diff options
author | Elizabeth Hunt <lizhunt@amazon.com> | 2025-05-16 16:17:13 -0700 |
---|---|---|
committer | Elizabeth Hunt <lizhunt@amazon.com> | 2025-05-16 16:17:13 -0700 |
commit | ef51b25e4388cbdf3a27e23d9f1fa381ae20a5ad (patch) | |
tree | d54be88fa30fd2da97a97fc7006d9ff9d94ed16a /u/server/request.ts | |
parent | 1ab20482ab37d7962c8e69701163270e687df3ca (diff) | |
download | ci-ef51b25e4388cbdf3a27e23d9f1fa381ae20a5ad.tar.gz ci-ef51b25e4388cbdf3a27e23d9f1fa381ae20a5ad.zip |
snapshot
Diffstat (limited to 'u/server/request.ts')
-rw-r--r-- | u/server/request.ts | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/u/server/request.ts b/u/server/request.ts new file mode 100644 index 0000000..6c4e602 --- /dev/null +++ b/u/server/request.ts @@ -0,0 +1,27 @@ +import { ITrace } from "@emprespresso/pengueno"; +import { ITraceWith } from "../trace/mod.ts"; + +class RequestTraceWith { + private constructor( + public readonly id: string, + public readonly received: Date, + ) { + } + + public static from() { + const id = crypto.randomUUID(); + const received = new Date(); + return new RequestTraceWith(id, received); + } +} +export class RequestTrace implements ITrace<RequestTraceWith> { + public readonly requestTrace: RequestTraceWith; + constructor(reques); + + public addTrace(_t: ITraceWith<RequestTraceWith>) { + return; + } + + addTrace: Mapper<ITraceWith<TraceWith>, ITrace<TraceWith>>; + trace: SideEffect<ITraceWith<TraceWith>>; +} |