internal

package
v0.2.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 3, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrValueRemoved error = errors.New("internal: value removed")

Functions

This section is empty.

Types

type Value

type Value struct {
	// contains filtered or unexported fields
}

func NewValue

func NewValue(vv string, version Version) *Value

func (*Value) AddWatcher

func (v *Value) AddWatcher() (Watcher, error)

func (*Value) CheckAndSet

func (v *Value) CheckAndSet(callback func(Version) (string, Version, bool)) (bool, error)

func (*Value) Clear

func (v *Value) Clear(version Version, remover ValueRemover) (bool, error)

func (*Value) Get

func (v *Value) Get() (string, Version, error)

func (*Value) RemoveWatcher

func (v *Value) RemoveWatcher(wrappedWatcher Watcher, remover ValueRemover) error

type ValueRemover

type ValueRemover func()

type Version

type Version uint64

type Watcher

type Watcher struct {
	// contains filtered or unexported fields
}

func (Watcher) Event

func (w Watcher) Event() <-chan struct{}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL