Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheRecord ¶
type CacheRecord struct { CurrWait float32 `json:"curr_wait"` TaskID string `json:"task_id"` Created int `json:"created"` LastUpdate int64 `json:"last_upd"` PID int `json:"pid"` RelConcSize float32 `json:"relconcsize"` ARF float32 `json:"arf"` FullSize int `json:"fullsize"` Finished bool `json:"finished"` Error string `json:"error"` ConcSize int `json:"concsize"` }
CacheRecord describes KonText's Redis cache record.
func (*CacheRecord) String ¶
func (c *CacheRecord) String() string
type ConcCacheDB ¶
type ConcCacheDB struct {
// contains filtered or unexported fields
}
ConcCacheDB is a simple wrapper around Redis connection with interface customized/stripped to our needs.
func NewConcCacheDB ¶
func NewConcCacheDB(conf *ConcCacheDBConf) *ConcCacheDB
NewConcCacheDB creates a properly configured instance of ConcCacheDB
func (*ConcCacheDB) GetItem ¶
func (c *ConcCacheDB) GetItem(corpusID string, cacheKey string) (*CacheRecord, error)
GetItem returns a cache item of a specific corpus and key.
type ConcCacheDBConf ¶
ConcCacheDBConf specifies a configuration of a connection to a Redis database containing KonText cache records.
Click to show internal directories.
Click to hide internal directories.