feat: local cache

This commit is contained in:
withchao
2024-01-12 15:41:05 +08:00
parent 006e4a1e93
commit 45064ae5ca
28 changed files with 268 additions and 386 deletions
+7 -1
View File
@@ -378,8 +378,14 @@ type LocalCache struct {
SlotSize int `yaml:"slotSize"`
}
func (l LocalCache) Enable() bool {
return l.Topic != "" && l.SlotNum > 0 && l.SlotSize > 0
}
type localCache struct {
Friend LocalCache `yaml:"friend"`
Friend LocalCache `yaml:"friend"`
Group LocalCache `yaml:"group"`
Conversation LocalCache `yaml:"conversation"`
}
func (c *configStruct) GetServiceNames() []string {