Categorygithub.com/thejerf/suture/v4
modulepackage
4.0.6
Repository: https://github.com/thejerf/suture.git
Documentation: pkg.go.dev

# Functions

AsService converts old-style suture service to a new style suture service.
New is the full constructor function for a supervisor.
NewSimple is a convenience function to create a service with just a name and the sensible defaults.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

ErrDoNotRestart can be returned by a service to voluntarily not be restarted.
ErrSupervisorNotRunning is returned by some methods if the supervisor is not running, either because it has not been started or because it has been terminated.
ErrSupervisorNotStarted is returned if you try to send control messages to a supervisor that has not started yet.
ErrSupervisorNotTerminated is returned when asking for a stopped service report before the supervisor has been terminated.
ErrTerminateSupervisorTree can can be returned by a service to terminate the entire supervision tree above it as well.
ErrTimeout is returned when an attempt to RemoveAndWait for a service to stop has timed out.
ErrWrongSupervisor is returned by the (*Supervisor).Remove method if you pass a ServiceToken from the wrong Supervisor.

# Structs

DefaultJitter is the jitter function that is applied when spec.BackoffJitter is set to nil.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NoJitter does not apply any jitter to the input duration.
ServiceToken is an opaque identifier that can be used to terminate a service that has been Add()ed to a Supervisor.
Spec is used to pass arguments to the New function to create a supervisor.
Supervisor is the core type of the module that represents a Supervisor.
An UnstoppedService is the component member of an UnstoppedServiceReport.

# Interfaces

No description provided by the author
Event defines the interface implemented by all events Suture will generate.
HasSupervisor is an interface that indicates the given struct contains a supervisor.
Jitter returns the sum of the input duration and a random jitter.
Service is the interface that describes a service to a Supervisor.

# Type aliases

No description provided by the author
No description provided by the author
No description provided by the author
An UnstoppedServiceReport will be returned by StopWithReport, reporting which services failed to stop.