[][src]Module tari_p2p::services::liveness

Liveness Service

This service is responsible for sending pings to any peer as well as maintaining some very basic counters for the number of ping/pongs sent and received.

It is responsible for:

  • handling requests to the Liveness backend. Types of requests can be found in the LivenessRequest enum, and
  • reading incoming PingPong messages and processing them.

In future, this service may be expanded to included periodic pings to maintain latency and availability statistics for peers.

Modules

error

Structs

LivenessConfig

Configuration for liveness service

LivenessHandle
LivenessInitializer

Initializer for the Liveness service handle and service future.

Metadata

Represents metadata in a ping/pong message.

PingPongEvent

Represents a ping or pong event

Enums

LivenessEvent
LivenessRequest

Request types made through the LivenessHandle and are handled by the LivenessService

LivenessResponse

Response type for LivenessService

MetadataKey

This enum represents all the possible metadata keys that can be used with a ping/pong message. MetadataKey may be extended as the need arises.

Type Definitions

LivenessEventSender