Documentation ¶
Index ¶
- Variables
- type Chore
- type Config
- type Endpoint
- func (e *Endpoint) GetExitProgress(ctx context.Context, req *pb.GetExitProgressRequest) (*pb.GetExitProgressResponse, error)
- func (e *Endpoint) GetNonExitingSatellites(ctx context.Context, req *pb.GetNonExitingSatellitesRequest) (*pb.GetNonExitingSatellitesResponse, error)
- func (e *Endpoint) InitiateGracefulExit(ctx context.Context, req *pb.InitiateGracefulExitRequest) (*pb.ExitProgress, error)
- type Worker
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Error is the default error class for graceful exit package. Error = errs.Class("gracefulexit") )
Functions ¶
This section is empty.
Types ¶
type Chore ¶
Chore checks for satellites that the node is exiting and creates a worker per satellite to complete the process.
architecture: Chore
type Config ¶
type Config struct { ChoreInterval time.Duration `help:"how often to run the chore to check for satellites for the node to exit." releaseDefault:"15m" devDefault:"10s"` NumWorkers int `help:"number of workers to handle satellite exits" default:"3"` NumConcurrentTransfers int `help:"number of concurrent transfers per graceful exit worker" default:"1"` MinBytesPerSecond memory.Size `help:"the minimum acceptable bytes that an exiting node can transfer per second to the new node" default:"128B"` MinDownloadTimeout time.Duration `help:"the minimum duration for downloading a piece from storage nodes before timing out" default:"2m"` }
Config for graceful exit
type Endpoint ¶
type Endpoint struct {
// contains filtered or unexported fields
}
Endpoint is
func NewEndpoint ¶
func NewEndpoint(log *zap.Logger, trust *trust.Pool, satellites satellites.DB, usageCache *pieces.BlobsUsageCache) *Endpoint
NewEndpoint creates a new graceful exit endpoint.
func (*Endpoint) GetExitProgress ¶
func (e *Endpoint) GetExitProgress(ctx context.Context, req *pb.GetExitProgressRequest) (*pb.GetExitProgressResponse, error)
GetExitProgress returns graceful exit progress on each satellite that a storagde node has started exiting.
func (*Endpoint) GetNonExitingSatellites ¶
func (e *Endpoint) GetNonExitingSatellites(ctx context.Context, req *pb.GetNonExitingSatellitesRequest) (*pb.GetNonExitingSatellitesResponse, error)
GetNonExitingSatellites returns a list of satellites that the storagenode has not begun a graceful exit for.
func (*Endpoint) InitiateGracefulExit ¶
func (e *Endpoint) InitiateGracefulExit(ctx context.Context, req *pb.InitiateGracefulExitRequest) (*pb.ExitProgress, error)
InitiateGracefulExit updates one or more satellites in the storagenode's database to be gracefully exiting.
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
Worker is responsible for completing the graceful exit for a given satellite.
Click to show internal directories.
Click to hide internal directories.