The Candid Startup
    Preparing search index...

    Reference implementation of EventLog

    In-memory event log

    Intended for use as a mock, to compare with an optimized implementation when testing and for simple sample apps. Simplest possible implementation, no attempt at optimization.

    Type Parameters

    Implements

    Index

    Constructors

    Methods

    • Add an entry to the log with the given sequence id

      Parameters

      • entry: T
      • sequenceId: bigint

        The next available sequence id in the log. This is returned as endSequenceId when making a query for the last entry in the log. Returns a ConflictError if not the next available id.

      • OptionalsnapshotId: bigint

        The sequence id for the most recent snapshot that the client is aware of. If there's a more recent snapshot, it's id will be returned in AddEntryValue.

        Any other problem with serializing the entry will return a StorageError.

      Returns ResultAsync<AddEntryValue, AddEntryError>

    • Return a range of entries from first to last inclusive

      The event log may return fewer entries than requested. If so, repeat the query starting from nextSequenceId.

      Parameters

      • start: bigint | "snapshot" | "start"

        SequenceId of first entry to return. Use 'start' to query from the first entry in the log. Use 'snapshot' to query from the most recent entry with a snapshot, or the first if no snapshot is defined.

      • end: bigint | "end"

        SequenceId one after the last entry to return. Use 'end' to query everything to the end of the log.

      • OptionalsnapshotId: bigint

      Returns ResultAsync<QueryValue<T>, QueryError>

    Properties

    Worker host used to process pending workflows