Skip to content

@codesoul-co/hypha-adapters-local / in-memory-execution-artifact-store

Using this module

Use the In memory execution artifact store module for persisting and reading data at this boundary. It exports 1 class, 2 interfaces.

Import from the package entrypoint

ts
import {
  InMemoryExecutionArtifactStore,
} from '@codesoul-co/hypha-adapters-local';

import type {
  InMemoryExecutionArtifactStoreOptions,
  InMemoryExecutionArtifactStoreStats,
} from '@codesoul-co/hypha-adapters-local';

Usage patterns

  • Use the 2 type/interface exports 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
InMemoryExecutionArtifactStoreclassnew InMemoryExecutionArtifactStore(options?: InMemoryExecutionArtifactStoreOptions): InMemoryExecutionArtifactStoreIn Memory Execution Artifact Store class with 12 public constructor or member entries; its exact declarations are listed below.
InMemoryExecutionArtifactStoreOptionsinterfaceinterface InMemoryExecutionArtifactStoreOptionsIn Memory Execution Artifact Store Options interface with 3 public fields or methods.
InMemoryExecutionArtifactStoreStatsinterfaceinterface InMemoryExecutionArtifactStoreStatsIn Memory Execution Artifact Store Stats interface with 3 public fields or methods.

InMemoryExecutionArtifactStore

In Memory Execution Artifact Store class with 12 public constructor or member entries; its exact declarations are listed below.

Declaration

text
export declare class InMemoryExecutionArtifactStore implements ArtifactStoreProvider {
    readonly id: string;
    constructor(options?: InMemoryExecutionArtifactStoreOptions);
    capabilities(): Promise<ArtifactStoreCapabilities>;
    put(input: ArtifactPutRequest): Promise<ArtifactStorageRef>;
    get(input: ArtifactGetRequest, options?: ArtifactOperationOptions): Promise<ArtifactContent>;
    head(input: ArtifactStorageRef): Promise<ArtifactObjectMetadata | null>;
    exists(input: ArtifactStorageRef): Promise<boolean>;
    delete(input: ArtifactStorageRef): Promise<void>;
    copy(input: ArtifactCopyRequest): Promise<ArtifactStorageRef>;
    health(): Promise<ProviderHealth>;
    close(): Promise<void>;
    stats(): InMemoryExecutionArtifactStoreStats;
}

Public members

MemberKindSignatureDescription
capabilitiesmethodcapabilities(): Promise<ArtifactStoreCapabilities>Public method; parameters and return type are shown in the signature.
closemethodclose(): Promise<void>Public method; parameters and return type are shown in the signature.
constructorconstructor(options?: InMemoryExecutionArtifactStoreOptions): InMemoryExecutionArtifactStoreCreates an instance of this class.
copymethodcopy(input: ArtifactCopyRequest): Promise<ArtifactStorageRef>Public method; parameters and return type are shown in the signature.
deletemethoddelete(input: ArtifactStorageRef): Promise<void>Public method; parameters and return type are shown in the signature.
existsmethodexists(input: ArtifactStorageRef): Promise<boolean>Public method; parameters and return type are shown in the signature.
getmethodget(input: ArtifactGetRequest, options?: ArtifactOperationOptions): Promise<ArtifactContent>Public method; parameters and return type are shown in the signature.
headmethodhead(input: ArtifactStorageRef): Promise<ArtifactObjectMetadata | null>Public method; parameters and return type are shown in the signature.
healthmethodhealth(): Promise<ProviderHealth>Public method; parameters and return type are shown in the signature.
idpropertyreadonly id: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
putmethodput(input: ArtifactPutRequest): Promise<ArtifactStorageRef>Public method; parameters and return type are shown in the signature.
statsmethodstats(): InMemoryExecutionArtifactStoreStatsPublic method; parameters and return type are shown in the signature.

InMemoryExecutionArtifactStoreOptions

In Memory Execution Artifact Store Options interface with 3 public fields or methods.

Declaration

text
export interface InMemoryExecutionArtifactStoreOptions {
    id?: string;
    maxObjectBytes?: number;
    now?: () => string;
}

Contract members

MemberKindSignatureDescription
idpropertyid?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
maxObjectBytespropertymaxObjectBytes?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
nowmethodnow?(): stringPublic method; parameters and return type are shown in the signature.

InMemoryExecutionArtifactStoreStats

In Memory Execution Artifact Store Stats interface with 3 public fields or methods.

Declaration

text
export interface InMemoryExecutionArtifactStoreStats {
    objects: number;
    blobs: number;
    storedBytes: number;
}

Contract members

MemberKindSignatureDescription
blobspropertyblobs: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
objectspropertyobjects: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
storedBytespropertystoredBytes: numberPublic property; its type, readonly modifier and optionality are shown in the signature.