Documentation ¶
Index ¶
- type Cache
- func (cache *Cache) ChatsKeys() []int64
- func (cache *Cache) GetChat(id int64) (*client.Chat, bool)
- func (cache *Cache) GetStatus(id int64) (*Status, bool)
- func (cache *Cache) GetUser(id int64) (*client.User, bool)
- func (cache *Cache) SetChat(id int64, chat *client.Chat)
- func (cache *Cache) SetStatus(id int64, show string, status string)
- func (cache *Cache) SetUser(id int64, user *client.User)
- func (cache *Cache) StatusesRange() chan *Status
- func (cache *Cache) UsersKeys() []int64
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache allows operating the chats and users cache in a thread-safe manner
func (*Cache) ChatsKeys ¶
ChatsKeys grabs chat ids synchronously to avoid lockups while they are used
func (*Cache) StatusesRange ¶
StatusesRange loops through the map in a thread-safe manner
Click to show internal directories.
Click to hide internal directories.