Interface DagEventStoreOptions<K, V>

Options for creating a DagEventStore.

interface DagEventStoreOptions {
    data?: AppendOnlyAutoKeyMap<K, V> & Partial<AutoKeyMapBatch<K, V>>;
    getEventMeta?: ((event) => undefined | EventMeta<K>);
    head?: {
        add(value, options?): unknown;
        addMany?(keys, options?): MaybeAsyncIterableIterator<undefined | Error>;
        delete(value, options?): unknown;
        deleteMany?(keys, options?): MaybeAsyncIterableIterator<undefined | Error>;
        has(value, options?): MaybePromise<boolean>;
        hasMany?(keys, options?): MaybeAsyncIterableIterator<boolean>;
        updateMany?(keys, options?): MaybeAsyncIterableIterator<undefined | Error>;
    };
    keyCodec?: Codec<K, string>;
}

Type Parameters

  • K

  • V

Properties

data?: AppendOnlyAutoKeyMap<K, V> & Partial<AutoKeyMapBatch<K, V>>

Backing data store map.

getEventMeta?: ((event) => undefined | EventMeta<K>)

Type declaration

    • (event): undefined | EventMeta<K>
    • Function to get given event metadata.

      Parameters

      • event: V

      Returns undefined | EventMeta<K>

head?: {
    add(value, options?): unknown;
    addMany?(keys, options?): MaybeAsyncIterableIterator<undefined | Error>;
    delete(value, options?): unknown;
    deleteMany?(keys, options?): MaybeAsyncIterableIterator<undefined | Error>;
    has(value, options?): MaybePromise<boolean>;
    hasMany?(keys, options?): MaybeAsyncIterableIterator<boolean>;
    updateMany?(keys, options?): MaybeAsyncIterableIterator<undefined | Error>;
}

Head event set.

Type declaration

keyCodec?: Codec<K, string>

Event key to string codec.

Generated using TypeDoc