mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 11:03:34 +00:00
16 lines
343 B
Go
16 lines
343 B
Go
package client
|
|
|
|
import (
|
|
"context"
|
|
"google.golang.org/protobuf/types/known/emptypb"
|
|
"uncloud/internal/machine/api/pb"
|
|
)
|
|
|
|
func (cli *Client) ListMachines(ctx context.Context) ([]*pb.MachineMember, error) {
|
|
resp, err := cli.ClusterClient.ListMachines(ctx, &emptypb.Empty{})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return resp.Machines, nil
|
|
}
|