MCPcopy Index your code
hub / github.com/Effect-TS/effect / isLocalRunner

Function isLocalRunner

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

Source from the content-addressed store, hash-verified

229 const getRegistrationEvents: Stream.Stream<ShardingRegistrationEvent> = Stream.fromPubSub(events)
230
231 const isLocalRunner = (address: RunnerAddress) =>
232 Option.isSome(config.runnerAddress) && Equal.equals(address, config.runnerAddress.value)
233
234 function getShardId(entityId: EntityId, group: string): ShardId {
235 const id = Math.abs(hashString(entityId) % config.shardsPerGroup) + 1

Callers 2

sendOutgoingFunction · 0.85
Sharding.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected