Skip to main content Link Search Menu Expand Document (external link)

RecipientBehaviourContext overview

Added in v1.0.0


Table of contents


constructors

make

Creates a new RecipientBehaviourContext

Signature

export declare const make: (
  args: Omit<RecipientBehaviourContext, typeof RecipientBehaviourContextTypeId>
) => RecipientBehaviourContext

Added in v1.0.0

context

RecipientBehaviourContext

A tag to access current RecipientBehaviourContext

Signature

export declare const RecipientBehaviourContext: Context.Tag<RecipientBehaviourContext, RecipientBehaviourContext>

Added in v1.0.0

models

RecipientBehaviourContext (interface)

This is the context information that is available to the RecipientBehaviour and has general informations about this specific entity, like the entityId or the recipientType.

Signature

export interface RecipientBehaviourContext {
  readonly [RecipientBehaviourContextTypeId]: RecipientBehaviourContextTypeId
  readonly recipientAddress: RecipientAddress.RecipientAddress
  readonly shardId: ShardId.ShardId
  readonly recipientType: RecipientType.RecipientType<Message.Message.Any>
  readonly forkShutdown: Effect.Effect<void>
}

Added in v1.0.0

symbols

RecipientBehaviourContextTypeId

Signature

export declare const RecipientBehaviourContextTypeId: typeof RecipientBehaviourContextTypeId

Added in v1.0.0

RecipientBehaviourContextTypeId (type alias)

Signature

export type RecipientBehaviourContextTypeId = typeof RecipientBehaviourContextTypeId

Added in v1.0.0

utils

entityId

Gets the current entityId

Signature

export declare const entityId: Effect.Effect<string, never, RecipientBehaviourContext>

Added in v1.0.0

forkShutdown

Forks the shutdown of the current recipient behaviour as soon as possible.

Signature

export declare const forkShutdown: Effect.Effect<void, never, RecipientBehaviourContext>

Added in v1.0.0

recipientAddress

Gets the current entityId

Signature

export declare const recipientAddress: Effect.Effect<
  RecipientAddress.RecipientAddress,
  never,
  RecipientBehaviourContext
>

Added in v1.0.0

recipientType

Gets the current recipientType

Signature

export declare const recipientType: Effect.Effect<
  RecipientType.RecipientType<Message.Message.Any>,
  never,
  RecipientBehaviourContext
>

Added in v1.0.0

shardId

Gets the current shardId

Signature

export declare const shardId: Effect.Effect<ShardId.ShardId, never, RecipientBehaviourContext>

Added in v1.0.0