Merge commit 'b61b4df2c2167018758dde59a3b9de2de480c3f4'

This commit is contained in:
Peter 2022-01-26 10:40:49 +01:00
commit 794159e137
Signed by: prskr
GPG key ID: C1DB5D2E8DB512F9
13 changed files with 166 additions and 86 deletions

View file

@ -8,5 +8,6 @@ stages:
lint:
stage: test
script:
- cd proto/
- buf ls-files
- buf lint

View file

@ -1,20 +0,0 @@
# Below is not the lint and breaking configuration we recommend!
# This just just what googleapis passes.
# For lint, we recommend having the single value "DEFAULT" in "use"
# with no values in "except".
# For breaking, we recommend having the single value "FILE" in use.
# See https://docs.buf.build/lint-usage
# See https://docs.buf.build/breaking-usage
version: v1beta1
build:
roots:
- proto
lint:
use:
- DEFAULT
except:
- PACKAGE_DIRECTORY_MATCH
allow_comment_ignores: true
breaking:
use:
- FILE

View file

@ -0,0 +1,25 @@
syntax = "proto3";
package inetmock.audit.v1;
enum DHCPOpCode {
DHCP_OP_CODE_UNSPECIFIED = 0;
DHCP_OP_CODE_BOOT_REQUEST = 1;
DHCP_OP_CODE_BOOT_REPLY = 2;
}
enum DHCPHwType {
DHCP_HW_TYPE_UNSPECIFIED = 0;
DHCP_HW_TYPE_ETHERNET = 1;
DHCP_HW_TYPE_LOCAL_NET = 12;
DHCP_HW_TYPE_FIBRE_CHANNEL = 18;
DHCP_HW_TYPE_SERIAL_LINE = 20;
DHCP_HW_TYPE_IPSEC = 31;
DHCP_HW_TYPE_INFINIBAND = 32;
}
message DHCPDetailsEntity {
int32 hop_count = 1;
DHCPOpCode opcode = 2;
DHCPHwType hw_type = 3;
}

View file

@ -2,12 +2,6 @@ syntax = "proto3";
package inetmock.audit.v1;
option csharp_namespace = "INetMock.Client.Audit";
option go_package = "gitlab.com/inetmock/inetmock/pkg/audit/v1";
option java_multiple_files = true;
option java_outer_classname = "HandlerEventProto";
option java_package = "com.github.baez90.inetmock.audit";
enum DNSOpCode {
//buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX
DNS_OP_CODE_QUERY = 0;

View file

@ -2,14 +2,10 @@ syntax = "proto3";
package inetmock.audit.v1;
option csharp_namespace = "INetMock.Client.Audit";
option go_package = "gitlab.com/inetmock/inetmock/pkg/audit/v1";
option java_multiple_files = true;
option java_outer_classname = "HandlerEventProto";
option java_package = "com.github.baez90.inetmock.audit";
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;
@ -22,6 +18,9 @@ enum AppProtocol {
APP_PROTOCOL_DNS = 1;
APP_PROTOCOL_HTTP = 2;
APP_PROTOCOL_HTTP_PROXY = 3;
APP_PROTOCOL_PPROF = 4;
APP_PROTOCOL_DNS_OVER_HTTPS = 5;
APP_PROTOCOL_DHCP = 6;
}
enum TLSVersion {
@ -48,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

@ -2,12 +2,6 @@ syntax = "proto3";
package inetmock.audit.v1;
option csharp_namespace = "INetMock.Client.Audit";
option go_package = "gitlab.com/inetmock/inetmock/pkg/audit/v1";
option java_multiple_files = true;
option java_outer_classname = "HandlerEventProto";
option java_package = "com.github.baez90.inetmock.audit";
enum HTTPMethod {
HTTP_METHOD_UNSPECIFIED = 0;
HTTP_METHOD_GET = 1;

10
api/proto/buf.yaml Normal file
View file

@ -0,0 +1,10 @@
version: v1
breaking:
use:
- FILE
lint:
use:
- DEFAULT
except:
- PACKAGE_DIRECTORY_MATCH
allow_comment_ignores: true

View file

@ -2,12 +2,6 @@ syntax = "proto3";
package inetmock.rpc.v1;
option csharp_namespace = "INetMock.Client.Rpc";
option go_package = "gitlab.com/inetmock/inetmock/pkg/rpc/v1";
option java_multiple_files = true;
option java_outer_classname = "AuditProto";
option java_package = "com.github.baez90.inetmock.rpc";
import "audit/v1/event_entity.proto";
message WatchEventsRequest {

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);
}

View file

@ -1,34 +0,0 @@
syntax = "proto3";
package inetmock.rpc.v1;
option csharp_namespace = "INetMock.Client.Rpc";
option go_package = "gitlab.com/inetmock/inetmock/pkg/rpc/v1";
option java_multiple_files = true;
option java_outer_classname = "HealthProto";
option java_package = "com.github.baez90.inetmock.rpc";
enum HealthState {
HEALTH_STATE_UNSPECIFIED = 0;
HEALTH_STATE_INITIALIZING = 1;
HEALTH_STATE_UNHEALTHY = 2;
HEALTH_STATE_HEALTHY = 3;
}
message GetHealthRequest {
repeated string components = 1;
}
message ComponentHealth {
HealthState state = 1;
string message = 2;
}
message GetHealthResponse {
HealthState overall_health_state = 1;
map<string, ComponentHealth> components_health = 2;
}
service HealthService {
rpc GetHealth(GetHealthRequest) returns (GetHealthResponse);
}

View file

@ -2,12 +2,6 @@ syntax = "proto3";
package inetmock.rpc.v1;
option csharp_namespace = "INetMock.Client.Rpc";
option go_package = "gitlab.com/inetmock/inetmock/pkg/rpc/v1";
option java_multiple_files = true;
option java_outer_classname = "AuditProto";
option java_package = "com.github.baez90.inetmock.rpc";
import "google/protobuf/duration.proto";
message ListAvailableDevicesRequest {}
@ -35,6 +29,7 @@ message StartPCAPFileRecordingRequest {
message StartPCAPFileRecordingResponse {
string resolved_path = 1;
string consumer_key = 2;
}
message StopPCAPFileRecordingRequest {

View file

@ -0,0 +1,38 @@
syntax = "proto3";
package inetmock.rpc.v1;
import "google/protobuf/duration.proto";
message ProfileDumpRequest {
string profile_name = 1;
int32 debug = 2;
// this applies only for 'heap' profile
bool gc_before_dump = 3;
}
message ProfileDumpResponse {
bytes profile_data = 1;
}
message CPUProfileRequest {
google.protobuf.Duration profile_duration = 1;
}
message CPUProfileResponse {
bytes profile_data = 1;
}
message TraceRequest {
google.protobuf.Duration trace_duration = 1;
}
message TraceResponse {
bytes profile_data = 1;
}
service ProfilingService {
rpc ProfileDump(ProfileDumpRequest) returns (ProfileDumpResponse);
rpc CPUProfile(CPUProfileRequest) returns (CPUProfileResponse);
rpc Trace(TraceRequest) returns (TraceResponse);
}

6
api/renovate.json Normal file
View file

@ -0,0 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base"
]
}