config

package
v1.9.9 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Amqp

type Amqp struct {
	Credentials
	Host
	VirtualHost string
}

type BaseJobConfig added in v1.7.0

type BaseJobConfig struct {
	Name             string   `hcl:",key" json:"name"`
	Command          string   `hcl:"command" json:"command"`
	Args             []string `hcl:"args" json:"args"`
	Env              []string `hcl:"env" json:"env"`
	CanFail          bool     `hcl:"canFail" json:"canFail"`
	Controllable     bool     `hcl:"controllable" json:"controllable"`
	WorkingDirectory string   `hcl:"workingDirectory" json:"workingDirectory,omitempty"`
	Stdout           string   `hcl:"stdout" json:"stdout,omitempty"`
	Stderr           string   `hcl:"stderr" json:"stderr,omitempty"`
}

type BootJobConfig added in v1.6.0

type BootJobConfig struct {
	BaseJobConfig `hcl:",squash"`

	Timeout string `hcl:"timeout"`
}

type Credentials

type Credentials struct {
	User     string
	Password string
}

type File

type File struct {
	Target     string                 `hcl:",key"`
	Template   string                 `hcl:"from"`
	Parameters map[string]interface{} `hcl:"params"`
	Overwrite  *bool                  `hcl:"overwrite"` // bool-pointer to make "true" the default
}

type Host

type Host struct {
	Hostname string
	Port     string
}

type HttpGet

type HttpGet struct {
	Scheme string
	Host
	Path    string
	Timeout string
}

type Ignition

type Ignition struct {
	Probes   []Probe         `hcl:"probe"`
	Files    []File          `hcl:"file"`
	Jobs     []JobConfig     `hcl:"job"`
	BootJobs []BootJobConfig `hcl:"boot"`
}

func (*Ignition) GenerateFromConfigDir

func (ignitionConfig *Ignition) GenerateFromConfigDir(configDir string) error

type JobConfig

type JobConfig struct {
	BaseJobConfig `hcl:",squash" json:",inline"`

	// optional fields for "normal" jobs
	// these will be ignored if fields for lazy jobs are set
	Watches      []Watch `hcl:"watch" json:"watch"`
	MaxAttempts_ *int    `hcl:"max_attempts" json:"-,omitempty"` // deprecated
	MaxAttempts  *int    `hcl:"maxAttempts" json:"maxAttempts,omitempty"`
	OneTime      bool    `hcl:"oneTime" json:"oneTime"`

	// fields required for lazy activation
	Laziness  *Laziness  `hcl:"lazy" json:"lazy"`
	Listeners []Listener `hcl:"listen" json:"listen"`
}

func (*JobConfig) GetMaxAttempts added in v1.9.2

func (jc *JobConfig) GetMaxAttempts() int

type Laziness added in v1.4.0

type Laziness struct {
	SpinUpTimeout   string `hcl:"spinUpTimeout"`
	CoolDownTimeout string `hcl:"coolDownTimeout"`
}

type Listener added in v1.4.0

type Listener struct {
	Address         string `hcl:",key"`
	ListenProtocol  string `hcl:"listenProtocol"`
	Forward         string `hcl:"forward"`
	ForwardProtocol string `hcl:"forwardProtocol"`

	Protocol string `hcl:"protocol"` // deprecated
}

type MongoDB

type MongoDB struct {
	Credentials
	Host
	Database                string
	ReplicaSetName          string
	AuthenticationDatabase  string
	AuthenticationMechanism string
	GssapiServiceName       string
	URL                     string
}

type MySQL

type MySQL struct {
	Credentials
	Host
	AllowNativePassword string
	Database            string
}

type Probe

type Probe struct {
	Name       string `hcl:",key"`
	Wait       bool
	Filesystem string
	MySQL      *MySQL
	Redis      *Redis
	MongoDB    *MongoDB
	Amqp       *Amqp
	HTTP       *HttpGet
	SMTP       *SMTP
}

type Redis

type Redis struct {
	Host
	Password string
}

type SMTP added in v1.8.0

type SMTP struct {
	Host
}

type Watch

type Watch struct {
	Filename string `hcl:",key"`
	Signal   int    `hcl:"signal"`
	Restart  bool   `hcl:"restart"`

	PreCommand  *WatchCommand `hcl:"preCommand"`
	PostCommand *WatchCommand `hcl:"postCommand"`
}

type WatchCommand added in v1.7.7

type WatchCommand struct {
	Command string   `hcl:"command"`
	Args    []string `hcl:"args"`
	Env     []string `hcl:"env"`
}

Jump to

Keyboard shortcuts

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