add ListServices method and ls CLI command

This commit is contained in:
Pavel Sviderski committed 2024-12-05 17:21:54 +10:00
1 parent 3ce9c8be04
commit 1fb8a3d7a0
8 files changed
+150 -13

No files matched your search

+3 -3
View File
@@ -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)
}