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

    Async server for handling source transform operations.

    The server listens on a Unix domain socket and processes incoming messages through the provided transform function.

    const server = new sourceTransform.AsyncServer(async (datum) => {
    // Parse JSON and extract timestamp
    const data = JSON.parse(datum.value.toString());
    const eventTime = new Date(data.timestamp);

    // Return transformed message with new event time
    return [new sourceTransform.Message(datum.value, eventTime)];
    });

    // Start the server
    await server.start();

    // Later, stop the server gracefully
    server.stop();
    Index

    Constructors

    Methods

    Constructors

    Methods

    • Start the source transform server.

      Parameters

      • OptionalsocketPath: string | null

        Optional custom Unix socket path (defaults to Numaflow standard)

      • OptionalserverInfoPath: string | null

        Optional path for server info file

      Returns Promise<void>

    • Stop the server gracefully.

      Returns void