broker

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Broker

func Broker(ctx context.Context, config *configs.Config) error

func Default

func Default() broker2.Broker

func New

func New(opts ...Option) (broker2.Broker, error)

func NewWithConfig

func NewWithConfig(ctx context.Context, cfg *Config, opts ...Option) (broker2.Broker, error)

func SetBroker

func SetBroker(b broker2.Broker)

Types

type Config

type Config struct {
	Type Type
	NSQ  nsq.Config
}

type Option

type Option func(options *Options)

func WithBroker

func WithBroker(b broker2.Broker) Option

func WithDefaultGroup

func WithDefaultGroup(group string) Option

func WithTopicPrefix

func WithTopicPrefix(prefix string) Option

func WithTracer

func WithTracer(t trace.Tracer) Option

type Options

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

type Type

type Type string
const (
	NSQ      Type = "nsq"
	EventBus Type = "event_bus"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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