mirror of
https://github.com/psviderski/uncloud.git
synced 2026-10-08 06:09:17 +00:00
strip one proto layer in ListMachines method
This commit is contained in:
1 parent
daada3bbe9
commit
77890b8a8a
6 files changed
+28
-17
No files matched your search
@@ -0,0 +1,15 @@
|
||||
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
|
||||
}
|
||||
Reference in new issue
Block a user