Documentation ¶
Index ¶
- type InsertQueue
- type Metrics
- func (m *Metrics) AddNodeData(data *models.CelestiaNode) error
- func (m *Metrics) FindByNodeId(nodeId string, offset, limit int) ([]models.CelestiaNode, int64, error)
- func (m *Metrics) FindByNodeIdAtNetworkHeight(nodeId string, networkHeight uint64) ([]models.CelestiaNode, error)
- func (m *Metrics) FindByNodeIdAtNetworkHeightRange(nodeId string, networkHeightBegin, networkHeightEnd uint64) ([]models.CelestiaNode, error)
- func (m *Metrics) GetAllNodes(offset, limit int) ([]models.CelestiaNode, int64, error)
- func (m *Metrics) GetLatestNodeData(nodeId string) (models.CelestiaNode, error)
- func (m *Metrics) GetNodeDataByMetricTime(nodeId string, metricTime time.Time) (models.CelestiaNode, error)
- func (m *Metrics) GetNodeUpTime(nodeId string) (float32, error)
- func (m *Metrics) GetNodesByType(nType receiver.NodeType, offset, limit int) ([]models.CelestiaNode, int64, error)
- func (m *Metrics) GetNodesVersions(nodeId string) ([]models.NodeVersion, error)
- func (m *Metrics) RecomputeUptimeForAll(uptimeStartTime, uptimeEndTime time.Time) ([]models.CelestiaNode, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InsertQueue ¶
type InsertQueue struct {
// contains filtered or unexported fields
}
func NewInsertQueue ¶
func NewInsertQueue(metrics *Metrics) *InsertQueue
func (*InsertQueue) Add ¶
func (i *InsertQueue) Add(data *models.CelestiaNode)
This function puts data in a queue and adds them to the DB whenever it can,
to be able to keep up with a big load of coming data
func (*InsertQueue) Start ¶
func (i *InsertQueue) Start() error
func (*InsertQueue) Stop ¶
func (i *InsertQueue) Stop()
type Metrics ¶
type Metrics struct { InsertQueue *InsertQueue // contains filtered or unexported fields }
func (*Metrics) AddNodeData ¶
func (m *Metrics) AddNodeData(data *models.CelestiaNode) error
func (*Metrics) FindByNodeId ¶
func (*Metrics) FindByNodeIdAtNetworkHeight ¶
func (*Metrics) FindByNodeIdAtNetworkHeightRange ¶
func (*Metrics) GetAllNodes ¶
func (*Metrics) GetLatestNodeData ¶
func (m *Metrics) GetLatestNodeData(nodeId string) (models.CelestiaNode, error)
func (*Metrics) GetNodeDataByMetricTime ¶
func (*Metrics) GetNodesByType ¶
func (*Metrics) GetNodesVersions ¶
func (m *Metrics) GetNodesVersions(nodeId string) ([]models.NodeVersion, error)
func (*Metrics) RecomputeUptimeForAll ¶
Click to show internal directories.
Click to hide internal directories.