mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 11:03:34 +00:00
chore: correct comment and add TODO to move machine resolution to grpc-proxy router
This commit is contained in:
@@ -63,6 +63,7 @@ type VolumeClient interface {
|
|||||||
func ProxyMachinesContext(
|
func ProxyMachinesContext(
|
||||||
ctx context.Context, cli MachineClient, namesOrIDs []string,
|
ctx context.Context, cli MachineClient, namesOrIDs []string,
|
||||||
) (context.Context, MachineMembersList, error) {
|
) (context.Context, MachineMembersList, error) {
|
||||||
|
// TODO: move the machine IP resolution to the proxy router to allow setting machine names and IDs in the metadata.
|
||||||
machines, err := cli.ListMachines(ctx, nil)
|
machines, err := cli.ListMachines(ctx, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil, fmt.Errorf("list machines: %w", err)
|
return nil, nil, fmt.Errorf("list machines: %w", err)
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ func (cli *Client) InspectService(ctx context.Context, nameOrID string) (api.Ser
|
|||||||
|
|
||||||
machineID := ""
|
machineID := ""
|
||||||
if mc.Metadata == nil {
|
if mc.Metadata == nil {
|
||||||
// ListContainers was proxied to only one machine.
|
// ListServiceContainers was proxied to only one machine.
|
||||||
for _, v := range machineIDByManagementIP {
|
for _, v := range machineIDByManagementIP {
|
||||||
machineID = v
|
machineID = v
|
||||||
break
|
break
|
||||||
|
|||||||
Reference in New Issue
Block a user