Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthKeyCacheManager ¶
type AuthKeyCacheManager struct { }
func NewAuthKeyCacheManager ¶
func NewAuthKeyCacheManager() *AuthKeyCacheManager
"root:@/nebulaim?charset=utf8" 30
func (*AuthKeyCacheManager) GetAuthKey ¶
func (s *AuthKeyCacheManager) GetAuthKey(keyID int64) (authKey []byte)
TODO(@benqi): 暂时在这里操作数据库,需要改善的地方: 1. 如果数据库连接有问题,尝试存储到本地缓存 2. 所有需要读写数据库和缓存的地方,全部推给后端服务 GetAuthKey(uint64) []byte PutAuthKey(uint64, []byte) error
func (*AuthKeyCacheManager) PutAuthKey ¶
func (s *AuthKeyCacheManager) PutAuthKey(keyID int64, key []byte) (err error)
Click to show internal directories.
Click to hide internal directories.