Documentation ¶
Index ¶
- Constants
- Variables
- func GetGlobalIterNum(queryID string) (int32, bool)
- func GetNodeIterNum(queryID string) (int32, bool)
- func PutGlobalIterNum(queryID string, iterCount int32)
- func PutNodeIterNum(queryID string, iterCount int32)
- func UpdateIterNumFunc(old, new Entry) bool
- func UpdateMetaData(_, _ Entry) bool
- type Cache
- type Entry
- type IncIterNumEntry
Constants ¶
View Source
const ( IncIterNumCacheSize int64 = 1 * 1024 * 1024 IncIterNumCacheTTL = 10 * time.Minute )
Variables ¶
View Source
var GlobalIncIterNumCache = NewCache(IncIterNumCacheSize, IncIterNumCacheTTL)
View Source
var NodeIncIterNumCache = NewCache(IncIterNumCacheSize, IncIterNumCacheTTL)
Functions ¶
func GetGlobalIterNum ¶
func GetNodeIterNum ¶
func PutGlobalIterNum ¶
func PutNodeIterNum ¶
func UpdateIterNumFunc ¶
func UpdateMetaData ¶
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func (*Cache) Get ¶
Get used to obtain the value of the key and returns whether the key is obtained successfully.
type IncIterNumEntry ¶
type IncIterNumEntry struct {
// contains filtered or unexported fields
}
func NewIncIterNumEntry ¶
func NewIncIterNumEntry(queryID string) *IncIterNumEntry
func (*IncIterNumEntry) GetKey ¶
func (e *IncIterNumEntry) GetKey() string
func (*IncIterNumEntry) GetTime ¶
func (e *IncIterNumEntry) GetTime() time.Time
func (*IncIterNumEntry) GetValue ¶
func (e *IncIterNumEntry) GetValue() interface{}
func (*IncIterNumEntry) SetTime ¶
func (e *IncIterNumEntry) SetTime(time time.Time)
func (*IncIterNumEntry) SetValue ¶
func (e *IncIterNumEntry) SetValue(value interface{})
func (*IncIterNumEntry) Size ¶
func (e *IncIterNumEntry) Size() int64
Click to show internal directories.
Click to hide internal directories.