subscriber

package
v0.0.0-...-3df06e7 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProcessorFunc

type ProcessorFunc func(message []byte)

ProcessorFunc represents a processor function that consume message

type RedisConfig

type RedisConfig struct {
	RedisHost     string
	RedisPassword string
	Channel       string
	Processor     ProcessorFunc
}

RedisConfig represents a configuration for Redis subscriber

type RedisSubscriber

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

RedisSubscriber handles event subscription

func NewRedis

func NewRedis(conf *RedisConfig) (*RedisSubscriber, error)

NewRedis creates a new Redis subscriber

func (*RedisSubscriber) Close

func (s *RedisSubscriber) Close() error

Close closes a subscription

Jump to

Keyboard shortcuts

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