compose

package
v0.1.20 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2020 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

type PortPublisher struct {
	URL           string
	TargetPort    int
	PublishedPort int
	Protocol      string
}

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) 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

type Stack

type Stack struct {
	ID     string
	Name   string
	Status string
	Reason string
}

Stack holds the name and state of a compose application/stack

Jump to

Keyboard shortcuts

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