Documentation
¶
Index ¶
- Variables
- func Run(satelliteConn *pgx.Conn, loop RangedLoop) error
- type Bucket
- type Checker
- type CheckerFork
- type CheckerLoop
- type Count
- func (c *Count) Finish(ctx context.Context) error
- func (c *Count) Fork(ctx context.Context) (rangedloop.Partial, error)
- func (c *Count) Join(ctx context.Context, partial rangedloop.Partial) error
- func (c *Count) Process(ctx context.Context, segments []rangedloop.Segment) error
- func (c *Count) Start(ctx context.Context, time time.Time) error
- func (c *Count) Stats(cb func(key monkit.SeriesKey, field string, val float64))
- type DurabilityLoop
- type FindSegment
- func (c *FindSegment) Finish(ctx context.Context) error
- func (c *FindSegment) Fork(ctx context.Context) (rangedloop.Partial, error)
- func (c *FindSegment) Join(ctx context.Context, partial rangedloop.Partial) error
- func (c *FindSegment) Run() error
- func (c *FindSegment) Start(ctx context.Context, time time.Time) error
- type FindSegmentPartial
- type FullScan
- type FullSelectedNode
- type Node
- type NodeSpace
- type NodeSpaceFork
- type Object
- type PieceList
- type PieceListFork
- type PieceListLoop
- type Project
- type RangedLoop
- type SQLProvider
- type Segment
- type UsedSpace
- type UsedSpaceFork
- type UsedSpaceLoop
- type WithRangedLoop
Constants ¶
This section is empty.
Variables ¶
View Source
var Error = errs.Class("rs")
Functions ¶
Types ¶
type Checker ¶ added in v1.10.0
type Checker struct {
// contains filtered or unexported fields
}
func NewChecker ¶ added in v1.10.0
func NewChecker(allNodes []nodeselection.SelectedNode, threshold int) *Checker
type CheckerFork ¶ added in v1.10.0
type CheckerFork struct {
// contains filtered or unexported fields
}
func (*CheckerFork) Process ¶ added in v1.10.0
func (c *CheckerFork) Process(ctx context.Context, segments []rangedloop.Segment) error
type CheckerLoop ¶ added in v1.14.0
type CheckerLoop struct {
WithRangedLoop
CheckerThreshold *int `help:"set a normalized health threshold to do a durability check"`
}
func (CheckerLoop) Run ¶ added in v1.14.0
func (c CheckerLoop) Run() error
type Count ¶
type Count struct {
// contains filtered or unexported fields
}
type DurabilityLoop ¶ added in v1.14.0
type DurabilityLoop struct {
WithRangedLoop
}
func (DurabilityLoop) Run ¶ added in v1.14.0
func (d DurabilityLoop) Run() error
type FindSegment ¶ added in v1.18.0
type FindSegment struct {
WithRangedLoop
SegmentID uuid.UUID `arg:"" help:"set a SegmentID to find and export segments"`
}
func (*FindSegment) Finish ¶ added in v1.18.0
func (c *FindSegment) Finish(ctx context.Context) error
func (*FindSegment) Fork ¶ added in v1.18.0
func (c *FindSegment) Fork(ctx context.Context) (rangedloop.Partial, error)
func (*FindSegment) Join ¶ added in v1.18.0
func (c *FindSegment) Join(ctx context.Context, partial rangedloop.Partial) error
func (*FindSegment) Run ¶ added in v1.18.0
func (c *FindSegment) Run() error
type FindSegmentPartial ¶ added in v1.18.0
func (*FindSegmentPartial) Process ¶ added in v1.18.0
func (s *FindSegmentPartial) Process(ctx context.Context, segments []rangedloop.Segment) error
type FullScan ¶
type FullScan struct {
// contains filtered or unexported fields
}
func (*FullScan) CreateRanges ¶
func (f *FullScan) CreateRanges(_ context.Context, nRanges int, batchSize int) ([]rangedloop.SegmentProvider, error)
type FullSelectedNode ¶
type FullSelectedNode struct {
nodeselection.SelectedNode
Email string
Wallet string
}
func GetParticipatingNodes ¶
func GetParticipatingNodes(ctx context.Context, db tagsql.DB) (records []*FullSelectedNode, err error)
GetParticipatingNodes returns all known participating nodes (this includes all known nodes excluding nodes that have been disqualified or gracefully exited).
type NodeSpace ¶ added in v1.14.0
type NodeSpace struct {
// contains filtered or unexported fields
}
func NewNodeSpace ¶ added in v1.14.0
func NewNodeSpace(placement storj.PlacementConstraint, expiration time.Time) *NodeSpace
type NodeSpaceFork ¶ added in v1.14.0
type NodeSpaceFork struct {
// contains filtered or unexported fields
}
func (*NodeSpaceFork) Close ¶ added in v1.14.0
func (p *NodeSpaceFork) Close() error
func (*NodeSpaceFork) Process ¶ added in v1.14.0
func (p *NodeSpaceFork) Process(ctx context.Context, segments []rangedloop.Segment) error
type PieceList ¶ added in v1.4.0
type PieceList struct {
// contains filtered or unexported fields
}
func NewPieceList ¶ added in v1.4.0
type PieceListFork ¶ added in v1.4.0
type PieceListFork struct {
// contains filtered or unexported fields
}
func (*PieceListFork) Close ¶ added in v1.9.0
func (p *PieceListFork) Close() error
func (*PieceListFork) Process ¶ added in v1.4.0
func (p *PieceListFork) Process(ctx context.Context, segments []rangedloop.Segment) error
type PieceListLoop ¶ added in v1.14.0
type PieceListLoop struct {
WithRangedLoop
NodeID string `help:"set a NodeID to generate a piece list report"`
}
func (PieceListLoop) Run ¶ added in v1.14.0
func (p PieceListLoop) Run() error
type RangedLoop ¶
type RangedLoop struct {
UsedSpace UsedSpaceLoop `cmd:"" help:"calculate used space for a given placement constraint and expiration time"`
Checker CheckerLoop `cmd:"" help:"check segment health and list segments below a given normalized health threshold"`
PieceList PieceListLoop `cmd:"" help:"generate a piece list report for a given NodeID or a file containing a list of NodeIDs"`
FindSegment FindSegment `cmd:"" help:"find and export segments for a given SegmentID"`
}
type SQLProvider ¶
type SQLProvider struct {
// contains filtered or unexported fields
}
func (*SQLProvider) Iterate ¶
func (s *SQLProvider) Iterate(ctx context.Context, fn func([]rangedloop.Segment) error) error
func (*SQLProvider) Range ¶
func (s *SQLProvider) Range() rangedloop.UUIDRange
type UsedSpace ¶ added in v1.14.0
type UsedSpace struct {
// contains filtered or unexported fields
}
func NewUsedSpace ¶ added in v1.14.0
func NewUsedSpace(placement storj.PlacementConstraint, expiration time.Time) *UsedSpace
type UsedSpaceFork ¶ added in v1.14.0
type UsedSpaceFork struct {
// contains filtered or unexported fields
}
func (*UsedSpaceFork) Close ¶ added in v1.14.0
func (p *UsedSpaceFork) Close() error
func (*UsedSpaceFork) Process ¶ added in v1.14.0
func (p *UsedSpaceFork) Process(ctx context.Context, segments []rangedloop.Segment) error
type UsedSpaceLoop ¶ added in v1.14.0
type UsedSpaceLoop struct {
WithRangedLoop
Placement *storj.PlacementConstraint `help:"set a placement constraint to calculate used space for"`
Expiration time.Time `help:"set an expiration time to limit the scan to segments expiring before this time, format: 2006-01-02T15:04:05Z07:00"`
}
func (UsedSpaceLoop) Run ¶ added in v1.14.0
func (u UsedSpaceLoop) Run() error
type WithRangedLoop ¶ added in v1.14.0
type WithRangedLoop struct {
db.WithDatabase
ScanType string `default:"full"`
ScanParam int
Parallelism int `default:"1"`
BackupBucket string `required:"true"`
BackupDay string `required:"true"`
}
func (WithRangedLoop) RunLoop ¶ added in v1.14.0
func (r WithRangedLoop) RunLoop(fn func(observers []rangedloop.Observer) []rangedloop.Observer) error
Click to show internal directories.
Click to hide internal directories.