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

Function ensureIdentity

packages/effect/src/unstable/eventlog/EventLogRemote.ts:171–178  ·  view source on GitHub ↗
(identity: Identity["Service"])

Source from the content-addressed store, hash-verified

169
170 const identities = new Map<string, Identity["Service"]>()
171 const ensureIdentity = (identity: Identity["Service"]) => {
172 let entry = identities.get(identity.publicKey)
173 if (!entry) {
174 entry = identity
175 identities.set(identity.publicKey, entry)
176 }
177 return entry
178 }
179
180 const authCache = yield* Cache.make({
181 lookup: Effect.fnUntraced(function*(publicKey: string) {

Callers 1

ensureAuthenticatedFunction · 0.85

Calls 2

getMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected