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

Function makeWith

packages/effect/src/eventlog/EventLogRemote.ts:279–292  ·  view source on GitHub ↗
(options: {
  readonly encodeWrite: (options: {
    readonly identity: Identity["Service"]
    readonly entries: ReadonlyArray<Entry>
    readonly storeId: StoreId
  }) => Effect.Effect<Uint8Array<ArrayBuffer>, Schema.SchemaError>
  readonly decodeChanges: (
    identity: Identity["Service"],
    storeId: StoreId,
    data: Uint8Array<ArrayBuffer>,
    knownEntries?: EventJournal["Service"]["entriesById"]
  ) => Effect.Effect<ReadonlyArray<RemoteEntry>, Schema.SchemaError | EventJournalError>
})

Source from the content-addressed store, hash-verified

277 * @since 4.0.0
278 */
279export const makeWith = (options: {
280 readonly encodeWrite: (options: {
281 readonly identity: Identity["Service"]
282 readonly entries: ReadonlyArray<Entry>
283 readonly storeId: StoreId
284 }) => Effect.Effect<Uint8Array<ArrayBuffer>, Schema.SchemaError>
285 readonly decodeChanges: (
286 identity: Identity["Service"],
287 storeId: StoreId,
288 data: Uint8Array<ArrayBuffer>,
289 knownEntries?: EventJournal["Service"]["entriesById"]
290 ) => Effect.Effect<ReadonlyArray<RemoteEntry>, Schema.SchemaError | EventJournalError>
291}): Effect.Effect<EventLogRemote["Service"], EventLogRemoteError, Scope.Scope | EventLogRemoteClient | Registry> =>
292 makeRemote(options)
293
294interface RemoteSession {
295 readonly client: EventLogRemoteClient["Service"]

Callers 1

EventLogRemote.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected