redispublisher

package
v0.0.0-...-2ba4c8d Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NORMAL = 0
	CLOSED = 1
)

Variables

This section is empty.

Functions

func New

func New(clientOpt ClientOption, opts ...Option) (easypubsub.Publisher, error)

Types

type ChannelGenerator

type ChannelGenerator func(topic string) (channel string)

type ClientOption

type ClientOption func(o *clientOptions)

func ClusterClient

func ClusterClient(opts *redis.ClusterOptions) ClientOption

func FailoverClient

func FailoverClient(opts *redis.FailoverOptions) ClientOption

func SampleClient

func SampleClient(opts *redis.Options) ClientOption

type MsgMarshaler

type MsgMarshaler func(topic string, msg *easypubsub.Message) ([]byte, error)

type Option

type Option func(o *options)

func WithChannelGenerator

func WithChannelGenerator(generateChannel ChannelGenerator) Option

func WithLogger

func WithLogger(logger easypubsub.Logger) Option

func WithMsgMarshaler

func WithMsgMarshaler(marshalMsg MsgMarshaler) Option

type Publisher

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

func (*Publisher) Close

func (pub *Publisher) Close() error

func (*Publisher) Publish

func (pub *Publisher) Publish(topic string, msg *easypubsub.Message) (result *easypubsub.PublishResult)

func (*Publisher) String

func (pub *Publisher) String() string

Jump to

Keyboard shortcuts

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