MCPcopy Create free account
hub / github.com/Effect-TS/effect / entityAddressFor

Function entityAddressFor

packages/cluster/src/ClusterWorkflowEngine.ts:137–151  ·  view source on GitHub ↗
(options: {
    readonly workflow: Workflow.Any
    readonly entityType: string
    readonly executionId: string
  })

Source from the content-addressed store, hash-verified

135 idleTimeToLive: "5 minutes"
136 })
137 const entityAddressFor = (options: {
138 readonly workflow: Workflow.Any
139 readonly entityType: string
140 readonly executionId: string
141 }) => {
142 const shardGroup = Context.get(options.workflow.annotations, ClusterSchema.ShardGroup)(
143 options.executionId as EntityId
144 )
145 const entityId = EntityId.make(options.executionId)
146 return new EntityAddress({
147 entityType: EntityType.make(options.entityType),
148 entityId,
149 shardId: sharding.getShardId(entityId, shardGroup)
150 })
151 }
152
153 const sendDiscard = Effect.fnUntraced(function*(options: {
154 readonly rpc: Rpc.AnyWithProps

Callers 2

scheduleClockFunction · 0.85

Calls 3

getShardIdMethod · 0.80
getMethod · 0.65
makeMethod · 0.65

Tested by

no test coverage detected