mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-28 12:03:33 +00:00
chore: update api.MachineClient interface
This commit is contained in:
@@ -42,6 +42,8 @@ type ImageClient interface {
|
|||||||
type MachineClient interface {
|
type MachineClient interface {
|
||||||
InspectMachine(ctx context.Context, id string) (*pb.MachineMember, error)
|
InspectMachine(ctx context.Context, id string) (*pb.MachineMember, error)
|
||||||
ListMachines(ctx context.Context, filter *MachineFilter) (MachineMembersList, 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 {
|
type ServiceClient interface {
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ type Client struct {
|
|||||||
connector Connector
|
connector Connector
|
||||||
conn *grpc.ClientConn
|
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.MachineClient
|
||||||
pb.ClusterClient
|
pb.ClusterClient
|
||||||
// Docker is a namespaced client for the Docker service to distinguish Uncloud-specific service container operations
|
// Docker is a namespaced client for the Docker service to distinguish Uncloud-specific service container operations
|
||||||
|
|||||||
Reference in New Issue
Block a user