Interface: EffectContext

akkaserverless. EffectContext

Effect context.

Properties:
Name Type Description
metadata module:akkaserverless.Metadata

The metadata associated with the command.

Members


metadata :module:akkaserverless.Metadata

Type:

Methods


effect(method, message [, synchronous] [, metadata] [, internalCall])

DEPRECATED. Emit an effect after processing this command.

Parameters:
Name Type Argument Description
method any

The entity service method to invoke.

message object

The message to send to that service.

synchronous boolean <optional>

Whether the effect should be execute synchronously or not.

metadata module:akkaserverless.Metadata <optional>

Metadata to send with the effect.

internalCall boolean <optional>

For internal calls to this deprecated function.


fail(msg)

Fail handling this command.

An alternative to using this is to return a failed Reply created with 'ReplyFactory.failed'.

Parameters:
Name Type Description
msg string

The failure message.

Throws:

An error that captures the failure message. Note that even if you catch the error thrown by this method, the command will still be failed with the given message.