Documentation ¶
Overview ¶
Package containerexecutor provides functions to execute service application in container environment
Index ¶
- type CEDocker
- func (ce CEDocker) Create(conf *container.Config, hostConf *container.HostConfig, ...) (resp container.ContainerCreateCreatedBody, err error)
- func (ce CEDocker) ImagePull(image string) (err error)
- func (ce CEDocker) Logs(id string) (io.ReadCloser, error)
- func (ce CEDocker) Remove(id string) (err error)
- func (ce CEDocker) Start(id string) (err error)
- func (ce CEDocker) Wait(id string, condition container.WaitCondition) (statusCh <-chan container.ContainerWaitOKBody, errCh <-chan error)
- type CEImpl
- type ContainerExecutor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CEDocker ¶
type CEDocker struct {
// contains filtered or unexported fields
}
CEDocker structure
func (CEDocker) Create ¶
func (ce CEDocker) Create(conf *container.Config, hostConf *container.HostConfig, networkConf *network.NetworkingConfig) (resp container.ContainerCreateCreatedBody, err error)
Create is to create container
func (CEDocker) Logs ¶
func (ce CEDocker) Logs(id string) (io.ReadCloser, error)
Logs is to logs container
func (CEDocker) Wait ¶
func (ce CEDocker) Wait(id string, condition container.WaitCondition) (statusCh <-chan container.ContainerWaitOKBody, errCh <-chan error)
Wait is to wait container
type CEImpl ¶
type CEImpl interface { Create(conf *container.Config, hostConf *container.HostConfig, networkConf *network.NetworkingConfig) (container.ContainerCreateCreatedBody, error) Remove(id string) error Start(id string) error Wait(id string, condition container.WaitCondition) (<-chan container.ContainerWaitOKBody, <-chan error) Logs(id string) (io.ReadCloser, error) ImagePull(image string) error }
CEImpl is the interface implemented by container execution functions
type ContainerExecutor ¶
type ContainerExecutor struct { executor.ServiceExecutionInfo executor.HasClientNotification // contains filtered or unexported fields }
ContainerExecutor struct
func GetInstance ¶
func GetInstance() *ContainerExecutor
GetInstance returns the singletone ContainerExecutor instance
func (*ContainerExecutor) Execute ¶
func (c *ContainerExecutor) Execute(s executor.ServiceExecutionInfo) error
Execute executes container service application
func (*ContainerExecutor) SetCEImpl ¶
func (c *ContainerExecutor) SetCEImpl(ce CEImpl)
SetCEImpl sets executor implementation
Click to show internal directories.
Click to hide internal directories.