natsinput

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: May 14, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	InvalidFormatError    = errors.New("invalid format")
	EmptyAuthContentError = errors.New("empty auth content")
)

Functions

func MustNewNatsConnection

func MustNewNatsConnection(c config.NatsConf) *nats.Conn

func NewNatsConnection

func NewNatsConnection(c config.NatsConf) (*nats.Conn, error)

Types

type ConsumeHandler

type ConsumeHandler interface {
	Consume(key string, value string) error
}

type Nats

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

func NewNats

func NewNats(c config.NatsConf, handler ConsumeHandler) *Nats

func (*Nats) Start

func (n *Nats) Start()

func (*Nats) Stop

func (n *Nats) Stop()

Jump to

Keyboard shortcuts

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