inspector

package
v0.30.4 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultRPCValidationConfig

DefaultRPCValidationConfig returns default RPC control message inspector config.

Types

type GossipSubInspectorBuilder

type GossipSubInspectorBuilder struct {
	// contains filtered or unexported fields
}

GossipSubInspectorBuilder builder that constructs all rpc inspectors used by gossip sub. The following rpc inspectors are created with this builder. - validation inspector: performs validation on all control messages. - metrics inspector: observes metrics for each rpc message received.

func NewGossipSubInspectorBuilder

func NewGossipSubInspectorBuilder(logger zerolog.Logger, sporkID flow.Identifier, inspectorsConfig *GossipSubRPCInspectorsConfig, distributor p2p.GossipSubInspectorNotificationDistributor) *GossipSubInspectorBuilder

NewGossipSubInspectorBuilder returns new *GossipSubInspectorBuilder.

func (*GossipSubInspectorBuilder) Build

Build builds the rpc inspectors used by gossipsub. Any returned error from this func indicates a problem setting up rpc inspectors. In libp2p node setup, the returned error should be treated as a fatal error.

func (*GossipSubInspectorBuilder) SetMetrics

SetMetrics sets the network metrics and registry.

func (*GossipSubInspectorBuilder) SetMetricsEnabled

func (b *GossipSubInspectorBuilder) SetMetricsEnabled(metricsEnabled bool) *GossipSubInspectorBuilder

SetMetricsEnabled disable and enable metrics collection for the inspectors underlying hero store cache.

func (*GossipSubInspectorBuilder) SetPublicNetwork

func (b *GossipSubInspectorBuilder) SetPublicNetwork(public bool) *GossipSubInspectorBuilder

SetPublicNetwork used to differentiate between libp2p nodes used for public vs private networks. Currently, there are different metrics collectors for public vs private networks.

type GossipSubRPCInspectorsConfig

type GossipSubRPCInspectorsConfig struct {
	// GossipSubRPCInspectorNotificationCacheSize size of the queue for notifications about invalid RPC messages.
	GossipSubRPCInspectorNotificationCacheSize uint32
	// ValidationInspectorConfigs control message validation inspector validation configuration and limits.
	ValidationInspectorConfigs *GossipSubRPCValidationInspectorConfigs
	// MetricsInspectorConfigs control message metrics inspector configuration.
	MetricsInspectorConfigs *GossipSubRPCMetricsInspectorConfigs
}

GossipSubRPCInspectorsConfig encompasses configuration related to gossipsub RPC message inspectors.

func DefaultGossipSubRPCInspectorsConfig

func DefaultGossipSubRPCInspectorsConfig() *GossipSubRPCInspectorsConfig

type GossipSubRPCMetricsInspectorConfigs

type GossipSubRPCMetricsInspectorConfigs struct {
	// NumberOfWorkers number of worker pool workers.
	NumberOfWorkers int
	// CacheSize size of the queue used by worker pool for the control message metrics inspector.
	CacheSize uint32
}

GossipSubRPCMetricsInspectorConfigs rpc metrics observer inspector configuration.

type GossipSubRPCValidationInspectorConfigs

type GossipSubRPCValidationInspectorConfigs struct {
	// NumberOfWorkers number of worker pool workers.
	NumberOfWorkers int
	// CacheSize size of the queue used by worker pool for the control message validation inspector.
	CacheSize uint32
	// GraftLimits GRAFT control message validation limits.
	GraftLimits map[string]int
	// PruneLimits PRUNE control message validation limits.
	PruneLimits map[string]int
}

GossipSubRPCValidationInspectorConfigs validation limits used for gossipsub RPC control message inspection.

Jump to

Keyboard shortcuts

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