publisher

package
v0.0.0-...-1c003c8 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NATSPublisher

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

func NewNATSPublisher

func NewNATSPublisher(nc *nats.Conn, topic string) *NATSPublisher

NewNATSPublisher creates a new NATSPublisher.

func NewPublisher

func NewPublisher(host string, topic string) *NATSPublisher

func (*NATSPublisher) Close

func (p *NATSPublisher) Close()

Close closes the NATS connection (optional).

func (*NATSPublisher) Publish

func (p *NATSPublisher) Publish(subject string, msg interface{}) error

Publish publishes a message to a given subject.

Jump to

Keyboard shortcuts

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