supervisord

package
v0.0.0-...-8680cc4 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CgroupConfig

type CgroupConfig struct {
	Path string `toml:"path"`
}

CgroupConfig provides cgroup configuration

type Config

type Config struct {
	// Root is the path to a directory where containerd will store persistent data
	Root string `toml:"root"`
	// State is the path to a directory where containerd will store transient data
	State string `toml:"state"`
	// GRPC configuration settings
	GRPC GRPCConfig `toml:"grpc"`
	// Debug and profiling settings
	Debug Debug `toml:"debug"`
	// Metrics and monitoring settings
	Metrics MetricsConfig `toml:"metrics"`
	// Plugins provides plugin specific configuration for the initialization of a plugin
	Plugins map[string]interface{} `toml:"plugins"`
	// OOMScore adjust the containerd's oom score
	OOMScore int `toml:"oom_score"`
	// Cgroup specifies cgroup information for the containerd daemon process
	Cgroup CgroupConfig `toml:"cgroup"`
	// contains filtered or unexported fields
}

Config provides containerd configuration data for the server

NOTE: The config is copied from containerd@v1.0.3/server, because the server package depends on a lot of packages which pouch doesn't need.

type Daemon

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

Daemon represents the containerd process.

func Start

func Start(ctx context.Context, rootDir, stateDir string, opts ...Opt) (*Daemon, error)

Start starts containerd in background.

func (*Daemon) Address

func (d *Daemon) Address() string

Address returns containerd grpc address.

func (*Daemon) Stop

func (d *Daemon) Stop() error

Stop stops the containerd in 15 seconds.

type Debug

type Debug struct {
	Address string `toml:"address"`
	UID     int    `toml:"uid"`
	GID     int    `toml:"gid"`
	Level   string `toml:"level"`
}

Debug provides debug configuration

type GRPCConfig

type GRPCConfig struct {
	Address string `toml:"address"`
	UID     int    `toml:"uid"`
	GID     int    `toml:"gid"`
}

GRPCConfig provides GRPC configuration for the socket

type MetricsConfig

type MetricsConfig struct {
	Address string `toml:"address"`
}

MetricsConfig provides metrics configuration

type Opt

type Opt func(*Daemon) error

Opt is used to modify the daemon setting.

func WithContainerdBinary

func WithContainerdBinary(nameOrPath string) Opt

WithContainerdBinary sets the binary name or path of containerd.

func WithGRPCAddress

func WithGRPCAddress(addr string) Opt

WithGRPCAddress sets the containerd address.

func WithLogLevel

func WithLogLevel(level string) Opt

WithLogLevel sets the log level of containerd.

func WithOOMScore

func WithOOMScore(score int) Opt

WithOOMScore sets the OOMScore for containerd.

func WithV1RuntimeShimDebug

func WithV1RuntimeShimDebug() Opt

WithV1RuntimeShimDebug shows shim log in stdout.

type V1RuntimeConfig

type V1RuntimeConfig struct {
	ShimDebug bool `toml:"shim_debug"`
}

V1RuntimeConfig options for the runtime

NOTE: don't add other thing here because default config will be merged with this in containerd side.

Jump to

Keyboard shortcuts

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