Module service

Module service 

Source

Re-exports§

pub use crate::service::message::Message;
pub use crate::service::message::ZeroBytes;
pub use crate::service::session::QueuedFetch;
pub use crate::service::session::Session;
pub use message::ADDRESS_LIMIT;
pub use message::INVENTORY_LIMIT;
pub use message::REF_REMOTE_LIMIT;

Modules§

filter
gossip
io
limiter
message
session

Structs§

FetchState
Fetch state for an ongoing fetch.
Lookup
Result of a project lookup.
Metrics
Metrics we track.
PeerMetrics
Per-peer metrics we track.
Service
The node service.
Sessions
Holds currently (or recently) connected peers.
Stores
Holds all node stores.

Enums§

Command
Commands sent to the service by the operator.
CommandError
Command-related errors.
ConnectError
DisconnectReason
Disconnect reason.
Error
General service error.
LookupError

Constants§

ANNOUNCE_INTERVAL
How often to run the “announce” task.
CONNECTION_RETRY_DELTA
Connection retry delta used for ephemeral peers that failed to connect previously.
FETCH_TIMEOUT
How long to wait for a fetch to stall before aborting, default is 3s.
GOSSIP_INTERVAL
How often to run the “gossip” task.
IDLE_INTERVAL
How often to run the “idle” task.
INITIAL_SUBSCRIBE_BACKLOG_DELTA
How far back from the present time should we request gossip messages when connecting to a peer, when we come online for the first time.
KEEP_ALIVE_DELTA
How much time should pass after a peer was last active for a ping to be sent.
MAX_CONNECTION_ATTEMPTS
Maximum attempts to connect to a peer before we give up.
MAX_LATENCIES
Maximum number of latency values to keep for a session.
MAX_RECONNECTION_DELTA
Maximum amount of time to wait before reconnecting to a peer.
MAX_TIME_DELTA
Maximum time difference between the local time, and an announcement timestamp.
MIN_RECONNECTION_DELTA
Minimum amount of time to wait before reconnecting to a peer.
PRUNE_INTERVAL
How often to run the “prune” task.
STALE_CONNECTION_TIMEOUT
Duration to wait on an unresponsive peer before dropping its connection.
SUBSCRIBE_BACKLOG_DELTA
When subscribing, what margin of error do we give ourselves. A igher delta means we ask for messages further back than strictly necessary, to account for missed messages.
SYNC_INTERVAL
How often to run the “sync” task.
TARGET_OUTBOUND_PEERS
Target number of peers to maintain connections to.

Traits§

ServiceState
Gives read access to the service state.
Store
A store for all node data.

Type Aliases§

QueryState
Function used to query internal service state.