Documentation ¶
Index ¶
Constants ¶
View Source
const ( // RouteNodeInfoExtended is the route to get additional info about the node. // GET returns the extended info of the node. RouteNodeInfoExtended = "/info" // RouteDatabaseSizes is the route to get the size of the databases. // GET returns the sizes of the databases. RouteDatabaseSizes = "/database/sizes" // RouteGossipMetrics is the route to get metrics about gossip. // GET returns the gossip metrics. RouteGossipMetrics = "/gossip" )
Variables ¶
View Source
var (
Component *app.Component
)
View Source
var NewEvents = event.CreateGroupConstructor(func() (self *EventsStruct) { return &EventsStruct{ ComponentCounterUpdated: event.New1[*ComponentCounterUpdatedEvent](), } })
NewEvents contains the constructor of the Events object (it is generated by a generic factory).
Functions ¶
This section is empty.
Types ¶
type ComponentCounterUpdatedEvent ¶
type ComponentCounterUpdatedEvent struct {
ComponentStatus map[ComponentType]uint64
}
type ComponentType ¶
type ComponentType byte
ComponentType defines the component for the different BPS metrics.
const ( // Received denotes blocks received from the network. Received ComponentType = iota // Issued denotes blocks that the node itself issued. Issued // Allowed denotes blocks that passed the filter checks. Allowed // Solidified denotes blocks solidified by the solidifier. Solidified // Scheduled denotes blocks scheduled by the scheduler. Scheduled // SchedulerDropped denotes blocks dropped by the scheduler. SchedulerDropped // SchedulerSkipped denotes confirmed blocks skipped by the scheduler. SchedulerSkipped // Booked denotes blocks booked by the booker. Booked )
func (ComponentType) String ¶
func (c ComponentType) String() string
String returns the stringified component type.
type DatabaseSizesMetric ¶
type DatabaseSizesMetric struct { Permanent int64 `json:"permanent"` Prunable int64 `json:"prunable"` TxRetainer int64 `json:"txRetainer"` Total int64 `json:"total"` Time int64 `json:"ts"` }
DatabaseSizesMetric represents database size metrics.
type EventsStruct ¶
type EventsStruct struct { // Fired when the component counter per second metric is updated. ComponentCounterUpdated *event.Event1[*ComponentCounterUpdatedEvent] event.Group[EventsStruct, *EventsStruct] }
var Events *EventsStruct
Events defines the events of the plugin.
type NodeInfoExtended ¶
type NodeInfoExtended struct { Version string `json:"version"` LatestVersion string `json:"latestVersion"` Uptime int64 `json:"uptime"` NodeID string `json:"nodeId"` NodeAlias string `json:"nodeAlias"` MemoryUsage int64 `json:"memUsage"` }
NodeInfoExtended represents extended information about the node.
Click to show internal directories.
Click to hide internal directories.