Versions in this module Expand all Collapse all v0 v0.4.3 Apr 29, 2022 v0.4.0 Jan 10, 2017 Changes in this version + const ComposeVersion type APIProject + Config func() (string, error) + GetServiceConfig func(service string) (*config.ServiceConfig, bool) + type ExportedConfig struct + Networks map[string]*config.NetworkConfig + Services map[string]*config.ServiceConfig + Version string + Volumes map[string]*config.VolumeConfig type Project + func (p *Project) Config() (string, error) + func (p *Project) GetServiceConfig(name string) (*config.ServiceConfig, bool) v0.3.0 Aug 9, 2016 Changes in this version + const AnyState + const RelTypeDependsOn + const RelTypeNetworkMode + const Running + const Stopped + func IsNamedVolume(volume string) bool + type APIProject interface + AddConfig func(name string, config *config.ServiceConfig) error + Build func(ctx context.Context, options options.Build, sevice ...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) + 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, onlyID bool, 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 Context + NetworksFactory NetworksFactory + VolumesFactory VolumesFactory + type EmptyNetworks struct + func (e *EmptyNetworks) Initialize(ctx context.Context) error + func (e *EmptyNetworks) Remove(ctx context.Context) error type EmptyService + func (e *EmptyService) Config() *config.ServiceConfig + func (e *EmptyService) DependentServices() []ServiceRelationship + func (e *EmptyService) Events(ctx context.Context, events chan events.ContainerEvent) error + func (e *EmptyService) Name() string + func (e *EmptyService) RemoveImage(ctx context.Context, imageType options.ImageType) error + func (e *EmptyService) Run(ctx context.Context, commandParts []string, options options.Run) (int, error) + type Filter struct + State State + 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 + NetworkConfigs map[string]*config.NetworkConfig + ParseOptions *config.ParseOptions + ServiceConfigs *config.ServiceConfigs + VolumeConfigs map[string]*config.VolumeConfig + func (p *Project) AddNetworkConfig(name string, config *config.NetworkConfig) error + func (p *Project) AddVolumeConfig(name string, config *config.VolumeConfig) error + func (p *Project) Containers(ctx context.Context, filter Filter, services ...string) ([]string, error) + func (p *Project) Events(ctx context.Context, services ...string) (chan events.ContainerEvent, error) + func (p *Project) Port(ctx context.Context, index int, protocol, serviceName, privatePort string) (string, error) + func (p *Project) Ps(ctx context.Context, onlyID bool, services ...string) (InfoSet, error) + func (p *Project) RemoveOrphans(ctx context.Context) error + func (p *Project) Scale(ctx context.Context, timeout int, servicesScale map[string]int) error + type RuntimeProject interface + RemoveOrphans func(ctx context.Context, projectName string, serviceConfigs *config.ServiceConfigs) error type Service + Events func(ctx context.Context, messages chan events.ContainerEvent) error + RemoveImage func(ctx context.Context, imageType options.ImageType) error + 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) v0.2.0 Apr 14, 2016 Changes in this version + const EventProjectStopDone + const EventProjectStopStart + const EventServiceRun + const EventServiceRunStart + const EventServiceStop + const EventServiceStopStart type EmptyService + func (e *EmptyService) Stop() error type Project + func (p *Project) Run(serviceName string, commandParts []string) (int, error) + func (p *Project) Stop(services ...string) error type Service + Run func(commandParts []string) (int, error) + Stop func() error v0.1.0 Feb 2, 2016 Changes in this version + const EventContainerCreated + const EventContainerStarted + const EventProjectBuildDone + const EventProjectBuildStart + const EventProjectCreateDone + const EventProjectCreateStart + const EventProjectDeleteDone + const EventProjectDeleteStart + const EventProjectDownDone + const EventProjectDownStart + const EventProjectKillDone + const EventProjectKillStart + const EventProjectPauseDone + const EventProjectPauseStart + const EventProjectReload + const EventProjectReloadTrigger + const EventProjectRestartDone + const EventProjectRestartStart + const EventProjectStartDone + const EventProjectStartStart + const EventProjectUnpauseDone + const EventProjectUnpauseStart + const EventProjectUpDone + const EventProjectUpStart + const EventServiceAdd + const EventServiceBuild + const EventServiceBuildStart + const EventServiceCreate + const EventServiceCreateStart + const EventServiceDelete + const EventServiceDeleteStart + const EventServiceDown + const EventServiceDownStart + const EventServiceKill + const EventServiceKillStart + const EventServicePause + const EventServicePauseStart + const EventServicePull + const EventServicePullStart + const EventServiceRestart + const EventServiceRestartStart + const EventServiceStart + const EventServiceStartStart + const EventServiceUnpause + const EventServiceUnpauseStart + const EventServiceUp + const EventServiceUpIgnored + const EventServiceUpStart + const NoEvent + const RelTypeIpcNamespace + const RelTypeLink + const RelTypeNetNamespace + const RelTypeVolumesFrom + var ErrRestart = errors.New("Restart execution") + var ErrUnsupported = errors.New("UnsupportedOperation") + var StateExecuted = ServiceState("executed") + var StateUnknown = ServiceState("unknown") + var ValidRemotes = []string + func GetContainerFromIpcLikeConfig(p *Project, conf string) string + func GetServiceHash(name string, config *ServiceConfig) string + func NameAlias(name string) (string, string) + func NewDefaultListener(p *Project) chan<- Event + type Command struct + func NewCommand(parts ...string) Command + func (s *Command) Slice() []string + func (s *Command) ToString() string + func (s *Command) UnmarshalYAML(tag string, value interface{}) error + func (s Command) MarshalYAML() (tag string, value interface{}, err error) + type Container interface + ID func() (string, error) + IsRunning func() (bool, error) + Name func() string + Port func(port string) (string, error) + type Context struct + ComposeBytes [][]byte + ComposeFiles []string + EnvironmentLookup EnvironmentLookup + ForceRecreate bool + IgnoreMissingConfig bool + Log bool + LoggerFactory logger.Factory + NoBuild bool + NoCache bool + NoRecreate bool + Project *Project + ProjectName string + ResourceLookup ResourceLookup + ServiceFactory ServiceFactory + Signal int + Timeout uint + Volume bool + type EmptyService struct + func (e *EmptyService) Build() error + func (e *EmptyService) Containers() ([]Container, error) + func (e *EmptyService) Create() error + func (e *EmptyService) Delete() error + func (e *EmptyService) Down() error + func (e *EmptyService) Info(qFlag bool) (InfoSet, error) + func (e *EmptyService) Kill() error + func (e *EmptyService) Log() error + func (e *EmptyService) Pause() error + func (e *EmptyService) Pull() error + func (e *EmptyService) Restart() error + func (e *EmptyService) Scale(count int) error + func (e *EmptyService) Start() error + func (e *EmptyService) Unpause() error + func (e *EmptyService) Up() error + type EnvironmentLookup interface + Lookup func(key, serviceName string, config *ServiceConfig) []string + type Event struct + Data map[string]string + EventType EventType + ServiceName string + type EventType int + func (e EventType) String() string + type Info []InfoPart + type InfoPart struct + Key string + Value string + type InfoSet []Info + func (infos InfoSet) String(titleFlag bool) string + type MaporColonSlice struct + func NewMaporColonSlice(parts []string) MaporColonSlice + func (s *MaporColonSlice) Slice() []string + func (s *MaporColonSlice) UnmarshalYAML(tag string, value interface{}) error + func (s MaporColonSlice) MarshalYAML() (tag string, value interface{}, err error) + type MaporEqualSlice struct + func NewMaporEqualSlice(parts []string) MaporEqualSlice + func (s *MaporEqualSlice) Slice() []string + func (s *MaporEqualSlice) UnmarshalYAML(tag string, value interface{}) error + func (s MaporEqualSlice) MarshalYAML() (tag string, value interface{}, err error) + type MaporSpaceSlice struct + func NewMaporSpaceSlice(parts []string) MaporSpaceSlice + func (s *MaporSpaceSlice) Slice() []string + func (s *MaporSpaceSlice) UnmarshalYAML(tag string, value interface{}) error + func (s MaporSpaceSlice) MarshalYAML() (tag string, value interface{}, err error) + type Project struct + Configs map[string]*ServiceConfig + Files []string + Name string + ReloadCallback func() error + func NewProject(context *Context) *Project + func (p *Project) AddConfig(name string, config *ServiceConfig) error + func (p *Project) AddListener(c chan<- Event) + func (p *Project) Build(services ...string) error + func (p *Project) Create(services ...string) error + func (p *Project) CreateService(name string) (Service, error) + func (p *Project) Delete(services ...string) error + func (p *Project) Down(services ...string) error + func (p *Project) Kill(services ...string) error + func (p *Project) ListStoppedContainers(services ...string) ([]string, error) + func (p *Project) Load(bytes []byte) error + func (p *Project) Log(services ...string) error + func (p *Project) Notify(eventType EventType, serviceName string, data map[string]string) + func (p *Project) Parse() error + func (p *Project) Pause(services ...string) error + func (p *Project) Pull(services ...string) error + func (p *Project) Restart(services ...string) error + func (p *Project) Start(services ...string) error + func (p *Project) Unpause(services ...string) error + func (p *Project) Up(services ...string) error + type ResourceLookup interface + Lookup func(file, relativeTo string) ([]byte, string, error) + ResolvePath func(path, inFile string) string + type Service interface + Build func() error + Config func() *ServiceConfig + Containers func() ([]Container, error) + Create func() error + Delete func() error + DependentServices func() []ServiceRelationship + Down func() error + Info func(qFlag bool) (InfoSet, error) + Kill func() error + Log func() error + Name func() string + Pause func() error + Pull func() error + Restart func() error + Scale func(count int) error + Start func() error + Unpause func() error + Up func() error + type ServiceConfig struct + Build string + CPUQuota int64 + CPUSet string + CPUShares int64 + CapAdd []string + CapDrop []string + CgroupParent string + Command Command + ContainerName string + DNS Stringorslice + DNSSearch Stringorslice + Devices []string + Dockerfile string + DomainName string + Entrypoint Command + EnvFile Stringorslice + Environment MaporEqualSlice + Expose []string + ExternalLinks []string + ExtraHosts []string + Hostname string + Image string + Ipc string + Labels SliceorMap + Links MaporColonSlice + LogDriver string + LogOpt map[string]string + MacAddress string + MemLimit int64 + MemSwapLimit int64 + Name string + Net string + Pid string + Ports []string + Privileged bool + ReadOnly bool + Restart string + SecurityOpt []string + StdinOpen bool + Tty bool + Ulimits Ulimits + User string + Uts string + VolumeDriver string + Volumes []string + VolumesFrom []string + WorkingDir string + type ServiceFactory interface + Create func(project *Project, name string, serviceConfig *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 SliceorMap struct + func NewSliceorMap(parts map[string]string) SliceorMap + func (s *SliceorMap) MapParts() map[string]string + func (s *SliceorMap) UnmarshalYAML(tag string, value interface{}) error + func (s SliceorMap) MarshalYAML() (tag string, value interface{}, err error) + type Stringorslice struct + func NewStringorslice(parts ...string) Stringorslice + func (s *Stringorslice) Len() int + func (s *Stringorslice) Slice() []string + func (s *Stringorslice) UnmarshalYAML(tag string, value interface{}) error + func (s Stringorslice) MarshalYAML() (tag string, value interface{}, err error) + type Ulimit struct + Name string + func (u Ulimit) MarshalYAML() (tag string, value interface{}, err error) + type Ulimits struct + Elements []Ulimit + func (u *Ulimits) UnmarshalYAML(tag string, value interface{}) error + func (u Ulimits) MarshalYAML() (tag string, value interface{}, err error)