mirror of
https://github.com/psviderski/uncloud.git
synced 2026-10-06 13:18:58 +00:00
76 lines
2.1 KiB
Protocol Buffer
76 lines
2.1 KiB
Protocol Buffer
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.
|
|
// See Storage interface in https://github.com/caddyserver/certmagic/blob/master/storage.go.
|
|
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;
|
|
}
|