콘텐츠로 이동

ChaosBlobStore

이 콘텐츠는 아직 번역되지 않았습니다.

被混沌包装后的存储:暴露故障配置、注入统计与内层存储。

readonly capabilities: BlobStoreCapabilities;

SegmentBlobStore.capabilities


readonly faults: ChaosFaults;

readonly inner: SegmentBlobStore;

readonly stats: ChaosStats;

delete(keys, signal?): Promise<void>;

不存在不算错

readonly string[]

any

Promise<void>

SegmentBlobStore.delete


get(
key,
range?,
signal?
): Promise<ReadableStream<Uint8Array<ArrayBufferLike>>>;

返回的流由引擎消费与关闭;适配器不得整段读入内存

string

ByteRange

any

Promise<ReadableStream<Uint8Array<ArrayBufferLike>>>

SegmentBlobStore.get


head(key, signal?): Promise<BlobMeta | null>;

不存在 → null(不抛)

string

any

Promise<BlobMeta | null>

SegmentBlobStore.head


list(
prefix,
cursor?,
signal?
): AsyncIterable<BlobListEntry>;

允许最终一致;引擎只用于 gc 与盘点

string

string

any

AsyncIterable<BlobListEntry>

SegmentBlobStore.list


put(
key,
body,
meta,
opts?
): Promise<PutResult>;

至少一次、按 meta.sha256 幂等(同键同哈希重复 put 必须成功且无副作用)

string

ReadableStream<Uint8Array<ArrayBufferLike>>

BlobMeta

PutOptions

Promise<PutResult>

SegmentBlobStore.put