Documentation ¶
Index ¶
- type Module
- func (m *Module) CancelSubscription(topic string)
- func (m *Module) CheckAndSet(ctx context.Context, key, value string, ttl time.Duration) (bool, error)
- func (m *Module) CheckIfKeyExists(ctx context.Context, key string) (bool, error)
- func (m *Module) Close()
- func (m *Module) PublishString(ctx context.Context, topic, value string) error
- func (m *Module) Send(ctx context.Context, topic string, value interface{}) error
- func (m *Module) SendAck(ctx context.Context, replyTo string, ack bool) error
- func (m *Module) Subscribe(ctx context.Context, topic string) (<-chan *redis.Message, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
Module deals with pub sub related activities
func (*Module) CancelSubscription ¶
CancelSubscription cancels an active subscription
func (*Module) CheckAndSet ¶
func (m *Module) CheckAndSet(ctx context.Context, key, value string, ttl time.Duration) (bool, error)
CheckAndSet sets the key value pair and returns if the key already existed or not
func (*Module) CheckIfKeyExists ¶
CheckIfKeyExists checks if the key exists
func (*Module) Close ¶
func (m *Module) Close()
Close closes the redis client along with the active subscriptions on it
func (*Module) PublishString ¶
PublishString delivers a message in a fire and forget fashion
Click to show internal directories.
Click to hide internal directories.