Documentation
¶
Index ¶
Constants ¶
View Source
const ( // STARTING indicates that stack is being deployed STARTING string = "Starting" // RUNNING indicates that stack is deployed and services are running RUNNING string = "Running" // UPDATING indicates that some stack resources are being recreated UPDATING string = "Updating" // REMOVING indicates that stack is being deleted REMOVING string = "Removing" // UNKNOWN indicates unknown stack state UNKNOWN string = "Unknown" // FAILED indicates that stack deployment failed FAILED string = "Failed" )
View Source
const ( // ProjectTag allow to track resource related to a compose project ProjectTag = "com.docker.compose.project" // NetworkTag allow to track resource related to a compose network NetworkTag = "com.docker.compose.network" // ServiceTag allow to track resource related to a compose service ServiceTag = "com.docker.compose.service" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PortPublisher ¶
PortPublisher hold status about published port
type Service ¶
type Service interface {
// Up executes the equivalent to a `compose up`
Up(ctx context.Context, project *types.Project, detach bool) error
// 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, w io.Writer) error
// Ps executes the equivalent to a `compose ps`
Ps(ctx context.Context, projectName string) ([]ServiceStatus, error)
// List executes the equivalent to a `docker stack ls`
List(ctx context.Context, projectName string) ([]Stack, error)
// Convert translate compose model into backend's native format
Convert(ctx context.Context, project *types.Project) ([]byte, error)
}
Service manages a compose project
type ServiceStatus ¶
type ServiceStatus struct {
ID string
Name string
Replicas int
Desired int
Ports []string
Publishers []PortPublisher
}
ServiceStatus hold status about a service
Click to show internal directories.
Click to hide internal directories.