type
ServerOptions
type ServerOptions = core.ServerOptionsSocket timeouts, graceful drain, and readiness admission.
ReadHeaderTimeouttime.Duration- Bounds request-header reads.
ReadTimeouttime.Duration- Bounds complete request reads.
WriteTimeouttime.Duration- Bounds response writes.
IdleTimeouttime.Duration- Bounds idle keep-alive connections.
MaxHeaderBytesint- Limits request-header bytes.
ShutdownTimeouttime.Duration- Bounds HTTP shutdown.
WorkerDrainTimeouttime.Duration- Bounds background worker drain.
ReadinessDrainDelaytime.Duration- Keeps the listener alive briefly after readiness becomes false.
AllowUnverifiableReadinessbool- Permits custom adapters that cannot report readiness.
SkipReadinessPreflightbool- Lets a development listener bind before dependency verification.
Zero values use conservative defaults. Negative socket timeouts disable that individual bound; non-positive shutdown and worker-drain timeouts still use bounded defaults.
WithServerOptions installs one complete value into Execute. Socket timeouts accept negative values to disable an individual bound; shutdown and worker-drain timeouts remain bounded at 15 seconds when non-positive.
AllowUnverifiableReadiness and SkipReadinessPreflight are explicit escape hatches, not general production defaults. Official adapters implement the readiness contracts required by normal startup.
Example
options := ridu.ServerOptions{
ReadHeaderTimeout: 10 * time.Second,
ShutdownTimeout: 20 * time.Second,
WorkerDrainTimeout: 30 * time.Second,
ReadinessDrainDelay: 5 * time.Second,
}