nats

package
v0.0.0-...-bc21482 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: MIT Imports: 8 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 {
	URI         *url.URL
	ChannelSize int
}

Config - configuration

type MQ

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

func New

func New() *MQ

func (*MQ) Init

func (mq *MQ) Init(ctx context.Context, log logger.Logger) error

func (*MQ) Publish

func (mq *MQ) Publish(_ context.Context, _ string, routingKey, payload []byte) error

Publish - publish a message

func (*MQ) Subscribe

func (mq *MQ) Subscribe(ctx context.Context, target string, message query.Response) error

Subscribe - subscribe to message

func (*MQ) UnSubscribe

func (mq *MQ) UnSubscribe(name string) error

UnSubscribe - unsubscribe from message

Jump to

Keyboard shortcuts

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