Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Action<CommandHandlers>

An Action.

Type Parameters

Hierarchy

  • Action

Implements

Index

Properties

serviceName: string

The gRPC service name for this component.

service: Service

The protobuf Service for this component.

options: Required<Action.Options>

Options for this component.

Access to gRPC clients (with promisified unary methods).

commandHandlers: CommandHandlers

The command handlers.

remarks

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

Constructors

  • new Action<CommandHandlers>(desc: string | string[], serviceName: string, options?: Action.Options): Action<CommandHandlers>
  • Create a new action.

    Type Parameters

    Parameters

    • desc: string | string[]

      A descriptor or list of descriptors to parse, containing the service to serve

    • serviceName: string

      The fully qualified name of the service that provides this interface

    • Optional options: Action.Options

      The options for this action

    Returns Action<CommandHandlers>

Methods

  • lookupType(messageType: string): Type
  • Lookup a protobuf message type.

    This is provided as a convenience to lookup protobuf message types for use with events and snapshots.

    Parameters

    • messageType: string

      The fully qualified name of the type to lookup

    Returns Type

    The protobuf message type

  • setCommandHandlers(commandHandlers: CommandHandlers): Action<CommandHandlers>
  • Set the command handlers for this action.

    Parameters

    • commandHandlers: CommandHandlers

      The command handlers

    Returns Action<CommandHandlers>

    This action

Generated using TypeDoc