MCPcopy Create free account
hub / github.com/Effect-TS/effect / makeWrite

Function makeWrite

packages/effect/src/eventlog/EventLogServerUnencrypted.ts:84–100  ·  view source on GitHub ↗
(
  schema: EventLog.EventLogSchema<Groups>
)

Source from the content-addressed store, hash-verified

82 * @since 4.0.0
83 */
84export const makeWrite = <Groups extends EventGroup.Any>(
85 schema: EventLog.EventLogSchema<Groups>
86): Effect.Effect<
87 <
88 Tag extends EventGroup.Events<Groups>["tag"],
89 Event extends Event.Any = Event.WithTag<EventGroup.Events<Groups>, Tag>
90 >(options: {
91 readonly storeId: StoreId
92 readonly event: Tag
93 readonly payload: Event.Payload<Event>
94 }) => Effect.Effect<
95 Event.Success<Event>,
96 EventLogServerStoreError | Event.Error<Event>
97 >,
98 never,
99 EventLogServerUnencrypted
100> => EventLogServerUnencrypted.useSync((_) => _.makeWrite(schema))
101
102/**
103 * Provides RPC handlers for the unencrypted event-log server.

Callers

nothing calls this directly

Calls 9

makeEntryIdUnsafeFunction · 0.90
makeClientIdentityFunction · 0.85
useSyncMethod · 0.80
handlerFunction · 0.70
setMethod · 0.65
getMethod · 0.65
pipeMethod · 0.65
writeMethod · 0.65

Tested by

no test coverage detected