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
Schemas
Section titled “Schemas”EntryId
Section titled “EntryId”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">Since v0.2.0
EntryId (type alias)
Section titled “EntryId (type alias)”Signature
type EntryId = typeof EntryId.TypeSince 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">Since v0.2.0
LogId (type alias)
Section titled “LogId (type alias)”Signature
type LogId = typeof LogId.TypeSince v0.2.0
Metadata
Section titled “Metadata”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}>Since v0.2.0
Metadata (interface)
Section titled “Metadata (interface)”Signature
export interface Metadata extends Schema.Schema.Type<typeof Metadata> {}Since v0.2.0
Position
Section titled “Position”A commit’s position within one log, from 0. Different logs have independent positions.
Signature
declare const Position: Schema.brand<Schema.Natural, "LogPosition">Since v0.2.0
Position (type alias)
Section titled “Position (type alias)”Signature
type Position = typeof Position.TypeSince v0.2.0