@codesoul-co/hypha-inference / plasmod
- Package index:
@codesoul-co/hypha-inference - Source:
packages/inference/src/plasmod.ts - Exports: 2
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
| Symbol | Kind | Signature | Description |
|---|---|---|---|
InMemoryPlasmodHotLayer | class | new InMemoryPlasmodHotLayer(nowOrOptions?: (() => Date) | InMemoryPlasmodHotLayerOptions): InMemoryPlasmodHotLayer | In Memory Plasmod Hot Layer class with 6 public constructor or member entries; its exact declarations are listed below. |
InMemoryPlasmodHotLayerOptions | interface | interface InMemoryPlasmodHotLayerOptions | In 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
| Member | Kind | Signature | Description |
|---|---|---|---|
constructor | constructor | (nowOrOptions?: (() => Date) | InMemoryPlasmodHotLayerOptions): InMemoryPlasmodHotLayer | Creates an instance of this class. |
getCacheMetadata | method | getCacheMetadata(segmentId: string): PlasmodCacheMetadata | null | Public method; parameters and return type are shown in the signature. |
getSessionState | method | getSessionState(stateId: string): PlasmodSessionState | null | Public method; parameters and return type are shown in the signature. |
invalidateSegment | method | invalidateSegment(segmentId: string, _reason: string): Promise<void> | Public method; parameters and return type are shown in the signature. |
prepare | method | prepare(input: PlasmodHotLayerPrepareInput): Promise<PlasmodHotLayerPrepareResult> | Public method; parameters and return type are shown in the signature. |
snapshot | method | snapshot(): { 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
| Member | Kind | Signature | Description |
|---|---|---|---|
maxAliases | property | maxAliases?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
maxDependenciesPerSegment | property | maxDependenciesPerSegment?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
maxReuseKeys | property | maxReuseKeys?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
maxSegments | property | maxSegments?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
maxSessionStates | property | maxSessionStates?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
now | method | now?(): Date | Public method; parameters and return type are shown in the signature. |
