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

Function storageNotification

packages/infra/src/ClusterServiceBus.ts:220–238  ·  view source on GitHub ↗
(message: Message.Outgoing<R>)

Source from the content-addressed store, hash-verified

218}
219
220const storageNotification = <R extends Rpc.Any>(message: Message.Outgoing<R>): ServiceBusMessage => {
221 const envelope = message.envelope
222 const envelopeId = envelope._tag === "Request" ? envelope.requestId : envelope.id
223 const body: StorageNotification = {
224 _tag: "EffectClusterStorageNotification",
225 envelopeId: String(envelopeId),
226 requestId: String(envelope.requestId),
227 shardId: envelope.address.shardId.toString(),
228 entityType: envelope.address.entityType,
229 entityId: envelope.address.entityId
230 }
231 return {
232 body,
233 contentType: "application/json",
234 correlationId: body.requestId,
235 messageId: body.envelopeId,
236 subject: body._tag
237 }
238}
239
240class ServiceBusPublishError extends Data.TaggedError("ServiceBusPublishError")<{
241 readonly cause: unknown

Callers 1

publishFunction · 0.85

Calls 2

toStringMethod · 0.65
StringInterface · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…