consul

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

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

Item definition.

func NewKeyItem

func NewKeyItem(key string) Item

NewKeyItem creates a new key watch item for the watcher.

func NewPrefixItem

func NewPrefixItem(key string) Item

NewPrefixItem creates a prefix key watch item for the watcher.

type Watcher

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

Watcher of Consul changes.

func New

func New(addr, dc, token string, timeout time.Duration, ii ...Item) (*Watcher, error)

New creates a new watcher.

func (*Watcher) Watch

func (w *Watcher) Watch(ctx context.Context, ch chan<- []*change.Change) error

Watch key and prefixes for changes.

Jump to

Keyboard shortcuts

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