services library

Classes

CacheConfig
Runtime configuration for the cache layer.
CacheTtlPolicy
Resolves a TTL for a given cache key based on a list of ordered rules.
EnvPlaceholder
EtfEncoderStrategy
HttpClient
HttpClientConfig
HttpClientConfigImpl
HttpClientContract
HttpClientStatus
HttpClientStatusImpl
HttpInterceptor
HttpInterceptorImpl
JsonEncoderStrategy
Logger
Marshaller
Placeholder
Request<T>
RequestContract
ResilientHttpClient
Decorator around HttpClientContract that retries transient failures (HTTP 500/502/503/504 and SocketException) with exponential backoff.
Response<T>
ResponseImpl<T>

Functions

composeDataLayer({required LoggerContract marshallerLogger, required LoggerContract dataStoreLogger, required LoggerContract httpLogger, required CacheProviderContract? cache, required HttpClientContract httpClient, required WebsocketOrchestratorContract wss, required RuntimeState runtimeState}) DataLayerComposition
Constructs the cyclic Marshaller / DataStore / EntityContext cluster in one step. The cycle is closed in this single function: outside this file the three components appear fully formed and immutable.

Typedefs

DataLayerComposition = ({DataStoreContract dataStore, EntityContext entityContext, MarshallerContract marshaller})
Composition output for the marshaller / datastore / entity-context cluster: three objects whose dependencies are mutually circular by nature (entities call DataStore, DataStore is built using Marshaller, Marshaller's serializers construct entities). Returned by composeDataLayer, which is the only sanctioned entry point for building these three together.
RequestInterceptor = FutureOr<RequestContract> Function(RequestContract)
ResponseInterceptor = FutureOr<Response> Function(Response)