mirror of
https://github.com/psviderski/uncloud.git
synced 2026-10-06 13:18:58 +00:00
feat(caddystorage): define CaddyStorage gRPC service API for distributed Caddy storage
This commit is contained in:
1 parent
01426ca03d
commit
c7e0e36daa
3 files changed
+1286
No files matched your search
@@ -0,0 +1,74 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package api;
|
||||
|
||||
option go_package = "github.com/psviderski/uncloud/internal/machine/api/pb";
|
||||
|
||||
import "google/protobuf/empty.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "internal/machine/api/pb/common.proto";
|
||||
|
||||
// CaddyStorage exposes the CertMagic storage operations backed by the distributed cluster store.
|
||||
service CaddyStorage {
|
||||
rpc Store(StoreCaddyStorageRequest) returns (google.protobuf.Empty);
|
||||
rpc Load(LoadCaddyStorageRequest) returns (LoadCaddyStorageResponse);
|
||||
rpc Delete(DeleteCaddyStorageRequest) returns (EmptyResponse);
|
||||
rpc List(ListCaddyStorageRequest) returns (ListCaddyStorageResponse);
|
||||
rpc Stat(StatCaddyStorageRequest) returns (StatCaddyStorageResponse);
|
||||
}
|
||||
|
||||
message StoreCaddyStorageRequest {
|
||||
string key = 1;
|
||||
bytes value = 2;
|
||||
}
|
||||
|
||||
message LoadCaddyStorageRequest {
|
||||
string key = 1;
|
||||
}
|
||||
|
||||
message LoadCaddyStorageResponse {
|
||||
// Must contain only one repeated messages field to allow broadcasting Load requests to multiple machines.
|
||||
repeated MachineCaddyStorageValue messages = 1;
|
||||
}
|
||||
|
||||
message MachineCaddyStorageValue {
|
||||
Metadata metadata = 1;
|
||||
bytes value = 2;
|
||||
google.protobuf.Timestamp updated_at = 3;
|
||||
}
|
||||
|
||||
message DeleteCaddyStorageRequest {
|
||||
string key = 1;
|
||||
}
|
||||
|
||||
message ListCaddyStorageRequest {
|
||||
string prefix = 1;
|
||||
bool recursive = 2;
|
||||
}
|
||||
|
||||
message ListCaddyStorageResponse {
|
||||
// Must contain only one repeated messages field to allow broadcasting List requests to multiple machines.
|
||||
repeated MachineCaddyStorageKeys messages = 1;
|
||||
}
|
||||
|
||||
message MachineCaddyStorageKeys {
|
||||
Metadata metadata = 1;
|
||||
repeated string keys = 2;
|
||||
}
|
||||
|
||||
message StatCaddyStorageRequest {
|
||||
string key = 1;
|
||||
}
|
||||
|
||||
message StatCaddyStorageResponse {
|
||||
// Must contain only one repeated messages field to allow broadcasting Stat requests to multiple machines.
|
||||
repeated MachineCaddyStorageKeyInfo messages = 1;
|
||||
}
|
||||
|
||||
message MachineCaddyStorageKeyInfo {
|
||||
Metadata metadata = 1;
|
||||
string key = 2;
|
||||
google.protobuf.Timestamp updated_at = 3;
|
||||
int64 size = 4;
|
||||
bool is_terminal = 5;
|
||||
}
|
||||
Reference in new issue
Block a user