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
+2 -2
View File
@@ -102,7 +102,7 @@ func (cli *Client) ServiceLogs(
func (cli *Client) ContainerLogs(
ctx context.Context, machineNameOrID string, containerID string, opts api.ServiceLogsOptions,
) (<-chan api.LogEntry, error) {
proxyCtx := cli.ProxySingleMachineContext(ctx, machineNameOrID)
proxyCtx := ProxySingleMachineContext(ctx, machineNameOrID)
req := &pb.LogsRequest{
Id: containerID,
@@ -198,7 +198,7 @@ func (cli *Client) MachineLogs(
func (cli *Client) systemServiceLogs(
ctx context.Context, machineID, service string, opts api.ServiceLogsOptions,
) (<-chan api.LogEntry, error) {
proxyCtx := cli.ProxySingleMachineContext(ctx, machineID)
proxyCtx := ProxySingleMachineContext(ctx, machineID)
req := &pb.LogsRequest{
Id: service,