Documentation ¶
Index ¶
- type Dao
- func (d *Dao) AddMapping(c context.Context, mid int64, key, server string) (err error)
- func (d *Dao) AddServerOnline(c context.Context, server string, sharding int32, online *model.Online) (err error)
- func (d *Dao) BroadcastMsg(c context.Context, op, speed int32, msg, platform string, contentType int32) (err error)
- func (d *Dao) BroadcastRoomMsg(c context.Context, op int32, room, msg string, contentType int32) (err error)
- func (d *Dao) Close()
- func (d *Dao) DelMapping(c context.Context, mid int64, key, server string) (has bool, err error)
- func (d *Dao) DelServerOnline(c context.Context, server string, shard int) (err error)
- func (d *Dao) ExpireMapping(c context.Context, mid int64, key string) (has bool, err error)
- func (d *Dao) KeysByMids(c context.Context, mids []int64) (ress map[string]string, olMids []int64, err error)
- func (d *Dao) MigrateRooms(c context.Context, shard int) (rooms map[string]int32, err error)
- func (d *Dao) MigrateServers(c context.Context) (conns, ips int64, err error)
- func (d *Dao) Ping(c context.Context) error
- func (d *Dao) PushMsg(c context.Context, op int32, server, msg string, keys []string, ...) (err error)
- func (d *Dao) ServerOnline(c context.Context, server string, shard int) (online *model.Online, err error)
- func (d *Dao) Servers(c context.Context) (srvs []*model.ServerInfo, err error)
- func (d *Dao) ServersByKeys(c context.Context, keys []string) (res []string, err error)
- func (d *Dao) SetServers(c context.Context, srvs []*model.ServerInfo) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dao ¶
type Dao struct {
// contains filtered or unexported fields
}
Dao dao.
func (*Dao) AddServerOnline ¶
func (d *Dao) AddServerOnline(c context.Context, server string, sharding int32, online *model.Online) (err error)
AddServerOnline add server online.
func (*Dao) BroadcastMsg ¶
func (d *Dao) BroadcastMsg(c context.Context, op, speed int32, msg, platform string, contentType int32) (err error)
BroadcastMsg push a message to databus.
func (*Dao) BroadcastRoomMsg ¶
func (d *Dao) BroadcastRoomMsg(c context.Context, op int32, room, msg string, contentType int32) (err error)
BroadcastRoomMsg push a message to databus.
func (*Dao) DelMapping ¶
DelMapping del a mapping.
func (*Dao) DelServerOnline ¶
DelServerOnline del a server online.
func (*Dao) ExpireMapping ¶
ExpireMapping expire a mapping.
func (*Dao) KeysByMids ¶
func (d *Dao) KeysByMids(c context.Context, mids []int64) (ress map[string]string, olMids []int64, err error)
KeysByMids get a key server by mid.
func (*Dao) MigrateRooms ¶
MigrateRooms migrate rooms.
func (*Dao) MigrateServers ¶
MigrateServers migrate servers.
func (*Dao) PushMsg ¶
func (d *Dao) PushMsg(c context.Context, op int32, server, msg string, keys []string, contentType int32) (err error)
PushMsg push a message to databus.
func (*Dao) ServerOnline ¶
func (d *Dao) ServerOnline(c context.Context, server string, shard int) (online *model.Online, err error)
ServerOnline get a server online.
func (*Dao) ServersByKeys ¶
ServersByKeys get a server by key.
func (*Dao) SetServers ¶
SetServers set servers info.
Click to show internal directories.
Click to hide internal directories.