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 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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