Documentation ¶
Index ¶
- type Closer
- type Cluster
- type ClusterStats
- type Config
- type DB
- type DurationQueue
- type Fragment
- type Keyspace
- type Logger
- type Regulator
- type Repair
- type RepairStats
- type RepairStatus
- type Scheduler
- type Server
- type Table
- type Token
- type TokenSet
- type Track
- func (t *Track) CheckCompletion()
- func (t *Track) Complete(duration time.Duration) (int, int, time.Duration, float32, time.Duration, time.Duration)
- func (t *Track) IsNew() bool
- func (t *Track) IsRepaired(threshold time.Duration) bool
- func (t *Track) IsSpoiled(threshold time.Duration) bool
- func (t *Track) Restart()
- func (t *Track) Skip()
- func (t *Track) Start(total int)
- type Tracker
- type ValueReader
- type ValueWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶ added in v0.8.0
type Cluster struct { ID int Name string `yaml:"name"` Interval string `yaml:"interval"` Keyspaces []*Keyspace `yaml:"keyspaces"` Host string Port int // contains filtered or unexported fields }
Cluster contains configuration of cluster item
func (*Cluster) RegulateWith ¶ added in v0.8.0
RegulateWith given rate limiter
type ClusterStats ¶ added in v0.8.0
type ClusterStats struct { Cluster string ClusterDuration time.Duration LastClusterSuccess time.Time }
ClusterStats for logging
type Config ¶
Config is a configuration file struct
func ReadConfiguration ¶ added in v0.8.0
ReadConfiguration parses yaml configuration file
type DB ¶ added in v0.8.0
type DB interface { CreateKey(keys ...string) string ValueReader ValueWriter Closer }
DB implements DB interface
func NewRedisDb ¶ added in v0.8.0
NewRedisDb connects to DB
type DurationQueue ¶ added in v0.8.0
type DurationQueue interface { Push(time.Duration) Pop() time.Duration Len() int Average() time.Duration }
DurationQueue is a fixed size FIFO queue of durations
func NewQueue ¶ added in v0.8.0
func NewQueue(size int) DurationQueue
NewQueue returns a new queue with the given initial size.
type Keyspace ¶ added in v0.8.0
type Keyspace struct { Name string `yaml:"name"` // contains filtered or unexported fields }
Keyspace contains keyspace repair schedule description
type Logger ¶ added in v0.8.0
type Logger interface { WithError(err error) Logger WithFields(str interface{}) Logger Debug(message interface{}) Logger Error(message interface{}) Logger Fatal(message interface{}) Logger Warn(message interface{}) Logger Info(message interface{}) Logger }
Logger logs messages
type Regulator ¶ added in v0.8.0
type Regulator interface { LimitRateTo(key string, duration time.Duration) time.Duration Limit(key string) Rate(key string) time.Duration }
Regulator moderates the process
func NewRegulator ¶ added in v0.8.0
NewRegulator initializes new stability service object
type Repair ¶
type Repair struct { ID int `json:"id"` Cluster string `json:"cluster"` Keyspace string `json:"keyspace"` Table string `json:"table"` Endpoint string `json:"endpoint"` Start string `json:"start"` End string `json:"end"` }
Repair object
type RepairStats ¶ added in v0.8.0
type RepairStats struct { Cluster string Keyspace string Table string ID int Duration time.Duration Rate time.Duration TableTotal int TableCompleted int TablePercent float32 TableDuration time.Duration TableAverage time.Duration TableEstimate time.Duration KeyspaceTotal int KeyspaceCompleted int KeyspacePercent float32 KeyspaceDuration time.Duration KeyspaceAverage time.Duration KeyspaceEstimate time.Duration ClusterTotal int ClusterCompleted int ClusterPercent float32 ClusterDuration time.Duration ClusterAverage time.Duration ClusterEstimate time.Duration LastClusterSuccess time.Time }
RepairStats for logging
type RepairStatus ¶
RepairStatus keeps status of repair
type Scheduler ¶ added in v0.8.0
type Scheduler interface { RegulateWith(Regulator) Scheduler Schedule() TrackIn(Tracker) Scheduler Until(chan bool) Scheduler }
Scheduler creates jobs in time
type Table ¶ added in v0.8.0
type Table struct { Name string `yaml:"name"` Size int64 `yaml:"size"` Slices int `yaml:"slices"` Weight float32 `yaml:"weight"` // contains filtered or unexported fields }
Table contains column families to repair
func (*Table) SetRepairs ¶ added in v0.8.0
SetRepairs to table
type Track ¶ added in v0.8.0
type Track struct { Completed bool Count int Total int Percent float32 Duration time.Duration Average time.Duration Estimate time.Duration Rate time.Duration Finished time.Time Started time.Time }
Track of repair item
func (*Track) CheckCompletion ¶ added in v0.8.0
func (t *Track) CheckCompletion()
CheckCompletion of repair
func (*Track) Complete ¶ added in v0.8.0
func (t *Track) Complete(duration time.Duration) (int, int, time.Duration, float32, time.Duration, time.Duration)
Complete repair fragment
func (*Track) IsRepaired ¶ added in v0.8.0
IsRepaired is check for repair completeness
type Tracker ¶ added in v0.8.0
type Tracker interface { Complete(cluster, keyspace, table string, repair int) *RepairStats IsCompleted(cluster, keyspace, table string, repair int, threshold time.Duration) bool Restart(cluster, keyspace, table string, repair int) Skip(cluster, keyspace, table string, repair int) Start(cluster, keyspace, table string, repair int) StartTable(cluster, keyspace, table string, total int) StartKeyspace(cluster, keyspace string, total int) StartCluster(cluster string, total int) }
Tracker keeps progress of repair
func NewTracker ¶ added in v0.8.0
NewTracker created new progress tracker
type ValueReader ¶ added in v0.8.0
ValueReader reads position data from DB