Documentation ¶
Overview ¶
Package lcache provides a cache library for storing and retrieving data.
Index ¶
- type App
- func (ap *App) BatchUpdateLastConsumedTime(kt *kit.Kit, bizID uint32, appIDs []uint32) error
- func (ap *App) GetAppID(kt *kit.Kit, bizID uint32, appName string) (uint32, error)
- func (ap *App) GetMeta(kt *kit.Kit, bizID uint32, appID uint32) (*types.AppCacheMeta, error)
- func (ap *App) IsAppExist(kt *kit.Kit, bizID uint32, appIDs ...uint32) (bool, error)
- func (ap *App) ListApps(kt *kit.Kit, req *pbcs.ListAppsReq) (*pbcs.ListAppsResp, error)
- func (ap *App) RemoveCache(kt *kit.Kit, bizID uint32, appName string)
- type Auth
- type Cache
- type ClientMetric
- type Credential
- type ReleasedCI
- type ReleasedGroup
- type ReleasedHook
- type ReleasedKv
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App is the instance of the app cache.
func (*App) BatchUpdateLastConsumedTime ¶
BatchUpdateLastConsumedTime 批量更新服务拉取时间
func (*App) IsAppExist ¶
IsAppExist validate app if exist.
func (*App) ListApps ¶
func (ap *App) ListApps(kt *kit.Kit, req *pbcs.ListAppsReq) (*pbcs.ListAppsResp, error)
ListApps 获取App列表, 不缓存,直接透传请求
type Auth ¶
type Auth struct {
// contains filtered or unexported fields
}
Auth is the instance of the auth cache.
type Cache ¶
type Cache struct { App *App ReleasedCI *ReleasedCI ReleasedKv *ReleasedKv ReleasedGroup *ReleasedGroup Credential *Credential ReleasedHook *ReleasedHook Auth *Auth ClientMetric *ClientMetric }
Cache defines a cache instance.
func NewLocalCache ¶
NewLocalCache initial the cache instance.
type ClientMetric ¶
type ClientMetric struct {
// contains filtered or unexported fields
}
ClientMetric xxx
type Credential ¶
type Credential struct {
// contains filtered or unexported fields
}
Credential is the instance of the credential local cache.
func (*Credential) CanMatchCI ¶
func (s *Credential) CanMatchCI(kt *kit.Kit, bizID uint32, app string, credential string, path string, name string) (bool, error)
CanMatchCI the credential's local cache. CanMatchCI 支持文件类型和KV类型
func (*Credential) GetCred ¶
func (s *Credential) GetCred(kt *kit.Kit, bizID uint32, credential string) (*types.CredentialCache, error)
GetCred 获取凭证, 并缓存
type ReleasedCI ¶
type ReleasedCI struct {
// contains filtered or unexported fields
}
ReleasedCI is the instance of the released ci cache.
func (*ReleasedCI) Get ¶
func (ci *ReleasedCI) Get(kt *kit.Kit, bizID uint32, releaseID uint32) ([]*types.ReleaseCICache, error)
Get the released config item's cache.
type ReleasedGroup ¶
type ReleasedGroup struct {
// contains filtered or unexported fields
}
ReleasedGroup is the instance of the ReleasedGroup local cache.
func (*ReleasedGroup) Get ¶
func (s *ReleasedGroup) Get(kt *kit.Kit, bizID uint32, appID uint32) ( []*types.ReleasedGroupCache, error)
Get the released group's local cache.
type ReleasedHook ¶
type ReleasedHook struct {
// contains filtered or unexported fields
}
ReleasedHook is the instance of the released hook cache.
func (*ReleasedHook) Get ¶
func (r *ReleasedHook) Get(kt *kit.Kit, bizID uint32, releaseID uint32) ( *types.ReleasedHookCache, *types.ReleasedHookCache, error)
Get the released hook's cache.
type ReleasedKv ¶
type ReleasedKv struct {
// contains filtered or unexported fields
}
ReleasedKv is the instance of the released kv cache.
func (*ReleasedKv) Get ¶
func (kv *ReleasedKv) Get(kt *kit.Kit, bizID uint32, releaseID uint32) ([]*types.ReleaseKvCache, error)
Get the released kvs cache.
func (*ReleasedKv) GetKvValue ¶
func (kv *ReleasedKv) GetKvValue(kt *kit.Kit, bizID, appID, releaseID uint32, key string) (*types.ReleaseKvValueCache, error)
GetKvValue Get the rkv value cache.