Documentation ¶
Overview ¶
Package converger is a facility for reporting the converged state.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConverger ¶
NewConverger builds a new converger struct
Types ¶
type Converger ¶
type Converger interface { Register() ConvergerUUID IsConverged(ConvergerUUID) bool // is the UUID converged ? SetConverged(ConvergerUUID, bool) error // set the converged state of the UUID Unregister(ConvergerUUID) Start() Pause() Loop(bool) ConvergedTimer(ConvergerUUID) <-chan time.Time Status() map[uint64]bool Timeout() int // returns the timeout that this was created with SetStateFn(func(bool) error) // sets the stateFn }
Converger is the general interface for implementing a convergence watcher
type ConvergerUUID ¶
type ConvergerUUID interface { ID() uint64 // get Id Name() string // get a friendly name SetName(string) IsValid() bool // has Id been initialized ? InvalidateID() // set Id to nil IsConverged() bool SetConverged(bool) error Unregister() ConvergedTimer() <-chan time.Time StartTimer() (func() error, error) // cancellable is the same as StopTimer() ResetTimer() error // resets counter to zero StopTimer() error }
ConvergerUUID is the interface resources can use to notify with if converged you'll need to use part of the Converger interface to Register initially too
Click to show internal directories.
Click to hide internal directories.