monitor

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2019 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// Error is the default error class for piecestore monitor errors
	Error = errs.Class("piecestore monitor")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Interval time.Duration `help:"how frequently Kademlia bucket should be refreshed with node stats" default:"1h0m0s"`
}

Config defines parameters for storage node disk and bandwidth usage monitoring.

type Service

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

Service which monitors disk usage and updates kademlia network as necessary.

func NewService

func NewService(log *zap.Logger, routingTable *kademlia.RoutingTable, store *pieces.Store, pieceInfo pieces.DB, usageDB bandwidth.DB, allocatedDiskSpace, allocatedBandwidth int64, interval time.Duration) *Service

NewService creates a new storage node monitoring service.

func (*Service) Run

func (service *Service) Run(ctx context.Context) (err error)

Run runs monitor service

Jump to

Keyboard shortcuts

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