Documentation ¶
Index ¶
Constants ¶
View Source
const Type primitive.Type = "Value"
Type is the value type
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { // GetValue gets the Value instance of the given name GetValue(ctx context.Context, name string) (Value, error) }
Client provides an API for creating Values
type Event ¶
type Event struct { // Type is the change event type Type EventType // Value is the updated value Value []byte // Version is the updated version Version uint64 }
Event is a value change event
type EventType ¶
type EventType string
EventType is the type of a set event
const ( // EventUpdated indicates the value was updated EventUpdated EventType = "updated" )
type SetOption ¶
type SetOption interface {
// contains filtered or unexported methods
}
SetOption is an option for Set calls
type Value ¶
type Value interface { primitive.Primitive // Set sets the current value and returns the version Set(ctx context.Context, value []byte, opts ...SetOption) (uint64, error) // Get gets the current value and version Get(ctx context.Context) ([]byte, uint64, error) // Watch watches the value for changes Watch(ctx context.Context, ch chan<- *Event) error }
Value provides a simple atomic value
Click to show internal directories.
Click to hide internal directories.