restart

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2019 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package restart enables containers to have labels added and monitored to keep the container's task running if it is killed.

Setting the StatusLabel on a container instructs the restart monitor to keep that container's task in a specific status. Setting the LogPathLabel on a container will setup the task's IO to be redirected to a log file when running a task within the restart manager.

The restart labels can be cleared off of a container using the WithNoRestarts Opt.

The restart monitor has one option in the containerd config under the [plugins.restart] section. `interval = "10s" sets the reconcile interval that the restart monitor checks for task state and reconciles the desired status for that task.

Index

Constants

View Source
const (
	// StatusLabel sets the restart status label for a container
	StatusLabel = "containerd.io/restart.status"
	// LogPathLabel sets the restart log path label for a container
	LogPathLabel = "containerd.io/restart.logpath"
)

Variables

This section is empty.

Functions

func WithLogPath

func WithLogPath(path string) func(context.Context, *containerd.Client, *containers.Container) error

WithLogPath sets the log path for a container

func WithNoRestarts

func WithNoRestarts(_ context.Context, _ *containerd.Client, c *containers.Container) error

WithNoRestarts clears any restart information from the container

func WithStatus

WithStatus sets the status for a container

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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