redis_consumer

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RedisConsumeHandler

type RedisConsumeHandler func(data string)

type RedisConsumer

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

func NewRedisConsumer

func NewRedisConsumer(ctx context.Context, options *RedisConsumerOptions) (*RedisConsumer, error)

func (*RedisConsumer) Start

func (rc *RedisConsumer) Start() error

func (*RedisConsumer) Subscribe

func (rc *RedisConsumer) Subscribe(topic string, handler RedisConsumeHandler) error

type RedisConsumerOptions added in v0.0.5

type RedisConsumerOptions struct {
	Addr     string `json:"addr"`
	Port     int    `json:"port"`
	Password string `json:"password"`
	DB       int    `json:"db"`
}

Jump to

Keyboard shortcuts

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