Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type Aliases

ValueEntityCommandContext<State>: ValueEntity.CommandContext<State>

Context for a value entity command.

Type Parameters

CommandHandler<State>: ((command: any, state: State, context: ValueEntity.CommandContext<State>) => Promise<CommandReply> | CommandReply)

Type Parameters

Type declaration

    • A command handler for one service call to the value entity.

      Parameters

      • command: any

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

      • state: State

        The entity state

      • context: ValueEntity.CommandContext<State>

        The command context

      Returns Promise<CommandReply> | CommandReply

      The message to reply with, it must match the gRPC service call output type for this command, or if a Reply is returned, contain an object that matches the output type.

CommandHandlers<State>: {}

Value entity command handlers.

remarks

The names of the properties must match the names of the service calls specified in the gRPC descriptor for this value entity's service.

Type Parameters

Type declaration

InitialCallback<State>: ((entityId: string) => State)

Type Parameters

Type declaration

    • (entityId: string): State
    • Initial state callback.

      remarks

      This is invoked if the entity is started with no snapshot.

      Parameters

      • entityId: string

        The entity id

      Returns State

      The entity state

Generated using TypeDoc