state

package
v1.0.0-rc9 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2025 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrKeyNotFound error = errors.New("key not found")

Functions

This section is empty.

Types

type State

type State interface {
	ServiceRegister(reg *api.AgentServiceRegistration) error
	ServiceDeregister(service string) error
	SetValue(key string, value string) error
	DeleteValue(key string) error
	GetValue(key string) (string, error)
	WatchValue(key string, cb func(value string)) (string, error)
	GetInstance(service string) (*api.CatalogService, error)
	GetInstances(service string) ([]*api.CatalogService, error)
	WatchInstances(service string, cb func(value []*api.CatalogService)) ([]*api.CatalogService, error)
}

func New

func New(config *api.Config) (State, error)

Jump to

Keyboard shortcuts

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