Object.RobustNetworkTransport (object v0.1.2)
A more robust network transport layer that handles startup failures gracefully.
This module addresses common issues in network startup by:
- Implementing graceful degradation when transport services fail
- Providing fallback mechanisms for connection establishment
- Better error handling and recovery strategies
- Improved process lifecycle management
Summary
Functions
Returns a specification to start this module under a supervisor.
Connects to a remote endpoint with robust error handling.
Gracefully starts the transport service with fallback options.
Checks if the transport service is available and healthy.
Sends data with automatic retry and fallback mechanisms.
Types
@type connection_id() :: String.t()
@type connection_opts() :: [ host: String.t(), port: non_neg_integer(), transport: transport_type(), ssl: boolean(), pool_size: pos_integer(), timeout: timeout(), reconnect_interval: pos_integer(), max_reconnect_attempts: pos_integer() ]
@type connection_state() :: :connecting | :connected | :disconnected | :failed
@type transport_type() :: :tcp | :udp | :websocket | :grpc
Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
Connects to a remote endpoint with robust error handling.
Gracefully starts the transport service with fallback options.
Checks if the transport service is available and healthy.
Sends data with automatic retry and fallback mechanisms.