Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Metrics names. MetricNameBuildInfo = "doublezero_monitor_build_info" MetricNameErrors = "doublezero_monitor_errors_total" // Labels. MetricLabelVersion = "version" MetricLabelCommit = "commit" MetricLabelDate = "date" MetricLabelErrorType = "error_type" )
Variables ¶
View Source
var ( MetricBuildInfo = promauto.NewGaugeVec( prometheus.GaugeOpts{ Name: MetricNameBuildInfo, Help: "Build information of the monitor agent", }, []string{MetricLabelVersion, MetricLabelCommit, MetricLabelDate}, ) MetricErrors = promauto.NewCounterVec( prometheus.CounterOpts{ Name: MetricNameErrors, Help: "Number of errors encountered", }, []string{MetricLabelErrorType}, ) )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Logger *slog.Logger
LedgerRPCClient LedgerRPCClient
Serviceability ServiceabilityClient
Telemetry TelemetryProgramClient
InternetLatencyCollectorPK solana.PublicKey
Interval time.Duration
}
type LedgerRPCClient ¶
type LedgerRPCClient interface {
GetEpochInfo(ctx context.Context, commitment solanarpc.CommitmentType) (*solanarpc.GetEpochInfoResult, error)
}
type ServiceabilityClient ¶
type ServiceabilityClient interface {
GetProgramData(context.Context) (*serviceability.ProgramData, error)
}
type TelemetryProgramClient ¶
type TelemetryProgramClient interface {
GetDeviceLatencySamples(ctx context.Context, originDevicePubKey, targetDevicePubKey, linkPubKey solana.PublicKey, epoch uint64) (*telemetry.DeviceLatencySamples, error)
GetInternetLatencySamples(ctx context.Context, dataProviderName string, originExchangePubKey, targetExchangePubKey, linkPubKey solana.PublicKey, epoch uint64) (*telemetry.InternetLatencySamples, error)
}
Click to show internal directories.
Click to hide internal directories.