Skip to content

server

Structs

  • Server - The Mini Authority Server.

Struct

The Mini Authority Server.

Can be instantiated with port 0 to bind to a random available port, which is useful for integration testing without race conditions.

Methods:

  • fn try_new<F>(config: AuthorityConfig, shutdown_signal: F) -> Result<Self> - Create a new Server instance from the provided configuration.
  • fn run(self: Self) -> Result<()> - Run the server until the provided shutdown signal is received.
  • fn port(self: &Self) -> u16 - Get the port the server is bound to.