rmqconsumer

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: BSD-2-Clause Imports: 4 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          string
	Exchange     string
	ExchangeType string
	Queue        string
	Tag          string
	RoutingKey   string
}

type Handle

type Handle func(body []byte)

type Option

type Option func(*Options)

func WithConfig

func WithConfig(config *Config) Option

func WithHandle

func WithHandle(h Handle) Option

type Options

type Options struct {
	Handle Handle
	Config *Config
}

type RmqConsumer

type RmqConsumer interface {
	Init(...Option) error
	Options() Options
	Shutdown() error
}

func NewRmqConsumer

func NewRmqConsumer(opts ...Option) (RmqConsumer, error)

Jump to

Keyboard shortcuts

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