github.com/thanos-io/thanos@v0.32.5/pkg/exemplars/exemplarspb/rpc.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: exemplars/exemplarspb/rpc.proto
     3  
     4  package exemplarspb
     5  
     6  import (
     7  	context "context"
     8  	encoding_binary "encoding/binary"
     9  	fmt "fmt"
    10  	io "io"
    11  	math "math"
    12  	math_bits "math/bits"
    13  
    14  	_ "github.com/gogo/protobuf/gogoproto"
    15  	proto "github.com/gogo/protobuf/proto"
    16  	labelpb "github.com/thanos-io/thanos/pkg/store/labelpb"
    17  	storepb "github.com/thanos-io/thanos/pkg/store/storepb"
    18  	grpc "google.golang.org/grpc"
    19  	codes "google.golang.org/grpc/codes"
    20  	status "google.golang.org/grpc/status"
    21  )
    22  
    23  // Reference imports to suppress errors if they are not otherwise used.
    24  var _ = proto.Marshal
    25  var _ = fmt.Errorf
    26  var _ = math.Inf
    27  
    28  // This is a compile-time assertion to ensure that this generated file
    29  // is compatible with the proto package it is being compiled against.
    30  // A compilation error at this line likely means your copy of the
    31  // proto package needs to be updated.
    32  const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
    33  
    34  type ExemplarsRequest struct {
    35  	Query                   string                          `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
    36  	Start                   int64                           `protobuf:"varint,2,opt,name=start,proto3" json:"start,omitempty"`
    37  	End                     int64                           `protobuf:"varint,3,opt,name=end,proto3" json:"end,omitempty"`
    38  	PartialResponseStrategy storepb.PartialResponseStrategy `protobuf:"varint,4,opt,name=partial_response_strategy,json=partialResponseStrategy,proto3,enum=thanos.PartialResponseStrategy" json:"partial_response_strategy,omitempty"`
    39  }
    40  
    41  func (m *ExemplarsRequest) Reset()         { *m = ExemplarsRequest{} }
    42  func (m *ExemplarsRequest) String() string { return proto.CompactTextString(m) }
    43  func (*ExemplarsRequest) ProtoMessage()    {}
    44  func (*ExemplarsRequest) Descriptor() ([]byte, []int) {
    45  	return fileDescriptor_fd9ad2a40bac3cc9, []int{0}
    46  }
    47  func (m *ExemplarsRequest) XXX_Unmarshal(b []byte) error {
    48  	return m.Unmarshal(b)
    49  }
    50  func (m *ExemplarsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    51  	if deterministic {
    52  		return xxx_messageInfo_ExemplarsRequest.Marshal(b, m, deterministic)
    53  	} else {
    54  		b = b[:cap(b)]
    55  		n, err := m.MarshalToSizedBuffer(b)
    56  		if err != nil {
    57  			return nil, err
    58  		}
    59  		return b[:n], nil
    60  	}
    61  }
    62  func (m *ExemplarsRequest) XXX_Merge(src proto.Message) {
    63  	xxx_messageInfo_ExemplarsRequest.Merge(m, src)
    64  }
    65  func (m *ExemplarsRequest) XXX_Size() int {
    66  	return m.Size()
    67  }
    68  func (m *ExemplarsRequest) XXX_DiscardUnknown() {
    69  	xxx_messageInfo_ExemplarsRequest.DiscardUnknown(m)
    70  }
    71  
    72  var xxx_messageInfo_ExemplarsRequest proto.InternalMessageInfo
    73  
    74  type ExemplarsResponse struct {
    75  	// Types that are valid to be assigned to Result:
    76  	//	*ExemplarsResponse_Data
    77  	//	*ExemplarsResponse_Warning
    78  	Result isExemplarsResponse_Result `protobuf_oneof:"result"`
    79  }
    80  
    81  func (m *ExemplarsResponse) Reset()         { *m = ExemplarsResponse{} }
    82  func (m *ExemplarsResponse) String() string { return proto.CompactTextString(m) }
    83  func (*ExemplarsResponse) ProtoMessage()    {}
    84  func (*ExemplarsResponse) Descriptor() ([]byte, []int) {
    85  	return fileDescriptor_fd9ad2a40bac3cc9, []int{1}
    86  }
    87  func (m *ExemplarsResponse) XXX_Unmarshal(b []byte) error {
    88  	return m.Unmarshal(b)
    89  }
    90  func (m *ExemplarsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    91  	if deterministic {
    92  		return xxx_messageInfo_ExemplarsResponse.Marshal(b, m, deterministic)
    93  	} else {
    94  		b = b[:cap(b)]
    95  		n, err := m.MarshalToSizedBuffer(b)
    96  		if err != nil {
    97  			return nil, err
    98  		}
    99  		return b[:n], nil
   100  	}
   101  }
   102  func (m *ExemplarsResponse) XXX_Merge(src proto.Message) {
   103  	xxx_messageInfo_ExemplarsResponse.Merge(m, src)
   104  }
   105  func (m *ExemplarsResponse) XXX_Size() int {
   106  	return m.Size()
   107  }
   108  func (m *ExemplarsResponse) XXX_DiscardUnknown() {
   109  	xxx_messageInfo_ExemplarsResponse.DiscardUnknown(m)
   110  }
   111  
   112  var xxx_messageInfo_ExemplarsResponse proto.InternalMessageInfo
   113  
   114  type isExemplarsResponse_Result interface {
   115  	isExemplarsResponse_Result()
   116  	MarshalTo([]byte) (int, error)
   117  	Size() int
   118  }
   119  
   120  type ExemplarsResponse_Data struct {
   121  	Data *ExemplarData `protobuf:"bytes,1,opt,name=data,proto3,oneof" json:"data,omitempty"`
   122  }
   123  type ExemplarsResponse_Warning struct {
   124  	Warning string `protobuf:"bytes,2,opt,name=warning,proto3,oneof" json:"warning,omitempty"`
   125  }
   126  
   127  func (*ExemplarsResponse_Data) isExemplarsResponse_Result()    {}
   128  func (*ExemplarsResponse_Warning) isExemplarsResponse_Result() {}
   129  
   130  func (m *ExemplarsResponse) GetResult() isExemplarsResponse_Result {
   131  	if m != nil {
   132  		return m.Result
   133  	}
   134  	return nil
   135  }
   136  
   137  func (m *ExemplarsResponse) GetData() *ExemplarData {
   138  	if x, ok := m.GetResult().(*ExemplarsResponse_Data); ok {
   139  		return x.Data
   140  	}
   141  	return nil
   142  }
   143  
   144  func (m *ExemplarsResponse) GetWarning() string {
   145  	if x, ok := m.GetResult().(*ExemplarsResponse_Warning); ok {
   146  		return x.Warning
   147  	}
   148  	return ""
   149  }
   150  
   151  // XXX_OneofWrappers is for the internal use of the proto package.
   152  func (*ExemplarsResponse) XXX_OneofWrappers() []interface{} {
   153  	return []interface{}{
   154  		(*ExemplarsResponse_Data)(nil),
   155  		(*ExemplarsResponse_Warning)(nil),
   156  	}
   157  }
   158  
   159  type ExemplarData struct {
   160  	SeriesLabels labelpb.ZLabelSet `protobuf:"bytes,1,opt,name=seriesLabels,proto3" json:"seriesLabels"`
   161  	Exemplars    []*Exemplar       `protobuf:"bytes,2,rep,name=exemplars,proto3" json:"exemplars"`
   162  }
   163  
   164  func (m *ExemplarData) Reset()         { *m = ExemplarData{} }
   165  func (m *ExemplarData) String() string { return proto.CompactTextString(m) }
   166  func (*ExemplarData) ProtoMessage()    {}
   167  func (*ExemplarData) Descriptor() ([]byte, []int) {
   168  	return fileDescriptor_fd9ad2a40bac3cc9, []int{2}
   169  }
   170  func (m *ExemplarData) XXX_Unmarshal(b []byte) error {
   171  	return m.Unmarshal(b)
   172  }
   173  func (m *ExemplarData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   174  	if deterministic {
   175  		return xxx_messageInfo_ExemplarData.Marshal(b, m, deterministic)
   176  	} else {
   177  		b = b[:cap(b)]
   178  		n, err := m.MarshalToSizedBuffer(b)
   179  		if err != nil {
   180  			return nil, err
   181  		}
   182  		return b[:n], nil
   183  	}
   184  }
   185  func (m *ExemplarData) XXX_Merge(src proto.Message) {
   186  	xxx_messageInfo_ExemplarData.Merge(m, src)
   187  }
   188  func (m *ExemplarData) XXX_Size() int {
   189  	return m.Size()
   190  }
   191  func (m *ExemplarData) XXX_DiscardUnknown() {
   192  	xxx_messageInfo_ExemplarData.DiscardUnknown(m)
   193  }
   194  
   195  var xxx_messageInfo_ExemplarData proto.InternalMessageInfo
   196  
   197  type Exemplar struct {
   198  	Labels labelpb.ZLabelSet `protobuf:"bytes,1,opt,name=labels,proto3" json:"labels"`
   199  	Value  float64           `protobuf:"fixed64,2,opt,name=value,proto3" json:"value"`
   200  	Ts     int64             `protobuf:"varint,3,opt,name=ts,proto3" json:"timestamp"`
   201  }
   202  
   203  func (m *Exemplar) Reset()         { *m = Exemplar{} }
   204  func (m *Exemplar) String() string { return proto.CompactTextString(m) }
   205  func (*Exemplar) ProtoMessage()    {}
   206  func (*Exemplar) Descriptor() ([]byte, []int) {
   207  	return fileDescriptor_fd9ad2a40bac3cc9, []int{3}
   208  }
   209  func (m *Exemplar) XXX_Unmarshal(b []byte) error {
   210  	return m.Unmarshal(b)
   211  }
   212  func (m *Exemplar) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   213  	if deterministic {
   214  		return xxx_messageInfo_Exemplar.Marshal(b, m, deterministic)
   215  	} else {
   216  		b = b[:cap(b)]
   217  		n, err := m.MarshalToSizedBuffer(b)
   218  		if err != nil {
   219  			return nil, err
   220  		}
   221  		return b[:n], nil
   222  	}
   223  }
   224  func (m *Exemplar) XXX_Merge(src proto.Message) {
   225  	xxx_messageInfo_Exemplar.Merge(m, src)
   226  }
   227  func (m *Exemplar) XXX_Size() int {
   228  	return m.Size()
   229  }
   230  func (m *Exemplar) XXX_DiscardUnknown() {
   231  	xxx_messageInfo_Exemplar.DiscardUnknown(m)
   232  }
   233  
   234  var xxx_messageInfo_Exemplar proto.InternalMessageInfo
   235  
   236  func init() {
   237  	proto.RegisterType((*ExemplarsRequest)(nil), "thanos.ExemplarsRequest")
   238  	proto.RegisterType((*ExemplarsResponse)(nil), "thanos.ExemplarsResponse")
   239  	proto.RegisterType((*ExemplarData)(nil), "thanos.ExemplarData")
   240  	proto.RegisterType((*Exemplar)(nil), "thanos.Exemplar")
   241  }
   242  
   243  func init() { proto.RegisterFile("exemplars/exemplarspb/rpc.proto", fileDescriptor_fd9ad2a40bac3cc9) }
   244  
   245  var fileDescriptor_fd9ad2a40bac3cc9 = []byte{
   246  	// 465 bytes of a gzipped FileDescriptorProto
   247  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x93, 0xc1, 0x6e, 0xd3, 0x40,
   248  	0x10, 0x86, 0xbd, 0x49, 0x1b, 0xea, 0x49, 0xa9, 0xd2, 0x55, 0x24, 0x9c, 0x48, 0xd8, 0x51, 0x4e,
   249  	0x81, 0x43, 0x8c, 0xc2, 0x89, 0x03, 0x17, 0x0b, 0xa4, 0x4a, 0x20, 0x81, 0xb6, 0xb7, 0x72, 0xa8,
   250  	0x36, 0x74, 0x14, 0x22, 0x39, 0xf6, 0x76, 0x77, 0x02, 0xe4, 0x01, 0xb8, 0x73, 0xe6, 0x1d, 0x78,
   251  	0x8f, 0x1c, 0x7b, 0xe4, 0x14, 0x41, 0x72, 0xcb, 0x53, 0xa0, 0xec, 0xda, 0x69, 0x1a, 0x55, 0xea,
   252  	0xc5, 0x3b, 0xf3, 0xcf, 0x67, 0xef, 0x3f, 0x3b, 0x6b, 0x88, 0xf0, 0x3b, 0x4e, 0x54, 0x2a, 0xb5,
   253  	0x89, 0xb7, 0x91, 0x1a, 0xc6, 0x5a, 0x7d, 0xee, 0x2b, 0x9d, 0x53, 0xce, 0x6b, 0xf4, 0x45, 0x66,
   254  	0xb9, 0x69, 0xb7, 0x0c, 0xe5, 0x1a, 0x63, 0xfb, 0x54, 0xc3, 0x98, 0x66, 0x0a, 0x8d, 0x43, 0xca,
   255  	0x52, 0x2a, 0x87, 0x98, 0xee, 0x95, 0x9a, 0xa3, 0x7c, 0x94, 0xdb, 0x30, 0xde, 0x44, 0x4e, 0xed,
   256  	0xfe, 0x66, 0xd0, 0x78, 0x5b, 0xee, 0x26, 0xf0, 0x7a, 0x8a, 0x86, 0x78, 0x13, 0x0e, 0xaf, 0xa7,
   257  	0xa8, 0x67, 0x01, 0xeb, 0xb0, 0x9e, 0x2f, 0x5c, 0xb2, 0x51, 0x0d, 0x49, 0x4d, 0x41, 0xa5, 0xc3,
   258  	0x7a, 0x55, 0xe1, 0x12, 0xde, 0x80, 0x2a, 0x66, 0x57, 0x41, 0xd5, 0x6a, 0x9b, 0x90, 0x7f, 0x82,
   259  	0x96, 0x92, 0x9a, 0xc6, 0x32, 0xbd, 0xd4, 0x68, 0x54, 0x9e, 0x19, 0xbc, 0x34, 0xa4, 0x25, 0xe1,
   260  	0x68, 0x16, 0x1c, 0x74, 0x58, 0xef, 0x64, 0x10, 0xf5, 0x5d, 0x2b, 0xfd, 0x8f, 0x0e, 0x14, 0x05,
   261  	0x77, 0x5e, 0x60, 0xe2, 0x89, 0xba, 0xbf, 0xd0, 0x45, 0x38, 0xdd, 0xb1, 0xeb, 0x8a, 0xfc, 0x39,
   262  	0x1c, 0x5c, 0x49, 0x92, 0xd6, 0x6e, 0x7d, 0xd0, 0x2c, 0x3f, 0x5e, 0x82, 0x6f, 0x24, 0xc9, 0x33,
   263  	0x4f, 0x58, 0x86, 0xb7, 0xe1, 0xd1, 0x37, 0xa9, 0xb3, 0x71, 0x36, 0xb2, 0x7d, 0xf8, 0x67, 0x9e,
   264  	0x28, 0x85, 0xe4, 0x08, 0x6a, 0x1a, 0xcd, 0x34, 0xa5, 0xee, 0x2f, 0x06, 0xc7, 0xbb, 0xaf, 0xf3,
   265  	0x77, 0x70, 0x6c, 0x50, 0x8f, 0xd1, 0xbc, 0xdf, 0x1c, 0xad, 0x29, 0xb6, 0x3a, 0x2d, 0xb7, 0xba,
   266  	0xb0, 0xf2, 0x39, 0x52, 0xd2, 0x9c, 0x2f, 0x22, 0x6f, 0xbd, 0x88, 0xee, 0xe0, 0xe2, 0x4e, 0xc6,
   267  	0x5f, 0x83, 0xbf, 0x9d, 0x70, 0x50, 0xe9, 0x54, 0x7b, 0xf5, 0x41, 0x63, 0xdf, 0x74, 0xf2, 0x78,
   268  	0xbd, 0x88, 0x6e, 0x31, 0x71, 0x1b, 0x76, 0x7f, 0x30, 0x38, 0x2a, 0x31, 0xfe, 0x0a, 0x6a, 0xe9,
   269  	0x03, 0x96, 0x4e, 0x0a, 0x4b, 0x05, 0x28, 0x8a, 0x95, 0x47, 0x70, 0xf8, 0x55, 0xa6, 0x53, 0xb4,
   270  	0x07, 0xc1, 0x12, 0x7f, 0xbd, 0x88, 0x9c, 0x20, 0xdc, 0xc2, 0x9f, 0x42, 0x85, 0x8c, 0x1b, 0xad,
   271  	0xb3, 0x43, 0xe3, 0x09, 0x1a, 0x92, 0x13, 0x25, 0x2a, 0x64, 0x06, 0x1f, 0xc0, 0xdf, 0xce, 0x82,
   272  	0x27, 0xbb, 0x49, 0xb0, 0xdf, 0x4d, 0x79, 0xb5, 0xda, 0xad, 0x7b, 0x2a, 0x6e, 0x8a, 0x2f, 0x58,
   273  	0xf2, 0x6c, 0xfe, 0x2f, 0xf4, 0xe6, 0xcb, 0x90, 0xdd, 0x2c, 0x43, 0xf6, 0x77, 0x19, 0xb2, 0x9f,
   274  	0xab, 0xd0, 0xbb, 0x59, 0x85, 0xde, 0x9f, 0x55, 0xe8, 0x5d, 0xd4, 0x77, 0xfe, 0x8a, 0x61, 0xcd,
   275  	0x5e, 0xdf, 0x97, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0x0f, 0x15, 0xe4, 0x68, 0x35, 0x03, 0x00,
   276  	0x00,
   277  }
   278  
   279  // Reference imports to suppress errors if they are not otherwise used.
   280  var _ context.Context
   281  var _ grpc.ClientConn
   282  
   283  // This is a compile-time assertion to ensure that this generated file
   284  // is compatible with the grpc package it is being compiled against.
   285  const _ = grpc.SupportPackageIsVersion4
   286  
   287  // ExemplarsClient is the client API for Exemplars service.
   288  //
   289  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   290  type ExemplarsClient interface {
   291  	/// Exemplars has info for all exemplars.
   292  	/// Returned exemplars are expected to include external labels.
   293  	Exemplars(ctx context.Context, in *ExemplarsRequest, opts ...grpc.CallOption) (Exemplars_ExemplarsClient, error)
   294  }
   295  
   296  type exemplarsClient struct {
   297  	cc *grpc.ClientConn
   298  }
   299  
   300  func NewExemplarsClient(cc *grpc.ClientConn) ExemplarsClient {
   301  	return &exemplarsClient{cc}
   302  }
   303  
   304  func (c *exemplarsClient) Exemplars(ctx context.Context, in *ExemplarsRequest, opts ...grpc.CallOption) (Exemplars_ExemplarsClient, error) {
   305  	stream, err := c.cc.NewStream(ctx, &_Exemplars_serviceDesc.Streams[0], "/thanos.Exemplars/Exemplars", opts...)
   306  	if err != nil {
   307  		return nil, err
   308  	}
   309  	x := &exemplarsExemplarsClient{stream}
   310  	if err := x.ClientStream.SendMsg(in); err != nil {
   311  		return nil, err
   312  	}
   313  	if err := x.ClientStream.CloseSend(); err != nil {
   314  		return nil, err
   315  	}
   316  	return x, nil
   317  }
   318  
   319  type Exemplars_ExemplarsClient interface {
   320  	Recv() (*ExemplarsResponse, error)
   321  	grpc.ClientStream
   322  }
   323  
   324  type exemplarsExemplarsClient struct {
   325  	grpc.ClientStream
   326  }
   327  
   328  func (x *exemplarsExemplarsClient) Recv() (*ExemplarsResponse, error) {
   329  	m := new(ExemplarsResponse)
   330  	if err := x.ClientStream.RecvMsg(m); err != nil {
   331  		return nil, err
   332  	}
   333  	return m, nil
   334  }
   335  
   336  // ExemplarsServer is the server API for Exemplars service.
   337  type ExemplarsServer interface {
   338  	/// Exemplars has info for all exemplars.
   339  	/// Returned exemplars are expected to include external labels.
   340  	Exemplars(*ExemplarsRequest, Exemplars_ExemplarsServer) error
   341  }
   342  
   343  // UnimplementedExemplarsServer can be embedded to have forward compatible implementations.
   344  type UnimplementedExemplarsServer struct {
   345  }
   346  
   347  func (*UnimplementedExemplarsServer) Exemplars(req *ExemplarsRequest, srv Exemplars_ExemplarsServer) error {
   348  	return status.Errorf(codes.Unimplemented, "method Exemplars not implemented")
   349  }
   350  
   351  func RegisterExemplarsServer(s *grpc.Server, srv ExemplarsServer) {
   352  	s.RegisterService(&_Exemplars_serviceDesc, srv)
   353  }
   354  
   355  func _Exemplars_Exemplars_Handler(srv interface{}, stream grpc.ServerStream) error {
   356  	m := new(ExemplarsRequest)
   357  	if err := stream.RecvMsg(m); err != nil {
   358  		return err
   359  	}
   360  	return srv.(ExemplarsServer).Exemplars(m, &exemplarsExemplarsServer{stream})
   361  }
   362  
   363  type Exemplars_ExemplarsServer interface {
   364  	Send(*ExemplarsResponse) error
   365  	grpc.ServerStream
   366  }
   367  
   368  type exemplarsExemplarsServer struct {
   369  	grpc.ServerStream
   370  }
   371  
   372  func (x *exemplarsExemplarsServer) Send(m *ExemplarsResponse) error {
   373  	return x.ServerStream.SendMsg(m)
   374  }
   375  
   376  var _Exemplars_serviceDesc = grpc.ServiceDesc{
   377  	ServiceName: "thanos.Exemplars",
   378  	HandlerType: (*ExemplarsServer)(nil),
   379  	Methods:     []grpc.MethodDesc{},
   380  	Streams: []grpc.StreamDesc{
   381  		{
   382  			StreamName:    "Exemplars",
   383  			Handler:       _Exemplars_Exemplars_Handler,
   384  			ServerStreams: true,
   385  		},
   386  	},
   387  	Metadata: "exemplars/exemplarspb/rpc.proto",
   388  }
   389  
   390  func (m *ExemplarsRequest) Marshal() (dAtA []byte, err error) {
   391  	size := m.Size()
   392  	dAtA = make([]byte, size)
   393  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   394  	if err != nil {
   395  		return nil, err
   396  	}
   397  	return dAtA[:n], nil
   398  }
   399  
   400  func (m *ExemplarsRequest) MarshalTo(dAtA []byte) (int, error) {
   401  	size := m.Size()
   402  	return m.MarshalToSizedBuffer(dAtA[:size])
   403  }
   404  
   405  func (m *ExemplarsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   406  	i := len(dAtA)
   407  	_ = i
   408  	var l int
   409  	_ = l
   410  	if m.PartialResponseStrategy != 0 {
   411  		i = encodeVarintRpc(dAtA, i, uint64(m.PartialResponseStrategy))
   412  		i--
   413  		dAtA[i] = 0x20
   414  	}
   415  	if m.End != 0 {
   416  		i = encodeVarintRpc(dAtA, i, uint64(m.End))
   417  		i--
   418  		dAtA[i] = 0x18
   419  	}
   420  	if m.Start != 0 {
   421  		i = encodeVarintRpc(dAtA, i, uint64(m.Start))
   422  		i--
   423  		dAtA[i] = 0x10
   424  	}
   425  	if len(m.Query) > 0 {
   426  		i -= len(m.Query)
   427  		copy(dAtA[i:], m.Query)
   428  		i = encodeVarintRpc(dAtA, i, uint64(len(m.Query)))
   429  		i--
   430  		dAtA[i] = 0xa
   431  	}
   432  	return len(dAtA) - i, nil
   433  }
   434  
   435  func (m *ExemplarsResponse) Marshal() (dAtA []byte, err error) {
   436  	size := m.Size()
   437  	dAtA = make([]byte, size)
   438  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   439  	if err != nil {
   440  		return nil, err
   441  	}
   442  	return dAtA[:n], nil
   443  }
   444  
   445  func (m *ExemplarsResponse) MarshalTo(dAtA []byte) (int, error) {
   446  	size := m.Size()
   447  	return m.MarshalToSizedBuffer(dAtA[:size])
   448  }
   449  
   450  func (m *ExemplarsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   451  	i := len(dAtA)
   452  	_ = i
   453  	var l int
   454  	_ = l
   455  	if m.Result != nil {
   456  		{
   457  			size := m.Result.Size()
   458  			i -= size
   459  			if _, err := m.Result.MarshalTo(dAtA[i:]); err != nil {
   460  				return 0, err
   461  			}
   462  		}
   463  	}
   464  	return len(dAtA) - i, nil
   465  }
   466  
   467  func (m *ExemplarsResponse_Data) MarshalTo(dAtA []byte) (int, error) {
   468  	size := m.Size()
   469  	return m.MarshalToSizedBuffer(dAtA[:size])
   470  }
   471  
   472  func (m *ExemplarsResponse_Data) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   473  	i := len(dAtA)
   474  	if m.Data != nil {
   475  		{
   476  			size, err := m.Data.MarshalToSizedBuffer(dAtA[:i])
   477  			if err != nil {
   478  				return 0, err
   479  			}
   480  			i -= size
   481  			i = encodeVarintRpc(dAtA, i, uint64(size))
   482  		}
   483  		i--
   484  		dAtA[i] = 0xa
   485  	}
   486  	return len(dAtA) - i, nil
   487  }
   488  func (m *ExemplarsResponse_Warning) MarshalTo(dAtA []byte) (int, error) {
   489  	size := m.Size()
   490  	return m.MarshalToSizedBuffer(dAtA[:size])
   491  }
   492  
   493  func (m *ExemplarsResponse_Warning) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   494  	i := len(dAtA)
   495  	i -= len(m.Warning)
   496  	copy(dAtA[i:], m.Warning)
   497  	i = encodeVarintRpc(dAtA, i, uint64(len(m.Warning)))
   498  	i--
   499  	dAtA[i] = 0x12
   500  	return len(dAtA) - i, nil
   501  }
   502  func (m *ExemplarData) Marshal() (dAtA []byte, err error) {
   503  	size := m.Size()
   504  	dAtA = make([]byte, size)
   505  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   506  	if err != nil {
   507  		return nil, err
   508  	}
   509  	return dAtA[:n], nil
   510  }
   511  
   512  func (m *ExemplarData) MarshalTo(dAtA []byte) (int, error) {
   513  	size := m.Size()
   514  	return m.MarshalToSizedBuffer(dAtA[:size])
   515  }
   516  
   517  func (m *ExemplarData) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   518  	i := len(dAtA)
   519  	_ = i
   520  	var l int
   521  	_ = l
   522  	if len(m.Exemplars) > 0 {
   523  		for iNdEx := len(m.Exemplars) - 1; iNdEx >= 0; iNdEx-- {
   524  			{
   525  				size, err := m.Exemplars[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   526  				if err != nil {
   527  					return 0, err
   528  				}
   529  				i -= size
   530  				i = encodeVarintRpc(dAtA, i, uint64(size))
   531  			}
   532  			i--
   533  			dAtA[i] = 0x12
   534  		}
   535  	}
   536  	{
   537  		size, err := m.SeriesLabels.MarshalToSizedBuffer(dAtA[:i])
   538  		if err != nil {
   539  			return 0, err
   540  		}
   541  		i -= size
   542  		i = encodeVarintRpc(dAtA, i, uint64(size))
   543  	}
   544  	i--
   545  	dAtA[i] = 0xa
   546  	return len(dAtA) - i, nil
   547  }
   548  
   549  func (m *Exemplar) Marshal() (dAtA []byte, err error) {
   550  	size := m.Size()
   551  	dAtA = make([]byte, size)
   552  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   553  	if err != nil {
   554  		return nil, err
   555  	}
   556  	return dAtA[:n], nil
   557  }
   558  
   559  func (m *Exemplar) MarshalTo(dAtA []byte) (int, error) {
   560  	size := m.Size()
   561  	return m.MarshalToSizedBuffer(dAtA[:size])
   562  }
   563  
   564  func (m *Exemplar) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   565  	i := len(dAtA)
   566  	_ = i
   567  	var l int
   568  	_ = l
   569  	if m.Ts != 0 {
   570  		i = encodeVarintRpc(dAtA, i, uint64(m.Ts))
   571  		i--
   572  		dAtA[i] = 0x18
   573  	}
   574  	if m.Value != 0 {
   575  		i -= 8
   576  		encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value))))
   577  		i--
   578  		dAtA[i] = 0x11
   579  	}
   580  	{
   581  		size, err := m.Labels.MarshalToSizedBuffer(dAtA[:i])
   582  		if err != nil {
   583  			return 0, err
   584  		}
   585  		i -= size
   586  		i = encodeVarintRpc(dAtA, i, uint64(size))
   587  	}
   588  	i--
   589  	dAtA[i] = 0xa
   590  	return len(dAtA) - i, nil
   591  }
   592  
   593  func encodeVarintRpc(dAtA []byte, offset int, v uint64) int {
   594  	offset -= sovRpc(v)
   595  	base := offset
   596  	for v >= 1<<7 {
   597  		dAtA[offset] = uint8(v&0x7f | 0x80)
   598  		v >>= 7
   599  		offset++
   600  	}
   601  	dAtA[offset] = uint8(v)
   602  	return base
   603  }
   604  func (m *ExemplarsRequest) Size() (n int) {
   605  	if m == nil {
   606  		return 0
   607  	}
   608  	var l int
   609  	_ = l
   610  	l = len(m.Query)
   611  	if l > 0 {
   612  		n += 1 + l + sovRpc(uint64(l))
   613  	}
   614  	if m.Start != 0 {
   615  		n += 1 + sovRpc(uint64(m.Start))
   616  	}
   617  	if m.End != 0 {
   618  		n += 1 + sovRpc(uint64(m.End))
   619  	}
   620  	if m.PartialResponseStrategy != 0 {
   621  		n += 1 + sovRpc(uint64(m.PartialResponseStrategy))
   622  	}
   623  	return n
   624  }
   625  
   626  func (m *ExemplarsResponse) Size() (n int) {
   627  	if m == nil {
   628  		return 0
   629  	}
   630  	var l int
   631  	_ = l
   632  	if m.Result != nil {
   633  		n += m.Result.Size()
   634  	}
   635  	return n
   636  }
   637  
   638  func (m *ExemplarsResponse_Data) Size() (n int) {
   639  	if m == nil {
   640  		return 0
   641  	}
   642  	var l int
   643  	_ = l
   644  	if m.Data != nil {
   645  		l = m.Data.Size()
   646  		n += 1 + l + sovRpc(uint64(l))
   647  	}
   648  	return n
   649  }
   650  func (m *ExemplarsResponse_Warning) Size() (n int) {
   651  	if m == nil {
   652  		return 0
   653  	}
   654  	var l int
   655  	_ = l
   656  	l = len(m.Warning)
   657  	n += 1 + l + sovRpc(uint64(l))
   658  	return n
   659  }
   660  func (m *ExemplarData) Size() (n int) {
   661  	if m == nil {
   662  		return 0
   663  	}
   664  	var l int
   665  	_ = l
   666  	l = m.SeriesLabels.Size()
   667  	n += 1 + l + sovRpc(uint64(l))
   668  	if len(m.Exemplars) > 0 {
   669  		for _, e := range m.Exemplars {
   670  			l = e.Size()
   671  			n += 1 + l + sovRpc(uint64(l))
   672  		}
   673  	}
   674  	return n
   675  }
   676  
   677  func (m *Exemplar) Size() (n int) {
   678  	if m == nil {
   679  		return 0
   680  	}
   681  	var l int
   682  	_ = l
   683  	l = m.Labels.Size()
   684  	n += 1 + l + sovRpc(uint64(l))
   685  	if m.Value != 0 {
   686  		n += 9
   687  	}
   688  	if m.Ts != 0 {
   689  		n += 1 + sovRpc(uint64(m.Ts))
   690  	}
   691  	return n
   692  }
   693  
   694  func sovRpc(x uint64) (n int) {
   695  	return (math_bits.Len64(x|1) + 6) / 7
   696  }
   697  func sozRpc(x uint64) (n int) {
   698  	return sovRpc(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   699  }
   700  func (m *ExemplarsRequest) Unmarshal(dAtA []byte) error {
   701  	l := len(dAtA)
   702  	iNdEx := 0
   703  	for iNdEx < l {
   704  		preIndex := iNdEx
   705  		var wire uint64
   706  		for shift := uint(0); ; shift += 7 {
   707  			if shift >= 64 {
   708  				return ErrIntOverflowRpc
   709  			}
   710  			if iNdEx >= l {
   711  				return io.ErrUnexpectedEOF
   712  			}
   713  			b := dAtA[iNdEx]
   714  			iNdEx++
   715  			wire |= uint64(b&0x7F) << shift
   716  			if b < 0x80 {
   717  				break
   718  			}
   719  		}
   720  		fieldNum := int32(wire >> 3)
   721  		wireType := int(wire & 0x7)
   722  		if wireType == 4 {
   723  			return fmt.Errorf("proto: ExemplarsRequest: wiretype end group for non-group")
   724  		}
   725  		if fieldNum <= 0 {
   726  			return fmt.Errorf("proto: ExemplarsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
   727  		}
   728  		switch fieldNum {
   729  		case 1:
   730  			if wireType != 2 {
   731  				return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType)
   732  			}
   733  			var stringLen uint64
   734  			for shift := uint(0); ; shift += 7 {
   735  				if shift >= 64 {
   736  					return ErrIntOverflowRpc
   737  				}
   738  				if iNdEx >= l {
   739  					return io.ErrUnexpectedEOF
   740  				}
   741  				b := dAtA[iNdEx]
   742  				iNdEx++
   743  				stringLen |= uint64(b&0x7F) << shift
   744  				if b < 0x80 {
   745  					break
   746  				}
   747  			}
   748  			intStringLen := int(stringLen)
   749  			if intStringLen < 0 {
   750  				return ErrInvalidLengthRpc
   751  			}
   752  			postIndex := iNdEx + intStringLen
   753  			if postIndex < 0 {
   754  				return ErrInvalidLengthRpc
   755  			}
   756  			if postIndex > l {
   757  				return io.ErrUnexpectedEOF
   758  			}
   759  			m.Query = string(dAtA[iNdEx:postIndex])
   760  			iNdEx = postIndex
   761  		case 2:
   762  			if wireType != 0 {
   763  				return fmt.Errorf("proto: wrong wireType = %d for field Start", wireType)
   764  			}
   765  			m.Start = 0
   766  			for shift := uint(0); ; shift += 7 {
   767  				if shift >= 64 {
   768  					return ErrIntOverflowRpc
   769  				}
   770  				if iNdEx >= l {
   771  					return io.ErrUnexpectedEOF
   772  				}
   773  				b := dAtA[iNdEx]
   774  				iNdEx++
   775  				m.Start |= int64(b&0x7F) << shift
   776  				if b < 0x80 {
   777  					break
   778  				}
   779  			}
   780  		case 3:
   781  			if wireType != 0 {
   782  				return fmt.Errorf("proto: wrong wireType = %d for field End", wireType)
   783  			}
   784  			m.End = 0
   785  			for shift := uint(0); ; shift += 7 {
   786  				if shift >= 64 {
   787  					return ErrIntOverflowRpc
   788  				}
   789  				if iNdEx >= l {
   790  					return io.ErrUnexpectedEOF
   791  				}
   792  				b := dAtA[iNdEx]
   793  				iNdEx++
   794  				m.End |= int64(b&0x7F) << shift
   795  				if b < 0x80 {
   796  					break
   797  				}
   798  			}
   799  		case 4:
   800  			if wireType != 0 {
   801  				return fmt.Errorf("proto: wrong wireType = %d for field PartialResponseStrategy", wireType)
   802  			}
   803  			m.PartialResponseStrategy = 0
   804  			for shift := uint(0); ; shift += 7 {
   805  				if shift >= 64 {
   806  					return ErrIntOverflowRpc
   807  				}
   808  				if iNdEx >= l {
   809  					return io.ErrUnexpectedEOF
   810  				}
   811  				b := dAtA[iNdEx]
   812  				iNdEx++
   813  				m.PartialResponseStrategy |= storepb.PartialResponseStrategy(b&0x7F) << shift
   814  				if b < 0x80 {
   815  					break
   816  				}
   817  			}
   818  		default:
   819  			iNdEx = preIndex
   820  			skippy, err := skipRpc(dAtA[iNdEx:])
   821  			if err != nil {
   822  				return err
   823  			}
   824  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   825  				return ErrInvalidLengthRpc
   826  			}
   827  			if (iNdEx + skippy) > l {
   828  				return io.ErrUnexpectedEOF
   829  			}
   830  			iNdEx += skippy
   831  		}
   832  	}
   833  
   834  	if iNdEx > l {
   835  		return io.ErrUnexpectedEOF
   836  	}
   837  	return nil
   838  }
   839  func (m *ExemplarsResponse) Unmarshal(dAtA []byte) error {
   840  	l := len(dAtA)
   841  	iNdEx := 0
   842  	for iNdEx < l {
   843  		preIndex := iNdEx
   844  		var wire uint64
   845  		for shift := uint(0); ; shift += 7 {
   846  			if shift >= 64 {
   847  				return ErrIntOverflowRpc
   848  			}
   849  			if iNdEx >= l {
   850  				return io.ErrUnexpectedEOF
   851  			}
   852  			b := dAtA[iNdEx]
   853  			iNdEx++
   854  			wire |= uint64(b&0x7F) << shift
   855  			if b < 0x80 {
   856  				break
   857  			}
   858  		}
   859  		fieldNum := int32(wire >> 3)
   860  		wireType := int(wire & 0x7)
   861  		if wireType == 4 {
   862  			return fmt.Errorf("proto: ExemplarsResponse: wiretype end group for non-group")
   863  		}
   864  		if fieldNum <= 0 {
   865  			return fmt.Errorf("proto: ExemplarsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
   866  		}
   867  		switch fieldNum {
   868  		case 1:
   869  			if wireType != 2 {
   870  				return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
   871  			}
   872  			var msglen int
   873  			for shift := uint(0); ; shift += 7 {
   874  				if shift >= 64 {
   875  					return ErrIntOverflowRpc
   876  				}
   877  				if iNdEx >= l {
   878  					return io.ErrUnexpectedEOF
   879  				}
   880  				b := dAtA[iNdEx]
   881  				iNdEx++
   882  				msglen |= int(b&0x7F) << shift
   883  				if b < 0x80 {
   884  					break
   885  				}
   886  			}
   887  			if msglen < 0 {
   888  				return ErrInvalidLengthRpc
   889  			}
   890  			postIndex := iNdEx + msglen
   891  			if postIndex < 0 {
   892  				return ErrInvalidLengthRpc
   893  			}
   894  			if postIndex > l {
   895  				return io.ErrUnexpectedEOF
   896  			}
   897  			v := &ExemplarData{}
   898  			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   899  				return err
   900  			}
   901  			m.Result = &ExemplarsResponse_Data{v}
   902  			iNdEx = postIndex
   903  		case 2:
   904  			if wireType != 2 {
   905  				return fmt.Errorf("proto: wrong wireType = %d for field Warning", wireType)
   906  			}
   907  			var stringLen uint64
   908  			for shift := uint(0); ; shift += 7 {
   909  				if shift >= 64 {
   910  					return ErrIntOverflowRpc
   911  				}
   912  				if iNdEx >= l {
   913  					return io.ErrUnexpectedEOF
   914  				}
   915  				b := dAtA[iNdEx]
   916  				iNdEx++
   917  				stringLen |= uint64(b&0x7F) << shift
   918  				if b < 0x80 {
   919  					break
   920  				}
   921  			}
   922  			intStringLen := int(stringLen)
   923  			if intStringLen < 0 {
   924  				return ErrInvalidLengthRpc
   925  			}
   926  			postIndex := iNdEx + intStringLen
   927  			if postIndex < 0 {
   928  				return ErrInvalidLengthRpc
   929  			}
   930  			if postIndex > l {
   931  				return io.ErrUnexpectedEOF
   932  			}
   933  			m.Result = &ExemplarsResponse_Warning{string(dAtA[iNdEx:postIndex])}
   934  			iNdEx = postIndex
   935  		default:
   936  			iNdEx = preIndex
   937  			skippy, err := skipRpc(dAtA[iNdEx:])
   938  			if err != nil {
   939  				return err
   940  			}
   941  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   942  				return ErrInvalidLengthRpc
   943  			}
   944  			if (iNdEx + skippy) > l {
   945  				return io.ErrUnexpectedEOF
   946  			}
   947  			iNdEx += skippy
   948  		}
   949  	}
   950  
   951  	if iNdEx > l {
   952  		return io.ErrUnexpectedEOF
   953  	}
   954  	return nil
   955  }
   956  func (m *ExemplarData) Unmarshal(dAtA []byte) error {
   957  	l := len(dAtA)
   958  	iNdEx := 0
   959  	for iNdEx < l {
   960  		preIndex := iNdEx
   961  		var wire uint64
   962  		for shift := uint(0); ; shift += 7 {
   963  			if shift >= 64 {
   964  				return ErrIntOverflowRpc
   965  			}
   966  			if iNdEx >= l {
   967  				return io.ErrUnexpectedEOF
   968  			}
   969  			b := dAtA[iNdEx]
   970  			iNdEx++
   971  			wire |= uint64(b&0x7F) << shift
   972  			if b < 0x80 {
   973  				break
   974  			}
   975  		}
   976  		fieldNum := int32(wire >> 3)
   977  		wireType := int(wire & 0x7)
   978  		if wireType == 4 {
   979  			return fmt.Errorf("proto: ExemplarData: wiretype end group for non-group")
   980  		}
   981  		if fieldNum <= 0 {
   982  			return fmt.Errorf("proto: ExemplarData: illegal tag %d (wire type %d)", fieldNum, wire)
   983  		}
   984  		switch fieldNum {
   985  		case 1:
   986  			if wireType != 2 {
   987  				return fmt.Errorf("proto: wrong wireType = %d for field SeriesLabels", wireType)
   988  			}
   989  			var msglen int
   990  			for shift := uint(0); ; shift += 7 {
   991  				if shift >= 64 {
   992  					return ErrIntOverflowRpc
   993  				}
   994  				if iNdEx >= l {
   995  					return io.ErrUnexpectedEOF
   996  				}
   997  				b := dAtA[iNdEx]
   998  				iNdEx++
   999  				msglen |= int(b&0x7F) << shift
  1000  				if b < 0x80 {
  1001  					break
  1002  				}
  1003  			}
  1004  			if msglen < 0 {
  1005  				return ErrInvalidLengthRpc
  1006  			}
  1007  			postIndex := iNdEx + msglen
  1008  			if postIndex < 0 {
  1009  				return ErrInvalidLengthRpc
  1010  			}
  1011  			if postIndex > l {
  1012  				return io.ErrUnexpectedEOF
  1013  			}
  1014  			if err := m.SeriesLabels.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1015  				return err
  1016  			}
  1017  			iNdEx = postIndex
  1018  		case 2:
  1019  			if wireType != 2 {
  1020  				return fmt.Errorf("proto: wrong wireType = %d for field Exemplars", wireType)
  1021  			}
  1022  			var msglen int
  1023  			for shift := uint(0); ; shift += 7 {
  1024  				if shift >= 64 {
  1025  					return ErrIntOverflowRpc
  1026  				}
  1027  				if iNdEx >= l {
  1028  					return io.ErrUnexpectedEOF
  1029  				}
  1030  				b := dAtA[iNdEx]
  1031  				iNdEx++
  1032  				msglen |= int(b&0x7F) << shift
  1033  				if b < 0x80 {
  1034  					break
  1035  				}
  1036  			}
  1037  			if msglen < 0 {
  1038  				return ErrInvalidLengthRpc
  1039  			}
  1040  			postIndex := iNdEx + msglen
  1041  			if postIndex < 0 {
  1042  				return ErrInvalidLengthRpc
  1043  			}
  1044  			if postIndex > l {
  1045  				return io.ErrUnexpectedEOF
  1046  			}
  1047  			m.Exemplars = append(m.Exemplars, &Exemplar{})
  1048  			if err := m.Exemplars[len(m.Exemplars)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1049  				return err
  1050  			}
  1051  			iNdEx = postIndex
  1052  		default:
  1053  			iNdEx = preIndex
  1054  			skippy, err := skipRpc(dAtA[iNdEx:])
  1055  			if err != nil {
  1056  				return err
  1057  			}
  1058  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1059  				return ErrInvalidLengthRpc
  1060  			}
  1061  			if (iNdEx + skippy) > l {
  1062  				return io.ErrUnexpectedEOF
  1063  			}
  1064  			iNdEx += skippy
  1065  		}
  1066  	}
  1067  
  1068  	if iNdEx > l {
  1069  		return io.ErrUnexpectedEOF
  1070  	}
  1071  	return nil
  1072  }
  1073  func (m *Exemplar) Unmarshal(dAtA []byte) error {
  1074  	l := len(dAtA)
  1075  	iNdEx := 0
  1076  	for iNdEx < l {
  1077  		preIndex := iNdEx
  1078  		var wire uint64
  1079  		for shift := uint(0); ; shift += 7 {
  1080  			if shift >= 64 {
  1081  				return ErrIntOverflowRpc
  1082  			}
  1083  			if iNdEx >= l {
  1084  				return io.ErrUnexpectedEOF
  1085  			}
  1086  			b := dAtA[iNdEx]
  1087  			iNdEx++
  1088  			wire |= uint64(b&0x7F) << shift
  1089  			if b < 0x80 {
  1090  				break
  1091  			}
  1092  		}
  1093  		fieldNum := int32(wire >> 3)
  1094  		wireType := int(wire & 0x7)
  1095  		if wireType == 4 {
  1096  			return fmt.Errorf("proto: Exemplar: wiretype end group for non-group")
  1097  		}
  1098  		if fieldNum <= 0 {
  1099  			return fmt.Errorf("proto: Exemplar: illegal tag %d (wire type %d)", fieldNum, wire)
  1100  		}
  1101  		switch fieldNum {
  1102  		case 1:
  1103  			if wireType != 2 {
  1104  				return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType)
  1105  			}
  1106  			var msglen int
  1107  			for shift := uint(0); ; shift += 7 {
  1108  				if shift >= 64 {
  1109  					return ErrIntOverflowRpc
  1110  				}
  1111  				if iNdEx >= l {
  1112  					return io.ErrUnexpectedEOF
  1113  				}
  1114  				b := dAtA[iNdEx]
  1115  				iNdEx++
  1116  				msglen |= int(b&0x7F) << shift
  1117  				if b < 0x80 {
  1118  					break
  1119  				}
  1120  			}
  1121  			if msglen < 0 {
  1122  				return ErrInvalidLengthRpc
  1123  			}
  1124  			postIndex := iNdEx + msglen
  1125  			if postIndex < 0 {
  1126  				return ErrInvalidLengthRpc
  1127  			}
  1128  			if postIndex > l {
  1129  				return io.ErrUnexpectedEOF
  1130  			}
  1131  			if err := m.Labels.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1132  				return err
  1133  			}
  1134  			iNdEx = postIndex
  1135  		case 2:
  1136  			if wireType != 1 {
  1137  				return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
  1138  			}
  1139  			var v uint64
  1140  			if (iNdEx + 8) > l {
  1141  				return io.ErrUnexpectedEOF
  1142  			}
  1143  			v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
  1144  			iNdEx += 8
  1145  			m.Value = float64(math.Float64frombits(v))
  1146  		case 3:
  1147  			if wireType != 0 {
  1148  				return fmt.Errorf("proto: wrong wireType = %d for field Ts", wireType)
  1149  			}
  1150  			m.Ts = 0
  1151  			for shift := uint(0); ; shift += 7 {
  1152  				if shift >= 64 {
  1153  					return ErrIntOverflowRpc
  1154  				}
  1155  				if iNdEx >= l {
  1156  					return io.ErrUnexpectedEOF
  1157  				}
  1158  				b := dAtA[iNdEx]
  1159  				iNdEx++
  1160  				m.Ts |= int64(b&0x7F) << shift
  1161  				if b < 0x80 {
  1162  					break
  1163  				}
  1164  			}
  1165  		default:
  1166  			iNdEx = preIndex
  1167  			skippy, err := skipRpc(dAtA[iNdEx:])
  1168  			if err != nil {
  1169  				return err
  1170  			}
  1171  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1172  				return ErrInvalidLengthRpc
  1173  			}
  1174  			if (iNdEx + skippy) > l {
  1175  				return io.ErrUnexpectedEOF
  1176  			}
  1177  			iNdEx += skippy
  1178  		}
  1179  	}
  1180  
  1181  	if iNdEx > l {
  1182  		return io.ErrUnexpectedEOF
  1183  	}
  1184  	return nil
  1185  }
  1186  func skipRpc(dAtA []byte) (n int, err error) {
  1187  	l := len(dAtA)
  1188  	iNdEx := 0
  1189  	depth := 0
  1190  	for iNdEx < l {
  1191  		var wire uint64
  1192  		for shift := uint(0); ; shift += 7 {
  1193  			if shift >= 64 {
  1194  				return 0, ErrIntOverflowRpc
  1195  			}
  1196  			if iNdEx >= l {
  1197  				return 0, io.ErrUnexpectedEOF
  1198  			}
  1199  			b := dAtA[iNdEx]
  1200  			iNdEx++
  1201  			wire |= (uint64(b) & 0x7F) << shift
  1202  			if b < 0x80 {
  1203  				break
  1204  			}
  1205  		}
  1206  		wireType := int(wire & 0x7)
  1207  		switch wireType {
  1208  		case 0:
  1209  			for shift := uint(0); ; shift += 7 {
  1210  				if shift >= 64 {
  1211  					return 0, ErrIntOverflowRpc
  1212  				}
  1213  				if iNdEx >= l {
  1214  					return 0, io.ErrUnexpectedEOF
  1215  				}
  1216  				iNdEx++
  1217  				if dAtA[iNdEx-1] < 0x80 {
  1218  					break
  1219  				}
  1220  			}
  1221  		case 1:
  1222  			iNdEx += 8
  1223  		case 2:
  1224  			var length int
  1225  			for shift := uint(0); ; shift += 7 {
  1226  				if shift >= 64 {
  1227  					return 0, ErrIntOverflowRpc
  1228  				}
  1229  				if iNdEx >= l {
  1230  					return 0, io.ErrUnexpectedEOF
  1231  				}
  1232  				b := dAtA[iNdEx]
  1233  				iNdEx++
  1234  				length |= (int(b) & 0x7F) << shift
  1235  				if b < 0x80 {
  1236  					break
  1237  				}
  1238  			}
  1239  			if length < 0 {
  1240  				return 0, ErrInvalidLengthRpc
  1241  			}
  1242  			iNdEx += length
  1243  		case 3:
  1244  			depth++
  1245  		case 4:
  1246  			if depth == 0 {
  1247  				return 0, ErrUnexpectedEndOfGroupRpc
  1248  			}
  1249  			depth--
  1250  		case 5:
  1251  			iNdEx += 4
  1252  		default:
  1253  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  1254  		}
  1255  		if iNdEx < 0 {
  1256  			return 0, ErrInvalidLengthRpc
  1257  		}
  1258  		if depth == 0 {
  1259  			return iNdEx, nil
  1260  		}
  1261  	}
  1262  	return 0, io.ErrUnexpectedEOF
  1263  }
  1264  
  1265  var (
  1266  	ErrInvalidLengthRpc        = fmt.Errorf("proto: negative length found during unmarshaling")
  1267  	ErrIntOverflowRpc          = fmt.Errorf("proto: integer overflow")
  1268  	ErrUnexpectedEndOfGroupRpc = fmt.Errorf("proto: unexpected end of group")
  1269  )