@numaproj/numaflow-js - v0.0.0-alpha.4
    Preparing search index...

    Class AsyncServer

    Async server implementation for sink operations.

    const server = new sink.AsyncServer(async (datums) => {
    const responses = [];
    for await (const datum of datums) {
    try {
    await processMessage(datum.getValue());
    responses.push(sink.Response.ok(datum.id));
    } catch (e) {
    responses.push(sink.Response.failure(datum.id, e.message));
    }
    }
    return responses;
    });
    Index

    Constructors

    Methods

    Constructors

    Methods

    • Start the sink server.

      Parameters

      • OptionalsocketPath: string | null

        Optional custom Unix socket path

      • OptionalserverInfoPath: string | null

        Optional path for server info file

      Returns Promise<void>

    • Stop the server gracefully.

      Returns void