Nexus/pkg/proto/services.proto

59 lines
1.1 KiB
Protocol Buffer
Raw Permalink Normal View History

2024-10-19 14:36:33 +00:00
syntax = "proto3";
option go_package = ".;proto";
package proto;
2024-10-21 14:07:36 +00:00
service DirectoryService {
2024-10-19 14:36:33 +00:00
rpc GetService(GetServiceRequest) returns (GetServiceResponse) {}
rpc ListService(ListServiceRequest) returns (ListServiceResponse) {}
rpc AddService(ServiceInfo) returns (AddServiceResponse) {}
rpc RemoveService(RemoveServiceRequest) returns (RemoveServiceResponse) {}
2024-10-20 16:05:40 +00:00
rpc BroadcastEvent(EventInfo) returns (EventResponse) {}
2024-10-19 14:36:33 +00:00
}
message ServiceInfo {
string id = 1;
string type = 2;
string label = 3;
string grpc_addr = 4;
optional string http_addr = 5;
}
message GetServiceRequest {
optional string id = 1;
optional string type = 2;
}
message GetServiceResponse {
ServiceInfo data = 1;
}
message ListServiceRequest {
optional string type = 1;
}
message ListServiceResponse {
repeated ServiceInfo data = 1;
}
message AddServiceResponse {
bool is_success = 1;
}
message RemoveServiceRequest {
2024-10-20 16:05:40 +00:00
string id = 1;
2024-10-19 14:36:33 +00:00
}
message RemoveServiceResponse {
bool is_success = 1;
}
2024-10-20 16:05:40 +00:00
message EventInfo {
string event = 1;
bytes data = 2;
}
message EventResponse {
}