Documentation
¶
Index ¶
Constants ¶
View Source
const ( LabelStep = "step" LabelData = "data" )
Variables ¶
View Source
var ( UpdateUserRecommendTotal = promauto.NewGauge(prometheus.GaugeOpts{ Namespace: "gorse", Subsystem: "worker", Name: "update_user_recommend_total", }) OfflineRecommendStepSecondsVec = promauto.NewGaugeVec(prometheus.GaugeOpts{ Namespace: "gorse", Subsystem: "worker", Name: "offline_recommend_step_seconds", }, []string{LabelStep}) OfflineRecommendTotalSeconds = promauto.NewGauge(prometheus.GaugeOpts{ Namespace: "gorse", Subsystem: "worker", Name: "offline_recommend_total_seconds", }) MemoryInuseBytesVec = promauto.NewGaugeVec(prometheus.GaugeOpts{ Namespace: "gorse", Subsystem: "worker", Name: "memory_inuse_bytes", }, []string{LabelData}) )
Functions ¶
This section is empty.
Types ¶
type HealthStatus ¶
type ItemCache ¶
ItemCache is alias of map[string]data.Item.
func NewItemCache ¶
NewItemCache creates a new ItemCache.
type Pipeline ¶
type Pipeline struct {
Config *config.Config
CacheClient cache.Database
DataClient data.Database
Tracer *monitor.Monitor
Jobs int
MatrixFactorizationItems *logics.MatrixFactorizationItems
MatrixFactorizationUsers *logics.MatrixFactorizationUsers
ClickThroughRateModel ctr.FactorizationMachines
// contains filtered or unexported fields
}
type Worker ¶
type Worker struct {
Pipeline
// contains filtered or unexported fields
}
Worker manages states of a worker node.
func NewWorker ¶
func NewWorker( masterHost string, masterPort int, httpHost string, httpPort int, jobs int, cacheFile string, tlsConfig *util.TLSConfig, interval time.Duration, ) *Worker
NewWorker creates a new worker node.
func (*Worker) ServeHTTP ¶
func (w *Worker) ServeHTTP()
ServeHTTP serves Prometheus metrics and API.
func (*Worker) WorkerName ¶
Click to show internal directories.
Click to hide internal directories.