dashboardmetrics

package
v1.0.0-alpha.13 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

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.

Jump to

Keyboard shortcuts

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