Documentation ¶
Index ¶
- type Redis
- func (r *Redis) ApplauseCleanOld(olderThen int64) error
- func (r *Redis) ApplausePublish(meetingID, userID int, time int64) error
- func (r *Redis) ApplauseSince(time int64) (map[int]int, error)
- func (r *Redis) NotifyPublish(message []byte) error
- func (r *Redis) NotifyReceive(ctx context.Context) ([]byte, error)
- func (r *Redis) Wait(ctx context.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Redis ¶
type Redis struct {
// contains filtered or unexported fields
}
Redis implements the icc backend by saving the data to redis.
Has to be created with redis.New().
func (*Redis) ApplauseCleanOld ¶
ApplauseCleanOld removes applause that is older then a given time.
func (*Redis) ApplausePublish ¶
ApplausePublish saves an applause for the user at a given time as unix time stamp.
func (*Redis) ApplauseSince ¶
ApplauseSince returned all applause since a given time as unix time stamp.
func (*Redis) NotifyPublish ¶
NotifyPublish saves a valid notify message.
func (*Redis) NotifyReceive ¶
NotifyReceive is a blocking function that receives the messages.
The first call returnes the first notify message, the next call the second an so on. If there are no more messages to read, the function blocks until there is or the context ist canceled.
It is expected, that only one goroutine is calling this function.