p2pconfig

package
v0.31.15 Latest Latest
Warning

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

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

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
}

PeerManagerConfig configuration parameters for the peer manager.

type UnicastConfig

type UnicastConfig struct {
	// StreamRetryInterval is the initial delay between failing to establish a connection with another node and retrying. This
	// delay increases exponentially (exponential backoff) with the number of subsequent failures to establish a connection.
	StreamRetryInterval time.Duration
	// RateLimiterDistributor distributor that distributes notifications whenever a peer is rate limited to all consumers.
	RateLimiterDistributor p2p.UnicastRateLimiterDistributor
}

UnicastConfig configuration parameters for the unicast manager.

Jump to

Keyboard shortcuts

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