github.com/yankunsam/loki/v2@v2.6.3-0.20220817130409-389df5235c27/pkg/logproto/indexgateway.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: pkg/logproto/indexgateway.proto
     3  
     4  package logproto
     5  
     6  import (
     7  	context "context"
     8  	fmt "fmt"
     9  	_ "github.com/gogo/protobuf/gogoproto"
    10  	proto "github.com/gogo/protobuf/proto"
    11  	grpc "google.golang.org/grpc"
    12  	codes "google.golang.org/grpc/codes"
    13  	status "google.golang.org/grpc/status"
    14  	math "math"
    15  )
    16  
    17  // Reference imports to suppress errors if they are not otherwise used.
    18  var _ = proto.Marshal
    19  var _ = fmt.Errorf
    20  var _ = math.Inf
    21  
    22  // This is a compile-time assertion to ensure that this generated file
    23  // is compatible with the proto package it is being compiled against.
    24  // A compilation error at this line likely means your copy of the
    25  // proto package needs to be updated.
    26  const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
    27  
    28  func init() { proto.RegisterFile("pkg/logproto/indexgateway.proto", fileDescriptor_d27585148d0a52c8) }
    29  
    30  var fileDescriptor_d27585148d0a52c8 = []byte{
    31  	// 360 bytes of a gzipped FileDescriptorProto
    32  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xb1, 0x4e, 0xf3, 0x30,
    33  	0x14, 0x85, 0x6d, 0xfd, 0xd2, 0x2f, 0x30, 0x88, 0xc1, 0x4b, 0x51, 0x0a, 0x46, 0x42, 0x0c, 0x30,
    34  	0xd0, 0x20, 0x78, 0x03, 0x90, 0x1a, 0x55, 0x2a, 0x48, 0x14, 0x89, 0xa1, 0x03, 0xc2, 0x29, 0xb7,
    35  	0x69, 0xd4, 0x34, 0x0e, 0x89, 0x23, 0xe8, 0xc6, 0x23, 0xf0, 0x18, 0x3c, 0x0a, 0x63, 0xc7, 0x8e,
    36  	0xd4, 0x5d, 0x18, 0x3b, 0x33, 0xa1, 0x38, 0x4a, 0xeb, 0x56, 0xa9, 0xc4, 0x14, 0xfb, 0x9c, 0x73,
    37  	0xbf, 0xab, 0xf8, 0x5e, 0x72, 0x10, 0xf5, 0x3d, 0x3b, 0x10, 0x5e, 0x14, 0x0b, 0x29, 0x6c, 0x3f,
    38  	0x7c, 0x82, 0x57, 0x8f, 0x4b, 0x78, 0xe1, 0xc3, 0x9a, 0x96, 0xe8, 0x8e, 0xa9, 0x45, 0xae, 0x75,
    39  	0xea, 0xf9, 0xb2, 0x97, 0xba, 0xb5, 0x8e, 0x18, 0xd8, 0x9e, 0xf0, 0x84, 0xad, 0x63, 0x6e, 0xda,
    40  	0xd5, 0xb7, 0x1c, 0x93, 0x9d, 0xf2, 0x72, 0xab, 0xba, 0xc4, 0x2f, 0x0e, 0xb9, 0x79, 0xfe, 0xf3,
    41  	0x8f, 0x6c, 0x37, 0x32, 0xbc, 0x93, 0xe3, 0x69, 0x83, 0x90, 0xdb, 0x14, 0xe2, 0xa1, 0x16, 0x69,
    42  	0xb5, 0x36, 0xcf, 0x2f, 0xd4, 0x16, 0x3c, 0xa7, 0x90, 0x48, 0x6b, 0xaf, 0xdc, 0x4c, 0x22, 0x11,
    43  	0x26, 0x70, 0x86, 0x69, 0x93, 0x6c, 0x39, 0x20, 0xaf, 0x7a, 0x69, 0xd8, 0x6f, 0x41, 0x97, 0x1a,
    44  	0x71, 0x43, 0x2e, 0x60, 0xfb, 0x6b, 0xdc, 0x9c, 0x76, 0x88, 0x68, 0x9d, 0x6c, 0x3a, 0x20, 0xef,
    45  	0x20, 0xf6, 0x21, 0xa1, 0xd6, 0x52, 0x3a, 0x17, 0x0b, 0x52, 0xb5, 0xd4, 0x9b, 0x73, 0x1e, 0x48,
    46  	0xa5, 0xc9, 0x5d, 0x08, 0x6e, 0xf8, 0x00, 0x92, 0xba, 0x88, 0xaf, 0x41, 0xc6, 0x7e, 0x27, 0xbb,
    47  	0xd1, 0xe3, 0x45, 0xe5, 0x9a, 0x48, 0xd1, 0xa3, 0xb2, 0x92, 0x34, 0xf8, 0x8f, 0x64, 0x57, 0x4b,
    48  	0xf7, 0x3c, 0x48, 0x57, 0x1b, 0x9c, 0xac, 0x94, 0x95, 0x64, 0xfe, 0xd0, 0xc1, 0x21, 0x1b, 0xd9,
    49  	0x8f, 0x49, 0x2e, 0x13, 0x73, 0x40, 0xfa, 0xf9, 0xb5, 0x5a, 0x32, 0x20, 0xd3, 0x2c, 0x40, 0x97,
    50  	0xed, 0xd1, 0x84, 0xa1, 0xf1, 0x84, 0xa1, 0xd9, 0x84, 0xe1, 0x37, 0xc5, 0xf0, 0x87, 0x62, 0xf8,
    51  	0x53, 0x31, 0x3c, 0x52, 0x0c, 0x7f, 0x29, 0x86, 0xbf, 0x15, 0x43, 0x33, 0xc5, 0xf0, 0xfb, 0x94,
    52  	0xa1, 0xd1, 0x94, 0xa1, 0xf1, 0x94, 0xa1, 0xf6, 0x91, 0xb9, 0x7e, 0x31, 0xef, 0xf2, 0x90, 0xdb,
    53  	0x81, 0xe8, 0xfb, 0xb6, 0xb9, 0x67, 0xee, 0x7f, 0xfd, 0xb9, 0xf8, 0x0d, 0x00, 0x00, 0xff, 0xff,
    54  	0xf0, 0xa4, 0xc7, 0x87, 0xde, 0x02, 0x00, 0x00,
    55  }
    56  
    57  // Reference imports to suppress errors if they are not otherwise used.
    58  var _ context.Context
    59  var _ grpc.ClientConn
    60  
    61  // This is a compile-time assertion to ensure that this generated file
    62  // is compatible with the grpc package it is being compiled against.
    63  const _ = grpc.SupportPackageIsVersion4
    64  
    65  // IndexGatewayClient is the client API for IndexGateway service.
    66  //
    67  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
    68  type IndexGatewayClient interface {
    69  	/// QueryIndex reads the indexes required for given query & sends back the batch of rows
    70  	/// in rpc streams
    71  	QueryIndex(ctx context.Context, in *QueryIndexRequest, opts ...grpc.CallOption) (IndexGateway_QueryIndexClient, error)
    72  	/// GetChunkRef returns chunk reference that match the provided label matchers
    73  	GetChunkRef(ctx context.Context, in *GetChunkRefRequest, opts ...grpc.CallOption) (*GetChunkRefResponse, error)
    74  	GetSeries(ctx context.Context, in *GetSeriesRequest, opts ...grpc.CallOption) (*GetSeriesResponse, error)
    75  	LabelNamesForMetricName(ctx context.Context, in *LabelNamesForMetricNameRequest, opts ...grpc.CallOption) (*LabelResponse, error)
    76  	LabelValuesForMetricName(ctx context.Context, in *LabelValuesForMetricNameRequest, opts ...grpc.CallOption) (*LabelResponse, error)
    77  	// Note: this MUST be the same as the variant defined in
    78  	// logproto.proto on the Querier service.
    79  	GetStats(ctx context.Context, in *IndexStatsRequest, opts ...grpc.CallOption) (*IndexStatsResponse, error)
    80  }
    81  
    82  type indexGatewayClient struct {
    83  	cc *grpc.ClientConn
    84  }
    85  
    86  func NewIndexGatewayClient(cc *grpc.ClientConn) IndexGatewayClient {
    87  	return &indexGatewayClient{cc}
    88  }
    89  
    90  func (c *indexGatewayClient) QueryIndex(ctx context.Context, in *QueryIndexRequest, opts ...grpc.CallOption) (IndexGateway_QueryIndexClient, error) {
    91  	stream, err := c.cc.NewStream(ctx, &_IndexGateway_serviceDesc.Streams[0], "/indexgatewaypb.IndexGateway/QueryIndex", opts...)
    92  	if err != nil {
    93  		return nil, err
    94  	}
    95  	x := &indexGatewayQueryIndexClient{stream}
    96  	if err := x.ClientStream.SendMsg(in); err != nil {
    97  		return nil, err
    98  	}
    99  	if err := x.ClientStream.CloseSend(); err != nil {
   100  		return nil, err
   101  	}
   102  	return x, nil
   103  }
   104  
   105  type IndexGateway_QueryIndexClient interface {
   106  	Recv() (*QueryIndexResponse, error)
   107  	grpc.ClientStream
   108  }
   109  
   110  type indexGatewayQueryIndexClient struct {
   111  	grpc.ClientStream
   112  }
   113  
   114  func (x *indexGatewayQueryIndexClient) Recv() (*QueryIndexResponse, error) {
   115  	m := new(QueryIndexResponse)
   116  	if err := x.ClientStream.RecvMsg(m); err != nil {
   117  		return nil, err
   118  	}
   119  	return m, nil
   120  }
   121  
   122  func (c *indexGatewayClient) GetChunkRef(ctx context.Context, in *GetChunkRefRequest, opts ...grpc.CallOption) (*GetChunkRefResponse, error) {
   123  	out := new(GetChunkRefResponse)
   124  	err := c.cc.Invoke(ctx, "/indexgatewaypb.IndexGateway/GetChunkRef", in, out, opts...)
   125  	if err != nil {
   126  		return nil, err
   127  	}
   128  	return out, nil
   129  }
   130  
   131  func (c *indexGatewayClient) GetSeries(ctx context.Context, in *GetSeriesRequest, opts ...grpc.CallOption) (*GetSeriesResponse, error) {
   132  	out := new(GetSeriesResponse)
   133  	err := c.cc.Invoke(ctx, "/indexgatewaypb.IndexGateway/GetSeries", in, out, opts...)
   134  	if err != nil {
   135  		return nil, err
   136  	}
   137  	return out, nil
   138  }
   139  
   140  func (c *indexGatewayClient) LabelNamesForMetricName(ctx context.Context, in *LabelNamesForMetricNameRequest, opts ...grpc.CallOption) (*LabelResponse, error) {
   141  	out := new(LabelResponse)
   142  	err := c.cc.Invoke(ctx, "/indexgatewaypb.IndexGateway/LabelNamesForMetricName", in, out, opts...)
   143  	if err != nil {
   144  		return nil, err
   145  	}
   146  	return out, nil
   147  }
   148  
   149  func (c *indexGatewayClient) LabelValuesForMetricName(ctx context.Context, in *LabelValuesForMetricNameRequest, opts ...grpc.CallOption) (*LabelResponse, error) {
   150  	out := new(LabelResponse)
   151  	err := c.cc.Invoke(ctx, "/indexgatewaypb.IndexGateway/LabelValuesForMetricName", in, out, opts...)
   152  	if err != nil {
   153  		return nil, err
   154  	}
   155  	return out, nil
   156  }
   157  
   158  func (c *indexGatewayClient) GetStats(ctx context.Context, in *IndexStatsRequest, opts ...grpc.CallOption) (*IndexStatsResponse, error) {
   159  	out := new(IndexStatsResponse)
   160  	err := c.cc.Invoke(ctx, "/indexgatewaypb.IndexGateway/GetStats", in, out, opts...)
   161  	if err != nil {
   162  		return nil, err
   163  	}
   164  	return out, nil
   165  }
   166  
   167  // IndexGatewayServer is the server API for IndexGateway service.
   168  type IndexGatewayServer interface {
   169  	/// QueryIndex reads the indexes required for given query & sends back the batch of rows
   170  	/// in rpc streams
   171  	QueryIndex(*QueryIndexRequest, IndexGateway_QueryIndexServer) error
   172  	/// GetChunkRef returns chunk reference that match the provided label matchers
   173  	GetChunkRef(context.Context, *GetChunkRefRequest) (*GetChunkRefResponse, error)
   174  	GetSeries(context.Context, *GetSeriesRequest) (*GetSeriesResponse, error)
   175  	LabelNamesForMetricName(context.Context, *LabelNamesForMetricNameRequest) (*LabelResponse, error)
   176  	LabelValuesForMetricName(context.Context, *LabelValuesForMetricNameRequest) (*LabelResponse, error)
   177  	// Note: this MUST be the same as the variant defined in
   178  	// logproto.proto on the Querier service.
   179  	GetStats(context.Context, *IndexStatsRequest) (*IndexStatsResponse, error)
   180  }
   181  
   182  // UnimplementedIndexGatewayServer can be embedded to have forward compatible implementations.
   183  type UnimplementedIndexGatewayServer struct {
   184  }
   185  
   186  func (*UnimplementedIndexGatewayServer) QueryIndex(req *QueryIndexRequest, srv IndexGateway_QueryIndexServer) error {
   187  	return status.Errorf(codes.Unimplemented, "method QueryIndex not implemented")
   188  }
   189  func (*UnimplementedIndexGatewayServer) GetChunkRef(ctx context.Context, req *GetChunkRefRequest) (*GetChunkRefResponse, error) {
   190  	return nil, status.Errorf(codes.Unimplemented, "method GetChunkRef not implemented")
   191  }
   192  func (*UnimplementedIndexGatewayServer) GetSeries(ctx context.Context, req *GetSeriesRequest) (*GetSeriesResponse, error) {
   193  	return nil, status.Errorf(codes.Unimplemented, "method GetSeries not implemented")
   194  }
   195  func (*UnimplementedIndexGatewayServer) LabelNamesForMetricName(ctx context.Context, req *LabelNamesForMetricNameRequest) (*LabelResponse, error) {
   196  	return nil, status.Errorf(codes.Unimplemented, "method LabelNamesForMetricName not implemented")
   197  }
   198  func (*UnimplementedIndexGatewayServer) LabelValuesForMetricName(ctx context.Context, req *LabelValuesForMetricNameRequest) (*LabelResponse, error) {
   199  	return nil, status.Errorf(codes.Unimplemented, "method LabelValuesForMetricName not implemented")
   200  }
   201  func (*UnimplementedIndexGatewayServer) GetStats(ctx context.Context, req *IndexStatsRequest) (*IndexStatsResponse, error) {
   202  	return nil, status.Errorf(codes.Unimplemented, "method GetStats not implemented")
   203  }
   204  
   205  func RegisterIndexGatewayServer(s *grpc.Server, srv IndexGatewayServer) {
   206  	s.RegisterService(&_IndexGateway_serviceDesc, srv)
   207  }
   208  
   209  func _IndexGateway_QueryIndex_Handler(srv interface{}, stream grpc.ServerStream) error {
   210  	m := new(QueryIndexRequest)
   211  	if err := stream.RecvMsg(m); err != nil {
   212  		return err
   213  	}
   214  	return srv.(IndexGatewayServer).QueryIndex(m, &indexGatewayQueryIndexServer{stream})
   215  }
   216  
   217  type IndexGateway_QueryIndexServer interface {
   218  	Send(*QueryIndexResponse) error
   219  	grpc.ServerStream
   220  }
   221  
   222  type indexGatewayQueryIndexServer struct {
   223  	grpc.ServerStream
   224  }
   225  
   226  func (x *indexGatewayQueryIndexServer) Send(m *QueryIndexResponse) error {
   227  	return x.ServerStream.SendMsg(m)
   228  }
   229  
   230  func _IndexGateway_GetChunkRef_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   231  	in := new(GetChunkRefRequest)
   232  	if err := dec(in); err != nil {
   233  		return nil, err
   234  	}
   235  	if interceptor == nil {
   236  		return srv.(IndexGatewayServer).GetChunkRef(ctx, in)
   237  	}
   238  	info := &grpc.UnaryServerInfo{
   239  		Server:     srv,
   240  		FullMethod: "/indexgatewaypb.IndexGateway/GetChunkRef",
   241  	}
   242  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   243  		return srv.(IndexGatewayServer).GetChunkRef(ctx, req.(*GetChunkRefRequest))
   244  	}
   245  	return interceptor(ctx, in, info, handler)
   246  }
   247  
   248  func _IndexGateway_GetSeries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   249  	in := new(GetSeriesRequest)
   250  	if err := dec(in); err != nil {
   251  		return nil, err
   252  	}
   253  	if interceptor == nil {
   254  		return srv.(IndexGatewayServer).GetSeries(ctx, in)
   255  	}
   256  	info := &grpc.UnaryServerInfo{
   257  		Server:     srv,
   258  		FullMethod: "/indexgatewaypb.IndexGateway/GetSeries",
   259  	}
   260  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   261  		return srv.(IndexGatewayServer).GetSeries(ctx, req.(*GetSeriesRequest))
   262  	}
   263  	return interceptor(ctx, in, info, handler)
   264  }
   265  
   266  func _IndexGateway_LabelNamesForMetricName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   267  	in := new(LabelNamesForMetricNameRequest)
   268  	if err := dec(in); err != nil {
   269  		return nil, err
   270  	}
   271  	if interceptor == nil {
   272  		return srv.(IndexGatewayServer).LabelNamesForMetricName(ctx, in)
   273  	}
   274  	info := &grpc.UnaryServerInfo{
   275  		Server:     srv,
   276  		FullMethod: "/indexgatewaypb.IndexGateway/LabelNamesForMetricName",
   277  	}
   278  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   279  		return srv.(IndexGatewayServer).LabelNamesForMetricName(ctx, req.(*LabelNamesForMetricNameRequest))
   280  	}
   281  	return interceptor(ctx, in, info, handler)
   282  }
   283  
   284  func _IndexGateway_LabelValuesForMetricName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   285  	in := new(LabelValuesForMetricNameRequest)
   286  	if err := dec(in); err != nil {
   287  		return nil, err
   288  	}
   289  	if interceptor == nil {
   290  		return srv.(IndexGatewayServer).LabelValuesForMetricName(ctx, in)
   291  	}
   292  	info := &grpc.UnaryServerInfo{
   293  		Server:     srv,
   294  		FullMethod: "/indexgatewaypb.IndexGateway/LabelValuesForMetricName",
   295  	}
   296  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   297  		return srv.(IndexGatewayServer).LabelValuesForMetricName(ctx, req.(*LabelValuesForMetricNameRequest))
   298  	}
   299  	return interceptor(ctx, in, info, handler)
   300  }
   301  
   302  func _IndexGateway_GetStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   303  	in := new(IndexStatsRequest)
   304  	if err := dec(in); err != nil {
   305  		return nil, err
   306  	}
   307  	if interceptor == nil {
   308  		return srv.(IndexGatewayServer).GetStats(ctx, in)
   309  	}
   310  	info := &grpc.UnaryServerInfo{
   311  		Server:     srv,
   312  		FullMethod: "/indexgatewaypb.IndexGateway/GetStats",
   313  	}
   314  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   315  		return srv.(IndexGatewayServer).GetStats(ctx, req.(*IndexStatsRequest))
   316  	}
   317  	return interceptor(ctx, in, info, handler)
   318  }
   319  
   320  var _IndexGateway_serviceDesc = grpc.ServiceDesc{
   321  	ServiceName: "indexgatewaypb.IndexGateway",
   322  	HandlerType: (*IndexGatewayServer)(nil),
   323  	Methods: []grpc.MethodDesc{
   324  		{
   325  			MethodName: "GetChunkRef",
   326  			Handler:    _IndexGateway_GetChunkRef_Handler,
   327  		},
   328  		{
   329  			MethodName: "GetSeries",
   330  			Handler:    _IndexGateway_GetSeries_Handler,
   331  		},
   332  		{
   333  			MethodName: "LabelNamesForMetricName",
   334  			Handler:    _IndexGateway_LabelNamesForMetricName_Handler,
   335  		},
   336  		{
   337  			MethodName: "LabelValuesForMetricName",
   338  			Handler:    _IndexGateway_LabelValuesForMetricName_Handler,
   339  		},
   340  		{
   341  			MethodName: "GetStats",
   342  			Handler:    _IndexGateway_GetStats_Handler,
   343  		},
   344  	},
   345  	Streams: []grpc.StreamDesc{
   346  		{
   347  			StreamName:    "QueryIndex",
   348  			Handler:       _IndexGateway_QueryIndex_Handler,
   349  			ServerStreams: true,
   350  		},
   351  	},
   352  	Metadata: "pkg/logproto/indexgateway.proto",
   353  }