36 lines
686 B
Protocol Buffer
36 lines
686 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
package proto;
|
|
|
|
option go_package="gitea.suyono.dev/suyono/go-agent/proto;proto";
|
|
|
|
import "google/protobuf/empty.proto";
|
|
|
|
message CacheGetRequest {
|
|
string key = 1;
|
|
}
|
|
|
|
message CacheValue {
|
|
string status = 1;
|
|
string value = 2;
|
|
string message = 3;
|
|
}
|
|
|
|
message CacheSetRequest {
|
|
string key = 1;
|
|
string value = 2;
|
|
}
|
|
|
|
message SetStatus{
|
|
string status = 1;
|
|
string message = 2;
|
|
}
|
|
|
|
service Agent {
|
|
rpc Get(CacheGetRequest) returns (CacheValue);
|
|
rpc Set(CacheSetRequest) returns (SetStatus);
|
|
rpc Shutdown(google.protobuf.Empty) returns (google.protobuf.Empty);
|
|
rpc Ping(google.protobuf.Empty) returns (google.protobuf.Empty);
|
|
}
|
|
|