containerexecutor

package
v0.0.0-...-707febc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2020 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Overview

Package containerexecutor provides functions to execute service application in container enviroment

Index

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) ImagePull

func (ce CEDocker) ImagePull(image string) (err error)

ImagePull is to pull container images

func (CEDocker) Logs

func (ce CEDocker) Logs(id string) (io.ReadCloser, error)

Logs is to logs container

func (CEDocker) Remove

func (ce CEDocker) Remove(id string) (err error)

Remove is to remove container

func (CEDocker) Start

func (ce CEDocker) Start(id string) (err error)

Start is to start 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 excution 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

Execute executes container service application

func (*ContainerExecutor) SetCEImpl

func (c *ContainerExecutor) SetCEImpl(ce CEImpl)

SetCEImpl sets executor implementation

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL