Documentation
¶
Overview ¶
Package commonexecutors contains the definitions of the commonly used executors.
Index ¶
- Constants
- type ContainerExecutor
- func (ex *ContainerExecutor) CloseLogs() error
- func (ex *ContainerExecutor) ExecuteCommand(ctx context.Context, cmdInterface interfaces.CommandInterface) error
- func (ex *ContainerExecutor) ReadLogs(ctx context.Context) error
- func (ex *ContainerExecutor) Start(ctx context.Context, contReq *api.ContainerRequest, template *api.Template, ...) (interfaces.ContainerInterface, *labapi.IpEndpoint, error)
- type CtrExecutor
- func (ex *CtrExecutor) ExecuteCommand(ctx context.Context, cmdInterface interfaces.CommandInterface) error
- func (ex *CtrExecutor) GcloudAuth(ctx context.Context, dockerKeyFileLocation string, useDockerKeyDirectly bool) error
- func (ex *CtrExecutor) StartAsync(ctx context.Context) error
- func (ex *CtrExecutor) Stop(ctx context.Context) error
Constants ¶
View Source
const ( CtrExecutorType interfaces.ExecutorType = "CtrExecutor" ContainerExecutorType interfaces.ExecutorType = "ContainerExecutor" // For testing purpose only NoExecutorType interfaces.ExecutorType = "NoExecutor" )
All supported common executor types.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerExecutor ¶
type ContainerExecutor struct { *interfaces.AbstractExecutor Ctr *crostoolrunner.CrosToolRunner WaitGroups []*sync.WaitGroup LogChannels []chan<- bool ContainerChannel chan struct { interfaces.ContainerInterface // contains filtered or unexported fields } // KnownNetworks maps the network name to its ID. KnownNetworks map[string]string // contains filtered or unexported fields }
ContainerExecutor represents executor for all container related commands.
func NewContainerExecutor ¶
func NewContainerExecutor(ctr *crostoolrunner.CrosToolRunner) *ContainerExecutor
func (*ContainerExecutor) CloseLogs ¶
func (ex *ContainerExecutor) CloseLogs() error
CloseLogs signals to the streaming logs through their channels that they can close.
func (*ContainerExecutor) ExecuteCommand ¶
func (ex *ContainerExecutor) ExecuteCommand(ctx context.Context, cmdInterface interfaces.CommandInterface) error
func (*ContainerExecutor) ReadLogs ¶
func (ex *ContainerExecutor) ReadLogs(ctx context.Context) error
func (*ContainerExecutor) Start ¶
func (ex *ContainerExecutor) Start( ctx context.Context, contReq *api.ContainerRequest, template *api.Template, containerImage string, bbID int64) (interfaces.ContainerInterface, *labapi.IpEndpoint, error)
Start starts the container.
type CtrExecutor ¶
type CtrExecutor struct { *interfaces.AbstractExecutor Ctr *crostoolrunner.CrosToolRunner CrosProvisionServiceClient testapi.GenericProvisionServiceClient }
CtrExecutor represents executor for all crostoolrunner (ctr) related commands.
func NewCtrExecutor ¶
func NewCtrExecutor(ctr *crostoolrunner.CrosToolRunner) *CtrExecutor
func (*CtrExecutor) ExecuteCommand ¶
func (ex *CtrExecutor) ExecuteCommand(ctx context.Context, cmdInterface interfaces.CommandInterface) error
func (*CtrExecutor) GcloudAuth ¶
func (ex *CtrExecutor) GcloudAuth(ctx context.Context, dockerKeyFileLocation string, useDockerKeyDirectly bool) error
GcloudAuth does the gcloud auth through ctr.
func (*CtrExecutor) StartAsync ¶
func (ex *CtrExecutor) StartAsync(ctx context.Context) error
StartAsync starts the ctr server asynchronously.
Click to show internal directories.
Click to hide internal directories.