nats

package
v0.0.0-...-9b27197 Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Url string `mapstructure:"url"`
}

func (*Config) RegisterFlags

func (c *Config) RegisterFlags(flagPrefix string, f *flag.FlagSet)

type NatsClient

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

func NewNatsClient

func NewNatsClient(cfg Config, log log.Logger) (*NatsClient, error)

func (*NatsClient) Pub

func (n *NatsClient) Pub(channel string, msg *message.Message) error

func (*NatsClient) Sub

func (n *NatsClient) Sub(channel string, f func(msg *message.Message)) error

Jump to

Keyboard shortcuts

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