Versions in this module Expand all Collapse all v0 v0.4.6 Jun 16, 2022 Changes in this version + const LabelData + const LabelStep + var CollaborativeFilteringIndexRecall = promauto.NewGauge(prometheus.GaugeOpts{ ... }) + var MemoryInuseBytesVec = promauto.NewGaugeVec(prometheus.GaugeOpts{ ... }, []string{ ... }) + var OfflineRecommendStepSecondsVec = promauto.NewGaugeVec(prometheus.GaugeOpts{ ... }, []string{ ... }) + var OfflineRecommendTotalSeconds = promauto.NewGauge(prometheus.GaugeOpts{ ... }) + var UpdateUserRecommendTotal = promauto.NewGauge(prometheus.GaugeOpts{ ... }) + type FeedbackCache struct + ByteCount uintptr + Cache cmap.ConcurrentMap + Client data.Database + Types []string + func NewFeedbackCache(client data.Database, feedbackTypes ...string) *FeedbackCache + func (c *FeedbackCache) Bytes() int + func (c *FeedbackCache) GetUserFeedback(userId string) ([]string, error) + type ItemCache struct + ByteCount uintptr + Data map[string]*data.Item + func NewItemCache() *ItemCache + func (c *ItemCache) Bytes() int + func (c *ItemCache) Get(itemId string) (*data.Item, bool) + func (c *ItemCache) GetCategory(itemId string) []string + func (c *ItemCache) IsAvailable(itemId string) bool + func (c *ItemCache) Set(itemId string, item data.Item) + type LocalCache struct + WorkerName string + func LoadLocalCache(path string) (*LocalCache, error) + func (c *LocalCache) WriteLocalCache() error + type Worker struct + func NewWorker(masterHost string, masterPort int, httpHost string, httpPort, jobs int, ...) *Worker + func (w *Worker) Pull() + func (w *Worker) Recommend(users []data.User) + func (w *Worker) Serve() + func (w *Worker) ServeMetrics() + func (w *Worker) SetOneMode(settings *config.Settings) + func (w *Worker) Sync()