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 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) Publish ¶
func (pub *Publisher) Publish(topic string, msg *easypubsub.Message) (result *easypubsub.PublishResult)
Click to show internal directories.
Click to hide internal directories.