From 07c301389d33ae48ac6daaaf2fe289750d3b219a Mon Sep 17 00:00:00 2001 From: Jaehyun Nam Date: Mon, 6 May 2024 13:58:27 +0000 Subject: [PATCH] update protobuf Signed-off-by: Jaehyun Nam --- protobuf/go.mod | 2 +- protobuf/go.sum | 4 +- protobuf/sentryflow.pb.go | 195 +++++++++++++++++---------------- protobuf/sentryflow.proto | 8 +- protobuf/sentryflow_grpc.pb.go | 20 ++-- 5 files changed, 115 insertions(+), 114 deletions(-) diff --git a/protobuf/go.mod b/protobuf/go.mod index 50886ac..0b4c987 100644 --- a/protobuf/go.mod +++ b/protobuf/go.mod @@ -4,7 +4,7 @@ go 1.21 require ( google.golang.org/grpc v1.63.2 - google.golang.org/protobuf v1.33.0 + google.golang.org/protobuf v1.34.0 ) require ( diff --git a/protobuf/go.sum b/protobuf/go.sum index e1723cb..84d0dd0 100644 --- a/protobuf/go.sum +++ b/protobuf/go.sum @@ -10,5 +10,5 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1: google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= +google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= diff --git a/protobuf/sentryflow.pb.go b/protobuf/sentryflow.pb.go index 5dda80a..d664634 100644 --- a/protobuf/sentryflow.pb.go +++ b/protobuf/sentryflow.pb.go @@ -258,7 +258,7 @@ func (x *APILog) GetResponseCode() int32 { return 0 } -type APIMetric struct { +type APIMetrics struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -266,8 +266,8 @@ type APIMetric struct { PerAPICounts map[string]uint64 `protobuf:"bytes,1,rep,name=perAPICounts,proto3" json:"perAPICounts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // @todo: add some more metrics here } -func (x *APIMetric) Reset() { - *x = APIMetric{} +func (x *APIMetrics) Reset() { + *x = APIMetrics{} if protoimpl.UnsafeEnabled { mi := &file_sentryflow_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -275,13 +275,13 @@ func (x *APIMetric) Reset() { } } -func (x *APIMetric) String() string { +func (x *APIMetrics) String() string { return protoimpl.X.MessageStringOf(x) } -func (*APIMetric) ProtoMessage() {} +func (*APIMetrics) ProtoMessage() {} -func (x *APIMetric) ProtoReflect() protoreflect.Message { +func (x *APIMetrics) ProtoReflect() protoreflect.Message { mi := &file_sentryflow_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -293,12 +293,12 @@ func (x *APIMetric) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use APIMetric.ProtoReflect.Descriptor instead. -func (*APIMetric) Descriptor() ([]byte, []int) { +// Deprecated: Use APIMetrics.ProtoReflect.Descriptor instead. +func (*APIMetrics) Descriptor() ([]byte, []int) { return file_sentryflow_proto_rawDescGZIP(), []int{2} } -func (x *APIMetric) GetPerAPICounts() map[string]uint64 { +func (x *APIMetrics) GetPerAPICounts() map[string]uint64 { if x != nil { return x.PerAPICounts } @@ -352,7 +352,7 @@ func (x *MetricValue) GetValue() map[string]string { return nil } -type EnvoyMetric struct { +type EnvoyMetrics struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -365,8 +365,8 @@ type EnvoyMetric struct { Metrics map[string]*MetricValue `protobuf:"bytes,21,rep,name=metrics,proto3" json:"metrics,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } -func (x *EnvoyMetric) Reset() { - *x = EnvoyMetric{} +func (x *EnvoyMetrics) Reset() { + *x = EnvoyMetrics{} if protoimpl.UnsafeEnabled { mi := &file_sentryflow_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -374,13 +374,13 @@ func (x *EnvoyMetric) Reset() { } } -func (x *EnvoyMetric) String() string { +func (x *EnvoyMetrics) String() string { return protoimpl.X.MessageStringOf(x) } -func (*EnvoyMetric) ProtoMessage() {} +func (*EnvoyMetrics) ProtoMessage() {} -func (x *EnvoyMetric) ProtoReflect() protoreflect.Message { +func (x *EnvoyMetrics) ProtoReflect() protoreflect.Message { mi := &file_sentryflow_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -392,47 +392,47 @@ func (x *EnvoyMetric) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use EnvoyMetric.ProtoReflect.Descriptor instead. -func (*EnvoyMetric) Descriptor() ([]byte, []int) { +// Deprecated: Use EnvoyMetrics.ProtoReflect.Descriptor instead. +func (*EnvoyMetrics) Descriptor() ([]byte, []int) { return file_sentryflow_proto_rawDescGZIP(), []int{4} } -func (x *EnvoyMetric) GetTimeStamp() string { +func (x *EnvoyMetrics) GetTimeStamp() string { if x != nil { return x.TimeStamp } return "" } -func (x *EnvoyMetric) GetNamespace() string { +func (x *EnvoyMetrics) GetNamespace() string { if x != nil { return x.Namespace } return "" } -func (x *EnvoyMetric) GetName() string { +func (x *EnvoyMetrics) GetName() string { if x != nil { return x.Name } return "" } -func (x *EnvoyMetric) GetIPAddress() string { +func (x *EnvoyMetrics) GetIPAddress() string { if x != nil { return x.IPAddress } return "" } -func (x *EnvoyMetric) GetLabels() map[string]string { +func (x *EnvoyMetrics) GetLabels() map[string]string { if x != nil { return x.Labels } return nil } -func (x *EnvoyMetric) GetMetrics() map[string]*MetricValue { +func (x *EnvoyMetrics) GetMetrics() map[string]*MetricValue { if x != nil { return x.Metrics } @@ -490,63 +490,64 @@ var file_sentryflow_proto_rawDesc = []byte{ 0x0a, 0x0d, 0x44, 0x73, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x97, 0x01, 0x0a, 0x09, - 0x41, 0x50, 0x49, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x49, 0x0a, 0x0c, 0x70, 0x65, 0x72, - 0x41, 0x50, 0x49, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x25, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x50, 0x49, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x2e, 0x50, 0x65, 0x72, 0x41, 0x50, 0x49, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x70, 0x65, 0x72, 0x41, 0x50, 0x49, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x73, 0x1a, 0x3f, 0x0a, 0x11, 0x50, 0x65, 0x72, 0x41, 0x50, 0x49, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x7f, 0x0a, 0x0b, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x38, 0x0a, 0x0a, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x82, 0x03, 0x0a, 0x0b, 0x45, 0x6e, 0x76, 0x6f, 0x79, - 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, - 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x53, - 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x49, 0x50, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x49, 0x50, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x39, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x0e, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x2e, 0x4c, 0x61, 0x62, 0x65, - 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, - 0x3c, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x15, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x76, 0x6f, - 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x1a, 0x39, 0x0a, - 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x99, 0x01, 0x0a, 0x0a, + 0x41, 0x50, 0x49, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x4a, 0x0a, 0x0c, 0x70, 0x65, + 0x72, 0x41, 0x50, 0x49, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x26, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x50, 0x49, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x50, 0x65, 0x72, 0x41, 0x50, 0x49, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x70, 0x65, 0x72, 0x41, 0x50, 0x49, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x1a, 0x3f, 0x0a, 0x11, 0x50, 0x65, 0x72, 0x41, 0x50, 0x49, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x7f, 0x0a, 0x0b, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x38, + 0x0a, 0x0a, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x51, 0x0a, 0x0c, 0x4d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2b, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x32, 0xc3, 0x01, 0x0a, 0x0a, - 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x46, 0x6c, 0x6f, 0x77, 0x12, 0x35, 0x0a, 0x09, 0x47, 0x65, - 0x74, 0x41, 0x50, 0x49, 0x4c, 0x6f, 0x67, 0x12, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0x10, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x50, 0x49, 0x4c, 0x6f, 0x67, 0x30, - 0x01, 0x12, 0x3c, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x41, 0x50, 0x49, 0x4d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x73, 0x12, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x43, 0x6c, - 0x69, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x41, 0x50, 0x49, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x30, 0x01, 0x12, - 0x40, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x73, 0x12, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x43, 0x6c, - 0x69, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x30, - 0x01, 0x42, 0x15, 0x5a, 0x13, 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x46, 0x6c, 0x6f, 0x77, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x85, 0x03, 0x0a, 0x0c, 0x45, 0x6e, 0x76, + 0x6f, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, + 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x69, + 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x49, 0x50, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x49, 0x50, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, + 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, + 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x73, 0x12, 0x3d, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x15, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x51, 0x0a, + 0x0c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x2b, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x32, 0xc5, 0x01, 0x0a, 0x0a, 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x46, 0x6c, 0x6f, 0x77, 0x12, + 0x35, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x41, 0x50, 0x49, 0x4c, 0x6f, 0x67, 0x12, 0x14, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x6e, + 0x66, 0x6f, 0x1a, 0x10, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x50, + 0x49, 0x4c, 0x6f, 0x67, 0x30, 0x01, 0x12, 0x3d, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x41, 0x50, 0x49, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0x14, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x50, 0x49, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x73, 0x30, 0x01, 0x12, 0x41, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x76, 0x6f, + 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0x16, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x30, 0x01, 0x42, 0x15, 0x5a, 0x13, 0x53, 0x65, 0x6e, 0x74, + 0x72, 0x79, 0x46, 0x6c, 0x6f, 0x77, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -563,32 +564,32 @@ func file_sentryflow_proto_rawDescGZIP() []byte { var file_sentryflow_proto_msgTypes = make([]protoimpl.MessageInfo, 11) var file_sentryflow_proto_goTypes = []interface{}{ - (*ClientInfo)(nil), // 0: protobuf.ClientInfo - (*APILog)(nil), // 1: protobuf.APILog - (*APIMetric)(nil), // 2: protobuf.APIMetric - (*MetricValue)(nil), // 3: protobuf.MetricValue - (*EnvoyMetric)(nil), // 4: protobuf.EnvoyMetric - nil, // 5: protobuf.APILog.SrcLabelEntry - nil, // 6: protobuf.APILog.DstLabelEntry - nil, // 7: protobuf.APIMetric.PerAPICountsEntry - nil, // 8: protobuf.MetricValue.ValueEntry - nil, // 9: protobuf.EnvoyMetric.LabelsEntry - nil, // 10: protobuf.EnvoyMetric.MetricsEntry + (*ClientInfo)(nil), // 0: protobuf.ClientInfo + (*APILog)(nil), // 1: protobuf.APILog + (*APIMetrics)(nil), // 2: protobuf.APIMetrics + (*MetricValue)(nil), // 3: protobuf.MetricValue + (*EnvoyMetrics)(nil), // 4: protobuf.EnvoyMetrics + nil, // 5: protobuf.APILog.SrcLabelEntry + nil, // 6: protobuf.APILog.DstLabelEntry + nil, // 7: protobuf.APIMetrics.PerAPICountsEntry + nil, // 8: protobuf.MetricValue.ValueEntry + nil, // 9: protobuf.EnvoyMetrics.LabelsEntry + nil, // 10: protobuf.EnvoyMetrics.MetricsEntry } var file_sentryflow_proto_depIdxs = []int32{ 5, // 0: protobuf.APILog.srcLabel:type_name -> protobuf.APILog.SrcLabelEntry 6, // 1: protobuf.APILog.dstLabel:type_name -> protobuf.APILog.DstLabelEntry - 7, // 2: protobuf.APIMetric.perAPICounts:type_name -> protobuf.APIMetric.PerAPICountsEntry + 7, // 2: protobuf.APIMetrics.perAPICounts:type_name -> protobuf.APIMetrics.PerAPICountsEntry 8, // 3: protobuf.MetricValue.value:type_name -> protobuf.MetricValue.ValueEntry - 9, // 4: protobuf.EnvoyMetric.labels:type_name -> protobuf.EnvoyMetric.LabelsEntry - 10, // 5: protobuf.EnvoyMetric.metrics:type_name -> protobuf.EnvoyMetric.MetricsEntry - 3, // 6: protobuf.EnvoyMetric.MetricsEntry.value:type_name -> protobuf.MetricValue + 9, // 4: protobuf.EnvoyMetrics.labels:type_name -> protobuf.EnvoyMetrics.LabelsEntry + 10, // 5: protobuf.EnvoyMetrics.metrics:type_name -> protobuf.EnvoyMetrics.MetricsEntry + 3, // 6: protobuf.EnvoyMetrics.MetricsEntry.value:type_name -> protobuf.MetricValue 0, // 7: protobuf.SentryFlow.GetAPILog:input_type -> protobuf.ClientInfo 0, // 8: protobuf.SentryFlow.GetAPIMetrics:input_type -> protobuf.ClientInfo 0, // 9: protobuf.SentryFlow.GetEnvoyMetrics:input_type -> protobuf.ClientInfo 1, // 10: protobuf.SentryFlow.GetAPILog:output_type -> protobuf.APILog - 2, // 11: protobuf.SentryFlow.GetAPIMetrics:output_type -> protobuf.APIMetric - 4, // 12: protobuf.SentryFlow.GetEnvoyMetrics:output_type -> protobuf.EnvoyMetric + 2, // 11: protobuf.SentryFlow.GetAPIMetrics:output_type -> protobuf.APIMetrics + 4, // 12: protobuf.SentryFlow.GetEnvoyMetrics:output_type -> protobuf.EnvoyMetrics 10, // [10:13] is the sub-list for method output_type 7, // [7:10] is the sub-list for method input_type 7, // [7:7] is the sub-list for extension type_name @@ -627,7 +628,7 @@ func file_sentryflow_proto_init() { } } file_sentryflow_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*APIMetric); i { + switch v := v.(*APIMetrics); i { case 0: return &v.state case 1: @@ -651,7 +652,7 @@ func file_sentryflow_proto_init() { } } file_sentryflow_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EnvoyMetric); i { + switch v := v.(*EnvoyMetrics); i { case 0: return &v.state case 1: diff --git a/protobuf/sentryflow.proto b/protobuf/sentryflow.proto index 5457fc4..eaed177 100644 --- a/protobuf/sentryflow.proto +++ b/protobuf/sentryflow.proto @@ -35,7 +35,7 @@ message APILog { int32 responseCode = 54; } -message APIMetric { +message APIMetrics { map perAPICounts = 1; // @todo: add some more metrics here } @@ -44,7 +44,7 @@ message MetricValue { map value = 1; } -message EnvoyMetric { +message EnvoyMetrics { string timeStamp = 1; string namespace = 11; @@ -57,7 +57,7 @@ message EnvoyMetric { service SentryFlow { rpc GetAPILog(ClientInfo) returns (stream APILog); - rpc GetAPIMetrics(ClientInfo) returns (stream APIMetric); - rpc GetEnvoyMetrics(ClientInfo) returns (stream EnvoyMetric); + rpc GetAPIMetrics(ClientInfo) returns (stream APIMetrics); + rpc GetEnvoyMetrics(ClientInfo) returns (stream EnvoyMetrics); } diff --git a/protobuf/sentryflow_grpc.pb.go b/protobuf/sentryflow_grpc.pb.go index 286399a..11f431c 100644 --- a/protobuf/sentryflow_grpc.pb.go +++ b/protobuf/sentryflow_grpc.pb.go @@ -89,7 +89,7 @@ func (c *sentryFlowClient) GetAPIMetrics(ctx context.Context, in *ClientInfo, op } type SentryFlow_GetAPIMetricsClient interface { - Recv() (*APIMetric, error) + Recv() (*APIMetrics, error) grpc.ClientStream } @@ -97,8 +97,8 @@ type sentryFlowGetAPIMetricsClient struct { grpc.ClientStream } -func (x *sentryFlowGetAPIMetricsClient) Recv() (*APIMetric, error) { - m := new(APIMetric) +func (x *sentryFlowGetAPIMetricsClient) Recv() (*APIMetrics, error) { + m := new(APIMetrics) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } @@ -121,7 +121,7 @@ func (c *sentryFlowClient) GetEnvoyMetrics(ctx context.Context, in *ClientInfo, } type SentryFlow_GetEnvoyMetricsClient interface { - Recv() (*EnvoyMetric, error) + Recv() (*EnvoyMetrics, error) grpc.ClientStream } @@ -129,8 +129,8 @@ type sentryFlowGetEnvoyMetricsClient struct { grpc.ClientStream } -func (x *sentryFlowGetEnvoyMetricsClient) Recv() (*EnvoyMetric, error) { - m := new(EnvoyMetric) +func (x *sentryFlowGetEnvoyMetricsClient) Recv() (*EnvoyMetrics, error) { + m := new(EnvoyMetrics) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } @@ -201,7 +201,7 @@ func _SentryFlow_GetAPIMetrics_Handler(srv interface{}, stream grpc.ServerStream } type SentryFlow_GetAPIMetricsServer interface { - Send(*APIMetric) error + Send(*APIMetrics) error grpc.ServerStream } @@ -209,7 +209,7 @@ type sentryFlowGetAPIMetricsServer struct { grpc.ServerStream } -func (x *sentryFlowGetAPIMetricsServer) Send(m *APIMetric) error { +func (x *sentryFlowGetAPIMetricsServer) Send(m *APIMetrics) error { return x.ServerStream.SendMsg(m) } @@ -222,7 +222,7 @@ func _SentryFlow_GetEnvoyMetrics_Handler(srv interface{}, stream grpc.ServerStre } type SentryFlow_GetEnvoyMetricsServer interface { - Send(*EnvoyMetric) error + Send(*EnvoyMetrics) error grpc.ServerStream } @@ -230,7 +230,7 @@ type sentryFlowGetEnvoyMetricsServer struct { grpc.ServerStream } -func (x *sentryFlowGetEnvoyMetricsServer) Send(m *EnvoyMetric) error { +func (x *sentryFlowGetEnvoyMetricsServer) Send(m *EnvoyMetrics) error { return x.ServerStream.SendMsg(m) }