ServerConfig class final
The full server configuration, resolved once from the process environment by serverConfigFromEnvironment.
- Annotations
-
- @immutable
Constructors
-
ServerConfig({required String host, required int port, required Uri publicBaseUrl, required String apiToken, required String cleanupToken, required List<
int> downloadSigningKey, required StorageBackend storageBackend, required String localStorageDir, required S3Config? s3, required bool publicByDefault, required Duration fileTtl, required Duration downloadUrlTtl, required Duration cleanupInterval, required int renderConcurrency, required String? renderProject, required String? ffmpegPath, required List<String> corsAllowOrigins, required Map<String, String> aiEnv, required RateLimitConfig aiRateLimit}) -
Creates a fully-resolved config (use serverConfigFromEnvironment).
const
Properties
-
aiEnv
→ Map<
String, String> -
AI provider/model/key env vars forwarded to the render project.
final
- aiRateLimit → RateLimitConfig
-
Per-IP limits applied to the LLM-cost render path (prompt/edit only).
final
- apiToken → String
-
Bearer token guarding render creation and job status.
final
- cleanupInterval → Duration
-
Internal cleanup-timer interval; Duration.zero disables it.
final
- cleanupToken → String
-
Bearer token guarding the cleanup endpoint.
final
-
corsAllowOrigins
→ List<
String> -
Allowed CORS origins (empty = no CORS;
['*']= any origin).final -
downloadSigningKey
→ List<
int> -
HMAC key for signed private-download URLs.
final
- downloadUrlTtl → Duration
-
How long a presigned/signed download URL stays valid.
final
- ffmpegPath → String?
-
The ffmpeg binary path, or
nullforffmpegon PATH.final - fileTtl → Duration
-
How long a rendered file stays valid.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- host → String
-
Bind address (default
0.0.0.0).final - localStorageDir → String
-
The local storage directory (used when storageBackend is local).
final
- port → int
-
Listen port (default
8080).final - publicBaseUrl → Uri
-
Base URL used to build absolute download links.
final
- publicByDefault → bool
-
Whether a render defaults to public when the request omits visibility.
final
- renderConcurrency → int
-
How many renders run concurrently.
final
- renderProject → String?
-
The Flutter project the capture harness runs in, or
nullto auto-discover.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- s3 → S3Config?
-
The S3 settings (non-null when storageBackend is s3).
final
- storageBackend → StorageBackend
-
The selected storage backend.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited