repairer

package
v0.8.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2019 License: AGPL-3.0 Imports: 17 Imported by: 0

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" default:"100"`
	Interval     time.Duration `help:"how frequently checker should audit segments" default:"1h0m0s"`
	Timeout      time.Duration `help:"time limit for uploading repaired pieces to new storage nodes" default:"1m0s"`
	MaxBufferMem memory.Size   `help:"maximum buffer memory (in bytes) to be allocated for read buffers" default:"4M"`
}

Config contains configurable values for repairer

func (Config) GetSegmentRepairer

func (c Config) GetSegmentRepairer(ctx context.Context, tc transport.Client, pointerdb *pointerdb.Service, orders *orders.Service, cache *overlay.Cache, identity *identity.FullIdentity) (ss SegmentRepairer, err error)

GetSegmentRepairer creates a new segment repairer from storeConfig values

type SegmentRepairer

type SegmentRepairer interface {
	Repair(ctx context.Context, path storj.Path, lostPieces []int32) (err error)
}

SegmentRepairer is a repairer for segments

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service contains the information needed to run the repair service

func NewService

func NewService(queue queue.RepairQueue, config *Config, interval time.Duration, concurrency int, transport transport.Client, pointerdb *pointerdb.Service, orders *orders.Service, cache *overlay.Cache) *Service

NewService creates repairing service

func (*Service) Close

func (service *Service) Close() error

Close closes resources

func (*Service) Run

func (service *Service) Run(ctx context.Context) (err error)

Run runs the repairer service

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL