From 809fd91a26fb820b7523679aee1520dcee7f1c8e Mon Sep 17 00:00:00 2001 From: Mohammad Alhussan Date: Mon, 2 Nov 2026 14:11:26 +0100 Subject: [PATCH 1/2] feat(client): list building block runners --- client/building_block_runner.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/client/building_block_runner.go b/client/building_block_runner.go index 421c5be..4164c88 100644 --- a/client/building_block_runner.go +++ b/client/building_block_runner.go @@ -5,6 +5,7 @@ import ( "errors" "github.com/meshcloud/meshstack-cli/client/internal" + "github.com/meshcloud/meshstack-cli/internal/http" ) type MeshBuildingBlockRunnerImplementationType string @@ -71,10 +72,16 @@ type MeshRunnerWifProviderConfig struct { type MeshBuildingBlockRunnerClient interface { Create(ctx context.Context, runner MeshBuildingBlockRunner) (*MeshBuildingBlockRunner, error) Read(ctx context.Context, uuid string) (*MeshBuildingBlockRunner, error) + List(ctx context.Context, filter MeshBuildingBlockRunnerFilter) ([]MeshBuildingBlockRunner, error) Update(ctx context.Context, runner MeshBuildingBlockRunner) (*MeshBuildingBlockRunner, error) Delete(ctx context.Context, uuid string) error } +// MeshBuildingBlockRunnerFilter narrows a list that always holds the caller's own runners and every shared one. +type MeshBuildingBlockRunnerFilter struct { + WorkspaceIdentifier *string `json:"workspaceIdentifier"` +} + type meshBuildingBlockRunnerClient struct { meshObject internal.MeshObjectClient[MeshBuildingBlockRunner] } @@ -91,6 +98,10 @@ func (c meshBuildingBlockRunnerClient) Read(ctx context.Context, uuid string) (* return c.meshObject.Get(ctx, uuid) } +func (c meshBuildingBlockRunnerClient) List(ctx context.Context, filter MeshBuildingBlockRunnerFilter) ([]MeshBuildingBlockRunner, error) { + return c.meshObject.List(ctx, http.WithUrlQuery(filter)) +} + func (c meshBuildingBlockRunnerClient) Update(ctx context.Context, runner MeshBuildingBlockRunner) (*MeshBuildingBlockRunner, error) { if runner.Metadata.Uuid == nil || *runner.Metadata.Uuid == "" { return nil, errors.New("missing metadata.uuid") From aefe2c395311c4b98bec20a72234ea70c65e2bb1 Mon Sep 17 00:00:00 2001 From: Mohammad Alhussan Date: Mon, 2 Nov 2026 14:27:32 +0100 Subject: [PATCH 2/2] refactor(client): drop the runner filter comment --- client/building_block_runner.go | 1 - 1 file changed, 1 deletion(-) diff --git a/client/building_block_runner.go b/client/building_block_runner.go index 4164c88..f7a9c5b 100644 --- a/client/building_block_runner.go +++ b/client/building_block_runner.go @@ -77,7 +77,6 @@ type MeshBuildingBlockRunnerClient interface { Delete(ctx context.Context, uuid string) error } -// MeshBuildingBlockRunnerFilter narrows a list that always holds the caller's own runners and every shared one. type MeshBuildingBlockRunnerFilter struct { WorkspaceIdentifier *string `json:"workspaceIdentifier"` }