Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type PlanProcessor ¶
type Service ¶
This service implements common behaviour for plan-processing: 1) wait for next plan, 2) download plan, 3) process each plan entry, 4) delete local plan, 5) repeat. It gets plans from scheduler. During plan processing, this service maintains "progress" status file, and when plan processing finishes, it uploads "finished" plan.
func NewService ¶
func NewService(cfg Config, plansDirectory string, bucket objstore.Bucket, cleanup func(logger log.Logger) error, factory func(planLog log.Logger, userID string, dayStart, dayEnd time.Time) PlanProcessor, l log.Logger, reg prometheus.Registerer) (*Service, error)
Creates new plan processor service. PlansDirectory is used for storing plan files. Bucket client used for downloading plan files. Cleanup function called on startup and after each build. Can be nil. Factory for creating PlanProcessor. Called for each new plan.
Click to show internal directories.
Click to hide internal directories.