mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-28 20:13:33 +00:00
refactor(client): make ProxySingleMachineContext and ProxyMachinesContext package functions as well
This commit is contained in:
@@ -78,7 +78,7 @@ func (cli *Client) ListMachines(ctx context.Context, filter *api.MachineFilter)
|
||||
func (cli *Client) UpdateMachine(
|
||||
ctx context.Context, nameOrID string, req *pb.UpdateMachineRequest,
|
||||
) (*pb.MachineInfo, error) {
|
||||
ctx = cli.ProxySingleMachineContext(ctx, nameOrID)
|
||||
ctx = ProxySingleMachineContext(ctx, nameOrID)
|
||||
resp, err := cli.MachineClient.UpdateMachine(ctx, req)
|
||||
if err != nil {
|
||||
if s, ok := status.FromError(err); ok && s.Code() == codes.NotFound {
|
||||
|
||||
Reference in New Issue
Block a user