interface EventClient

Properties

coldHotStream

Play from persisted storage the continue from in memory

Signature
coldHotStream: (config: {
        parallelEventCount?: number;
        rawEvents: true;
        stream: string | string[];
        groupId: string;
        handler: (event: EncodedEvent) => Promise<void>;
        onError: (error: any) => void;
    } | {
        parallelEventCount?: number;
        rawEvents: false;
        stream: string | string[];
        groupId: string;
        handler: (event: EventicleEvent) => Promise<void>;
        onError: (error: any) => void;
    } | {
        parallelEventCount?: number;
        stream: string | string[];
        groupId: string;
        handler: (event: EventicleEvent) => Promise<void>;
        onError: (error: any) => void;
    }) => Promise<EventSubscriptionControl>;

coldStream

Play from persisted storage

Signature
coldStream: (config: {
        stream: string;
        handler: (event: EventicleEvent) => Promise<void>;
        onError: (error: any) => void;
        onDone: () => void;
    }) => Promise<EventSubscriptionControl>;

emit

Signature
emit: (event: EventicleEvent[] | EncodedEvent[], stream: string) => Promise<void>;

hotRawStream

Only play hot data.

Signature
hotRawStream: (config: {
        parallelEventCount?: number;
        stream: string | string[];
        groupId: string;
        handler: (event: EncodedEvent) => Promise<void>;
        onError: (error: any) => void;
    }) => Promise<EventSubscriptionControl>;

hotStream

Only play hot data.

Signature
hotStream: (config: {
        parallelEventCount?: number;
        stream: string | string[];
        groupId: string;
        handler: (event: EventicleEvent) => Promise<void>;
        onError: (error: any) => void;
    }) => Promise<EventSubscriptionControl>;

isConnected

Signature
isConnected: () => boolean;

shutdown

Signature
shutdown: () => Promise<void>;