Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetWorkerConfig ¶
GetWorkerConfig returns the current worker viper config instance. Returns nil if LoadWorkerConfig has not been called.
Types ¶
type WorkerConfig ¶
type WorkerConfig struct {
Dev WorkerDevConfig `mapstructure:"dev" json:"dev,omitempty"`
Triggers []Trigger `mapstructure:"triggers" json:"triggers,omitempty"`
}
func LoadWorkerConfig ¶
func LoadWorkerConfig() (*WorkerConfig, error)
LoadWorkerConfig loads the worker configuration from a hatchet.yaml file in the current working directory. Returns nil config if the file doesn't exist.
type WorkerDevConfig ¶
type WorkerDevConfig struct {
// commands to run before starting the worker
PreCmds []string `mapstructure:"preCmds" json:"preCmds,omitempty"`
// command to run the worker
RunCmd string `mapstructure:"runCmd" json:"runCmd,omitempty"`
// list of glob files to watch for reloads
Files []string `mapstructure:"files" json:"files,omitempty"`
// whether to reload on file changes
Reload bool `mapstructure:"reload" json:"reload,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.