Options
All
  • Public
  • Public/Protected
  • All
Menu

Module lib/types

Index

References

Re-exports BatchOptions
Re-exports BufferOptions
Re-exports Callback
Re-exports CheckpointData
Re-exports CommandWrapFunction
Re-exports CommandWrapOptions
Re-exports EnrichOptions
Re-exports FromCsvOptions
Re-exports OffloadOptions
Re-exports ProcessCallback
Re-exports ProcessCallbackOptions
Re-exports ProcessFunction
Re-exports ReadOptions
Re-exports StatsStream
Re-exports StreamUtil
Re-exports ThroughEvent
Re-exports ToCheckpointOptions
Re-exports ToCsvOptions
Re-exports WriteOptions
Re-exports batch
Re-exports buffer
Re-exports bufferBackoff
Re-exports commandWrap
Re-exports counter
Re-exports devnull
Re-exports eventIdFromTimestamp
Re-exports eventIdToTimestamp
Re-exports fromCSV
Re-exports fromS3
Re-exports log
Re-exports parse
Re-exports passthrough
Re-exports pipe
Re-exports pipeAsync
Re-exports pipeline
Re-exports process
Re-exports stringify
Re-exports through
Re-exports throughAsync
Re-exports toCSV
Re-exports toS3
Re-exports writeWrapped

Type aliases

BotInvocationEvent2<T>: T & { __cron: Cron; botId: string }

The RStreams bus will create this event and pass it to your bot when it is invoked. It tells you the ID of the bot your code is running as, so you don't have to hard-code it or so you can do complex things with fanout. It also sends you detail on the bot itself, including checkpoints and so on. Finally, the event will include your own custom-defined config you registered that you wanted passed into your bot when invoked.

Type parameters

  • T: any = {}

    Your registered config data that will be mixed in with the event when sent to you

DataCallback<T, E>: (err?: E | null, data?: T) => void

Type parameters

  • T = any

    The type of the data to be returned from the operation, if any

  • E = Error

    The type of the Error object if the operation fails

Type declaration

    • (err?: E | null, data?: T): void
    • A standard callback function supporting operation success with optional data returned and fail with Error.

      // Operation failed, returns an error from the callback
      callback(new Error())

      // Operation succeeded, return data from this operation
      callback(null, data)

      // Operation succeeded but don't want to forward any data from this operation
      callback()

      Parameters

      • Optional err: E | null

        If present, the operation failed and this is the error

      • Optional data: T

        If present, this is the data to return from the operation

      Returns void

DuplexStream<T, U>: TransformStream<T, U>
deprecated

Don't use. Will be removed.

Type parameters

  • T

  • U

ErrorCallback: (error: Error | null | undefined) => void

Type declaration

    • (error: Error | null | undefined): void
    • A standard callback indicating the operation failed if error is present

      Parameters

      • error: Error | null | undefined

        If present, an error occurred and this is it

      Returns void

FlushCallback<T, E>: (this: stream.Transform, flushCallback: DataCallback<T, E>) => any

Type parameters

  • T = any

  • E = Error

    The type of an error, if there is one

Type declaration

    • (this: stream.Transform, flushCallback: DataCallback<T, E>): any
    • This is a flush event callback function. When a stream is closed, the pipe is flushed meaning all events flow out of the pipe until it's empty. Once it's empty, the FlushCallabck will be called, allowing the developer to do cleanup like close open database connections or whatever.

      Parameters

      • this: stream.Transform

        Node will consume this argument and use it to set the context of the function to be the TransformStream itself so you can call methods on this in the function which will be the TransformStream instance

      • flushCallback: DataCallback<T, E>

        The function to call when the flush is complete

      Returns any

RStreamsTransformFunction<T, U, E>: (this: TransformStream<T, U>, obj: T, callback: DataCallback<U, E>) => void

Type parameters

  • T

    The type of data to be sent into the pipe step

  • U

    The type of data that will be produced by this pipe step and sent to the next pipe step

  • E = Error

    The type of error produced if something goes wrong

Type declaration

    • Creates a TransformStream pipe step. The doc on TransformStream is very helpful.

      Parameters

      • this: TransformStream<T, U>

        Node will consume this argument and use it to set the context of the function to be the TransformStream itself so you can call methods on this in the function which will be the TransformStream instance

      • obj: T
      • callback: DataCallback<U, E>

        A standard callback to return an error or data to send to the next pipe step

      Returns void

TransformFunction<T, E>: (this: stream.Transform, chunk: T, encoding: BufferEncoding, callback: DataCallback<T, E>) => void

Type parameters

  • T = any

  • E = Error

Type declaration

    • (this: stream.Transform, chunk: T, encoding: BufferEncoding, callback: DataCallback<T, E>): void
    • internal

      Don't use.

      Parameters

      • this: stream.Transform
      • chunk: T
      • encoding: BufferEncoding
      • callback: DataCallback<T, E>

      Returns void

Generated using TypeDoc