cfg

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetI18nPrinter

func GetI18nPrinter() *message.Printer

func SetupLogs

func SetupLogs(path string)

Types

type CmdConfig

type CmdConfig struct {
	Cmd  string `yaml:"cmd"`
	Path string `yaml:"path,omitempty"`
}

type ConfigError

type ConfigError struct {
	// contains filtered or unexported fields
}

func (*ConfigError) Error

func (e *ConfigError) Error() string

type ConfigFile

type ConfigFile struct {
	BasePath    string                   `yaml:"-"`
	LogFilePath string                   `yaml:"log_file"`
	Jobs        map[string]JobConfig     `yaml:"jobs,omitempty"`
	Services    map[string]ServiceConfig `yaml:"services,omitempty"`
}

func FindAndParseConfig

func FindAndParseConfig(givenPath string) (*ConfigFile, error)

func ParseConfigs added in v1.15.0

func ParseConfigs(fileContents [][]byte) (*ConfigFile, error)

type DependencyConfig

type DependencyConfig struct {
	Target            string `yaml:"target"`
	RestartWithTarget bool   `yaml:"restart_with_target"`
	WaitTargetStarted bool   `yaml:"wait_target_restarted"`
}

type HealthcheckConfig

type HealthcheckConfig struct {
	Port int `yaml:"port"`
}

type JobConfig

type JobConfig struct {
	Steps    []StepConfig `yaml:"steps"`
	RunAfter []CmdConfig  `yaml:"run_after,omitempty"`
}

type ServiceConfig

type ServiceConfig struct {
	TaskConfig `yaml:"task_config,inline"`

	Healthcheck  HealthcheckConfig  `yaml:"healthcheck"`
	AutoRestart  bool               `yaml:"auto_restart"`
	Dependencies []DependencyConfig `yaml:"dependencies"`

	OpenTarget string `yaml:"open_target"`
}

type StepConfig

type StepConfig struct {
	Name      string       `yaml:"name"`
	Tasks     []TaskConfig `yaml:"tasks"`
	RunBefore []CmdConfig  `yaml:"run_before,omitempty"`
	RunAfter  []CmdConfig  `yaml:"run_after,omitempty"`
}

type TaskConfig

type TaskConfig struct {
	CmdConfig `yaml:"cmd_config,inline"`

	Name      string      `yaml:"name"`
	RunBefore []CmdConfig `yaml:"run_before,omitempty"`
	RunAfter  []CmdConfig `yaml:"run_after,omitempty"`
}

Jump to

Keyboard shortcuts

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