runtime

package
Version: v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: Apache-2.0 Imports: 6 Imported by: 4

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

	// InterruptedCh returns the interrupted channel.
	InterruptedCh() <-chan struct{}

	// SetInterruptedCh sets the interrupted channel.
	SetInterruptedCh(value <-chan struct{}) Options
}

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