Documentation
¶
Index ¶
- type Container
- type DockerOrchestrator
- func (o *DockerOrchestrator) Run(ctx context.Context) error
- func (o *DockerOrchestrator) WithPosRunStep(steps ...RunStep) *DockerOrchestrator
- func (o *DockerOrchestrator) WithPreRunStep(steps ...RunStep) *DockerOrchestrator
- func (o *DockerOrchestrator) WithRunStep(steps ...RunStep) *DockerOrchestrator
- type GoBuild
- type Image
- type Network
- type RunStep
- func ContainerCreateStep(specs ...*Container) RunStep
- func ContainerLogStep(errLogSink io.Writer, specs ...*Container) RunStep
- func ContainerRemoveStep(specs ...*Container) RunStep
- func ContainerStartStep(specs ...*Container) RunStep
- func ContainerStopStep(specs ...*Container) RunStep
- func ContainerStreamStatStep(errLogSink io.Writer, specs ...*Container) RunStep
- func ContainerWaitStep(errLogSink io.Writer, specs ...*Container) RunStep
- func EnsureContainerSinkCloseStep(specs ...*Container) RunStep
- func EnsureImageStep(specs ...*Image) RunStep
- func EnsureNetworkStep(specs ...*Network) RunStep
- func GoBuildStep(specs ...*GoBuild) RunStep
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container struct {
Name string
Config container.Config
Network network.NetworkingConfig
LogSink io.WriteCloser
StatSink io.WriteCloser
// ID is usually used as a read-only field which
// is populated when a create step is executed.
ID string
}
type DockerOrchestrator ¶
type DockerOrchestrator struct {
// contains filtered or unexported fields
}
func NewDockerOrchestrator ¶
func NewDockerOrchestrator() (*DockerOrchestrator, error)
func (*DockerOrchestrator) WithPosRunStep ¶
func (o *DockerOrchestrator) WithPosRunStep(steps ...RunStep) *DockerOrchestrator
WithPosRunStep sets the post-run steps.
Failures during post-run steps halt the process.
func (*DockerOrchestrator) WithPreRunStep ¶
func (o *DockerOrchestrator) WithPreRunStep(steps ...RunStep) *DockerOrchestrator
WithPreRunStep sets the pre-run steps.
Failures during pre-run steps halt the process and do not execute any other phases of the orchestration.
func (*DockerOrchestrator) WithRunStep ¶
func (o *DockerOrchestrator) WithRunStep(steps ...RunStep) *DockerOrchestrator
WithPreRunStep sets the run steps.
Failures during run steps skips to the post-run part.
type GoBuild ¶
type GoBuild struct {
PkgPath, Dest string
BuildCtxSpecs []osutil.BuildCtxSpec
// ArtifactStore is used to store the context once the build is complete.
ArtifactStore io.Writer
}
type RunStep ¶
func ContainerCreateStep ¶
func ContainerLogStep ¶
ContainerLogStep returns a RunStep that copies the container logs to the provided log sinks concurrently in the background.
Only logs of Containers with a non-nil LogSink are copied.
func ContainerRemoveStep ¶
func ContainerStartStep ¶
func ContainerStopStep ¶
func ContainerStreamStatStep ¶
ContainerStreamStatStep returns a RunStep that copies the container stats to the provided metric sinks concurrently in the background.
Only stats of Containers with a non-nil StatSink are copied.