...

Source file src/google.golang.org/grpc/interop/stress/grpc_testing/metrics.pb.go

Documentation: google.golang.org/grpc/interop/stress/grpc_testing

     1  // Copyright 2015-2016 gRPC authors.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  // Contains the definitions for a metrics service and the type of metrics
    16  // exposed by the service.
    17  //
    18  // Currently, 'Gauge' (i.e a metric that represents the measured value of
    19  // something at an instant of time) is the only metric type supported by the
    20  // service.
    21  
    22  // Code generated by protoc-gen-go. DO NOT EDIT.
    23  // versions:
    24  // 	protoc-gen-go v1.33.0
    25  // 	protoc        v4.25.2
    26  // source: interop/stress/grpc_testing/metrics.proto
    27  
    28  package grpc_testing
    29  
    30  import (
    31  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    32  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    33  	reflect "reflect"
    34  	sync "sync"
    35  )
    36  
    37  const (
    38  	// Verify that this generated code is sufficiently up-to-date.
    39  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    40  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    41  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    42  )
    43  
    44  // Response message containing the gauge name and value
    45  type GaugeResponse struct {
    46  	state         protoimpl.MessageState
    47  	sizeCache     protoimpl.SizeCache
    48  	unknownFields protoimpl.UnknownFields
    49  
    50  	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
    51  	// Types that are assignable to Value:
    52  	//
    53  	//	*GaugeResponse_LongValue
    54  	//	*GaugeResponse_DoubleValue
    55  	//	*GaugeResponse_StringValue
    56  	Value isGaugeResponse_Value `protobuf_oneof:"value"`
    57  }
    58  
    59  func (x *GaugeResponse) Reset() {
    60  	*x = GaugeResponse{}
    61  	if protoimpl.UnsafeEnabled {
    62  		mi := &file_interop_stress_grpc_testing_metrics_proto_msgTypes[0]
    63  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    64  		ms.StoreMessageInfo(mi)
    65  	}
    66  }
    67  
    68  func (x *GaugeResponse) String() string {
    69  	return protoimpl.X.MessageStringOf(x)
    70  }
    71  
    72  func (*GaugeResponse) ProtoMessage() {}
    73  
    74  func (x *GaugeResponse) ProtoReflect() protoreflect.Message {
    75  	mi := &file_interop_stress_grpc_testing_metrics_proto_msgTypes[0]
    76  	if protoimpl.UnsafeEnabled && x != nil {
    77  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    78  		if ms.LoadMessageInfo() == nil {
    79  			ms.StoreMessageInfo(mi)
    80  		}
    81  		return ms
    82  	}
    83  	return mi.MessageOf(x)
    84  }
    85  
    86  // Deprecated: Use GaugeResponse.ProtoReflect.Descriptor instead.
    87  func (*GaugeResponse) Descriptor() ([]byte, []int) {
    88  	return file_interop_stress_grpc_testing_metrics_proto_rawDescGZIP(), []int{0}
    89  }
    90  
    91  func (x *GaugeResponse) GetName() string {
    92  	if x != nil {
    93  		return x.Name
    94  	}
    95  	return ""
    96  }
    97  
    98  func (m *GaugeResponse) GetValue() isGaugeResponse_Value {
    99  	if m != nil {
   100  		return m.Value
   101  	}
   102  	return nil
   103  }
   104  
   105  func (x *GaugeResponse) GetLongValue() int64 {
   106  	if x, ok := x.GetValue().(*GaugeResponse_LongValue); ok {
   107  		return x.LongValue
   108  	}
   109  	return 0
   110  }
   111  
   112  func (x *GaugeResponse) GetDoubleValue() float64 {
   113  	if x, ok := x.GetValue().(*GaugeResponse_DoubleValue); ok {
   114  		return x.DoubleValue
   115  	}
   116  	return 0
   117  }
   118  
   119  func (x *GaugeResponse) GetStringValue() string {
   120  	if x, ok := x.GetValue().(*GaugeResponse_StringValue); ok {
   121  		return x.StringValue
   122  	}
   123  	return ""
   124  }
   125  
   126  type isGaugeResponse_Value interface {
   127  	isGaugeResponse_Value()
   128  }
   129  
   130  type GaugeResponse_LongValue struct {
   131  	LongValue int64 `protobuf:"varint,2,opt,name=long_value,json=longValue,proto3,oneof"`
   132  }
   133  
   134  type GaugeResponse_DoubleValue struct {
   135  	DoubleValue float64 `protobuf:"fixed64,3,opt,name=double_value,json=doubleValue,proto3,oneof"`
   136  }
   137  
   138  type GaugeResponse_StringValue struct {
   139  	StringValue string `protobuf:"bytes,4,opt,name=string_value,json=stringValue,proto3,oneof"`
   140  }
   141  
   142  func (*GaugeResponse_LongValue) isGaugeResponse_Value() {}
   143  
   144  func (*GaugeResponse_DoubleValue) isGaugeResponse_Value() {}
   145  
   146  func (*GaugeResponse_StringValue) isGaugeResponse_Value() {}
   147  
   148  // Request message containing the gauge name
   149  type GaugeRequest struct {
   150  	state         protoimpl.MessageState
   151  	sizeCache     protoimpl.SizeCache
   152  	unknownFields protoimpl.UnknownFields
   153  
   154  	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
   155  }
   156  
   157  func (x *GaugeRequest) Reset() {
   158  	*x = GaugeRequest{}
   159  	if protoimpl.UnsafeEnabled {
   160  		mi := &file_interop_stress_grpc_testing_metrics_proto_msgTypes[1]
   161  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   162  		ms.StoreMessageInfo(mi)
   163  	}
   164  }
   165  
   166  func (x *GaugeRequest) String() string {
   167  	return protoimpl.X.MessageStringOf(x)
   168  }
   169  
   170  func (*GaugeRequest) ProtoMessage() {}
   171  
   172  func (x *GaugeRequest) ProtoReflect() protoreflect.Message {
   173  	mi := &file_interop_stress_grpc_testing_metrics_proto_msgTypes[1]
   174  	if protoimpl.UnsafeEnabled && x != nil {
   175  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   176  		if ms.LoadMessageInfo() == nil {
   177  			ms.StoreMessageInfo(mi)
   178  		}
   179  		return ms
   180  	}
   181  	return mi.MessageOf(x)
   182  }
   183  
   184  // Deprecated: Use GaugeRequest.ProtoReflect.Descriptor instead.
   185  func (*GaugeRequest) Descriptor() ([]byte, []int) {
   186  	return file_interop_stress_grpc_testing_metrics_proto_rawDescGZIP(), []int{1}
   187  }
   188  
   189  func (x *GaugeRequest) GetName() string {
   190  	if x != nil {
   191  		return x.Name
   192  	}
   193  	return ""
   194  }
   195  
   196  type EmptyMessage struct {
   197  	state         protoimpl.MessageState
   198  	sizeCache     protoimpl.SizeCache
   199  	unknownFields protoimpl.UnknownFields
   200  }
   201  
   202  func (x *EmptyMessage) Reset() {
   203  	*x = EmptyMessage{}
   204  	if protoimpl.UnsafeEnabled {
   205  		mi := &file_interop_stress_grpc_testing_metrics_proto_msgTypes[2]
   206  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   207  		ms.StoreMessageInfo(mi)
   208  	}
   209  }
   210  
   211  func (x *EmptyMessage) String() string {
   212  	return protoimpl.X.MessageStringOf(x)
   213  }
   214  
   215  func (*EmptyMessage) ProtoMessage() {}
   216  
   217  func (x *EmptyMessage) ProtoReflect() protoreflect.Message {
   218  	mi := &file_interop_stress_grpc_testing_metrics_proto_msgTypes[2]
   219  	if protoimpl.UnsafeEnabled && x != nil {
   220  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   221  		if ms.LoadMessageInfo() == nil {
   222  			ms.StoreMessageInfo(mi)
   223  		}
   224  		return ms
   225  	}
   226  	return mi.MessageOf(x)
   227  }
   228  
   229  // Deprecated: Use EmptyMessage.ProtoReflect.Descriptor instead.
   230  func (*EmptyMessage) Descriptor() ([]byte, []int) {
   231  	return file_interop_stress_grpc_testing_metrics_proto_rawDescGZIP(), []int{2}
   232  }
   233  
   234  var File_interop_stress_grpc_testing_metrics_proto protoreflect.FileDescriptor
   235  
   236  var file_interop_stress_grpc_testing_metrics_proto_rawDesc = []byte{
   237  	0x0a, 0x29, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6f, 0x70, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x73, 0x73,
   238  	0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x6d, 0x65,
   239  	0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x67, 0x72, 0x70,
   240  	0x63, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x97, 0x01, 0x0a, 0x0d, 0x47, 0x61,
   241  	0x75, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e,
   242  	0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
   243  	0x1f, 0x0a, 0x0a, 0x6c, 0x6f, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20,
   244  	0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65,
   245  	0x12, 0x23, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65,
   246  	0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65,
   247  	0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f,
   248  	0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x73,
   249  	0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61,
   250  	0x6c, 0x75, 0x65, 0x22, 0x22, 0x0a, 0x0c, 0x47, 0x61, 0x75, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75,
   251  	0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
   252  	0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x0e, 0x0a, 0x0c, 0x45, 0x6d, 0x70, 0x74, 0x79,
   253  	0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0xa0, 0x01, 0x0a, 0x0e, 0x4d, 0x65, 0x74, 0x72,
   254  	0x69, 0x63, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x49, 0x0a, 0x0c, 0x47, 0x65,
   255  	0x74, 0x41, 0x6c, 0x6c, 0x47, 0x61, 0x75, 0x67, 0x65, 0x73, 0x12, 0x1a, 0x2e, 0x67, 0x72, 0x70,
   256  	0x63, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4d,
   257  	0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x74, 0x65,
   258  	0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x47, 0x61, 0x75, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
   259  	0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x43, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x47, 0x61, 0x75, 0x67,
   260  	0x65, 0x12, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67,
   261  	0x2e, 0x47, 0x61, 0x75, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e,
   262  	0x67, 0x72, 0x70, 0x63, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x47, 0x61, 0x75,
   263  	0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x34, 0x5a, 0x32, 0x67, 0x6f,
   264  	0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f,
   265  	0x67, 0x72, 0x70, 0x63, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6f, 0x70, 0x2f, 0x73, 0x74, 0x72,
   266  	0x65, 0x73, 0x73, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67,
   267  	0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
   268  }
   269  
   270  var (
   271  	file_interop_stress_grpc_testing_metrics_proto_rawDescOnce sync.Once
   272  	file_interop_stress_grpc_testing_metrics_proto_rawDescData = file_interop_stress_grpc_testing_metrics_proto_rawDesc
   273  )
   274  
   275  func file_interop_stress_grpc_testing_metrics_proto_rawDescGZIP() []byte {
   276  	file_interop_stress_grpc_testing_metrics_proto_rawDescOnce.Do(func() {
   277  		file_interop_stress_grpc_testing_metrics_proto_rawDescData = protoimpl.X.CompressGZIP(file_interop_stress_grpc_testing_metrics_proto_rawDescData)
   278  	})
   279  	return file_interop_stress_grpc_testing_metrics_proto_rawDescData
   280  }
   281  
   282  var file_interop_stress_grpc_testing_metrics_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
   283  var file_interop_stress_grpc_testing_metrics_proto_goTypes = []interface{}{
   284  	(*GaugeResponse)(nil), // 0: grpc.testing.GaugeResponse
   285  	(*GaugeRequest)(nil),  // 1: grpc.testing.GaugeRequest
   286  	(*EmptyMessage)(nil),  // 2: grpc.testing.EmptyMessage
   287  }
   288  var file_interop_stress_grpc_testing_metrics_proto_depIdxs = []int32{
   289  	2, // 0: grpc.testing.MetricsService.GetAllGauges:input_type -> grpc.testing.EmptyMessage
   290  	1, // 1: grpc.testing.MetricsService.GetGauge:input_type -> grpc.testing.GaugeRequest
   291  	0, // 2: grpc.testing.MetricsService.GetAllGauges:output_type -> grpc.testing.GaugeResponse
   292  	0, // 3: grpc.testing.MetricsService.GetGauge:output_type -> grpc.testing.GaugeResponse
   293  	2, // [2:4] is the sub-list for method output_type
   294  	0, // [0:2] is the sub-list for method input_type
   295  	0, // [0:0] is the sub-list for extension type_name
   296  	0, // [0:0] is the sub-list for extension extendee
   297  	0, // [0:0] is the sub-list for field type_name
   298  }
   299  
   300  func init() { file_interop_stress_grpc_testing_metrics_proto_init() }
   301  func file_interop_stress_grpc_testing_metrics_proto_init() {
   302  	if File_interop_stress_grpc_testing_metrics_proto != nil {
   303  		return
   304  	}
   305  	if !protoimpl.UnsafeEnabled {
   306  		file_interop_stress_grpc_testing_metrics_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   307  			switch v := v.(*GaugeResponse); i {
   308  			case 0:
   309  				return &v.state
   310  			case 1:
   311  				return &v.sizeCache
   312  			case 2:
   313  				return &v.unknownFields
   314  			default:
   315  				return nil
   316  			}
   317  		}
   318  		file_interop_stress_grpc_testing_metrics_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
   319  			switch v := v.(*GaugeRequest); i {
   320  			case 0:
   321  				return &v.state
   322  			case 1:
   323  				return &v.sizeCache
   324  			case 2:
   325  				return &v.unknownFields
   326  			default:
   327  				return nil
   328  			}
   329  		}
   330  		file_interop_stress_grpc_testing_metrics_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
   331  			switch v := v.(*EmptyMessage); i {
   332  			case 0:
   333  				return &v.state
   334  			case 1:
   335  				return &v.sizeCache
   336  			case 2:
   337  				return &v.unknownFields
   338  			default:
   339  				return nil
   340  			}
   341  		}
   342  	}
   343  	file_interop_stress_grpc_testing_metrics_proto_msgTypes[0].OneofWrappers = []interface{}{
   344  		(*GaugeResponse_LongValue)(nil),
   345  		(*GaugeResponse_DoubleValue)(nil),
   346  		(*GaugeResponse_StringValue)(nil),
   347  	}
   348  	type x struct{}
   349  	out := protoimpl.TypeBuilder{
   350  		File: protoimpl.DescBuilder{
   351  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   352  			RawDescriptor: file_interop_stress_grpc_testing_metrics_proto_rawDesc,
   353  			NumEnums:      0,
   354  			NumMessages:   3,
   355  			NumExtensions: 0,
   356  			NumServices:   1,
   357  		},
   358  		GoTypes:           file_interop_stress_grpc_testing_metrics_proto_goTypes,
   359  		DependencyIndexes: file_interop_stress_grpc_testing_metrics_proto_depIdxs,
   360  		MessageInfos:      file_interop_stress_grpc_testing_metrics_proto_msgTypes,
   361  	}.Build()
   362  	File_interop_stress_grpc_testing_metrics_proto = out.File
   363  	file_interop_stress_grpc_testing_metrics_proto_rawDesc = nil
   364  	file_interop_stress_grpc_testing_metrics_proto_goTypes = nil
   365  	file_interop_stress_grpc_testing_metrics_proto_depIdxs = nil
   366  }
   367  

View as plain text