wsub

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSubscriber

func NewSubscriber(config *Config, topic string, consumeFunc subscriber.ConsumeFunc) (subscriber.Subscriber, error)

Types

type Config

type Config struct {
	LoggerDebug   bool   `env:"REDIS_SUB_LOGGER_DEBUG,notEmpty" envdefault:"false"`
	LoggerTrace   bool   `env:"REDIS_SUB_LOGGER_TRACE,notEmpty" envdefault:"false"`
	ConsumerGroup string `env:"REDIS_SUB_CONSUMER_GROUP_ID,required"`
}

func NewConfig

func NewConfig() (*Config, error)

type MultiSubscriber

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

Subscriber to manage multiple subscribers

func NewMultiSubscriber

func NewMultiSubscriber(config *Config) *MultiSubscriber

func (*MultiSubscriber) Close

func (s *MultiSubscriber) Close() error

func (*MultiSubscriber) Subscribe

func (s *MultiSubscriber) Subscribe(topic string, consumeFunc subscriber.ConsumeFunc) error

Jump to

Keyboard shortcuts

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