p2pbuilderconfig

package
v0.37.12-add-verify-ex... Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: AGPL-3.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectionGaterConfig

type ConnectionGaterConfig struct {
	// InterceptPeerDialFilters list of peer filters used to filter peers on outgoing connections in the InterceptPeerDial callback.
	InterceptPeerDialFilters []p2p.PeerFilter
	// InterceptSecuredFilters list of peer filters used to filter peers and accept or reject inbound connections in InterceptSecured callback.
	InterceptSecuredFilters []p2p.PeerFilter
}

ConnectionGaterConfig configuration parameters for the connection gater.

type MetricsConfig

type MetricsConfig struct {
	// HeroCacheFactory is the factory for the HeroCache metrics. It is used to
	// create a HeroCache metrics instance for each cache when needed. By passing
	// the factory to the libp2p node builder, the libp2p node can create the
	// HeroCache metrics instance for each cache internally, which reduces the
	// number of arguments needed to be passed to the libp2p node builder.
	HeroCacheFactory metrics.HeroCacheMetricsFactory

	// LibP2PMetrics is the metrics instance for the libp2p node.
	Metrics module.LibP2PMetrics
}

MetricsConfig is a wrapper around the metrics configuration for the libp2p node. It is used to pass the metrics configuration to the libp2p node builder.

type PeerManagerConfig

type PeerManagerConfig struct {
	// ConnectionPruning enables connection pruning in the connection manager.
	ConnectionPruning bool
	// UpdateInterval interval used by the libp2p node peer manager component to periodically request peer updates.
	UpdateInterval time.Duration
	// ConnectorFactory is a factory function to create a new connector.
	ConnectorFactory p2p.ConnectorFactory
}

PeerManagerConfig configuration parameters for the peer manager.

func PeerManagerDisableConfig

func PeerManagerDisableConfig() *PeerManagerConfig

PeerManagerDisableConfig returns a configuration that disables the peer manager.

type UnicastConfig

type UnicastConfig struct {
	netconf.Unicast

	// RateLimiterDistributor distributor that distributes notifications whenever a peer is rate limited to all consumers.
	RateLimiterDistributor p2p.UnicastRateLimiterDistributor
}

UnicastConfig configuration parameters for the unicast protocol.

Jump to

Keyboard shortcuts

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