Sync / foldkit-durable/core

JournalDefinition

interface · packages/durable/src/service.ts:74

interface JournalDefinition<
  Operation,
  Snapshot,
  Principal,
  OperationEncoded = unknown,
> {
  readonly key: string
  readonly tag: ReturnType<
    typeof JournalService<Operation, Snapshot, Principal, OperationEncoded>
  >
  readonly layer: <SnapshotEncoded = unknown>(
    options: JournalStoreOptions<
      Operation,
      Snapshot,
      Principal,
      OperationEncoded,
      SnapshotEncoded
    >,
  ) => Layer.Layer<
    JournalShape<Operation, Snapshot, Principal, OperationEncoded>,
    JournalError | UnsupportedJournalVersionError,
    SqlClient.SqlClient
  >
}

One journal's service tag together with the layer that satisfies it, both built from the same type parameters, so the tag cannot be read back as a journal of some other shape.

Members

JournalDefinition.key

property · packages/durable/src/service.ts:75

readonly key: string

JournalDefinition.tag

property · packages/durable/src/service.ts:76

readonly tag: ReturnType<
  typeof JournalService<Operation, Snapshot, Principal, OperationEncoded>
>

JournalDefinition.layer

property · packages/durable/src/service.ts:77

readonly layer: <SnapshotEncoded = unknown>(
  options: JournalStoreOptions<
    Operation,
    Snapshot,
    Principal,
    OperationEncoded,
    SnapshotEncoded
  >,
) => Layer.Layer<
  JournalShape<Operation, Snapshot, Principal, OperationEncoded>,
  JournalError | UnsupportedJournalVersionError,
  SqlClient.SqlClient
>