42 lines
768 B
Protocol Buffer
42 lines
768 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
import "google/protobuf/empty.proto";
|
|
|
|
package v1.primitives.flt;
|
|
|
|
service FloatCacheService {
|
|
rpc Create(FloatCreateRequest) returns (FloatCreateResponse);
|
|
rpc Set(FloatSetRequest) returns (google.protobuf.Empty);
|
|
rpc Get(FloatGetRequest) returns (FloatGetResponse);
|
|
rpc Delete(FloatDeleteRequest) returns (FloatDeleteResponse);
|
|
}
|
|
|
|
message FloatCreateRequest {
|
|
double value = 1;
|
|
optional uint32 ttl_seconds = 2;
|
|
}
|
|
|
|
message FloatCreateResponse {
|
|
string id = 1;
|
|
}
|
|
|
|
message FloatSetRequest {
|
|
string id = 1;
|
|
double value = 2;
|
|
}
|
|
|
|
message FloatGetRequest {
|
|
string id = 1;
|
|
}
|
|
|
|
message FloatGetResponse {
|
|
double value = 1;
|
|
}
|
|
|
|
message FloatDeleteRequest {
|
|
string id = 1;
|
|
}
|
|
|
|
message FloatDeleteResponse {
|
|
double removed_value = 1;
|
|
} |