Documentation ¶
Index ¶
- type Doner
- type JSONMessage
- type RedisAdapter
- func (a *RedisAdapter) Add(client wsadapter.Client) (err error)
- func (a *RedisAdapter) Broadcast(msg wsmessage.Message) error
- func (a *RedisAdapter) Clients() (map[string]string, error)
- func (a *RedisAdapter) Close() (err error)
- func (a *RedisAdapter) Emit(clientID string, msg wsmessage.Message) error
- func (a *RedisAdapter) Metadata(clientID string) (metadata string, ok bool)
- func (a *RedisAdapter) Remove(clientID string) (err error)
- func (a *RedisAdapter) SetMetadata(clientID string, metadata string) (ok bool)
- func (a *RedisAdapter) Size() (size int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSONMessage ¶
type RedisAdapter ¶
type RedisAdapter struct {
// contains filtered or unexported fields
}
func NewRedisAdapter ¶
func NewRedisAdapter( pubRedis *redis.Client, subRedis *redis.Client, prefix string, room string, ) *RedisAdapter
func (*RedisAdapter) Clients ¶
func (a *RedisAdapter) Clients() (map[string]string, error)
Returns IDs of all known clients connected to this room
func (*RedisAdapter) Close ¶
func (a *RedisAdapter) Close() (err error)
func (*RedisAdapter) Emit ¶
func (a *RedisAdapter) Emit(clientID string, msg wsmessage.Message) error
func (*RedisAdapter) Metadata ¶
func (a *RedisAdapter) Metadata(clientID string) (metadata string, ok bool)
func (*RedisAdapter) Remove ¶
func (a *RedisAdapter) Remove(clientID string) (err error)
func (*RedisAdapter) SetMetadata ¶
func (a *RedisAdapter) SetMetadata(clientID string, metadata string) (ok bool)
func (*RedisAdapter) Size ¶
func (a *RedisAdapter) Size() (size int, err error)
Returns count of all known clients connected to this room
Click to show internal directories.
Click to hide internal directories.