mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-27 11:33:33 +00:00
BREAKING CHANGE: resolve gRPC API proxy targets (machines) on server instead of client, needs upgrade to v0.20 (#247)
Co-authored-by: Pasha Sviderski <me@psviderski.name>
This commit is contained in:
co-authored by
Pasha Sviderski
parent
03ff4cd51d
commit
c95136eae6
+2
-8
@@ -102,10 +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, _, err := cli.ProxyMachinesContext(ctx, []string{machineNameOrID})
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("create request context to proxy to machine '%s': %w", machineNameOrID, err)
|
||||
}
|
||||
proxyCtx := cli.ProxySingleMachineContext(ctx, machineNameOrID)
|
||||
|
||||
req := &pb.LogsRequest{
|
||||
Id: containerID,
|
||||
@@ -201,10 +198,7 @@ func (cli *Client) MachineLogs(
|
||||
func (cli *Client) systemdServiceLogs(
|
||||
ctx context.Context, machineID, unit string, opts api.ServiceLogsOptions,
|
||||
) (<-chan api.LogEntry, error) {
|
||||
proxyCtx, _, err := cli.ProxyMachinesContext(ctx, []string{machineID})
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("create request context to proxy to machine '%s': %w", machineID, err)
|
||||
}
|
||||
proxyCtx := cli.ProxySingleMachineContext(ctx, machineID)
|
||||
|
||||
req := &pb.LogsRequest{
|
||||
Id: unit,
|
||||
|
||||
Reference in New Issue
Block a user