docker

package
v0.0.0-...-d39b1a8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL