Versions in this module Expand all Collapse all v1 v1.0.0 Jul 21, 2022 Changes in this version + type Calculator interface + CalculateUptime func(nodeID ids.NodeID) (time.Duration, time.Time, error) + CalculateUptimePercent func(nodeID ids.NodeID) (float64, error) + CalculateUptimePercentFrom func(nodeID ids.NodeID, startTime time.Time) (float64, error) + type LockedCalculator interface + SetCalculator func(isBootstrapped *utils.AtomicBool, lock sync.Locker, newC Calculator) + func NewLockedCalculator() LockedCalculator + type Manager interface + func NewManager(state State) Manager + type State interface + GetStartTime func(nodeID ids.NodeID) (startTime time.Time, err error) + GetUptime func(nodeID ids.NodeID) (upDuration time.Duration, lastUpdated time.Time, err error) + SetUptime func(nodeID ids.NodeID, upDuration time.Duration, lastUpdated time.Time) error + type TestManager interface + SetTime func(time.Time) + type TestState struct + func NewTestState() *TestState + func (s *TestState) AddNode(nodeID ids.NodeID, startTime time.Time) + func (s *TestState) GetStartTime(nodeID ids.NodeID) (time.Time, error) + func (s *TestState) GetUptime(nodeID ids.NodeID) (time.Duration, time.Time, error) + func (s *TestState) SetUptime(nodeID ids.NodeID, upDuration time.Duration, lastUpdated time.Time) error + type Tracker interface + Connect func(nodeID ids.NodeID) error + Disconnect func(nodeID ids.NodeID) error + IsConnected func(nodeID ids.NodeID) bool + Shutdown func(nodeIDs []ids.NodeID) error + StartTracking func(nodeIDs []ids.NodeID) error v1.0.0-alpha Nov 22, 2022