bus

package
v0.0.0-...-33015ef Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NatsUrlEnvVariableName = "NATS_URL"
)

Variables

This section is empty.

Functions

func AddStream

func AddStream(name string, subjects ...string) error

AddStream add new stream with dedicated subjects

func Close

func Close()

Close closes NATS connections

func PublishMessage

func PublishMessage(subject string, msg message.Message) error

PublishMessage publishes message to subject subject - subject where message be published msg - Message to publish

func StartSubscriptions

func StartSubscriptions(consumer string)

StartSubscriptions - actually subscribe on NATS jet stream

func Subscribe

func Subscribe(name string, handler message.Subscriber)

Subscribe - provide handler func to subject subject - subscribe to handler - handler func which would be invoked on incoming message

func Subscriber

func Subscriber(topic string) message.Subscriber

Subscriber - returns subscriber which publishes message in NATS stream

Types

This section is empty.

Jump to

Keyboard shortcuts

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