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

Function make

packages/effect/src/HashRing.ts:92–101  ·  view source on GitHub ↗
(options?: {
  readonly baseWeight?: number | undefined
})

Source from the content-addressed store, hash-verified

90 * @since 3.19.0
91 */
92export const make = <A extends PrimaryKey.PrimaryKey>(options?: {
93 readonly baseWeight?: number | undefined
94}): HashRing<A> => {
95 const self = Object.create(Proto)
96 self.baseWeight = Math.max(options?.baseWeight ?? 128, 1)
97 self.totalWeightCache = 0
98 self.nodes = new Map()
99 self.ring = []
100 return self
101}
102
103const Proto = {
104 ...PipeInspectableProto,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected