Skip to content

@codesoul-co/hypha-inference / plasmod

Using this module

Use the Plasmod module for using the public contracts and operations for this capability boundary. It exports 1 class, 1 interface.

Import from the package entrypoint

ts
import {
  InMemoryPlasmodHotLayer,
} from '@codesoul-co/hypha-inference';

import type {
  InMemoryPlasmodHotLayerOptions,
} from '@codesoul-co/hypha-inference';

Usage patterns

  • Use the 1 type/interface export as static contracts in application code, adapters, or tests. Import them with import type; they do not exist at runtime.
  • The module exposes 1 class as constructable runtime implementations. Each symbol entry lists its constructor and public methods.

Public exports

SymbolKindSignatureDescription
InMemoryPlasmodHotLayerclassnew InMemoryPlasmodHotLayer(nowOrOptions?: (() => Date) | InMemoryPlasmodHotLayerOptions): InMemoryPlasmodHotLayerIn Memory Plasmod Hot Layer class with 6 public constructor or member entries; its exact declarations are listed below.
InMemoryPlasmodHotLayerOptionsinterfaceinterface InMemoryPlasmodHotLayerOptionsIn Memory Plasmod Hot Layer Options interface with 6 public fields or methods.

InMemoryPlasmodHotLayer

In Memory Plasmod Hot Layer class with 6 public constructor or member entries; its exact declarations are listed below.

  • Kind: class
  • Import: import { InMemoryPlasmodHotLayer } from '@codesoul-co/hypha-inference';
  • Source module: plasmod

Declaration

text
export declare class InMemoryPlasmodHotLayer implements PlasmodHotLayer {
    constructor(nowOrOptions?: (() => Date) | InMemoryPlasmodHotLayerOptions);
    prepare(input: PlasmodHotLayerPrepareInput): Promise<PlasmodHotLayerPrepareResult>;
    invalidateSegment(segmentId: string, _reason: string): Promise<void>;
    getSessionState(stateId: string): PlasmodSessionState | null;
    getCacheMetadata(segmentId: string): PlasmodCacheMetadata | null;
    snapshot(): {
            prefixRegistrySize: number;
            cacheMetadataSize: number;
            sessionStateSize: number;
            invalidationGraphSize: number;
            segmentAliasSize: number;
            reuseKeySize: number;
        };
}

Public members

MemberKindSignatureDescription
constructorconstructor(nowOrOptions?: (() => Date) | InMemoryPlasmodHotLayerOptions): InMemoryPlasmodHotLayerCreates an instance of this class.
getCacheMetadatamethodgetCacheMetadata(segmentId: string): PlasmodCacheMetadata | nullPublic method; parameters and return type are shown in the signature.
getSessionStatemethodgetSessionState(stateId: string): PlasmodSessionState | nullPublic method; parameters and return type are shown in the signature.
invalidateSegmentmethodinvalidateSegment(segmentId: string, _reason: string): Promise<void>Public method; parameters and return type are shown in the signature.
preparemethodprepare(input: PlasmodHotLayerPrepareInput): Promise<PlasmodHotLayerPrepareResult>Public method; parameters and return type are shown in the signature.
snapshotmethodsnapshot(): { prefixRegistrySize: number; cacheMetadataSize: number; sessionStateSize: number; invalidationGraphSize: number; segmentAliasSize: number; reuseKeySize: number; }Public method; parameters and return type are shown in the signature.

InMemoryPlasmodHotLayerOptions

In Memory Plasmod Hot Layer Options interface with 6 public fields or methods.

  • Kind: interface
  • Import: import type { InMemoryPlasmodHotLayerOptions } from '@codesoul-co/hypha-inference';
  • Source module: plasmod

Declaration

text
export interface InMemoryPlasmodHotLayerOptions {
    now?: () => Date;
    maxSegments?: number;
    maxSessionStates?: number;
    maxAliases?: number;
    maxReuseKeys?: number;
    maxDependenciesPerSegment?: number;
}

Contract members

MemberKindSignatureDescription
maxAliasespropertymaxAliases?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
maxDependenciesPerSegmentpropertymaxDependenciesPerSegment?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
maxReuseKeyspropertymaxReuseKeys?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
maxSegmentspropertymaxSegments?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
maxSessionStatespropertymaxSessionStates?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
nowmethodnow?(): DatePublic method; parameters and return type are shown in the signature.