Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Error = errs.Class("repairer error")
)
Error is a standard error class for this package.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { MaxRepair int `help:"maximum segments that can be repaired concurrently" releaseDefault:"5" devDefault:"1"` Interval time.Duration `help:"how frequently repairer should try and repair more data" releaseDefault:"1h" devDefault:"0h5m0s"` Timeout time.Duration `help:"time limit for uploading repaired pieces to new storage nodes" devDefault:"10m0s" releaseDefault:"2h"` MaxBufferMem memory.Size `help:"maximum buffer memory (in bytes) to be allocated for read buffers" default:"4M"` MaxExcessRateOptimalThreshold float64 `` /* 135-byte string literal not displayed */ }
Config contains configurable values for repairer
type SegmentRepairer ¶
type SegmentRepairer struct {
// contains filtered or unexported fields
}
SegmentRepairer for segments
func NewSegmentRepairer ¶
func NewSegmentRepairer( log *zap.Logger, metainfo *metainfo.Service, orders *orders.Service, cache *overlay.Cache, ec ecclient.Client, timeout time.Duration, excessOptimalThreshold float64, ) *SegmentRepairer
NewSegmentRepairer creates a new instance of SegmentRepairer.
excessPercentageOptimalThreshold is the percentage to apply over the optimal threshould to determine the maximum limit of nodes to upload repaired pieces, when negative, 0 is applied.
type Service ¶
type Service struct { Limiter *sync2.Limiter Loop sync2.Cycle // contains filtered or unexported fields }
Service contains the information needed to run the repair service
Click to show internal directories.
Click to hide internal directories.