switchboard

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ListenFunc

type ListenFunc func(ctx context.Context, name string, value interface{})

type Setter

type Setter interface {
	Set(ctx context.Context, value interface{}) bool
}

type UpdateFunc

type UpdateFunc func(ctx context.Context, name string, value Setter)

type Value

type Value interface {
	Setter

	Value() interface{}
	Listen(listenFn ListenFunc)
}

func NewValue

func NewValue(ctx context.Context, name string, defaultValue interface{}, updateFn UpdateFunc) Value

Jump to

Keyboard shortcuts

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