mirror of
https://github.com/psviderski/uncloud.git
synced 2026-10-09 06:35:03 +00:00
add ListServices method and ls CLI command
This commit is contained in:
1 parent
3ce9c8be04
commit
1fb8a3d7a0
8 files changed
+150
-13
No files matched your search
@@ -68,11 +68,11 @@ func runRun(ctx context.Context, uncli *cli.CLI, opts runOptions) error {
|
||||
return fmt.Errorf("invalid replication mode: %q", opts.mode)
|
||||
}
|
||||
|
||||
c, err := uncli.ConnectCluster(ctx, opts.cluster)
|
||||
client, err := uncli.ConnectCluster(ctx, opts.cluster)
|
||||
if err != nil {
|
||||
return fmt.Errorf("connect to cluster: %w", err)
|
||||
}
|
||||
defer c.Close()
|
||||
defer client.Close()
|
||||
|
||||
spec := api.ServiceSpec{
|
||||
Container: api.ContainerSpec{
|
||||
@@ -82,7 +82,7 @@ func runRun(ctx context.Context, uncli *cli.CLI, opts runOptions) error {
|
||||
Mode: opts.mode,
|
||||
Name: opts.name,
|
||||
}
|
||||
resp, err := c.RunService(ctx, spec)
|
||||
resp, err := client.RunService(ctx, spec)
|
||||
if err != nil {
|
||||
return fmt.Errorf("run service: %w", err)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user