rangedloop

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2025 License: AGPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Error = errs.Class("rs")

Functions

func Run

func Run(satelliteConn *pgx.Conn, loop RangedLoop) error

Types

type Bucket

type Bucket struct {
	ID   []byte
	Name []byte
}

type Count

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

func NewCount

func NewCount() *Count

func (*Count) Finish

func (c *Count) Finish(ctx context.Context) error

func (*Count) Fork

func (c *Count) Fork(ctx context.Context) (rangedloop.Partial, error)

func (*Count) Join

func (c *Count) Join(ctx context.Context, partial rangedloop.Partial) error

func (*Count) Process

func (c *Count) Process(ctx context.Context, segments []rangedloop.Segment) error

func (*Count) Start

func (c *Count) Start(ctx context.Context, time time.Time) error

func (*Count) Stats

func (c *Count) Stats(cb func(key monkit.SeriesKey, field string, val float64))

type FullScan

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

func NewFullScan

func NewFullScan(db *metabase.DB, scanType string) *FullScan

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 Node

type Node struct {
	NodeID    storj.NodeID
	Address   string
	Email     string
	Country   location.CountryCode
	LastNet   string
	UpdatedAt time.Time
}

type Object

type Object struct {
	StreamID     []byte
	PieceAliases []byte
	ObjectKey    []byte
}

type PieceList added in v1.4.0

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

func NewPieceList added in v1.4.0

func NewPieceList(nodeIDs []storj.NodeID) *PieceList

func (*PieceList) Finish added in v1.4.0

func (p *PieceList) Finish(ctx context.Context) error

func (*PieceList) Fork added in v1.4.0

func (p *PieceList) Fork(ctx context.Context) (rangedloop.Partial, error)

func (*PieceList) Join added in v1.4.0

func (p *PieceList) Join(ctx context.Context, partial rangedloop.Partial) error

func (*PieceList) Start added in v1.4.0

func (p *PieceList) Start(ctx context.Context, time time.Time) (err error)

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 Project

type Project struct {
	ID   []byte
	Name string
}

type RangedLoop

type RangedLoop struct {
	db.WithDatabase
	ScanType  string `default:"full"`
	ScanParam int

	Parallelism int `default:"1"`
	NodeID      string
	Output      string

	BackupBucket   string
	BackupDatabase string
	BackupDay      string
	Instance       string
}

func (RangedLoop) Run

func (r RangedLoop) Run() error

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 Segment

type Segment struct {
	StreamID  []byte
	NodeAlias []byte
	Position  int
	Placement int
}

Jump to

Keyboard shortcuts

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