MCPcopy Create free account
hub / github.com/effect-app/libs / messageDocId

Function messageDocId

packages/infra/src/ClusterCosmos.ts:114–115  ·  view source on GitHub ↗
(envelope: Envelope.Encoded, primaryKey: string | null)

Source from the content-addressed store, hash-verified

112const cosmosId = (id: string) => encodeURIComponent(id)
113const messagePartition = (shardId: string) => `message::${shardId}`
114const messageDocId = (envelope: Envelope.Encoded, primaryKey: string | null) =>
115 cosmosId(primaryKey === null ? envelopeId(envelope) : `primary::${primaryKey}`)
116const replyPartition = (requestId: string) => `reply::${requestId}`
117const runnerDocId = (address: string) => cosmosId(`runner::${address}`)
118const lockDocId = (shardId: string) => cosmosId(`lock::${shardId}`)

Callers 1

envelopeToDocFunction · 0.85

Calls 2

envelopeIdFunction · 0.85
cosmosIdFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…