Documentation ¶
Index ¶
Constants ¶
View Source
const TerminationSignal = syscall.SIGTERM
TerminationSignal is SIGTERM which is sent by most container runtimes when a container should terminate gracefully.
Variables ¶
This section is empty.
Functions ¶
func Manifold ¶
func Manifold(config ManifoldConfig) dependency.Manifold
Manifold returns a manifold whose worker returns ErrTerminateAgent if a termination signal is received by the process it's running in.
Types ¶
type ManifoldConfig ¶
type ManifoldConfig struct { AgentName string APICallerName string UniterName string Clock clock.Clock Logger logger.Logger }
ManifoldConfig defines the names of the manifolds on which a Manifold will depend.
func (*ManifoldConfig) Validate ¶
func (config *ManifoldConfig) Validate() error
Validate ensures all the required values for the config are set.
type State ¶
type State interface {
UnitTerminating(ctx context.Context, tag names.UnitTag) (caasapplication.UnitTermination, error)
}
type UnitTerminator ¶
type UnitTerminator interface {
Terminate() error
}
Click to show internal directories.
Click to hide internal directories.