storage

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2026 License: MIT Imports: 20 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Storage

描述

Tavern 的 storage 包提供灵活且可插拔的存储抽象层,用于管理对象存储、索引数据库和本地/内存/磁盘后端。它封装了存储后端的选择、注册与初始化逻辑,支持不同存储实现之间的无缝替换,便于在不同部署环境(例如内存测试、单机磁盘、分布式后端)中使用。

Features

  • 多后端支持: 提供对内存、磁盘、空实现等多种存储后端的抽象和实现,便于根据场景选择最合适的后端。
  • 后端注册与发现: 支持通过注册机制添加新的存储实现,运行时可通过配置或代码选择具体实现。
  • 索引与对象分离: 将对象存储与索引(如 indexdb)分离,使索引存储可以独立演进或替换。
  • 轻量 API: 暴露简单且一致的接口用于对象读写、列举和元数据管理,便于上层服务调用。
  • 测试友好: 提供内存与空实现(empty)用于单元测试,减少对外部依赖的需要。
  • 可扩展性: 设计允许插件式扩展(新增存储类型、缓存策略、持久化引擎等)。

Directories

Path Synopsis
bucket

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL