pubsub

package
v1.8.17 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IMessageBroker

type IMessageBroker interface {
	Publish(ctx context.Context, channel string, payload interface{}) error
	Subscribe(ctx context.Context, channel string, callback func(channel string, payload string)) func() error
}

func GetBroker

func GetBroker() (IMessageBroker, error)

func Init

func Init(options ...MessageBrokerOptions) (IMessageBroker, error)

type MessageBrokerDriver added in v1.8.12

type MessageBrokerDriver string
const (
	MessageBrokerDriverRedis MessageBrokerDriver = "redis"
)

type MessageBrokerOptions added in v1.8.12

type MessageBrokerOptions struct {
	Db     int
	Driver MessageBrokerDriver
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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