Documentation ¶
Index ¶
- Variables
- type Config
- type Endpoint
- func (endpoint *Endpoint) GracefulExitFeasibility(ctx context.Context, req *pb.GracefulExitFeasibilityRequest) (_ *pb.GracefulExitFeasibilityResponse, err error)
- func (endpoint *Endpoint) Process(stream pb.DRPCSatelliteGracefulExit_ProcessStream) (err error)
- func (endpoint *Endpoint) SetNowFunc(timeFunc func() time.Time)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Error is the default error class for graceful exit package. Error = errs.Class("gracefulexit") // ErrNodeNotFound is returned if a graceful exit entry for a node does not exist in database. ErrNodeNotFound = errs.Class("graceful exit node not found") )
View Source
var ( // ErrInvalidArgument is an error class for invalid argument errors used to check which rpc code to use. ErrInvalidArgument = errs.Class("graceful exit") // ErrIneligibleNodeAge is an error class for when a node has not been on the network long enough to graceful exit. ErrIneligibleNodeAge = errs.Class("node is not yet eligible for graceful exit") )
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v0.23.0
type Config struct { Enabled bool `help:"whether or not graceful exit is enabled on the satellite side." default:"true"` TimeBased bool `` /* 162-byte string literal not displayed */ NodeMinAgeInMonths int `help:"minimum age for a node on the network in order to initiate graceful exit" default:"6" testDefault:"0"` GracefulExitDurationInDays int `help:"number of days it takes to execute a passive graceful exit" default:"30" testDefault:"1"` OfflineCheckInterval time.Duration `help:"how frequently to check uptime ratio of gracefully-exiting nodes" default:"30m" testDefault:"10s"` MinimumOnlineScore float64 `` /* 141-byte string literal not displayed */ }
Config for the chore.
type Endpoint ¶ added in v0.24.0
type Endpoint struct { pb.DRPCSatelliteGracefulExitUnimplementedServer // contains filtered or unexported fields }
Endpoint for handling the transfer of pieces for Graceful Exit.
func NewEndpoint ¶ added in v0.24.0
func NewEndpoint(log *zap.Logger, signer signing.Signer, overlaydb overlay.DB, overlay *overlay.Service, reputation *reputation.Service, metabase *metabase.DB, orders *orders.Service, peerIdentities overlay.PeerIdentities, config Config) *Endpoint
NewEndpoint creates a new graceful exit endpoint.
func (*Endpoint) GracefulExitFeasibility ¶ added in v1.7.1
func (endpoint *Endpoint) GracefulExitFeasibility(ctx context.Context, req *pb.GracefulExitFeasibilityRequest) (_ *pb.GracefulExitFeasibilityResponse, err error)
GracefulExitFeasibility returns node's joined at date, nodeMinAge and if graceful exit available.
func (*Endpoint) Process ¶ added in v0.24.0
func (endpoint *Endpoint) Process(stream pb.DRPCSatelliteGracefulExit_ProcessStream) (err error)
Process is called by storage nodes to receive pieces to transfer to new nodes and get exit status.
func (*Endpoint) SetNowFunc ¶ added in v1.89.2
SetNowFunc applies a function to be used in determining the "now" time for graceful exit purposes.
Click to show internal directories.
Click to hide internal directories.