queue

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: 5 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 {
	Type string      `mapstructure:"type"`
	Nats nats.Config `mapstructure:"nats"`
}

func (*Config) RegisterFlags

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

type Publisher

type Publisher interface {
	Pub(channel string, msg *message.Message) error
}

func NewPublisher

func NewPublisher(cfg Config, log log.Logger) (Publisher, error)

type Subscriber

type Subscriber interface {
	Sub(channel string, action func(msg *message.Message)) error
}

func NewSubscriber

func NewSubscriber(cfg Config, log log.Logger) (Subscriber, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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