Skip to content

Entry

Where a log entry is and what recorded it: its ID, its log, the position of the batch its commit wrote to that log, and its index in that batch. A position is a batch cursor, so an entry is located by its log, position, and index, and each log’s positions are its own. Log and Store build their entries on this metadata.

Since v0.2.0

Names one log entry within the store. A reader that keeps an entry’s ID can find it again with Log.getEntry.

Signature

declare const EntryId: Schema.brand<Schema.NonEmptyString, "LogEntryId">

Source

Since v0.2.0

Signature

type EntryId = typeof EntryId.Type

Source

Since v0.2.0

Names a log within the store. Reopening the same ID addresses the same history.

Signature

declare const LogId: Schema.brand<Schema.NonEmptyString, "LogId">

Source

Since v0.2.0

Signature

type LogId = typeof LogId.Type

Source

Since v0.2.0

What every stored entry carries beside its payload: where it is, which commit recorded it, and when.

Signature

declare const Metadata: Schema.Struct<{
readonly id: Schema.brand<Schema.NonEmptyString, "LogEntryId">
readonly logId: Schema.brand<Schema.NonEmptyString, "LogId">
readonly position: Schema.brand<Schema.Natural, "LogPosition">
readonly commitId: Schema.brand<Schema.NonEmptyString, "LogCommitId">
readonly index: Schema.Natural
readonly recordedAt: Schema.DateTimeUtcFromString
}>

Source

Since v0.2.0

Signature

export interface Metadata extends Schema.Schema.Type<typeof Metadata> {}

Source

Since v0.2.0

A commit’s position within one log, from 0. Different logs have independent positions.

Signature

declare const Position: Schema.brand<Schema.Natural, "LogPosition">

Source

Since v0.2.0

Signature

type Position = typeof Position.Type

Source

Since v0.2.0