layout

package
v3.0.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PidFileName is the pid file of the watchdog of the instance. It is the
	// scope's, as the run directory is: the resolver of an application finds
	// the instances that run under a root by it.
	PidFileName = scope.PidFileName
	// LogFileName is the log of the watchdog, which the output of tarantool
	// goes to as well.
	LogFileName = "tt.log"
	// ConsoleSocketName is the control socket of tarantool.
	ConsoleSocketName = "tarantool.control"
	// BinaryPortName is the unix socket tarantool listens on for iproto.
	BinaryPortName = "tarantool.sock"
	// TarantoolPidFileName is the pid file tarantool writes itself.
	TarantoolPidFileName = "tarantool.pid"
	// ProcessPidFileName is the pid file of an external process, which its
	// watchdog writes: the process leads a process group of its own, which
	// tt instance kill has to reach apart from the group of the watchdog.
	ProcessPidFileName = "process.pid"
	// TarantoolLogFileName is the log file of tarantool when its config logs
	// to a file without naming one.
	TarantoolLogFileName = "tarantool.log"
)

The names of the files an instance keeps in its run and log directories. They are the names the layout of tt.yaml used: moving the directories to a scope root changed where the files are, not what they are called, so whatever looks for them by name, a person or a script, keeps finding them.

Variables

This section is empty.

Functions

This section is empty.

Types

type ScopeLayout

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

ScopeLayout is where the runtime artifacts of an instance go under the root of the scope its application is in:

<root>/var/lib/<app>/<inst>/    wal, snapshots and vinyl files
<root>/var/log/<app>/<inst>/    tt.log
<root>/var/run/<app>/<inst>/    tt.pid, tarantool.pid, tarantool.control, tarantool.sock

An external process has no data and no sockets: it keeps tt.log, tt.pid and process.pid.

The root is <project>/.tarantool in a project and the user or the system root otherwise. The artifacts live outside of the application directory on purpose: an installed version is immutable and is replaced by switching a link, and the data of an instance must outlive both. In a project the same tree keeps them out of the sources.

func NewScopeLayout

func NewScopeLayout(root, appName, instName string) (ScopeLayout, error)

NewScopeLayout returns the layout of the instance instName of the application appName under root, which must be absolute. Both names must be usable as one directory name, so that no instance reaches into the directories of another.

func (ScopeLayout) BinaryPort

func (layout ScopeLayout) BinaryPort() string

BinaryPort is the unix socket tarantool listens on for iproto.

func (ScopeLayout) ConsoleSocket

func (layout ScopeLayout) ConsoleSocket() string

ConsoleSocket is the control socket of tarantool.

func (ScopeLayout) DataDir

func (layout ScopeLayout) DataDir() string

DataDir is the directory of the write-ahead log, the snapshots and the vinyl files of the instance.

func (ScopeLayout) LogDir

func (layout ScopeLayout) LogDir() string

LogDir is the directory of the logs of the instance.

func (ScopeLayout) LogFile

func (layout ScopeLayout) LogFile() string

LogFile is the log of the watchdog and of the output of tarantool.

func (ScopeLayout) PidFile

func (layout ScopeLayout) PidFile() string

PidFile is the pid file of the watchdog.

func (ScopeLayout) ProcessPidFile

func (layout ScopeLayout) ProcessPidFile() string

ProcessPidFile is the pid file of an external process.

func (ScopeLayout) RunDir

func (layout ScopeLayout) RunDir() string

RunDir is the directory of the pid files and the sockets of the instance.

Jump to

Keyboard shortcuts

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