inspector

package
v0.32.6-patch.1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: AGPL-3.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// DefaultControlMsgMetricsInspectorNumberOfWorkers default number of workers for the inspector component.
	DefaultControlMsgMetricsInspectorNumberOfWorkers = 1
	// DefaultControlMsgMetricsInspectorQueueCacheSize is the default size of the message queue.
	DefaultControlMsgMetricsInspectorQueueCacheSize = 100
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ControlMsgMetricsInspector

type ControlMsgMetricsInspector struct {
	component.Component

	// NumberOfWorkers number of component workers.
	NumberOfWorkers int
	// contains filtered or unexported fields
}

ControlMsgMetricsInspector a GossipSub RPC inspector that will observe incoming RPC's and collect metrics related to control messages.

func NewControlMsgMetricsInspector

func NewControlMsgMetricsInspector(logger zerolog.Logger, metricsObserver p2p.GossipSubControlMetricsObserver, numberOfWorkers int, heroStoreOpts ...queue.HeroStoreConfigOption) *ControlMsgMetricsInspector

NewControlMsgMetricsInspector returns a new *ControlMsgMetricsInspector

func (*ControlMsgMetricsInspector) Inspect

func (c *ControlMsgMetricsInspector) Inspect(from peer.ID, rpc *pubsub.RPC) error

Inspect submits a request to the worker pool to observe metrics for the rpc. All errors returned from this function can be considered benign.

func (*ControlMsgMetricsInspector) Name

Name returns the name of the rpc inspector.

func (*ControlMsgMetricsInspector) ObserveRPC

ObserveRPC collects metrics for the rpc. No error is ever returned from this func.

type ObserveRPCMetricsRequest

type ObserveRPCMetricsRequest struct {
	// Nonce adds random value so that when msg req is stored on hero store a unique ID can be created from the struct fields.
	Nonce []byte
	// From the sender of the RPC.
	From peer.ID
	// contains filtered or unexported fields
}

ObserveRPCMetricsRequest represents a request to capture metrics for the provided RPC

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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