config

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: BSD-2-Clause Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppOpts

type AppOpts struct {
	// RunDir is a path to directory that stores various instance
	// runtime artifacts like console socket, PID file, etc.
	RunDir string `mapstructure:"run_dir" yaml:"run_dir"`
	// LogDir is a directory that stores log files.
	LogDir string `mapstructure:"log_dir" yaml:"log_dir"`
	// LogMaxSize is a maximum size in MB of the log file before
	// it gets rotated.
	LogMaxSize int `mapstructure:"log_maxsize" yaml:"log_maxsize"`
	// LogMaxAge is the maximum number of days to retain old log files
	// based on the timestamp encoded in their filename. Note that a
	// day is defined as 24 hours and may not exactly correspond to
	// calendar days due to daylight savings, leap seconds, etc. The
	// default is not to remove old log files based on age.
	LogMaxAge int `mapstructure:"log_maxage" yaml:"log_maxage"`
	// LogMaxBackups is the maximum number of old log files to retain.
	// The default is to retain all old log files (though LogMaxAge may
	// still cause them to get deleted).
	LogMaxBackups int `mapstructure:"log_maxbackups" yaml:"log_maxbackups"`
	// If the instance is started under the watchdog it should
	// restart on if it crashes.
	Restartable bool `mapstructure:"restart_on_failure" yaml:"restart_on_failure"`
	// WalDir is a directory where write-ahead log (.xlog) files are stored.
	WalDir string `mapstructure:"wal_dir" yaml:"wal_dir"`
	// MemtxDir is a directory where memtx stores snapshot (.snap) files.
	MemtxDir string `mapstructure:"memtx_dir" yaml:"memtx_dir"`
	// VinylDir is a directory where vinyl files or subdirectories will be stored.
	VinylDir string `mapstructure:"vinyl_dir" yaml:"vinyl_dir"`
	// BinDir is the directory where all the binary files
	// are stored.
	BinDir string `mapstructure:"bin_dir" yaml:"bin_dir"`
	// IncludeDir is the directory where all the header files
	// are stored.
	IncludeDir string `mapstructure:"inc_dir" yaml:"inc_dir"`
	// InstancesEnabled is the directory where all enabled applications are stored.
	InstancesEnabled string `mapstructure:"instances_enabled" yaml:"instances_enabled"`
	// TarantoolctlLayout enables artifact files layout compatibility with tarantoolctl:
	// application sub-directories are not created for runtime artifacts like
	// control socket, pid files and logs.
	TarantoolctlLayout bool `mapstructure:"tarantoolctl_layout" yaml:"tarantoolctl_layout"`
}

AppOpts is used to store all app options.

type CliOpts

type CliOpts struct {
	// Modules is a struct that contain module options.
	Modules *ModulesOpts
	// App is a struct that contains app options.
	App *AppOpts
	// EE is a struct that contains tarantool-ee options.
	EE *EEOpts
	// Templates options.
	Templates []TemplateOpts
	// Repo is a struct used to store paths to local files.
	Repo *RepoOpts
}

CliOpts is used to store modules and app options.

type Config

type Config struct {
	CliConfig *CliOpts `mapstructure:"tt" yaml:"tt"`
}

Config used to store all information from the tt.yaml configuration file.

type DaemonCfg

type DaemonCfg struct {
	DaemonConfig *DaemonOpts `mapstructure:"daemon" yaml:"daemon"`
}

DaemonCfg used to store all information from the tt_daemon.yaml configuration file.

type DaemonOpts

type DaemonOpts struct {
	// PIDFile is name of file contains pid of daemon process.
	PIDFile string `mapstructure:"pidfile"`
	// Port is a port number to be used for daemon http server.
	Port int `mapstructure:"port"`
	// LogDir is a directory that stores log files.
	LogDir string `mapstructure:"log_dir"`
	// LogFile is a name of file contains log of daemon process.
	LogFile string `mapstructure:"log_file"`
	// LogMaxSize is a maximum size in MB of the log file before
	// it gets rotated.
	LogMaxSize int `mapstructure:"log_maxsize"`
	// LogMaxAge is the maximum number of days to retain old log files
	// based on the timestamp encoded in their filename. Note that a
	// day is defined as 24 hours and may not exactly correspond to
	// calendar days due to daylight savings, leap seconds, etc. The
	// default is not to remove old log files based on age.
	LogMaxAge int `mapstructure:"log_maxage"`
	// LogMaxBackups is the maximum number of old log files to retain.
	// The default is to retain all old log files (though LogMaxAge may
	// still cause them to get deleted).
	LogMaxBackups int `mapstructure:"log_maxbackups"`
	// ListenInterface is a network interface the IP address
	// should be found on to bind http server socket.
	ListenInterface string `mapstructure:"listen_interface"`
	// RunDir is a path to directory that stores various instance
	// runtime artifacts like console socket, PID file, etc.
	RunDir string `mapstructure:"run_dir" yaml:"run_dir"`
}

DaemonOpts stores information about tt daemon configuration. Filled in when parsing the tt_daemon.yaml configuration file.

tt_daemon.yaml file format: daemon:

run_dir: path
log_dir: path
log_maxsize: num (MB)
log_maxage: num (Days)
log_maxbackups: num
log_file: string (file name)
listen_interface: string
port: num
pidfile: string (file name)

type EEOpts

type EEOpts struct {
	// CredPath is a path to file with credentials for downloading tarantool-ee.
	CredPath string `mapstructure:"credential_path" yaml:"credential_path"`
}

EEOpts is used to store tarantool-ee options.

type ModulesOpts

type ModulesOpts struct {
	// Directory is a path to directory where the external modules
	// are stored.
	Directory string
}

ModuleOpts is used to store all module options.

type RepoOpts

type RepoOpts struct {
	// Rocks is the directory where local rocks files could be found.
	Rocks string `mapstructure:"rocks"`
	// Install is the directory where local installation files could be found.
	Install string `mapstructure:"distfiles" yaml:"distfiles"`
}

RepoOpts is a struct used to store paths to local files.

type TemplateOpts

type TemplateOpts struct {
	// Path is a directory to search template in.
	Path string `mapstructure:"path"`
}

TemplateOpts contains configuration for applications templates.

Jump to

Keyboard shortcuts

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