type
Config
Runtime-only MongoDB connection behavior.
Fields
| Property | Type | Description |
|---|---|---|
DatabaseURL | string | Credential-bearing URL selecting the application database. |
AllowInsecureTransport | bool | Allow an insecure local development connection; keep false in production. |
ApplicationName | string | Client application name; defaults to ridu. |
ConnectTimeout | time.Duration | Connection bound; zero selects the Ridu default. |
ServerSelectionTimeout | time.Duration | Primary-selection bound; zero selects the Ridu default. |
MaxConnectionIdleTime | time.Duration | Pooled idle-time bound; zero selects the Ridu default. |
MaxPoolSize | uint64 | Maximum pool size; zero selects ten. |
MinPoolSize | uint64 | Minimum pool size; cannot exceed MaxPoolSize. |
How it works
DatabaseURL never belongs in manifests, artifacts, generated contracts, or diagnostics. Negative durations and invalid pool bounds are rejected.
Full signature
type Config struct {
DatabaseURL string
// AllowInsecureTransport permits plaintext or certificate verification
// bypasses to a remote host for an explicitly selected development
// fixture. Loopback and Unix-socket databases never need it.
AllowInsecureTransport bool
ApplicationName string
ConnectTimeout time.Duration
ServerSelectionTimeout time.Duration
MaxConnectionIdleTime time.Duration
MaxPoolSize uint64
MinPoolSize uint64
}