Versions in this module Expand all Collapse all v0 v0.1.0 Jun 26, 2020 Changes in this version + type CephClient interface + BackfillingPGs func() (int, error) + Close func() + CrushReweight func(osdID int, crushWeight float64) error + OSDTree func() (*OSDTreeOut, error) + RecoveringPGs func() (int, error) + func NewCephClient(user, configPath string) (CephClient, error) + type OSDTreeOut struct + Nodes []nodeType + Stray []nodeType + type Option func(*Rebalancer) + func WithCephClient(val CephClient) Option + func WithDryRun(val bool) Option + func WithMaxBackfillPGsAllowed(val int) Option + func WithMaxRecoveryPGsAllowed(val int) Option + func WithSleepInterval(val time.Duration) Option + func WithTargetCrushWeightMap(val map[int]float64) Option + func WithWeightIncrement(val float64) Option + type Rebalancer struct + func New(opt ...Option) (*Rebalancer, error) + func (r *Rebalancer) Collect(ch chan<- prometheus.Metric) + func (r *Rebalancer) Describe(ch chan<- *prometheus.Desc) + func (r *Rebalancer) DoReweight() + func (r *Rebalancer) Run(ctx context.Context)