switchboard

package
v0.0.9-generics Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 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 any)

type Setter

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

type UpdateFunc

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

type Value

type Value interface {
	Setter

	Value() any
	Listen(listenFn ListenFunc)
}

func NewValue

func NewValue(ctx context.Context, name string, defaultValue any, updateFn UpdateFunc) Value

Jump to

Keyboard shortcuts

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