Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var LocalFx = fx.Provide( NewLocalPubSub, )
View Source
var RedisFx = fx.Provide( NewRedisPubSub, )
Functions ¶
This section is empty.
Types ¶
type LocalPubSub ¶
type LocalPubSub struct {
// contains filtered or unexported fields
}
LocalPubSub is an implementation of PubSub that only allows publishing of payloads to 'local' subscribers i.e. subscribers on the same instance as the publisher.
func NewLocalPubSub ¶
func NewLocalPubSub() *LocalPubSub
type PubSub ¶
type PubSub interface { Subscribe(topic string, handler *Handler) error Publish(topic string, payload []byte) error }
func NewRedisPubSub ¶
type RedisConfig ¶
type RedisConfig struct {
Addr string
}
type RedisPubSub ¶
type RedisPubSub struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.