docker: Index | Files

package restartmanager

import ""


Package Files



var ErrRestartCanceled = errors.New("restart canceled")

ErrRestartCanceled is returned when the restart manager has been canceled and will no longer restart the container.

type RestartManager Uses

type RestartManager interface {
    Cancel() error
    ShouldRestart(exitCode uint32, hasBeenManuallyStopped bool, executionDuration time.Duration) (bool, chan error, error)

RestartManager defines object that controls container restarting rules.

func New Uses

func New(policy container.RestartPolicy, restartCount int) RestartManager

New returns a new restartManager based on a policy.

Package restartmanager imports 5 packages (graph) and is imported by 606 packages. Updated 2019-09-29. Refresh now. Tools for package owners.