config

package
v0.0.0-...-c996816 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: ISC Imports: 2 Imported by: 0

Documentation

Overview

Package config parses taskmaster config files in the yaml format and turns them into structs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conf

type Conf struct {
	Programs map[string]Program `yaml:"programs"`
}

Conf stores the configuration of multiple programs from a config file.

func Parse

func Parse(name string) (Conf, error)

Parse reads the content of file name and tries to parse its content as yaml intoa config file structure.

type Program

type Program struct {
	Cmd          string            `yaml:"cmd"`
	NumProcs     uint              `yaml:"numprocs"`
	UMask        uint32            `yaml:"umask"`
	WorkingDir   string            `yaml:"workingdir"`
	AutoStart    bool              `yaml:"autostart"`
	AutoRestart  string            `yaml:"autorestart"`
	ExitCodes    []int             `yaml:"exitcodes"`
	StartRetries uint              `yaml:"startretries"`
	StartTime    uint              `yaml:"starttime"`
	StopSignal   string            `yaml:"stopsignal"`
	StopTime     uint              `yaml:"stoptime"`
	Stdout       string            `yaml:"stdout"`
	Stderr       string            `yaml:"stderr"`
	Env          map[string]string `yaml:"env"`
}

Program stores the configuration attributes of an individual program in a config file.

Jump to

Keyboard shortcuts

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