Skip to main content

run_server

Function run_server 

Source
pub fn run_server(py: Python<'_>, run_args: &ProxyServerConfig)
Expand description

Build and run the Pingora proxy server.

This is the Rust entry-point called from start_server. It:

  1. Initialises tracing.
  2. Parses the COS map and HMAC keystore from the Python objects in run_args.
  3. Creates the Pingora [Server], attaches HTTP and/or HTTPS listeners, and enters the run-forever loop (blocking the calling thread).

ยงPanics

Panics if run_args.cos_map cannot be parsed, or if the TLS certificate / key paths are missing when https_port is set.