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: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProviderName = "consul"
)

Variables

This section is empty.

Functions

func NewPublisher

func NewPublisher(opts *publisher.Options) (publisher.Publisher, error)

NewPublisher creates a new publisher

Types

type Config

type Config struct {
	Topic         string         `json:"topic" yaml:"topic"`
	NodeFilter    string         `json:"node_filter" yaml:"node_filter"`
	ServiceFilter string         `json:"service_filter" yaml:"service_filter"`
	TagFilter     string         `json:"tag_filter" yaml:"tag_filter"`
	Version       int            `json:"version" yaml:"version"`
	Consul        *consul.Config `json:"consul" yaml:"consul"`
}

type Publisher

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

func (*Publisher) Connect

func (p *Publisher) Connect(ctx context.Context) (err error)

func (*Publisher) Disconnect

func (p *Publisher) Disconnect(ctx context.Context) (err error)

func (*Publisher) Publish

func (p *Publisher) Publish(ctx context.Context, payload []byte) (err error)

Publish publishes a message to a topic

Jump to

Keyboard shortcuts

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