Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WatchFile ¶
func WatchFile(cacheIdent *CacheIdent, events chan *ConcCacheEvent)
Types ¶
type CacheIdent ¶
CacheIdent provides complete information about concordance cache record. In KonText, cache file path is typically derived from other two values but here we treat it as an independent item.
type ConcCacheEvent ¶
type ConcCacheEvent struct { CorpusID string CacheKey string Record *taskdb.CacheRecord Error error }
ConcCacheEvent contains status data related to a specific concordance calculation.
func (*ConcCacheEvent) ARF ¶
func (c *ConcCacheEvent) ARF() float32
ARF returns so called Average Reduced Frequency. This value is typically available once the calculation is done (i.e. it comes with last update event)
func (*ConcCacheEvent) ConcSize ¶
func (c *ConcCacheEvent) ConcSize() int
ConcSize returns current conconrdance size
func (*ConcCacheEvent) Finished ¶
func (c *ConcCacheEvent) Finished() bool
Finished returns calc. status ("true" means "finished")
func (*ConcCacheEvent) FullSize ¶
func (c *ConcCacheEvent) FullSize() int
FullSize - this value has no clear use in KonText but we keep it passing around.
func (*ConcCacheEvent) RelConcSize ¶
func (c *ConcCacheEvent) RelConcSize() float32
RelConcSize returns a relative concordance size scaled to million tokens (aka "i.p.m")
func (*ConcCacheEvent) String ¶
func (c *ConcCacheEvent) String() string
type RedisWatchdogFactory ¶
type RedisWatchdogFactory struct {
// contains filtered or unexported fields
}
func NewRedisWatchdogFactory ¶
func NewRedisWatchdogFactory(cacheDB *taskdb.ConcCacheDB) *RedisWatchdogFactory
func (*RedisWatchdogFactory) Create ¶
func (rwf *RedisWatchdogFactory) Create(cacheIdent *CacheIdent, events chan *ConcCacheEvent) *Watchdog