registry

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Endpoints []string
}

Config represents the configuration of a Registry

type EtcdRegistry

type EtcdRegistry struct {
	// contains filtered or unexported fields
}

EtcdRegistry implements the Registry interface for etcd

func NewEtcdRegistry

func NewEtcdRegistry(config Config) (*EtcdRegistry, error)

NewEtcdRegistry creates and configures a new EtcdRegistry

func (*EtcdRegistry) Get

func (r *EtcdRegistry) Get(key string) (*client.Response, error)

Get returns the value associated with the provided key

func (*EtcdRegistry) Watch

func (r *EtcdRegistry) Watch(key string, recursive bool, eventChannel chan *client.Response)

Watch watches for changes of the provided key and sends the event through the channel

type Event

type Event struct {
	Action string
	Value  string
}

Event represents a watchable event

type Registry

type Registry interface {
	Get(key string) (*client.Response, error)
	Watch(key string, recursive bool, eventChannel chan *client.Response)
}

Registry manages a config registry (e.g. etcd)

Jump to

Keyboard shortcuts

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