refactor(client): make ProxySingleMachineContext and ProxyMachinesContext package functions as well

This commit is contained in:
Pasha Sviderski
2026-08-28 20:37:50 +10:00
parent 43bf2baaf7
commit 00d68d9465
8 changed files with 114 additions and 16 deletions
+1 -1
View File
@@ -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 {