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

Function isLocalRunner

packages/cluster/src/Sharding.ts:247–248  ·  view source on GitHub ↗
(address: RunnerAddress)

Source from the content-addressed store, hash-verified

245 const getRegistrationEvents: Stream.Stream<ShardingRegistrationEvent> = Stream.fromPubSub(events)
246
247 const isLocalRunner = (address: RunnerAddress) =>
248 Option.isSome(config.runnerAddress) && Equal.equals(address, config.runnerAddress.value)
249
250 function getShardId(entityId: EntityId, group: string): ShardId {
251 const id = Math.abs(hashString(entityId) % config.shardsPerGroup) + 1

Callers 3

Sharding.tsFile · 0.85
sendToRunnerFunction · 0.85
sendOutgoingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected