mirror of
https://github.com/docker/compose.git
synced 2026-08-28 12:23:49 +00:00
allow to collect logs for a subset of project services
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
ba47b3d9d2
commit
056dfb95bc
8 changed files with 60 additions and 12 deletions
|
|
@ -56,7 +56,7 @@ func (c *composeService) Down(context.Context, string) error {
|
|||
return errdefs.ErrNotImplemented
|
||||
}
|
||||
|
||||
func (c *composeService) Logs(context.Context, string, compose.LogConsumer) error {
|
||||
func (c *composeService) Logs(context.Context, string, compose.LogConsumer, compose.LogOptions) error {
|
||||
return errdefs.ErrNotImplemented
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ type Service interface {
|
|||
// Down executes the equivalent to a `compose down`
|
||||
Down(ctx context.Context, projectName string) error
|
||||
// Logs executes the equivalent to a `compose logs`
|
||||
Logs(ctx context.Context, projectName string, consumer LogConsumer) error
|
||||
Logs(ctx context.Context, projectName string, consumer LogConsumer, options LogOptions) error
|
||||
// Ps executes the equivalent to a `compose ps`
|
||||
Ps(ctx context.Context, projectName string) ([]ContainerSummary, error)
|
||||
// List executes the equivalent to a `docker stack ls`
|
||||
|
|
@ -76,6 +76,11 @@ type ServiceStatus struct {
|
|||
Publishers []PortPublisher
|
||||
}
|
||||
|
||||
// LogOptions defines optional parameters for the `Log` API
|
||||
type LogOptions struct {
|
||||
Services []string
|
||||
}
|
||||
|
||||
const (
|
||||
// STARTING indicates that stack is being deployed
|
||||
STARTING string = "Starting"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue