consul

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewWatcher

func NewWatcher(cfg *Config, apiCfg *api.Config, handler watch.ClientManagerHandler) (watch.Watcher, error)

Types

type Config

type Config struct {
	ServiceName    string `json:"name" yaml:"name" toml:"name"`
	ServiceVersion string `json:"version,omitempty" yaml:"version,omitempty" toml:"version,omitempty"`
	RegistryDir    string `json:"registry_dir,omitempty" yaml:"registry_dir,omitempty" toml:"registry_dir,omitempty"`
	Balancer       string `json:"balancer,omitempty" yaml:"balancer,omitempty" toml:"balancer,omitempty"`
}

type Watcher

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

func (*Watcher) Close

func (w *Watcher) Close()

func (*Watcher) Pick

func (w *Watcher) Pick(info *watch.PickInfo) any

func (*Watcher) Remove

func (w *Watcher) Remove(addr string)

func (*Watcher) Update

func (w *Watcher) Update(addr string, content any)

func (*Watcher) Watch

func (w *Watcher) Watch()

Jump to

Keyboard shortcuts

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