Documentation ¶
Index ¶
Constants ¶
View Source
const ( SOCKETS adapter.MessageType = iota ALL_ROOMS REMOTE_JOIN REMOTE_LEAVE REMOTE_DISCONNECT REMOTE_FETCH SERVER_SIDE_EMIT BROADCAST BROADCAST_CLIENT_COUNT BROADCAST_ACK )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisClient ¶
type RedisClient struct { events.EventEmitter Client redis.UniversalClient Context context.Context }
func NewRedisClient ¶
func NewRedisClient(ctx context.Context, redis redis.UniversalClient) *RedisClient
type RedisPacket ¶ added in v1.1.1
type RedisRequest ¶ added in v1.1.1
type RedisRequest struct { Type adapter.MessageType `json:"type,omitempty" msgpack:"type,omitempty"` RequestId string `json:"requestId,omitempty" msgpack:"requestId,omitempty"` Rooms []socket.Room `json:"rooms,omitempty" msgpack:"rooms,omitempty"` Opts *adapter.PacketOptions `json:"opts,omitempty" msgpack:"opts,omitempty"` Sid socket.SocketId `json:"sid,omitempty" msgpack:"sid,omitempty"` Room socket.Room `json:"room,omitempty" msgpack:"room,omitempty"` Close bool `json:"close,omitempty" msgpack:"close,omitempty"` Uid adapter.ServerId `json:"uid,omitempty" msgpack:"uid,omitempty"` Data []any `json:"data,omitempty" msgpack:"data,omitempty"` Packet *parser.Packet `json:"packet,omitempty" msgpack:"packet,omitempty"` }
type RedisResponse ¶ added in v1.1.1
type RedisResponse struct { Type adapter.MessageType `json:"type,omitempty" msgpack:"type,omitempty"` RequestId string `json:"requestId,omitempty" msgpack:"requestId,omitempty"` Rooms []socket.Room `json:"rooms,omitempty" msgpack:"rooms,omitempty"` Sockets []*adapter.SocketResponse `json:"sockets,omitempty" msgpack:"sockets,omitempty"` Data []any `json:"data,omitempty" msgpack:"data,omitempty"` ClientCount uint64 `json:"clientcount,omitempty" msgpack:"clientcount,omitempty"` Packet []any `json:"packet,omitempty" msgpack:"packet,omitempty"` }
type String ¶ added in v1.1.0
type String struct {
// contains filtered or unexported fields
}
A String is an atomic string value. The zero value is "".
func (*String) CompareAndSwap ¶ added in v1.1.0
CompareAndSwap executes the compare-and-swap operation for the string value x.
Click to show internal directories.
Click to hide internal directories.