package
0.0.0-20250213080715-e03b4921b52d
Repository: https://github.com/0xsoniclabs/norma.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

GetData retrieves access to the data collected for a given metric or nil, if the defined metric for the given subject is not available.
GetSubjects retrieves all subjects with available data for the given metric.
InstallAllRegisteredSources installs one instance of every registered source in the given monitor.
InstallSource installs a new source on the given monitor.
InstallSourceFor installs a data source for the given metric in the given monitor.
IsSupported checks whether there is a source registered for the given metric.
NewLogReader creates a channel and reads logs from the input reader, sending it to the channel.
NewMockLogListener creates a new mock instance.
NewMockNodeLogProvider creates a new mock instance.
NewMockPrometheusLogProvider creates a new mock instance.
NewMockTimeLogListener creates a new mock instance.
NewMonitor creates a new Monitor instance without any registered sources.
NewNodeLogDispatcher creates a new instance of this registry, which is filled by already running nodes, and further listens to newly added nodes.
NewPrometheusKey composes the key using the name of the metric and quantile.
NewPrometheusLogDispatcher creates a new object that periodically parses Prometheus logs for all nodes active in the network and dispatches the entries to registered listeners.
NewPrometheusNameKey composes the key using the name of the metric only.
No description provided by the author
No description provided by the author
ParsePrometheusLogReader reads text logs from the input reader, and produces the output slice of parsed representation of the log.
RegisterFactory registers a new source factory in a global registry.
RegisterSource is a convenience variant of RegisterFactory above, accepting a metric and a factory function for registering a source.
WriteCsvHeader writes a header line defining the fields of the CsvRecord.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

Block contains data of one block.
BlockStatus encapsulates epoch, blockheight.
CsvRecord summarizes the content of a single line in the exported raw CSV metric dump.
DataPoint is one entry of a data series.
Metric defines a metric in the monitoring system.
MockLogListener is a mock of LogListener interface.
MockLogListenerMockRecorder is the mock recorder for MockLogListener.
MockNodeLogProvider is a mock of NodeLogProvider interface.
MockNodeLogProviderMockRecorder is the mock recorder for MockNodeLogProvider.
MockPrometheusLogProvider is a mock of PrometheusLogProvider interface.
MockPrometheusLogProviderMockRecorder is the mock recorder for MockPrometheusLogProvider.
MockTimeLogListener is a mock of TimeLogListener interface.
MockTimeLogListenerMockRecorder is the mock recorder for MockTimeLogListener.
Monitor instances are handling the life-cycle of sets of data sources for a a configurable set of metrics.
No description provided by the author
Network is a unit type to reference the full managed network in a scenario as the subject of a metric.
NodeLogDispatcher listens and maintains nodes of the network.
PrometheusLogDispatcher allows for registering objects to receive Prometheus log messages from nodes.
PrometheusLogKey is a unique identifier of the log entry obtained from prometheus.
PrometheusLogValue is one measured value obtained from Prometheus.
Record is a generic struture modeling a single data point recorded by a sensor.
SmaSeries is computes a Simple Moving Average from the input series and stores it to this series.
SyncedSeries implements a generic series retaining all data in memory and offering synchronized access to its content.
User is an identifier of a user/account interacting with an application.

# Interfaces

LogListener gets data of a new block every time it is occurred for a certain node.
NodeLogProvider is an interface for registering listeners that will be notified about incoming blocks.
Number is a constraint type for float and integer types.
PrometheusLogProvider is an interface for registering listeners that will be notified about incoming prometheus logs.
Series is a generic interface for arbitrarily indexed sequences of values.
Source is a provider of monitoring data for a single metric.
SourceFactory is a generic interface for metric sources.
TimeLogListener is an interface implemented by any subject that wants to receive a value for the specific time and node.

# Type aliases

App is an identifier of an application deployed in the network.
BlockNumber is the type used to identify a block.
Node identifies a node in the network.
Percent is used to represent a percentage of some value.
PrometheusMetricType is one of the counter, gauge, summary.
Quantile is a type representing quantile for a summary metric.
Time is the time used in time series.