package restartmanager
import "github.com/docker/docker/restartmanager"
Index ¶
- Variables
- type RestartManager
- func New(policy container.RestartPolicy, restartCount int) *RestartManager
- func (rm *RestartManager) Cancel()
- func (rm *RestartManager) SetPolicy(policy container.RestartPolicy)
- func (rm *RestartManager) ShouldRestart(exitCode uint32, hasBeenManuallyStopped bool, executionDuration time.Duration) (bool, chan error, error)
Variables ¶
ErrRestartCanceled is returned when the restart manager has been canceled and will no longer restart the container.
Types ¶
type RestartManager ¶
RestartManager defines object that controls container restarting rules.
func New ¶
func New(policy container.RestartPolicy, restartCount int) *RestartManager
New returns a new RestartManager based on a policy.
func (*RestartManager) Cancel ¶
func (rm *RestartManager) Cancel()
Cancel tells the RestartManager to no longer restart the container.
func (*RestartManager) SetPolicy ¶
func (rm *RestartManager) SetPolicy(policy container.RestartPolicy)
SetPolicy sets the restart-policy for the RestartManager.
func (*RestartManager) ShouldRestart ¶
func (rm *RestartManager) ShouldRestart(exitCode uint32, hasBeenManuallyStopped bool, executionDuration time.Duration) (bool, chan error, error)
ShouldRestart returns whether the container should be restarted.
Source Files ¶
- Version
- v26.0.0-rc2+incompatible
- Published
- Mar 7, 2024
- Platform
- js/wasm
- Imports
- 5 packages
- Last checked
- 5 minutes ago –
Tools for package owners.