Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/n8maninger/renterc
https://github.com/n8maninger/renterc
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/n8maninger/renterc
- Owner: n8maninger
- Created: 2022-09-15T14:00:20.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-11-04T16:58:30.000Z (about 2 years ago)
- Last Synced: 2024-06-21T09:56:19.878Z (7 months ago)
- Language: Go
- Size: 90.8 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# renterd demo
## Overview
Wraps the `renterd` API in a simple CLI interface.## Build
```sh
go build -o bin/ ./cmd/renterc
```## Usage
The environment variables `RENTERD_API_ADDR` and `RENTERD_API_PASSWORD` must be set to connect to a `renterd` instance.
### List Contracts:
```sh
renterc contracts
```### Form Contract:
```sh
renterc contracts form ed25519:1fb61da55e8c54d6bc0fa0350b4eb5065af2a52485714a16680e7e21f686e2c7
```By default, contracts are formed for 1 week and 1 GiB of upload and download.
Duration can be changed with the `--duration 1m` flag and data can be changed
with the `--data 10GiB` flag. Since renterd is still in development, it's
recommended to only upload test data to small short duration contracts.### Upload Data:
#### Single File
```sh
renterc objects upload -m 1 -n 3 Big_Buck_Bunny_1080_10s_30MB.mp4
```Uploads the file `Big_Buck_Bunny_1080_10s_30MB.mp4` with 3x redundancy. A
minimum of three contracts must be formed. `-m` and `-n` are optional and
default to 1 (no redundancy). `n` is the total number of shards to upload, while
`m` is the minimum number of shards required to reconstruct the file. For
example, Sia's default redundancy would be `-m 10 -n 30`.#### Multiple Files
If multiple file paths are provided, they will be efficiently packed together.
This prevents wasting storage with small files due to Sia's 4MiB minimum sector
size. Each file will still be available under an individual key for downloading,
but deleting and repair become more complicated and may require reuploading some
files.```sh
renterc objects upload -m 1 -n 3 file_1.jpeg file_2.jpeg
```Packs and uploads `file_1.jpeg` and `file_2.jpeg` with 3x redundancy.
### Download Data:
```sh
renterc objects download Big_Buck_Bunny_1080_10s_30MB.mp4 ~/dest.mp4
```Downloads the file `Big_Buck_Bunny_1080_10s_30MB.mp4` from the network using
the metadata stored in `renterd`'s object store.