Versions in this module Expand all Collapse all v0 v0.4.0 Jan 10, 2017 Changes in this version + const AnyState + const ComposeVersion + const RelTypeDependsOn + const RelTypeIpcNamespace + const RelTypeLink + const RelTypeNetNamespace + const RelTypeNetworkMode + const RelTypeVolumesFrom + const Running + const Stopped + var ErrRestart = errors.New("Restart execution") + var ErrUnsupported = errors.New("UnsupportedOperation") + var StateExecuted = ServiceState("executed") + var StateUnknown = ServiceState("unknown") + func IsNamedVolume(volume string) bool + func NameAlias(name string) (string, string) + func NewDefaultListener(p *Project) chan<- events.Event + type APIProject interface + AddConfig func(name string, config *config.ServiceConfig) error + Build func(ctx context.Context, options options.Build, sevice ...string) error + Config func() (string, error) + Containers func(ctx context.Context, filter Filter, services ...string) ([]string, error) + Create func(ctx context.Context, options options.Create, services ...string) error + CreateService func(name string) (Service, error) + Delete func(ctx context.Context, options options.Delete, services ...string) error + Down func(ctx context.Context, options options.Down, services ...string) error + Events func(ctx context.Context, services ...string) (chan events.ContainerEvent, error) + GetServiceConfig func(service string) (*config.ServiceConfig, bool) + Kill func(ctx context.Context, signal string, services ...string) error + Load func(bytes []byte) error + Log func(ctx context.Context, follow bool, services ...string) error + Parse func() error + Pause func(ctx context.Context, services ...string) error + Port func(ctx context.Context, index int, protocol, serviceName, privatePort string) (string, error) + Ps func(ctx context.Context, services ...string) (InfoSet, error) + Pull func(ctx context.Context, services ...string) error + Restart func(ctx context.Context, timeout int, services ...string) error + Run func(ctx context.Context, serviceName string, commandParts []string, ...) (int, error) + Scale func(ctx context.Context, timeout int, servicesScale map[string]int) error + Start func(ctx context.Context, services ...string) error + Stop func(ctx context.Context, timeout int, services ...string) error + Unpause func(ctx context.Context, services ...string) error + Up func(ctx context.Context, options options.Up, services ...string) error + type Container interface + ID func() (string, error) + IsRunning func(ctx context.Context) (bool, error) + Name func() string + Port func(ctx context.Context, port string) (string, error) + type Context struct + ComposeBytes [][]byte + ComposeFiles []string + EnvironmentLookup config.EnvironmentLookup + IgnoreMissingConfig bool + LoggerFactory logger.Factory + NetworksFactory NetworksFactory + Project *Project + ProjectName string + ResourceLookup config.ResourceLookup + ServiceFactory ServiceFactory + VolumesFactory VolumesFactory + type EmptyNetworks struct + func (e *EmptyNetworks) Initialize(ctx context.Context) error + func (e *EmptyNetworks) Remove(ctx context.Context) error + type EmptyService struct + func (e *EmptyService) Build(ctx context.Context, buildOptions options.Build) error + func (e *EmptyService) Config() *config.ServiceConfig + func (e *EmptyService) Containers(ctx context.Context) ([]Container, error) + func (e *EmptyService) Create(ctx context.Context, options options.Create) error + func (e *EmptyService) Delete(ctx context.Context, options options.Delete) error + func (e *EmptyService) DependentServices() []ServiceRelationship + func (e *EmptyService) Events(ctx context.Context, events chan events.ContainerEvent) error + func (e *EmptyService) Info(ctx context.Context) (InfoSet, error) + func (e *EmptyService) Kill(ctx context.Context, signal string) error + func (e *EmptyService) Log(ctx context.Context, follow bool) error + func (e *EmptyService) Name() string + func (e *EmptyService) Pause(ctx context.Context) error + func (e *EmptyService) Pull(ctx context.Context) error + func (e *EmptyService) RemoveImage(ctx context.Context, imageType options.ImageType) error + func (e *EmptyService) Restart(ctx context.Context, timeout int) error + func (e *EmptyService) Run(ctx context.Context, commandParts []string, options options.Run) (int, error) + func (e *EmptyService) Scale(ctx context.Context, count int, timeout int) error + func (e *EmptyService) Start(ctx context.Context) error + func (e *EmptyService) Stop(ctx context.Context, timeout int) error + func (e *EmptyService) Unpause(ctx context.Context) error + func (e *EmptyService) Up(ctx context.Context, options options.Up) error + type ExportedConfig struct + Networks map[string]*config.NetworkConfig + Services map[string]*config.ServiceConfig + Version string + Volumes map[string]*config.VolumeConfig + type Filter struct + State State + type Info map[string]string + type InfoSet []Info + func (infos InfoSet) String(columns []string, titleFlag bool) string + type Networks interface + Initialize func(ctx context.Context) error + Remove func(ctx context.Context) error + type NetworksFactory interface + Create func(projectName string, networkConfigs map[string]*config.NetworkConfig, ...) (Networks, error) + type Project struct + Files []string + Name string + NetworkConfigs map[string]*config.NetworkConfig + ParseOptions *config.ParseOptions + ReloadCallback func() error + ServiceConfigs *config.ServiceConfigs + VolumeConfigs map[string]*config.VolumeConfig + func NewProject(context *Context, runtime RuntimeProject, parseOptions *config.ParseOptions) *Project + func (p *Project) AddConfig(name string, config *config.ServiceConfig) error + func (p *Project) AddListener(c chan<- events.Event) + func (p *Project) AddNetworkConfig(name string, config *config.NetworkConfig) error + func (p *Project) AddVolumeConfig(name string, config *config.VolumeConfig) error + func (p *Project) Build(ctx context.Context, buildOptions options.Build, services ...string) error + func (p *Project) Config() (string, error) + func (p *Project) Containers(ctx context.Context, filter Filter, services ...string) ([]string, error) + func (p *Project) Create(ctx context.Context, options options.Create, services ...string) error + func (p *Project) CreateService(name string) (Service, error) + func (p *Project) Delete(ctx context.Context, options options.Delete, services ...string) error + func (p *Project) Down(ctx context.Context, opts options.Down, services ...string) error + func (p *Project) Events(ctx context.Context, services ...string) (chan events.ContainerEvent, error) + func (p *Project) GetServiceConfig(name string) (*config.ServiceConfig, bool) + func (p *Project) Kill(ctx context.Context, signal string, services ...string) error + func (p *Project) Load(bytes []byte) error + func (p *Project) Log(ctx context.Context, follow bool, services ...string) error + func (p *Project) Notify(eventType events.EventType, serviceName string, data map[string]string) + func (p *Project) Parse() error + func (p *Project) Pause(ctx context.Context, services ...string) error + func (p *Project) Port(ctx context.Context, index int, protocol, serviceName, privatePort string) (string, error) + func (p *Project) Ps(ctx context.Context, services ...string) (InfoSet, error) + func (p *Project) Pull(ctx context.Context, services ...string) error + func (p *Project) Restart(ctx context.Context, timeout int, services ...string) error + func (p *Project) Run(ctx context.Context, serviceName string, commandParts []string, ...) (int, error) + func (p *Project) Scale(ctx context.Context, timeout int, servicesScale map[string]int) error + func (p *Project) Start(ctx context.Context, services ...string) error + func (p *Project) Stop(ctx context.Context, timeout int, services ...string) error + func (p *Project) Unpause(ctx context.Context, services ...string) error + func (p *Project) Up(ctx context.Context, options options.Up, services ...string) error + type RuntimeProject interface + RemoveOrphans func(ctx context.Context, projectName string, serviceConfigs *config.ServiceConfigs) error + type Service interface + Build func(ctx context.Context, buildOptions options.Build) error + Config func() *config.ServiceConfig + Containers func(ctx context.Context) ([]Container, error) + Create func(ctx context.Context, options options.Create) error + Delete func(ctx context.Context, options options.Delete) error + DependentServices func() []ServiceRelationship + Events func(ctx context.Context, messages chan events.ContainerEvent) error + Info func(ctx context.Context) (InfoSet, error) + Kill func(ctx context.Context, signal string) error + Log func(ctx context.Context, follow bool) error + Name func() string + Pause func(ctx context.Context) error + Pull func(ctx context.Context) error + RemoveImage func(ctx context.Context, imageType options.ImageType) error + Restart func(ctx context.Context, timeout int) error + Run func(ctx context.Context, commandParts []string, options options.Run) (int, error) + Scale func(ctx context.Context, count int, timeout int) error + Start func(ctx context.Context) error + Stop func(ctx context.Context, timeout int) error + Unpause func(ctx context.Context) error + Up func(ctx context.Context, options options.Up) error + type ServiceFactory interface + Create func(project *Project, name string, serviceConfig *config.ServiceConfig) (Service, error) + type ServiceRelationship struct + Alias string + Optional bool + Target string + Type ServiceRelationshipType + func DefaultDependentServices(p *Project, s Service) []ServiceRelationship + func NewServiceRelationship(nameAlias string, relType ServiceRelationshipType) ServiceRelationship + type ServiceRelationshipType string + type ServiceState string + type State string + type Volumes interface + Initialize func(ctx context.Context) error + Remove func(ctx context.Context) error + type VolumesFactory interface + Create func(projectName string, volumeConfigs map[string]*config.VolumeConfig, ...) (Volumes, error)