Interface IArvoEventHandler<TContract>

Interface for an ArvoEvent handler.

interface IArvoEventHandler<TContract> {
    contract: TContract;
    executionunits: number;
    handler: ArvoEventHandlerFunction<TContract>;
    spanOptions?: SpanOptions;
}

Type Parameters

  • TContract extends ArvoContract

Properties

contract: TContract

The contract for the handler defining its input and outputs as well as the description.

executionunits: number

The default execution cost of the function. This can represent a dollar value or some other number with a rate card.

The functional handler of the event which takes the input, performs an action, and returns the result.

The input parameters for the handler function.

A promise of object containing the created ArvoEvent and optional extensions.

spanOptions?: SpanOptions

The OpenTelemetry span options