From b24b55c4c700b8a618a1996a00e187936fdc9003 Mon Sep 17 00:00:00 2001 From: Pasha Sviderski Date: Thu, 24 Jul 2025 14:25:09 +1000 Subject: [PATCH] chore: update api.MachineClient interface --- pkg/api/client.go | 2 ++ pkg/client/client.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/pkg/api/client.go b/pkg/api/client.go index 757dce79..47791905 100644 --- a/pkg/api/client.go +++ b/pkg/api/client.go @@ -42,6 +42,8 @@ type ImageClient interface { type MachineClient interface { InspectMachine(ctx context.Context, id string) (*pb.MachineMember, error) ListMachines(ctx context.Context, filter *MachineFilter) (MachineMembersList, error) + UpdateMachine(ctx context.Context, req *pb.UpdateMachineRequest) (*pb.MachineInfo, error) + RenameMachine(ctx context.Context, nameOrID, newName string) (*pb.MachineInfo, error) } type ServiceClient interface { diff --git a/pkg/client/client.go b/pkg/client/client.go index d712d17a..ca805bae 100644 --- a/pkg/client/client.go +++ b/pkg/client/client.go @@ -19,6 +19,8 @@ type Client struct { connector Connector conn *grpc.ClientConn + // TODO: refactor to not embed MachineClient and instead expose only required methods. + // Methods such as Reset or Inspect are ambiguous in the context of a machine+cluster client. pb.MachineClient pb.ClusterClient // Docker is a namespaced client for the Docker service to distinguish Uncloud-specific service container operations