Documentation
¶
Overview ¶
Package config contains everything necessary to build a config that can be later used to build a docker container from it.
Index ¶
- type Builder
- func (b *Builder) Build() *Config
- func (b *Builder) CPUCount(CPUCount int) *Builder
- func (b *Builder) Cmd(cmd ...string) *Builder
- func (b *Builder) DiskSpace(diskSpace int) *Builder
- func (b *Builder) Image(image string) *Builder
- func (b *Builder) MemoryLimit(memoryLimit int) *Builder
- func (b *Builder) Mount(volume *types.Volume, containerPath string) *Builder
- func (b *Builder) TimeLimit(timeLimit time.Duration) *Builder
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
Config *Config
}
func NewConfigBuilder ¶
func NewConfigBuilder() *Builder
NewConfigBuilder return new builder that can be used to build config for a container
func (*Builder) CPUCount ¶
CPUCount sets max amount of CPU cycles for the container. Be aware that it might collide with TimeLimit since 1 CPU cycle is approximately 1 second.
func (*Builder) DiskSpace ¶
DiskSpace sets max disk space allocated for the container (in megabytes) TODO: This might not work. Not yet tested
func (*Builder) MemoryLimit ¶
MemoryLimit sets max amount of memory allocated to the container (in megabytes)
Click to show internal directories.
Click to hide internal directories.