@ydbjs/topic
Version:
YDB Topics client for publish-subscribe messaging. Provides at-least-once delivery, exactly-once publishing, FIFO guarantees, and scalable message processing for unstructured data.
31 lines • 1.16 kB
TypeScript
import { type StreamWriteMessage_InitRequest, type StreamWriteMessage_InitResponse, type StreamWriteMessage_WriteRequest, type StreamWriteMessage_WriteResponse, type UpdateTokenResponse } from '@ydbjs/api/topic';
export interface WriterStreamInput {
driver: import('@ydbjs/core').Driver;
updateTokenIntervalMs?: number;
}
export type WriterStreamReceiveEvent = {
type: 'writer.stream.request.init';
data: StreamWriteMessage_InitRequest;
} | {
type: 'writer.stream.request.write';
data: StreamWriteMessage_WriteRequest;
};
export type WriterStreamEmittedEvent = {
type: 'writer.stream.start';
} | {
type: 'writer.stream.response.init';
data: StreamWriteMessage_InitResponse;
} | {
type: 'writer.stream.response.write';
data: StreamWriteMessage_WriteResponse;
} | {
type: 'writer.stream.response.token';
data: UpdateTokenResponse;
} | {
type: 'writer.stream.error';
error: unknown;
} | {
type: 'writer.stream.close';
};
export declare const WriterStream: import("xstate").CallbackActorLogic<WriterStreamReceiveEvent, WriterStreamInput, WriterStreamEmittedEvent>;
//# sourceMappingURL=stream.d.ts.map