Versions in this module Expand all Collapse all v1 v1.1.14 Oct 6, 2022 Changes in this version + func StatScaleToTime(r float64) time.Duration + func TimeToStatScale(d time.Duration) float64 + type FillSet struct + func NewFillSet(ns *nodestate.NodeStateMachine, input enode.Iterator, flags nodestate.Flags) *FillSet + func (fs *FillSet) Close() + func (fs *FillSet) SetTarget(target int) + type NodeValueTracker struct + func (nv *NodeValueTracker) RtStats() ResponseTimeStats + func (nv *NodeValueTracker) Served(reqs []ServedRequest, respTime time.Duration) + func (nv *NodeValueTracker) UpdateCosts(reqCosts []uint64) + type PrivateClientAPI struct + func NewPrivateClientAPI(vt *ValueTracker) *PrivateClientAPI + func (api *PrivateClientAPI) Distribution(nodeStr string, normalized bool) (RtDistribution, error) + func (api *PrivateClientAPI) RequestStats() []RequestStatsItem + func (api *PrivateClientAPI) Timeout(nodeStr string, failRate float64) (float64, error) + func (api *PrivateClientAPI) Value(nodeStr string, timeout float64) (float64, error) + type QueryFunc func(*enode.Node) int + type QueueIterator struct + func NewQueueIterator(ns *nodestate.NodeStateMachine, requireFlags, disableFlags nodestate.Flags, ...) *QueueIterator + func (qi *QueueIterator) Close() + func (qi *QueueIterator) Next() bool + func (qi *QueueIterator) Node() *enode.Node + type RequestInfo struct + InitAmount float64 + InitValue float64 + Name string + type RequestStatsItem struct + Name string + ReqAmount float64 + ReqValue float64 + type ResponseTimeStats struct + func (rt *ResponseTimeStats) Add(respTime time.Duration, weight float64, expFactor utils.ExpirationFactor) + func (rt *ResponseTimeStats) AddStats(s *ResponseTimeStats) + func (rt *ResponseTimeStats) DecodeRLP(s *rlp.Stream) error + func (rt *ResponseTimeStats) EncodeRLP(w io.Writer) error + func (rt *ResponseTimeStats) SubStats(s *ResponseTimeStats) + func (rt ResponseTimeStats) Distribution(normalized bool, expFactor utils.ExpirationFactor) (res RtDistribution) + func (rt ResponseTimeStats) Timeout(failRatio float64) time.Duration + func (rt ResponseTimeStats) Value(weights ResponseTimeWeights, expFactor utils.ExpirationFactor) float64 + type ResponseTimeWeights [timeStatLength]float64 + func TimeoutWeights(timeout time.Duration) (res ResponseTimeWeights) + type RtDistribution [timeStatLength][2]float64 + type ServedRequest struct + Amount uint32 + ReqType uint32 + type ServerPool struct + func NewServerPool(db ethdb.KeyValueStore, dbKey []byte, mixTimeout time.Duration, ...) (*ServerPool, enode.Iterator) + func (s *ServerPool) API() *PrivateClientAPI + func (s *ServerPool) AddMetrics(...) + func (s *ServerPool) AddSource(source enode.Iterator) + func (s *ServerPool) DialNode(n *enode.Node) *enode.Node + func (s *ServerPool) GetTimeout() time.Duration + func (s *ServerPool) Persist(n *enode.Node) + func (s *ServerPool) RegisterNode(node *enode.Node) (*NodeValueTracker, error) + func (s *ServerPool) Start() + func (s *ServerPool) Stop() + func (s *ServerPool) UnregisterNode(node *enode.Node) + type ValueTracker struct + func NewValueTracker(db ethdb.KeyValueStore, clock mclock.Clock, reqInfo []RequestInfo, ...) *ValueTracker + func (vt *ValueTracker) GetNode(id enode.ID) *NodeValueTracker + func (vt *ValueTracker) Register(id enode.ID) *NodeValueTracker + func (vt *ValueTracker) RequestStats() []RequestStatsItem + func (vt *ValueTracker) RtStats() ResponseTimeStats + func (vt *ValueTracker) StatsExpFactor() utils.ExpirationFactor + func (vt *ValueTracker) StatsExpirer() *utils.Expirer + func (vt *ValueTracker) Stop() + func (vt *ValueTracker) Unregister(id enode.ID) + type WrsIterator struct + func NewWrsIterator(ns *nodestate.NodeStateMachine, requireFlags, disableFlags nodestate.Flags, ...) *WrsIterator + func (w *WrsIterator) Close() + func (w *WrsIterator) Next() bool + func (w *WrsIterator) Node() *enode.Node