Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MonitorVariable ¶
type MonitorVariable interface { Set(value interface{}) Subscribe() Subscription }
MonitorVariable is a specific monitor variable which allows for channel-subscription to changes to the internal value of the MonitorVariable.
func NewMonitorVariable ¶
func NewMonitorVariable() MonitorVariable
NewMonitorVariable instantiates an empty monitor variable
type Subscription ¶
type Subscription interface { // On instantiation, if the value has been set, this will return a closed channel. Otherwise, it will follow the // standard semantic, which is when the Monitor Variable is updated, this channel will close. The channel is updated // based on reading Value(). Once a value is read, the channel returned will only be closed if a the Monitor Variable // is set to a new value. NewValueReady() <-chan struct{} // Value returns a value object in a non-blocking fashion. This also means it may return an uninitialized value. // If the monitor variable has not yet been set, the "Version" of the value will be 0. Value() Value }
Subscription is not concurrency safe. It must not be shared between multiple goroutines.
Click to show internal directories.
Click to hide internal directories.