Documentation ¶
Index ¶
- Variables
- type Config
- type Observer
- func (observer *Observer) Finish(ctx context.Context) (err error)
- func (observer *Observer) Fork(ctx context.Context) (_ rangedloop.Partial, err error)
- func (observer *Observer) Join(ctx context.Context, partial rangedloop.Partial) (err error)
- func (observer *Observer) Start(ctx context.Context, time time.Time) (err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Error is a standard error class for this package. Error = errs.Class("piecetracker") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { UseRangedLoop bool `help:"whether to enable piece tracker observer with ranged loop" default:"true"` UpdateBatchSize int `help:"batch size for updating nodes with number of pieces" default:"1000"` }
Config is the configuration for the piecetracker.
type Observer ¶
type Observer struct {
// contains filtered or unexported fields
}
Observer implements piecetraker ranged loop observer.
The piecetracker counts the number of pieces currently expected to reside on each node, then passes the counts to the overlay with UpdatePieceCounts().
func NewObserver ¶
func NewObserver(log *zap.Logger, metabaseDB *metabase.DB, overlay overlay.DB, config Config) *Observer
NewObserver creates new piecetracker ranged loop observer.
Click to show internal directories.
Click to hide internal directories.