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() ConvergerUID IsConverged(ConvergerUID) bool // is the UID converged ? SetConverged(ConvergerUID, bool) error // set the converged state of the UID Unregister(ConvergerUID) Start() Pause() Loop(bool) ConvergedTimer(ConvergerUID) <-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 ConvergerUID ¶
type ConvergerUID 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 }
ConvergerUID 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.