consul

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2022 License: MIT Imports: 17 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 {
	Address string
	Token   string
	// additional message: tsf namespaceid and tencent appid if exsist
	AppID       string
	NamespaceID string
}

type Consul

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

func DefaultConsul

func DefaultConsul() *Consul

func New

func New(conf *Config) *Consul

func (*Consul) Get

func (c *Consul) Get(ctx context.Context, path string) (spec []config.Spec)

func (*Consul) Subscribe

func (c *Consul) Subscribe(path string) config.Watcher

type Topic

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

type Watcher

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

func (*Watcher) Close

func (w *Watcher) Close()

func (*Watcher) Watch

func (w *Watcher) Watch(ctx context.Context) (spec []config.Spec, err error)

Jump to

Keyboard shortcuts

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