Documentation
¶
Index ¶
- Constants
- Variables
- func EnvVarsFromService(varMap types.MappingWithEquals, varFiles types.StringList) []string
- func ExposedPorts(expose types.StringOrNumberList, ports []types.ServicePortConfig) map[dockerapi.Port]struct{}
- func HasImage(dclient *dockerapi.Client, imageRef string) (bool, error)
- func MountsFromVolumeConfigs(baseComposeDir string, configs []types.ServiceVolumeConfig, ...) ([]dockerapi.HostMount, error)
- func VolumesFrom(serviceNames map[string]struct{}, volumesFrom []string) []string
- type ActiveNetwork
- type ActiveVolume
- type ConfigInfo
- type Execution
- func (ref *Execution) ActiveNetworkNames() map[string]string
- func (ref *Execution) ActiveServiceNetworks(svcName string) map[string]NetNameInfo
- func (ref *Execution) Cleanup() error
- func (ref *Execution) CleanupService(key string) error
- func (ref *Execution) CleanupServices() error
- func (ref *Execution) CreateNetworks() error
- func (ref *Execution) CreateVolumes() error
- func (ref *Execution) DeleteNetworks() error
- func (ref *Execution) DeleteVolumes() error
- func (ref *Execution) DiscoverResources() error
- func (ref *Execution) Prepare() error
- func (ref *Execution) PrepareService(ctx context.Context, name string) error
- func (ref *Execution) PrepareServices() error
- func (ref *Execution) ProjectName() string
- func (ref *Execution) ProjectWorkingDir() string
- func (ref *Execution) SelectedHaveImages() bool
- func (ref *Execution) Service(name string) *ServiceInfo
- func (ref *Execution) Start() error
- func (ref *Execution) StartService(name string) error
- func (ref *Execution) StartServices() error
- func (ref *Execution) Stop() error
- func (ref *Execution) StopService(key string) error
- func (ref *Execution) StopServices() error
- type ExecutionEvent
- type ExecutionEventInfo
- type ExecutionOptions
- type ExecutionState
- type ImageIdentity
- type LoaderOptionsFn
- type NetNameInfo
- type NetworkInfo
- type RunningService
- type ServiceError
- type ServiceInfo
- type ServiceSelectors
Constants ¶
View Source
const ( XSNone ExecutionState = "xs.none" XSCreated = "xs.created" XSStarted = "xs.started" XSStopping = "xs.stopping" XSStopped = "xs.stopped" XSRemoved = "xs.removed" XSExited = "xs.exited" XSExitedCrash = "xs.exited.crash" XSError = "xs.error" )
View Source
const ( XECreated ExecutionEvent = "xe.container.created" XEStarted = "xe.container.started" XEStopping = "xe.container.stopping" XEStopped = "xe.container.stopped" XERemoved = "xe.container.removed" XEExited = "xe.container.exited" XEExitedCrash = "xe.container.exited.crash" XEAPIError = "xe.api.error" XEInterrupt = "xe.interrupt" )
View Source
const ( ComposeVerUnknown = 0 ComposeVerOne = 1 ComposeVerTwo = 2 ComposeVerThree = 3 )
View Source
const ( ComposeVerOneStr = "1" ComposeVerTwoStr = "2" ComposeVerThreeStr = "3" )
Variables ¶
View Source
var ErrNoServiceImage = errors.New("no service image")
Functions ¶
func EnvVarsFromService ¶
func EnvVarsFromService(varMap types.MappingWithEquals, varFiles types.StringList) []string
func ExposedPorts ¶
func ExposedPorts(expose types.StringOrNumberList, ports []types.ServicePortConfig) map[dockerapi.Port]struct{}
func MountsFromVolumeConfigs ¶
func MountsFromVolumeConfigs( baseComposeDir string, configs []types.ServiceVolumeConfig, tmpfsConfigs []string, activeVolumes map[string]*ActiveVolume) ([]dockerapi.HostMount, error)
func VolumesFrom ¶
Types ¶
type ActiveNetwork ¶
type ActiveVolume ¶
type ConfigInfo ¶
type ConfigInfo struct { BaseComposeDir string Version uint FullVersion string Project *types.Project Raw map[string]interface{} RawList []map[string]interface{} }
func NewConfigInfo ¶
type Execution ¶
type Execution struct { *ConfigInfo State ExecutionState Selectors *ServiceSelectors BuildImages bool PullImages bool OwnAllResources bool AllServiceNames map[string]struct{} AllServices map[string]*ServiceInfo AllNetworks map[string]*NetworkInfo PendingServices map[string]struct{} RunningServices map[string]*RunningService ActiveVolumes map[string]*ActiveVolume ActiveNetworks map[string]*ActiveNetwork StopTimeout uint ContainerProbeSvc string // contains filtered or unexported fields }
func NewExecution ¶
func NewExecution( xc *app.ExecutionContext, logger *log.Entry, apiClient *dockerapi.Client, composeFiles []string, selectors *ServiceSelectors, projectName string, workingDir string, envVars []string, environmentNoHost bool, containerProbeComposeSvc string, buildImages bool, pullImages bool, pullExcludes []string, ownAllResources bool, options *ExecutionOptions, eventCh chan *ExecutionEventInfo, printState bool) (*Execution, error)
func (*Execution) ActiveNetworkNames ¶
func (*Execution) ActiveServiceNetworks ¶
func (ref *Execution) ActiveServiceNetworks(svcName string) map[string]NetNameInfo
func (*Execution) CleanupService ¶
func (*Execution) CleanupServices ¶
func (*Execution) CreateNetworks ¶
func (*Execution) CreateVolumes ¶
func (*Execution) DeleteNetworks ¶
func (*Execution) DeleteVolumes ¶
func (*Execution) DiscoverResources ¶
func (*Execution) PrepareService ¶
func (*Execution) PrepareServices ¶
func (*Execution) ProjectName ¶
func (*Execution) ProjectWorkingDir ¶
func (*Execution) SelectedHaveImages ¶
func (*Execution) Service ¶
func (ref *Execution) Service(name string) *ServiceInfo
func (*Execution) StartService ¶
func (*Execution) StartServices ¶
func (*Execution) StopService ¶
func (*Execution) StopServices ¶
type ExecutionEvent ¶
type ExecutionEvent string
type ExecutionEventInfo ¶
type ExecutionEventInfo struct { Event ExecutionEvent Data map[string]string }
type ExecutionOptions ¶
type ExecutionOptions struct {
SvcStartWait int
}
type ExecutionState ¶
type ExecutionState string
type ImageIdentity ¶
type ImageIdentity struct { ID string ShortTags []string RepoTags []string ShortDigests []string RepoDigests []string }
func ImageToIdentity ¶
func ImageToIdentity(info *dockerapi.Image) *ImageIdentity
type LoaderOptionsFn ¶
type NetNameInfo ¶
type NetworkInfo ¶
type NetworkInfo struct { Name string Config types.NetworkConfig }
type RunningService ¶
type ServiceError ¶
func (*ServiceError) Error ¶
func (e *ServiceError) Error() string
type ServiceInfo ¶
type ServiceSelectors ¶
type ServiceSelectors struct { Includes map[string]struct{} Excludes map[string]struct{} ServiceAllDeps string }
func NewServiceSelectors ¶
func NewServiceSelectors(serviceAllDeps string, includes []string, excludes []string) *ServiceSelectors
Click to show internal directories.
Click to hide internal directories.