config

package
v0.0.0-...-66c7a0d Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

View Source
const (
	DeleteNodes int = iota
	NodesMissing
	MissingNodesForDeletion
)

Enum jobs

Variables

View Source
var JobList = map[int]string{
	DeleteNodes:             "delete_nodes",
	NodesMissing:            "missing_nodes",
	MissingNodesForDeletion: "missing_nodes_for_deletion",
}

List of jobs

Functions

This section is empty.

Types

type Config

type Config struct {
	JobsConfig []JobConfig `toml:"jobs_config"`
}

type JobConfig

type JobConfig struct {
	// The ID of the job
	ID int `toml:"id"`
	// The threshold time that the job will use internally to do a task
	Threshold string `toml:"threshold"`
	// How often to run the job
	Every string `toml:"every"`
	// Is the job running
	Running bool `toml:"running"`
}

JobConfig is the config for a job

type OldJobConfig

type OldJobConfig struct {
	Config            *Config
	DefaultJobConfigs []JobConfig
}

func NewOldJobConfig

func NewOldJobConfig(opts serveropts.JobsConfig) *OldJobConfig

NewOldJobConfig - Create a OldJobConfig

func (*OldJobConfig) ConfigForJob

func (c *OldJobConfig) ConfigForJob(jobIndex int) (JobConfig, error)

ConfigForJob returns the configuration for the given job index. The job indexes are constants in this package and reflect this historical structure of the on-disk job configuration. The default configuration is used if the configuration for a given index cannot be found.

func (*OldJobConfig) FromFile

func (c *OldJobConfig) FromFile(configFile string) error

Jump to

Keyboard shortcuts

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