runtime

package
v0.15.2 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2020 License: Apache-2.0 Imports: 6 Imported by: 5 modules, 4 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

This section is empty.

Functions

This section is empty.

Types

type Options

type Options interface {
	// SetInstrumentOptions sets the instrument options.
	SetInstrumentOptions(value instrument.Options) Options

	// InstrumentOptions returns the instrument options.
	InstrumentOptions() instrument.Options

	// SetInitWatchTimeout sets the initial watch timeout.
	SetInitWatchTimeout(value time.Duration) Options

	// InitWatchTimeout returns the initial watch timeout.
	InitWatchTimeout() time.Duration

	// SetKVStore sets the kv store.
	SetKVStore(value kv.Store) Options

	// KVStore returns the kv store.
	KVStore() kv.Store

	// SetUnmarshalFn sets the unmarshal function.
	SetUnmarshalFn(value UnmarshalFn) Options

	// UnmarshalFn returns the unmarshal function.
	UnmarshalFn() UnmarshalFn

	// SetProcessFn sets the process function.
	SetProcessFn(value ProcessFn) Options

	// ProcessFn returns the process function.
	ProcessFn() ProcessFn
}

Options provide a set of value options.

func NewOptions

func NewOptions() Options

NewOptions creates a new set of options.

type ProcessFn

type ProcessFn func(value interface{}) error

ProcessFn processes a value.

type UnmarshalFn

type UnmarshalFn func(value kv.Value) (interface{}, error)

UnmarshalFn unmarshals a kv value and extracts its payload.

type Value

type Value interface {
	watch.Value

	// Key is the key associated with value.
	Key() string
}

Value is a value that can be updated during runtime.

func NewValue

func NewValue(
	key string,
	opts Options,
) Value

NewValue creates a new value.

Jump to

Keyboard shortcuts

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