浏览代码

update param name and add comments for logs and ps methods

Signed-off-by: aiordache <[email protected]>
aiordache 5 年之前
父节点
当前提交
e097d19d7c
共有 2 个文件被更改,包括 5 次插入2 次删除
  1. 4 2
      compose/api.go
  2. 1 0
      example/backend.go

+ 4 - 2
compose/api.go

@@ -29,6 +29,8 @@ type Service interface {
 	Up(ctx context.Context, opts cli.ProjectOptions) error
 	// Down executes the equivalent to a `compose down`
 	Down(ctx context.Context, opts cli.ProjectOptions) error
-	Logs(ctx context.Context, projectName cli.ProjectOptions) error
-	Ps(background context.Context, options cli.ProjectOptions) ([]types.ServiceStatus, error)
+	// Logs executes the equivalent to a `compose logs`
+	Logs(ctx context.Context, opts cli.ProjectOptions) error
+	// Ps executes the equivalent to a `compose ps`
+	Ps(ctx context.Context, opts cli.ProjectOptions) ([]types.ServiceStatus, error)
 }

+ 1 - 0
example/backend.go

@@ -131,6 +131,7 @@ func (cs *composeService) Down(ctx context.Context, opts cli.ProjectOptions) err
 	fmt.Printf("Down command on project %q", prj.Name)
 	return nil
 }
+
 func (cs *composeService) Ps(ctx context.Context, opts cli.ProjectOptions) ([]ecstypes.ServiceStatus, error) {
 	return nil, errdefs.ErrNotImplemented
 }