Add endpoint API to control running endpoint groups

This commit is contained in:
Peter 2022-01-25 16:00:42 +01:00
parent 505b06f37b
commit 226c480458
2 changed files with 82 additions and 2 deletions

View file

@ -2,8 +2,10 @@ syntax = "proto3";
package inetmock.audit.v1;
import "google/protobuf/any.proto";
import "google/protobuf/timestamp.proto";
import "audit/v1/http_details.proto";
import "audit/v1/dns_details.proto";
import "audit/v1/dhcp_details.proto";
enum TransportProtocol {
TRANSPORT_PROTOCOL_UNSPECIFIED = 0;
@ -45,5 +47,10 @@ message EventEntity {
uint32 source_port = 7;
uint32 destination_port = 8;
TLSDetailsEntity tls = 9;
google.protobuf.Any protocol_details = 10;
oneof protocol_details {
HTTPDetailsEntity http = 20;
DNSDetailsEntity dns = 21;
DHCPDetailsEntity dhcp = 22;
}
}

View file

@ -0,0 +1,73 @@
syntax = "proto3";
package inetmock.rpc.v1;
message ListenerGroup {
string name = 1;
repeated string endpoints = 2;
}
message ListAllServingGroupsRequest {
}
message ListAllServingGroupsResponse {
repeated ListenerGroup groups = 1;
}
message ListAllConfiguredGroupsRequest {
}
message ListAllConfiguredGroupsResponse {
repeated ListenerGroup groups = 1;
}
message StartListenerGroupRequest {
string group_name = 1;
}
message StartListenerGroupResponse {
}
message StartAllGroupsRequest {
}
message StartAllGroupsResponse {
}
message StopListenerGroupRequest {
string group_name = 1;
}
message StopListenerGroupResponse {
}
message StopAllGroupsRequest {
}
message StopAllGroupsResponse {
}
message RestartListenerGroupRequest {
string group_name = 1;
}
message RestartListenerGroupResponse {
}
message RestartAllGroupsRequest {
}
message RestartAllGroupsResponse {
}
service EndpointOrchestratorService {
rpc ListAllServingGroups(ListAllServingGroupsRequest) returns(ListAllServingGroupsResponse);
rpc ListAllConfiguredGroups(ListAllConfiguredGroupsRequest) returns(ListAllConfiguredGroupsResponse);
rpc StartListenerGroup(StartListenerGroupRequest) returns (StartListenerGroupResponse);
rpc StartAllGroups(StartAllGroupsRequest) returns (StartAllGroupsResponse);
rpc StopListenerGroup(StopListenerGroupRequest) returns (StopListenerGroupResponse);
rpc StopAllGroups(StopAllGroupsRequest) returns (StopAllGroupsResponse);
rpc RestartListenerGroup(RestartListenerGroupRequest) returns (RestartListenerGroupResponse);
rpc RestartAllGroups(RestartAllGroupsRequest) returns (RestartAllGroupsResponse);
}