ContextR.Propagation.Token¶
Token/reference contracts for large payload transport strategies.
This package defines the contracts needed to store large serialized payloads out-of-band and propagate only a compact token in headers/metadata.
Install¶
Dependencies: ContextR.Propagation.
Contracts¶
ContextPayloadTokenReference-- token envelope (Token, optionalVersion).IContextPayloadStore-- storage abstraction:PutAsync(payload, ttl)GetAsync(token)DeleteAsync(token)IContextPayloadTokenCodec-- encode/decode token envelope to transport-safe string.
Intended usage¶
Typical flow for large payload scenarios:
- Serialize mapped payload.
- If payload is over inline threshold, write it to store via
IContextPayloadStore. - Encode token reference via
IContextPayloadTokenCodec. - Propagate token string in HTTP/gRPC metadata instead of full payload.
- On extraction, decode token and hydrate payload from store.
Current status¶
- Contracts are available in this package.
- Store-backed runtime fallback wiring is planned as a next step.
Testing¶
Coverage is provided by:
tests/ContextR.Propagation.Token.UnitTeststests/ContextR.Propagation.Strategies.IntegrationTests(fallback diagnostics when no token runtime is configured)