SparkyBase class base

Implementers

Constructors

SparkyBase({required List<Route> routes, OpenApiConfig? openApi, MetricsConfig? metrics, HealthCheckConfig? health, SchedulerConfig? scheduler, int port = 8080, String ip = '0.0.0.0', bool shared = false, Route? routeNotFound, LogConfig logConfig = LogConfig.showAndWriteLogs, LogType logType = LogType.all, String logFilePath = 'logs.txt', Pipeline? pipelineAfter, Pipeline? pipelineBefore, SecurityContext? securityContext, Duration? requestTimeout, int? maxBodySize, bool enableGzip = false, int gzipMinLength = 0, Duration? cacheTtl, int? cacheMaxEntries})

Properties

enableGzip bool
final
gzipMinLength int
final
hashCode int
The hash code for this object.
no setterinherited
ip String
final
logConfig LogConfig
final
logFilePath String
final
logType LogType
final
maxBodySize int?
final
pipelineAfter Pipeline?
final
pipelineBefore Pipeline?
final
port int
final
prometheusMetrics PrometheusMetrics?
In-process Prometheus metrics, or null when MetricsConfig was disabled.
no setter
requestTimeout Duration?
final
routeNotFound Route?
final
routes List<Route>
Resolved routes (user routes + optional OpenAPI + optional /metrics).
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scheduler Scheduler?
In-process scheduler, or null when SchedulerConfig was not provided.
no setter
securityContext SecurityContext?
final
shared bool
final

Methods

cacheResponse(Route route, String method, Response response) → void
Stores response in the cache for route + method.
getCachedResponse(Route route, String method) Response
Returns the cached Response for route + method.
isCached(Route route, String method) bool
Whether route + method has a valid cached response.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
runPipeline(Pipeline? pipeline, HttpRequest request) Future<Response?>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited