Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComposeClient ¶
type ComposeClient interface {
Listen(ctx context.Context, eventChan chan<- ComposeEvent) error
}
func NewComposeClient ¶
func NewComposeClient(actionFilters []events.Action) ComposeClient
NewComposeClient creates a new ComposeClient with optional action filters.
If actionFilters is empty, all compose-events are listened to.
type ComposeEvent ¶
type ComposeEvent struct {
ID string `json:"id"` //The actor id
Action events.Action `json:"action"` // action type, e.g., "start", "stop", "create", etc.
Project string `json:"project"` // project name
WorkingDir string `json:"working_dir"` // absolute path of the project working directory
Image string `json:"image"` // image name
Name string `json:"name"` // container name
Service string `json:"service"` // service name
Container string `json:"container"` // container number as string
Time int64 `json:"time"` // event timestamp as unix time
}
ComposeEvent represents a Docker Compose related-event with relevant details.
It transforms from a event.Message from Docker SDK to a more convenient structure for Compose events with toComposeEvent function.
Click to show internal directories.
Click to hide internal directories.