Documentation
¶
Index ¶
- type ContainerSetup
- type ContainerWaiter
- type ImageSetup
- type ImageWaiter
- type Setup
- func (s *Setup) CheckHasContainer(name string) bool
- func (s *Setup) ExecCmdContainer(ctx context.Context, containerID string, userID string, stdIn io.Reader, ...) error
- func (s *Setup) Execute(ctx context.Context) error
- func (s *Setup) WaitForContainer(ctx context.Context, name string, logOut io.Writer) (string, error)
- func (s *Setup) WaitForImage(ctx context.Context, ref string, logOut io.Writer) error
- type SetupJob
- type UserSetup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerSetup ¶
type ContainerSetup struct {
// contains filtered or unexported fields
}
ContainerSetup creates one configured Docker container.
func NewContainerSetup ¶
func NewContainerSetup( le *logrus.Entry, conf *config.ConfigContainer, waiter ImageWaiter, ) *ContainerSetup
NewContainerSetup constructs a container setup operation.
func (*ContainerSetup) Execute ¶
func (c *ContainerSetup) Execute(ctx context.Context) (executeError error)
Execute creates or finds the container and publishes completion to waiters.
func (*ContainerSetup) WaitWithID ¶ added in v1.15.0
WaitWithID waits for container setup and returns the container ID.
type ContainerWaiter ¶
type ContainerWaiter interface {
CheckHasContainer(string) bool
WaitForContainer(context.Context, string, io.Writer) (string, error)
ExecCmdContainer(
context.Context,
string,
string,
io.Reader,
io.Writer,
io.Writer,
string,
...string,
) error
}
ContainerWaiter waits for container setup and executes container commands.
type ImageSetup ¶
type ImageSetup struct {
// contains filtered or unexported fields
}
ImageSetup pulls or builds one configured image.
func NewImageSetup ¶
func NewImageSetup(le *logrus.Entry, conf *config.ConfigImage, workDir string) *ImageSetup
NewImageSetup constructs an image setup operation.
type ImageWaiter ¶
ImageWaiter waits for an image setup to complete.
type Setup ¶
type Setup struct {
// contains filtered or unexported fields
}
Setup coordinates image, container, and host-user setup.
func (*Setup) CheckHasContainer ¶
CheckHasContainer reports whether a container is configured.
func (*Setup) ExecCmdContainer ¶ added in v1.7.1
func (s *Setup) ExecCmdContainer( ctx context.Context, containerID string, userID string, stdIn io.Reader, stdOut io.Writer, stdErr io.Writer, cmd string, args ...string, ) error
ExecCmdContainer executes a command in a configured Docker container.
type UserSetup ¶
type UserSetup struct {
// contains filtered or unexported fields
}
UserSetup configures one host user to execute commands in a container.
func NewUserSetup ¶
func NewUserSetup( le *logrus.Entry, conf *config.ConfigUser, waiter ContainerWaiter, createUsers bool, ) *UserSetup
NewUserSetup constructs a host-user setup operation.