gnats

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: MulanPSL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PubSub

type PubSub interface {
	utils.PubSub
	Close()
}

PubSub wraps utils Publisher exposing Close() method for NATS connection.

func NewPubSub

func NewPubSub(url, queue string, logger *glog.Logger) (PubSub, error)

NewPubSub returns NATS message publisher/subscriber. Parameter queue specifies the queue for the Subscribe method. If queue is specified (is not an empty string), Subscribe method will execute NATS QueueSubscribe which is conceptually different from ordinary subscribe. For more information, please take a look here: https://docs.nats.io/developing-with-nats/receiving/queues. If the queue is empty, Subscribe will be used.

type Publisher

type Publisher interface {
	utils.Publisher
	Close()
}

Publisher wraps messaging Publisher exposing Close() method for NATS connection.

func NewPublisher

func NewPublisher(url string) (Publisher, error)

NewPublisher returns NATS message Publisher.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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