Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Example []byte
Functions ¶
func SaveRegistration ¶
func SaveRegistration(file string, reg *Registration) error
Types ¶
type Config ¶
type Config struct { Log struct { Level string `yaml:"level"` } `yaml:"log"` Runner struct { File string `yaml:"file"` Capacity int `yaml:"capacity"` Envs map[string]string `yaml:"envs"` EnvFile string `yaml:"env_file"` Timeout time.Duration `yaml:"timeout"` Insecure bool `yaml:"insecure"` } `yaml:"runner"` Cache struct { Enabled *bool `yaml:"enabled"` // pointer to distinguish between false and not set, and it will be true if not set Dir string `yaml:"dir"` Host string `yaml:"host"` Port uint16 `yaml:"port"` } `yaml:"cache"` Container struct { NetworkMode string `yaml:"network_mode"` } }
func LoadDefault ¶
LoadDefault returns the default configuration. If file is not empty, it will be used to load the configuration.
type Registration ¶
type Registration struct { Warning string `json:"WARNING"` // Warning message to display, it's always the registrationWarning constant ID int64 `json:"id"` UUID string `json:"uuid"` Name string `json:"name"` Token string `json:"token"` Address string `json:"address"` Labels []string `json:"labels"` }
Registration is the registration information for a runner
func LoadRegistration ¶
func LoadRegistration(file string) (*Registration, error)
Click to show internal directories.
Click to hide internal directories.