Documentation ¶
Index ¶
- type DurationConfig
- type NetworkConfig
- type OrderConfig
- type ResourcesConfig
- type SlotConfig
- type TaskConfig
- type YamlConfig
- func (yc *YamlConfig) GetCPUCount() uint64
- func (yc *YamlConfig) GetCPUType() string
- func (yc *YamlConfig) GetCommitOnStop() bool
- func (yc *YamlConfig) GetEntrypoint() string
- func (yc *YamlConfig) GetEnvVars() map[string]string
- func (yc *YamlConfig) GetGPURequirement() bool
- func (yc *YamlConfig) GetGPUType() string
- func (yc *YamlConfig) GetImageName() string
- func (yc *YamlConfig) GetMinersPreferred() []string
- func (yc *YamlConfig) GetRAMCount() uint64
- func (yc *YamlConfig) GetRegistryAuth() string
- func (yc *YamlConfig) GetRegistryName() string
- func (yc *YamlConfig) GetSSHKey() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DurationConfig ¶
type NetworkConfig ¶
type OrderConfig ¶
type ResourcesConfig ¶
type ResourcesConfig struct { Cpu uint64 `yaml:"cpu_cores" required:"true"` Ram string `yaml:"ram_bytes" required:"true"` Gpu string `yaml:"gpu_count" required:"true"` Storage string `yaml:"storage" required:"true"` Network NetworkConfig `yaml:"network" required:"true"` Properties map[string]float64 `yaml:"properties" required:"true"` }
type SlotConfig ¶
type SlotConfig struct { Duration string `yaml:"duration" required:"true"` Resources ResourcesConfig `yaml:"resources" required:"true"` }
type TaskConfig ¶
type TaskConfig interface { GetImageName() string GetEntrypoint() string GetSSHKey() string GetEnvVars() map[string]string GetCommitOnStop() bool GetRegistryName() string GetRegistryAuth() string GetMinersPreferred() []string GetCPUCount() uint64 GetRAMCount() uint64 GetCPUType() string GetGPURequirement() bool GetGPUType() string }
TaskConfig describe how to start task (docker image) on Miner
func LoadConfig ¶
func LoadConfig(path string) (TaskConfig, error)
type YamlConfig ¶
type YamlConfig struct { Task task `yaml:"task" required:"true"` // RamCount this field is temporary exportable because of bug in configor // https://github.com/jinzhu/configor/issues/23 // maybe it will be better to fork configor and fix this bug RamCount uint64 `yaml:"-"` }
func (*YamlConfig) GetCPUCount ¶
func (yc *YamlConfig) GetCPUCount() uint64
func (*YamlConfig) GetCPUType ¶
func (yc *YamlConfig) GetCPUType() string
func (*YamlConfig) GetCommitOnStop ¶
func (yc *YamlConfig) GetCommitOnStop() bool
func (*YamlConfig) GetEntrypoint ¶
func (yc *YamlConfig) GetEntrypoint() string
func (*YamlConfig) GetEnvVars ¶
func (yc *YamlConfig) GetEnvVars() map[string]string
func (*YamlConfig) GetGPURequirement ¶
func (yc *YamlConfig) GetGPURequirement() bool
func (*YamlConfig) GetGPUType ¶
func (yc *YamlConfig) GetGPUType() string
func (*YamlConfig) GetImageName ¶
func (yc *YamlConfig) GetImageName() string
func (*YamlConfig) GetMinersPreferred ¶
func (yc *YamlConfig) GetMinersPreferred() []string
func (*YamlConfig) GetRAMCount ¶
func (yc *YamlConfig) GetRAMCount() uint64
func (*YamlConfig) GetRegistryAuth ¶
func (yc *YamlConfig) GetRegistryAuth() string
func (*YamlConfig) GetRegistryName ¶
func (yc *YamlConfig) GetRegistryName() string
func (*YamlConfig) GetSSHKey ¶
func (yc *YamlConfig) GetSSHKey() string
Click to show internal directories.
Click to hide internal directories.