nats

package
v0.1.0 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 = "nats"
)

Variables

This section is empty.

Functions

func NewSubscriber

NewSubscriber create a new subscriber

Types

type Config

type Config struct {
	Servers      []string `yaml:"servers" json:"servers"`
	MaxReconnect int      `yaml:"max_reconnect" json:"max_reconnect"`
}

Config provides configuration information to nats client

type Subscriber

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

Subscriber implements the subscriber interface for nats

func (*Subscriber) Connect

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

Connect connects to nats server

func (*Subscriber) Disconnect

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

Disconnect disconnects from nats server

func (*Subscriber) Subscribe

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

Subscribe subscribes to bundle updates

func (*Subscriber) Unsubscribe

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

Unsubscribe unsubscribes from bundle updates

Jump to

Keyboard shortcuts

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