forgetsatellite

package
v1.109.0-rc Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chore

type Chore struct {
	Loop *sync2.Cycle
	// contains filtered or unexported fields
}

Chore checks for satellites that the node wants to forget and creates a worker per satellite to complete the process.

func NewChore

func NewChore(log *zap.Logger, cleaner *Cleaner, config Config) *Chore

NewChore instantiates a new forget satellite chore.

func (*Chore) Close

func (chore *Chore) Close() error

Close closes the forget satellite chore.

func (*Chore) Run

func (chore *Chore) Run(ctx context.Context) (err error)

Run starts the forget satellite chore.

func (*Chore) RunOnce

func (chore *Chore) RunOnce(ctx context.Context) (err error)

RunOnce runs the forget satellite chore once.

type Cleaner

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

Cleaner is responsible for cleaning up satellite data.

func NewCleaner

func NewCleaner(log *zap.Logger, store *pieces.Store, trust *trust.Pool, usageCache *pieces.BlobsUsageCache, satelliteDB satellites.DB, reputationDB reputation.DB, v0PieceInfoDB pieces.V0PieceInfoDB) *Cleaner

NewCleaner creates a new Cleaner.

func (*Cleaner) ListSatellites

func (c *Cleaner) ListSatellites(ctx context.Context) (satelliteIDs []storj.NodeID, err error)

ListSatellites lists all satellites that are being cleaned up.

func (*Cleaner) Run

func (c *Cleaner) Run(ctx context.Context, satelliteID storj.NodeID) (err error)

Run runs the cleaner.

type Config

type Config struct {
	ChoreInterval time.Duration `help:"how often to run the chore to check for satellites for the node to forget" releaseDefault:"1m" devDefault:"10s"`
	NumWorkers    int           `help:"number of workers to handle forget satellite" default:"1"`
}

Config defines the config for the forget satellite chore.

type Endpoint

type Endpoint struct {
	internalpb.DRPCNodeForgetSatelliteUnimplementedServer
	// contains filtered or unexported fields
}

Endpoint implements private inspector for forget-satellite.

func NewEndpoint

func NewEndpoint(log *zap.Logger, trust *trust.Pool, satellites satellites.DB) *Endpoint

NewEndpoint creates a new forget satellite endpoint.

func (*Endpoint) ForgetSatelliteStatus

ForgetSatelliteStatus returns the status of the forget-satellite process for a satellite.

func (*Endpoint) GetAllForgetSatelliteStatus added in v1.96.4

GetAllForgetSatelliteStatus returns the status of the forget-satellite process for all satellites.

func (*Endpoint) GetUntrustedSatellites

GetUntrustedSatellites returns a list of untrusted satellites.

func (*Endpoint) InitForgetSatellite

InitForgetSatellite initializes the forget-satellite process for a satellite.

type Worker

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

Worker is responsible for completing the cleanup for a given satellite.

func NewWorker

func NewWorker(log *zap.Logger, cleaner *Cleaner, satellite storj.NodeID) *Worker

NewWorker instantiates Worker.

func (*Worker) Run

func (w *Worker) Run(ctx context.Context) (err error)

Run starts the cleanup process for a satellite.

Jump to

Keyboard shortcuts

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