可用于构建自定义 S3 兼容对象存储服务器。实现 S3 REST API,支持桶和对象操作、分片上传,提供可插拔存储后端特性,方便扩展存储实现。【此简介由AI生成】
| Files | Last commit | Last update |
|---|---|---|
| 6 months ago | ||
| 6 months ago | ||
| 6 months ago | ||
| 5 months ago | ||
| 7 months ago |
s3con
Minimal S3-compatible HTTP server scaffolding (YAPL-first).
Overview
s3con provides a framework for building S3-compatible object storage servers. It implements the S3 REST API over HTTP and allows pluggable backends for storage implementation.
Features
- Full S3 REST API implementation
- Bucket operations (create, delete, list)
- Object operations (put, get, delete, head)
- Multipart upload support
- XML error responses compatible with AWS S3
- Pluggable backend trait
Usage
use s3con::Server
use s3con::Backend
struct MyBackend { ... }
impl Backend for MyBackend {
fn list_buckets(&self) -> Result<Vec<BucketInfo>, S3Error> { ... }
fn create_bucket(&self, bucket: string) -> Result<bool, S3Error> { ... }
// ... implement other methods
}
fn main() {
let backend = MyBackend { ... }
let server = Server.new_server("0.0.0.0", 8080, backend)
let _ = server.listen_and_serve()
}
API Endpoints
| Method | Path | Description |
|---|---|---|
| GET | / | List buckets |
| PUT | /bucket | Create bucket |
| DELETE | /bucket | Delete bucket |
| GET | /bucket | List objects |
| GET | /bucket/key | Get object |
| PUT | /bucket/key | Put object |
| DELETE | /bucket/key | Delete object |
| POST | /bucket/key?uploads | Create multipart upload |
| PUT | /bucket/key?uploadId&partNumber | Upload part |
| POST | /bucket/key?uploadId | Complete multipart upload |
License
MIT
Introduction
可用于构建自定义 S3 兼容对象存储服务器。实现 S3 REST API,支持桶和对象操作、分片上传,提供可插拔存储后端特性,方便扩展存储实现。【此简介由AI生成】
Customize your domain