type
ServerOptions
Production socket bounds, readiness admission, and graceful drain.
Properties
| Property | Type | Description |
|---|---|---|
ReadHeaderTimeout | time.Duration | Bounds request-header reads. |
ReadTimeout | time.Duration | Bounds complete request reads. |
WriteTimeout | time.Duration | Bounds response writes. |
IdleTimeout | time.Duration | Bounds idle keep-alive connections. |
MaxHeaderBytes | int | Limits request-header bytes. |
ShutdownTimeout | time.Duration | Bounds HTTP shutdown. |
WorkerDrainTimeout | time.Duration | Bounds background worker drain. |
ReadinessDrainDelay | time.Duration | Keeps the listener alive briefly after readiness becomes false. |
AllowUnverifiableReadiness | bool | Permits custom adapters that cannot report readiness. |
SkipReadinessPreflight | bool | Lets a development listener bind before dependency verification. |
How it works
Zero values use conservative defaults. Negative socket timeouts disable that individual bound; non-positive shutdown and worker-drain timeouts still use bounded defaults.
Full signature
type ServerOptions struct {
ReadHeaderTimeout time.Duration
ReadTimeout time.Duration
WriteTimeout time.Duration
IdleTimeout time.Duration
MaxHeaderBytes int
ShutdownTimeout time.Duration
WorkerDrainTimeout time.Duration
ReadinessDrainDelay time.Duration
// AllowUnverifiableReadiness permits Execute with custom database or upload
// adapters that cannot prove readiness. It is an explicit production safety
// escape hatch; official adapters do not require it.
AllowUnverifiableReadiness bool
// SkipReadinessPreflight lets a development server bind before dependency
// verification. Its /readyz probe still checks database connectivity,
// storage, and custom checks, but permits an unapplied migration ledger
// while ridu dev owns non-destructive schema synchronization.
SkipReadinessPreflight bool
}