Skip to main content

serve_master

Function serve_master 

Source
pub async fn serve_master(
    db: Database,
    settings: Settings,
    __arg2: (Duration, Problems, (usize, ApiLimits), MasterOutbox),
    listener: TcpListener,
    tls: Option<Tls>,
    leadership: impl Future<Output = Result<Leadership, AppError>>,
    observed: Observed<'_, MasterMetrics>,
    stop: Receiver<u32>,
) -> Result<(), AppError>
Expand description

Serves the master: its gRPC service on listener (over mTLS with tls) and its loop, until stop, once leadership has taken the lease (a standby waits there).

§Errors

AppError if the gRPC server fails, the lease can’t be taken, or another master took it over.