Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type JobStore ¶
type JobStore interface { StoreJobPlan(*bbolt.Tx, *raft_log.CompactionJobPlan) error GetJobPlan(tx *bbolt.Tx, name string) (*raft_log.CompactionJobPlan, error) DeleteJobPlan(tx *bbolt.Tx, name string) error StoreJobState(*bbolt.Tx, *raft_log.CompactionJobState) error DeleteJobState(tx *bbolt.Tx, name string) error ListEntries(*bbolt.Tx) iter.Iterator[*raft_log.CompactionJobState] CreateBuckets(*bbolt.Tx) error }
JobStore does not really store jobs as they are: it explicitly distinguishes between the job and the job state.
Implementation note: block metadata should never be stored in StoreJob: those are already stored in the metadata index.
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
func NewScheduler ¶
func NewScheduler(config Config, store JobStore, reg prometheus.Registerer) *Scheduler
NewScheduler creates a scheduler with the given lease duration. Typically, callers should update jobs at the interval not exceeding the half of the lease duration.
func (*Scheduler) NewSchedule ¶
func (*Scheduler) UpdateSchedule ¶
Click to show internal directories.
Click to hide internal directories.