Module apollo_framework::server[][src]

Expand description

Contains the server component of Apollo.

Opens a server-socket on the specified port (server.port in the config or 2410 as fallback) and binds it to the selected IP (server.host in the config or 0.0.0.0 as fallback). Each incoming client is expected to send RESP requests and will be provided with the appropriate responses.

Note that in order to achieve zero downtime / ultra high availability demands, the sever will periodically try to bind the socket to the selected port, therefore an “new” instance can be started and the “old” once can bleed out and the port will be “handed through” with minimal downtime. Also, this will listen to change events of the config and will relocate to another port or host if changed.

Example

use apollo_framework::server::Server;
use tokio::time::Duration;

#[tokio::main]
async fn main() {
}

Structs

Represents a client connection.

Provides some metadata for a client connection.

Represents a TODO server which manages all TCP connections.