Documentation ¶
Index ¶
- func AvailableModules() (modules []string)
- func Register(name string, janitor Janitor)
- type Janitor
- type JanitorInfo
- type JanitorWithStatus
- type Scheduler
- func (scheduler *Scheduler) CurrentMasterID() string
- func (scheduler *Scheduler) Enable(janitorNames []string) error
- func (scheduler *Scheduler) EnableDryRun(janitorNames []string) error
- func (scheduler *Scheduler) IsMaster() bool
- func (scheduler *Scheduler) Run()
- func (scheduler *Scheduler) RunElection()
- func (scheduler *Scheduler) ServeHTTP(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AvailableModules ¶
func AvailableModules() (modules []string)
Types ¶
type Janitor ¶
type Janitor interface { // Run performs one round of fixes. If active is true, the // janitor can perform destructive changes to the // topology. Otherwise, it is considered to be in dry run // mode, and it should only log what it would have done if it // were active. Run(active bool) error // Initialize initializes the Janitor. Configure(wr *wrangler.Wrangler, keyspace, shard string) error }
Janitor is a module that fixes the topology. If janitor implements http.Handle, it will have a page added to /janitorz.
type JanitorInfo ¶
func (*JanitorInfo) AverageRuntime ¶
func (ji *JanitorInfo) AverageRuntime() time.Duration
func (*JanitorInfo) ErrorCount ¶
func (ji *JanitorInfo) ErrorCount() int
func (*JanitorInfo) RecordError ¶
func (ji *JanitorInfo) RecordError(err error)
func (*JanitorInfo) RecordSuccess ¶
func (ji *JanitorInfo) RecordSuccess(start time.Time)
func (*JanitorInfo) Runs ¶
func (ji *JanitorInfo) Runs() int
type JanitorWithStatus ¶
type JanitorWithStatus interface { // StatusTemplate should return a string containing the // template that should be used to display the status of the // janitor. The template should expect to get a JanitorInfo // instance wrapping the Janitor itself. StatusTemplate() string }
type Scheduler ¶
func (*Scheduler) CurrentMasterID ¶
func (*Scheduler) EnableDryRun ¶
func (*Scheduler) RunElection ¶
func (scheduler *Scheduler) RunElection()
Click to show internal directories.
Click to hide internal directories.