consul

package
v0.16.2 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package consul handles the monitor capabilities of harvester using ConsulLogger.

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 NewKeyItemWithPrefix

func NewKeyItemWithPrefix(key, prefix string) Item

NewKeyItemWithPrefix creates a new key item for a given key and prefix.

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 ConsulLogger 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