holger-server-lib 0.6.5

Holger server library: config, wiring, gRPC service, Rust API

use serde::{Deserialize, Serialize};
use fast_routes::FastRoutes;
use crate::repository::Repository;

pub mod fast_routes;
pub mod http;
pub mod tls;

/// An exposed gRPC endpoint configured in RON
#[derive(Serialize, Deserialize)]
pub struct ExposedEndpoint {
    pub ron_name: String,
    pub ron_url: String, // e.g. "0.0.0.0:50051"

    /// Optional HTTP/OCI listener (e.g. "0.0.0.0:8443") serving the same
    /// repositories to ecosystem clients (helm/pip/cargo, OCI registry) plus
    /// /healthz and /readyz for Kubernetes probes.
    #[serde(default)]
    pub ron_http_url: Option<String>,

    /// Optional TLS for this endpoint. Applies to BOTH the gRPC port and the
    /// HTTP/OCI port. Absent = cleartext (loopback/dev only; logged loudly).
    #[serde(default)]
    pub ron_tls: Option<crate::exposed::tls::TlsSettings>,

    /// Max accepted request-body size for the HTTP/OCI gateway, in bytes.
    /// Guards against memory-exhaustion uploads. Default 1 GiB.
    #[serde(default)]
    pub ron_max_body_bytes: Option<usize>,

    #[serde(skip_serializing, skip_deserializing, default)]
    pub aggregated_routes: Option<FastRoutes>,

    #[serde(skip_serializing, skip_deserializing, default)]
    pub wired_in_repositories: Vec<*const Repository>,
    #[serde(skip_serializing, skip_deserializing, default)]
    pub wired_out_repositories: Vec<*const Repository>,
}