subscriber

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2025 License: MIT Imports: 2 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EtcdConf

type EtcdConf = discov.EtcdConf

EtcdConf is the configuration for etcd.

type Subscriber

type Subscriber interface {
	// AddListener adds a listener to the subscriber.
	AddListener(listener func()) error
	// Value returns the value of the subscriber.
	Value() (string, error)
}

Subscriber is the interface for configcenter subscribers.

func MustNewEtcdSubscriber

func MustNewEtcdSubscriber(conf EtcdConf) Subscriber

MustNewEtcdSubscriber returns an etcd Subscriber, exits on errors.

func NewEtcdSubscriber

func NewEtcdSubscriber(conf EtcdConf) (Subscriber, error)

NewEtcdSubscriber returns an etcd Subscriber.

Jump to

Keyboard shortcuts

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