Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type Aliases

CommandHandlers: {}

The command handlers.

remarks

The names of the properties must match the names of the service calls specified in the gRPC descriptor.

Type declaration

An action command handler.

UnaryCommandHandler<Request, Response>: ((message: Request, context: UnaryCommandContext<Response>) => Promise<CommandReply<Response>> | CommandReply<Response>)

Type Parameters

  • Request extends object = any

    The type of the request message

  • Response extends object = any

    The type of the response message

Type declaration

    • A unary action command handler.

      Parameters

      • message: Request

        The command message, this will be of the type of the gRPC service call input type

      • context: UnaryCommandContext<Response>

        The command context

      Returns Promise<CommandReply<Response>> | CommandReply<Response>

      The message to reply with, it must match the gRPC service call output type for this command. If replying by using context.write, undefined must be returned.

StreamedInCommandHandler<Request, Response>: ((context: StreamedInCommandContext<Request, Response>) => Promise<CommandReply<Response>> | CommandReply<Response>)

Type Parameters

  • Request extends object = any

    The type of the request message

  • Response extends object = any

    The type of the response message

Type declaration

StreamedOutCommandHandler<Request, Response>: ((message: Request, context: StreamedOutCommandContext<Response>) => void)

Type Parameters

  • Request extends object = any

    The type of the request message

  • Response extends object = any

    The type of the response message

Type declaration

    • A streamed out command handler.

      Parameters

      • message: Request

        The command message, this will be of the type of the gRPC service call input type

      • context: StreamedOutCommandContext<Response>

        The command context

      Returns void

StreamedCommandHandler<Request, Response>: ((context: StreamedCommandContext<Request, Response>) => void)

Type Parameters

  • Request extends object = any

    The type of the request message

  • Response extends object = any

    The type of the response message

Type declaration

Generated using TypeDoc