mirror of
https://github.com/psviderski/uncloud.git
synced 2026-10-06 13:18:58 +00:00
refactor(client): make ProxySingleMachineContext and ProxyMachinesContext package functions as well
This commit is contained in:
1 parent
43bf2baaf7
commit
00d68d9465
8 files changed
+114
-16
No files matched your search
@@ -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