@codesoul-co/hypha-adapters-local / in-memory-execution-artifact-store
- 包索引:
@codesoul-co/hypha-adapters-local - 源码:
packages/adapters-local/src/in-memory-execution-artifact-store.ts - 导出数: 3
模块用法
用于持久化并读取该边界的数据。In memory execution artifact store 模块公开 1 类、2 接口。
从包入口导入
ts
import {
InMemoryExecutionArtifactStore,
} from '@codesoul-co/hypha-adapters-local';
import type {
InMemoryExecutionArtifactStoreOptions,
InMemoryExecutionArtifactStoreStats,
} from '@codesoul-co/hypha-adapters-local';使用要点
- 2 个类型/接口用于应用代码、Adapter 或测试中的静态契约;请使用
import type,运行时不应依赖它们。 - 1 个类提供可实例化的运行时实现;构造参数与公开方法在各自条目中完整列出。
公共导出
| Symbol | 种类 | 签名 | 说明 |
|---|---|---|---|
InMemoryExecutionArtifactStore | 类 | new InMemoryExecutionArtifactStore(options?: InMemoryExecutionArtifactStoreOptions): InMemoryExecutionArtifactStore | In Memory Execution Artifact Store 类,共公开 12 个构造函数或成员;精确签名见本条目的声明与成员表。 |
InMemoryExecutionArtifactStoreOptions | 接口 | interface InMemoryExecutionArtifactStoreOptions | In Memory Execution Artifact Store Options 接口,共包含 3 个公开字段或方法。 |
InMemoryExecutionArtifactStoreStats | 接口 | interface InMemoryExecutionArtifactStoreStats | In Memory Execution Artifact Store Stats 接口,共包含 3 个公开字段或方法。 |
InMemoryExecutionArtifactStore
In Memory Execution Artifact Store 类,共公开 12 个构造函数或成员;精确签名见本条目的声明与成员表。
- 种类: 类
- 导入:
import { InMemoryExecutionArtifactStore } from '@codesoul-co/hypha-adapters-local'; - 源码模块:
in-memory-execution-artifact-store
声明
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;
}公开成员
| 成员 | 种类 | 签名 | 说明 |
|---|---|---|---|
capabilities | 方法 | capabilities(): Promise<ArtifactStoreCapabilities> | 公开方法;参数与返回类型以签名列为准。 |
close | 方法 | close(): Promise<void> | 公开方法;参数与返回类型以签名列为准。 |
constructor | 构造函数 | (options?: InMemoryExecutionArtifactStoreOptions): InMemoryExecutionArtifactStore | 创建该类的实例。 |
copy | 方法 | copy(input: ArtifactCopyRequest): Promise<ArtifactStorageRef> | 公开方法;参数与返回类型以签名列为准。 |
delete | 方法 | delete(input: ArtifactStorageRef): Promise<void> | 公开方法;参数与返回类型以签名列为准。 |
exists | 方法 | exists(input: ArtifactStorageRef): Promise<boolean> | 公开方法;参数与返回类型以签名列为准。 |
get | 方法 | get(input: ArtifactGetRequest, options?: ArtifactOperationOptions): Promise<ArtifactContent> | 公开方法;参数与返回类型以签名列为准。 |
head | 方法 | head(input: ArtifactStorageRef): Promise<ArtifactObjectMetadata | null> | 公开方法;参数与返回类型以签名列为准。 |
health | 方法 | health(): Promise<ProviderHealth> | 公开方法;参数与返回类型以签名列为准。 |
id | 属性 | readonly id: string | 公开属性;类型、只读和可选状态以签名列为准。 |
put | 方法 | put(input: ArtifactPutRequest): Promise<ArtifactStorageRef> | 公开方法;参数与返回类型以签名列为准。 |
stats | 方法 | stats(): InMemoryExecutionArtifactStoreStats | 公开方法;参数与返回类型以签名列为准。 |
InMemoryExecutionArtifactStoreOptions
In Memory Execution Artifact Store Options 接口,共包含 3 个公开字段或方法。
- 种类: 接口
- 导入:
import type { InMemoryExecutionArtifactStoreOptions } from '@codesoul-co/hypha-adapters-local'; - 源码模块:
in-memory-execution-artifact-store
声明
text
export interface InMemoryExecutionArtifactStoreOptions {
id?: string;
maxObjectBytes?: number;
now?: () => string;
}契约成员
| 成员 | 种类 | 签名 | 说明 |
|---|---|---|---|
id | 属性 | id?: string | 公开属性;类型、只读和可选状态以签名列为准。 |
maxObjectBytes | 属性 | maxObjectBytes?: number | 公开属性;类型、只读和可选状态以签名列为准。 |
now | 方法 | now?(): string | 公开方法;参数与返回类型以签名列为准。 |
InMemoryExecutionArtifactStoreStats
In Memory Execution Artifact Store Stats 接口,共包含 3 个公开字段或方法。
- 种类: 接口
- 导入:
import type { InMemoryExecutionArtifactStoreStats } from '@codesoul-co/hypha-adapters-local'; - 源码模块:
in-memory-execution-artifact-store
声明
text
export interface InMemoryExecutionArtifactStoreStats {
objects: number;
blobs: number;
storedBytes: number;
}契约成员
| 成员 | 种类 | 签名 | 说明 |
|---|---|---|---|
blobs | 属性 | blobs: number | 公开属性;类型、只读和可选状态以签名列为准。 |
objects | 属性 | objects: number | 公开属性;类型、只读和可选状态以签名列为准。 |
storedBytes | 属性 | storedBytes: number | 公开属性;类型、只读和可选状态以签名列为准。 |
