Crates.io | yeet-yoink |
lib.rs | yeet-yoink |
version | 0.1.1-unstable |
source | src |
created_at | 2024-02-26 11:48:54.238464 |
updated_at | 2024-03-02 14:40:21.695734 |
description | A file storage API |
homepage | |
repository | https://github.com/yeet-yoink/yeet-yoink |
max_upload_size | |
id | 1153462 |
size | 150,990 |
A service to which you can yeet your files in order to yoink them from somewhere else. This is meant to simplify cluster-local file sharing with configurable persistence backends.
One key aspect here is that a service like this can offload communication with object storage, databases or other systems, allowing the actual storage and retrieval within the application to be reduced to a simple HTTP POST and GET, given a file ID.
⚠️ This service is work in progress.
sequenceDiagram
autonumber
Alice->>Alice's yeyo: do yeet
activate Alice;
Note over Alice,Alice's yeyo: Alice stores a file
activate Alice's yeyo;
Alice's yeyo -) Storage Backend: take file;
activate Storage Backend;
deactivate Storage Backend;
Alice's yeyo-->>Alice: okie #9829;
deactivate Alice's yeyo;
deactivate Alice;
Bob->>Bob's yeyo: do yoink
activate Bob;
Note over Bob,Bob's yeyo: Bob needs the file
activate Bob's yeyo;
Bob's yeyo ->> Alice's yeyo: maybe yoink?
activate Alice's yeyo;
Note over Bob's yeyo,Alice's yeyo: Bob's yeyo attempts to fetch the file from the source
alt has file
Alice's yeyo --) Bob's yeyo: here file #9829;
Note over Alice's yeyo,Bob's yeyo: If possible, Alice's yeyo returns the file directly
else no file
Alice's yeyo --) Bob's yeyo: sry no yoink
Note over Alice's yeyo,Bob's yeyo: Eventually the file would be missing
Bob's yeyo ->> Storage Backend: give file
activate Storage Backend;
Note over Bob's yeyo,Storage Backend: Bob's yeyo then talks directly to the Storage backend
Storage Backend --) Bob's yeyo: here file
deactivate Storage Backend;
end
deactivate Alice's yeyo;
Bob's yeyo-->>Bob: here file
deactivate Bob's yeyo;
deactivate Bob;
/yeet
- Hands a file over to the service for storage and returns its ID.
?file_name=...
- Optional. Allows to specify name metadata for the file./yoink/:id
- Retrieves a file from storage, given its ID./metrics
- Produces metrics in Prometheus/OpenMetrics format./startupz
- Meant for Kubernetes startup probes./readyz
- Meant for Kubernetes readiness probes./livez
- Meant for Kubernetes liveness probes./health
- Meant for complete health checks (e.g. by Google Cloud Load Balancer)./healthz
- Meant for human inspection./stop
- Initiates a graceful shutdown.