Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DockerClient ¶
func NewDockerClient ¶
func NewDockerClient(httpAddr string, version string) (*DockerClient, error)
func (*DockerClient) RemoveByLabel ¶
func (dockerClient *DockerClient) RemoveByLabel(labelName, labelValue string)
func (*DockerClient) String ¶
func (dockerClient *DockerClient) String() string
type DockerClientConfig ¶
type DockerContainerConfig ¶
type DockerContainerConfig struct { NetWork string `json:"network"` ProcessAddrMap string `json:"processAddrMap"` ProcessPort int `json:"processPort"` ListenAddrMap string `json:"listenAddrMap"` Volume string `json:"volume"` Image string `json:"image"` Cmd string `json:"cmd"` MountPoint string `json:"mountPoint"` LabelName string `json:"labelName"` LabelValue string `json:"labelValue"` }
type DockerExecutor ¶
type DockerExecutor struct {
// contains filtered or unexported fields
}
func NewDockerExecutor ¶
func NewDockerExecutor(submitID int, containerName string, resource Resource, client *DockerClient, config DockerContainerConfig) *DockerExecutor
func (*DockerExecutor) CreateAndStart ¶
func (executor *DockerExecutor) CreateAndStart() error
func (*DockerExecutor) Destroy ¶
func (executor *DockerExecutor) Destroy() error
type DockerExecutorError ¶
type DockerExecutorError struct {
// contains filtered or unexported fields
}
func (*DockerExecutorError) Error ¶
func (executorError *DockerExecutorError) Error() string
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
func NewExecutor ¶
func NewExecutor(executorChannel chan submitwrap.SubmitTaskWrap, dispatchChannel chan<- submitwrap.SubmitTaskWrap, config ExecutorConfig) *Executor
type ExecutorConfig ¶
type ExecutorConfig struct { Workers int `json:"workers"` RecliamFrequence int `json:"recliamFrequence"` ChannelSize int `json:"channelSize"` ContainerConfig DockerContainerConfig `json:"containerConfig"` ClientConfig DockerClientConfig `json:"clientConfig"` }
type Resource ¶
type Resource struct { Memory int64 // contains filtered or unexported fields }
func (*Resource) SetMemoryByByte ¶
func (*Resource) SetMemoryByGB ¶
func (*Resource) SetMemoryByKB ¶
func (*Resource) SetMemoryByMb ¶
Click to show internal directories.
Click to hide internal directories.