Skip to content
vikloverPublic

About

Simple SeaweedFS .NET driver

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

48 Commits

Folders and files

Repository files navigation

SeaweedFS .NET Client

Simple HTTP client implementation for SeaweedFS API.

NuGet License: MIT CI/CD

📚 Features

  • Complete file lifecycle: assign, upload, download, check existence, delete
  • Single-step and two-step upload modes
  • Volume server discovery via /dir/lookup
  • Fully asynchronous API
  • Strongly typed models
  • Optional collection support for logical file grouping

🚀 Quick start

dotnet add package Viklover.Seaweed --version 1.1.0
using Viklover.Seaweed.Process;

// Create client with master server URI
var masterUri = new Uri("http://localhost:9333");
using var client = new SeaweedHttpClient(masterUri);

// Read file from filesystem
byte[] fileContent = await File.ReadAllBytesAsync("path/to/file");

// Single-step submit (collection is optional)
SeaweedFileId fileId = await client.SubmitAsync(fileContent, cancellationToken, "MyCollection");

// Two-step: assign + upload (collection is optional on assign)
var (fileId, volumeRoute) = await client.AssignAsync(cancellationToken, "MyCollection");
await client.UploadAsync(volumeRoute, fileId, fileContent, cancellationToken);

// Download
byte[] content = await client.FetchAsync(volumeRoute, fileId, cancellationToken);

// Check existence
bool exists = await client.ExistsFileAsync(volumeRoute, fileId, cancellationToken);

// Delete
await client.DeleteAsync(volumeRoute, fileId, cancellationToken);

// Lookup volume routes
SeaweedVolumeRoute[] routes = await client.LookupAsync(fileId.VolumeId, cancellationToken, "MyCollection");

🛠️ Contribution

  • Report bugs 🐛
  • Suggest features 💡
  • Submit pull requests 🔄

License

MIT

About

Simple SeaweedFS .NET driver

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages