add client and groups member logic
This commit is contained in:
@@ -42,7 +42,7 @@ func CacheGetClientByName(name string) (*Client, error) {
|
||||
return nil, fmt.Errorf("client %s not found", name)
|
||||
}
|
||||
|
||||
func CacheSetClient(client *Client) {
|
||||
func CacheSaveClient(client *Client) {
|
||||
mu.Lock()
|
||||
defer mu.Unlock()
|
||||
|
||||
@@ -56,7 +56,12 @@ func CacheDeleteClient(id uint32) {
|
||||
delete(CacheClients, id)
|
||||
}
|
||||
|
||||
func CacheSetGroup() {}
|
||||
func CacheSaveGroup(group *Group) {
|
||||
mu.Lock()
|
||||
defer mu.Unlock()
|
||||
|
||||
Groups[group.Id] = group
|
||||
}
|
||||
|
||||
func CacheGetGroup(id uint32) (*Group, error) {
|
||||
mu.RLock()
|
||||
|
||||
Reference in New Issue
Block a user