Files
crawlab/grpc/metrics_service_v2.pb.go
2024-06-26 23:23:14 +08:00

400 lines
14 KiB
Go

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// source: services/metrics_service_v2.proto
package grpc
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type MetricsServiceV2Code int32
const (
MetricsServiceV2Code_SYNC_METRICS MetricsServiceV2Code = 0
)
// Enum value maps for MetricsServiceV2Code.
var (
MetricsServiceV2Code_name = map[int32]string{
0: "SYNC_METRICS",
}
MetricsServiceV2Code_value = map[string]int32{
"SYNC_METRICS": 0,
}
)
func (x MetricsServiceV2Code) Enum() *MetricsServiceV2Code {
p := new(MetricsServiceV2Code)
*p = x
return p
}
func (x MetricsServiceV2Code) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (MetricsServiceV2Code) Descriptor() protoreflect.EnumDescriptor {
return file_services_metrics_service_v2_proto_enumTypes[0].Descriptor()
}
func (MetricsServiceV2Code) Type() protoreflect.EnumType {
return &file_services_metrics_service_v2_proto_enumTypes[0]
}
func (x MetricsServiceV2Code) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use MetricsServiceV2Code.Descriptor instead.
func (MetricsServiceV2Code) EnumDescriptor() ([]byte, []int) {
return file_services_metrics_service_v2_proto_rawDescGZIP(), []int{0}
}
type Metric struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
Subsystem string `protobuf:"bytes,2,opt,name=subsystem,proto3" json:"subsystem,omitempty"`
Module string `protobuf:"bytes,3,opt,name=module,proto3" json:"module,omitempty"`
Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
Value float32 `protobuf:"fixed32,5,opt,name=value,proto3" json:"value,omitempty"`
Help string `protobuf:"bytes,6,opt,name=help,proto3" json:"help,omitempty"`
Labels []byte `protobuf:"bytes,7,opt,name=labels,proto3" json:"labels,omitempty"`
}
func (x *Metric) Reset() {
*x = Metric{}
if protoimpl.UnsafeEnabled {
mi := &file_services_metrics_service_v2_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Metric) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Metric) ProtoMessage() {}
func (x *Metric) ProtoReflect() protoreflect.Message {
mi := &file_services_metrics_service_v2_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Metric.ProtoReflect.Descriptor instead.
func (*Metric) Descriptor() ([]byte, []int) {
return file_services_metrics_service_v2_proto_rawDescGZIP(), []int{0}
}
func (x *Metric) GetNamespace() string {
if x != nil {
return x.Namespace
}
return ""
}
func (x *Metric) GetSubsystem() string {
if x != nil {
return x.Subsystem
}
return ""
}
func (x *Metric) GetModule() string {
if x != nil {
return x.Module
}
return ""
}
func (x *Metric) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Metric) GetValue() float32 {
if x != nil {
return x.Value
}
return 0
}
func (x *Metric) GetHelp() string {
if x != nil {
return x.Help
}
return ""
}
func (x *Metric) GetLabels() []byte {
if x != nil {
return x.Labels
}
return nil
}
type MetricsServiceV2ConnectRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
NodeKey string `protobuf:"bytes,1,opt,name=node_key,json=nodeKey,proto3" json:"node_key,omitempty"`
Metrics []*Metric `protobuf:"bytes,2,rep,name=metrics,proto3" json:"metrics,omitempty"`
}
func (x *MetricsServiceV2ConnectRequest) Reset() {
*x = MetricsServiceV2ConnectRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_services_metrics_service_v2_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MetricsServiceV2ConnectRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MetricsServiceV2ConnectRequest) ProtoMessage() {}
func (x *MetricsServiceV2ConnectRequest) ProtoReflect() protoreflect.Message {
mi := &file_services_metrics_service_v2_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MetricsServiceV2ConnectRequest.ProtoReflect.Descriptor instead.
func (*MetricsServiceV2ConnectRequest) Descriptor() ([]byte, []int) {
return file_services_metrics_service_v2_proto_rawDescGZIP(), []int{1}
}
func (x *MetricsServiceV2ConnectRequest) GetNodeKey() string {
if x != nil {
return x.NodeKey
}
return ""
}
func (x *MetricsServiceV2ConnectRequest) GetMetrics() []*Metric {
if x != nil {
return x.Metrics
}
return nil
}
type MetricsServiceV2ConnectResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Code MetricsServiceV2Code `protobuf:"varint,1,opt,name=code,proto3,enum=grpc.MetricsServiceV2Code" json:"code,omitempty"`
}
func (x *MetricsServiceV2ConnectResponse) Reset() {
*x = MetricsServiceV2ConnectResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_services_metrics_service_v2_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MetricsServiceV2ConnectResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MetricsServiceV2ConnectResponse) ProtoMessage() {}
func (x *MetricsServiceV2ConnectResponse) ProtoReflect() protoreflect.Message {
mi := &file_services_metrics_service_v2_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MetricsServiceV2ConnectResponse.ProtoReflect.Descriptor instead.
func (*MetricsServiceV2ConnectResponse) Descriptor() ([]byte, []int) {
return file_services_metrics_service_v2_proto_rawDescGZIP(), []int{2}
}
func (x *MetricsServiceV2ConnectResponse) GetCode() MetricsServiceV2Code {
if x != nil {
return x.Code
}
return MetricsServiceV2Code_SYNC_METRICS
}
var File_services_metrics_service_v2_proto protoreflect.FileDescriptor
var file_services_metrics_service_v2_proto_rawDesc = []byte{
0x0a, 0x21, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69,
0x63, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x76, 0x32, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x12, 0x04, 0x67, 0x72, 0x70, 0x63, 0x22, 0xb2, 0x01, 0x0a, 0x06, 0x4d, 0x65,
0x74, 0x72, 0x69, 0x63, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63,
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61,
0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x75, 0x62, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d,
0x12, 0x16, 0x0a, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
0x52, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x65, 0x6c, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x68, 0x65, 0x6c, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73,
0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x22, 0x63,
0x0a, 0x1e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x56, 0x32, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x26, 0x0a, 0x07, 0x6d,
0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x67,
0x72, 0x70, 0x63, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72,
0x69, 0x63, 0x73, 0x22, 0x51, 0x0a, 0x1f, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x53, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x65, 0x74, 0x72,
0x69, 0x63, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x43, 0x6f, 0x64, 0x65,
0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x2a, 0x28, 0x0a, 0x14, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63,
0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x10,
0x0a, 0x0c, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, 0x53, 0x10, 0x00,
0x32, 0x70, 0x0a, 0x10, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x56, 0x32, 0x12, 0x5c, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x12,
0x24, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x53, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x65, 0x74,
0x72, 0x69, 0x63, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x32, 0x43, 0x6f, 0x6e,
0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01,
0x30, 0x01, 0x42, 0x08, 0x5a, 0x06, 0x2e, 0x3b, 0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
}
var (
file_services_metrics_service_v2_proto_rawDescOnce sync.Once
file_services_metrics_service_v2_proto_rawDescData = file_services_metrics_service_v2_proto_rawDesc
)
func file_services_metrics_service_v2_proto_rawDescGZIP() []byte {
file_services_metrics_service_v2_proto_rawDescOnce.Do(func() {
file_services_metrics_service_v2_proto_rawDescData = protoimpl.X.CompressGZIP(file_services_metrics_service_v2_proto_rawDescData)
})
return file_services_metrics_service_v2_proto_rawDescData
}
var file_services_metrics_service_v2_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_services_metrics_service_v2_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_services_metrics_service_v2_proto_goTypes = []any{
(MetricsServiceV2Code)(0), // 0: grpc.MetricsServiceV2Code
(*Metric)(nil), // 1: grpc.Metric
(*MetricsServiceV2ConnectRequest)(nil), // 2: grpc.MetricsServiceV2ConnectRequest
(*MetricsServiceV2ConnectResponse)(nil), // 3: grpc.MetricsServiceV2ConnectResponse
}
var file_services_metrics_service_v2_proto_depIdxs = []int32{
1, // 0: grpc.MetricsServiceV2ConnectRequest.metrics:type_name -> grpc.Metric
0, // 1: grpc.MetricsServiceV2ConnectResponse.code:type_name -> grpc.MetricsServiceV2Code
2, // 2: grpc.MetricsServiceV2.Connect:input_type -> grpc.MetricsServiceV2ConnectRequest
3, // 3: grpc.MetricsServiceV2.Connect:output_type -> grpc.MetricsServiceV2ConnectResponse
3, // [3:4] is the sub-list for method output_type
2, // [2:3] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_services_metrics_service_v2_proto_init() }
func file_services_metrics_service_v2_proto_init() {
if File_services_metrics_service_v2_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_services_metrics_service_v2_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*Metric); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_services_metrics_service_v2_proto_msgTypes[1].Exporter = func(v any, i int) any {
switch v := v.(*MetricsServiceV2ConnectRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_services_metrics_service_v2_proto_msgTypes[2].Exporter = func(v any, i int) any {
switch v := v.(*MetricsServiceV2ConnectResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_services_metrics_service_v2_proto_rawDesc,
NumEnums: 1,
NumMessages: 3,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_services_metrics_service_v2_proto_goTypes,
DependencyIndexes: file_services_metrics_service_v2_proto_depIdxs,
EnumInfos: file_services_metrics_service_v2_proto_enumTypes,
MessageInfos: file_services_metrics_service_v2_proto_msgTypes,
}.Build()
File_services_metrics_service_v2_proto = out.File
file_services_metrics_service_v2_proto_rawDesc = nil
file_services_metrics_service_v2_proto_goTypes = nil
file_services_metrics_service_v2_proto_depIdxs = nil
}