Documentation ¶
Index ¶
- func Address(address string) redisOpt
- func ApplyProperties(properties *Properties) redisOpt
- func BufferSize(size int) subscriptionOpt
- func Channels(channels ...string) subscriptionOpt
- func ConnectionTimeout(timeout time.Duration) redisOpt
- func DB(db int) redisOpt
- func NewClient(opts ...redisOpt) (*redis.Client, func(), error)
- func NewSubscription(client *redis.Client, opts ...subscriptionOpt) func()
- func OnMessage(handler func(*Message)) subscriptionOpt
- func Password(password string) redisOpt
- func PublishTimeout(timeout time.Duration) publisherOpt
- func PublisherCodec(codec MessageCodec) publisherOpt
- func SubscribeTimeout(timeout time.Duration) subscriptionOpt
- func SubscriptionCodec(codec MessageCodec, payloadStruct interface{}) subscriptionOpt
- func TLS(tls bool) redisOpt
- func TargetChannel(channel string) publisherOpt
- func Username(username string) redisOpt
- type JSONMessageCodec
- type Message
- type MessageCodec
- type Properties
- type Publisher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyProperties ¶
func ApplyProperties(properties *Properties) redisOpt
func BufferSize ¶ added in v1.0.4
func BufferSize(size int) subscriptionOpt
func ConnectionTimeout ¶
func NewSubscription ¶ added in v1.0.4
func NewSubscription(client *redis.Client, opts ...subscriptionOpt) func()
func PublishTimeout ¶ added in v1.0.4
func PublisherCodec ¶ added in v1.0.4
func PublisherCodec(codec MessageCodec) publisherOpt
func SubscribeTimeout ¶ added in v1.0.4
func SubscriptionCodec ¶ added in v1.0.4
func SubscriptionCodec(codec MessageCodec, payloadStruct interface{}) subscriptionOpt
func TargetChannel ¶ added in v1.0.4
func TargetChannel(channel string) publisherOpt
Types ¶
type JSONMessageCodec ¶ added in v1.0.4
type JSONMessageCodec struct { }
func (*JSONMessageCodec) Marshall ¶ added in v1.0.4
func (codec *JSONMessageCodec) Marshall(val interface{}) ([]byte, error)
func (*JSONMessageCodec) Name ¶ added in v1.0.4
func (codec *JSONMessageCodec) Name() string
func (*JSONMessageCodec) Unmarshall ¶ added in v1.0.4
func (codec *JSONMessageCodec) Unmarshall(data []byte, target interface{}) error
type MessageCodec ¶ added in v1.0.4
type Properties ¶
type Publisher ¶ added in v1.0.4
type Publisher struct {
// contains filtered or unexported fields
}
func NewPublisher ¶ added in v1.0.4
Click to show internal directories.
Click to hide internal directories.