consul

package
v0.0.0-...-c8a8185 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProviderName    = "consul"
	DefaultDebounce = "200ms"
)

Variables

This section is empty.

Functions

func NewSubscriber

func NewSubscriber(opts *subscriber.Options) (subscriber.Subscriber, error)

NewSubscriber creates a new subscriber

Types

type Config

type Config struct {
	WatchType string         `json:"watch_type" yaml:"watch_type"`
	Topic     string         `json:"topic" yaml:"topic"`
	Debounce  string         `json:"debounce" yaml:"debounce"`
	Consul    *consul.Config `json:"consul" yaml:"consul"`
}

type Subscriber

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

func (*Subscriber) Connect

func (s *Subscriber) Connect(ctx context.Context) (err error)

func (*Subscriber) Disconnect

func (s *Subscriber) Disconnect(ctx context.Context) (err error)

func (*Subscriber) Subscribe

func (s *Subscriber) Subscribe(ctx context.Context) (err error)

func (*Subscriber) Unsubscribe

func (s *Subscriber) Unsubscribe(ctx context.Context) (err error)

Jump to

Keyboard shortcuts

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