mirror of https://github.com/grafana/loki
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
249 lines
9.7 KiB
249 lines
9.7 KiB
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
// source: pkg/storegateway/storegatewaypb/gateway.proto
|
|
|
|
package storegatewaypb
|
|
|
|
import (
|
|
context "context"
|
|
fmt "fmt"
|
|
proto "github.com/gogo/protobuf/proto"
|
|
storepb "github.com/thanos-io/thanos/pkg/store/storepb"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
math "math"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
|
|
|
func init() {
|
|
proto.RegisterFile("pkg/storegateway/storegatewaypb/gateway.proto", fileDescriptor_3b0b40cab91a425a)
|
|
}
|
|
|
|
var fileDescriptor_3b0b40cab91a425a = []byte{
|
|
// 262 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x2d, 0xc8, 0x4e, 0xd7,
|
|
0x2f, 0x2e, 0xc9, 0x2f, 0x4a, 0x4d, 0x4f, 0x2c, 0x49, 0x2d, 0x4f, 0xac, 0x44, 0xe1, 0x14, 0x24,
|
|
0xe9, 0x43, 0x59, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x9c, 0x70, 0x09, 0x29, 0xf3, 0xf4,
|
|
0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0xfd, 0x92, 0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x8d, 0xc7, 0x72, 0x0c, 0x51, 0x7c,
|
|
0xa8, 0x01, 0x9e, 0xc4, 0x06, 0x0e, 0x25, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x5e, 0xed,
|
|
0xb4, 0x59, 0x9a, 0x01, 0x00, 0x00,
|
|
}
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ context.Context
|
|
var _ grpc.ClientConn
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
const _ = grpc.SupportPackageIsVersion4
|
|
|
|
// StoreGatewayClient is the client API for StoreGateway service.
|
|
//
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
type StoreGatewayClient interface {
|
|
// Series streams each Series for given label matchers and time range.
|
|
//
|
|
// Series should strictly stream full series after series, optionally split by time. This means that a single frame can contain
|
|
// partition of the single series, but once a new series is started to be streamed it means that no more data will
|
|
// be sent for previous one.
|
|
//
|
|
// Series are sorted.
|
|
Series(ctx context.Context, in *storepb.SeriesRequest, opts ...grpc.CallOption) (StoreGateway_SeriesClient, error)
|
|
// LabelNames returns all label names that is available.
|
|
LabelNames(ctx context.Context, in *storepb.LabelNamesRequest, opts ...grpc.CallOption) (*storepb.LabelNamesResponse, error)
|
|
// LabelValues returns all label values for given label name.
|
|
LabelValues(ctx context.Context, in *storepb.LabelValuesRequest, opts ...grpc.CallOption) (*storepb.LabelValuesResponse, error)
|
|
}
|
|
|
|
type storeGatewayClient struct {
|
|
cc *grpc.ClientConn
|
|
}
|
|
|
|
func NewStoreGatewayClient(cc *grpc.ClientConn) StoreGatewayClient {
|
|
return &storeGatewayClient{cc}
|
|
}
|
|
|
|
func (c *storeGatewayClient) Series(ctx context.Context, in *storepb.SeriesRequest, opts ...grpc.CallOption) (StoreGateway_SeriesClient, error) {
|
|
stream, err := c.cc.NewStream(ctx, &_StoreGateway_serviceDesc.Streams[0], "/gatewaypb.StoreGateway/Series", opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
x := &storeGatewaySeriesClient{stream}
|
|
if err := x.ClientStream.SendMsg(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if err := x.ClientStream.CloseSend(); err != nil {
|
|
return nil, err
|
|
}
|
|
return x, nil
|
|
}
|
|
|
|
type StoreGateway_SeriesClient interface {
|
|
Recv() (*storepb.SeriesResponse, error)
|
|
grpc.ClientStream
|
|
}
|
|
|
|
type storeGatewaySeriesClient struct {
|
|
grpc.ClientStream
|
|
}
|
|
|
|
func (x *storeGatewaySeriesClient) Recv() (*storepb.SeriesResponse, error) {
|
|
m := new(storepb.SeriesResponse)
|
|
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
func (c *storeGatewayClient) LabelNames(ctx context.Context, in *storepb.LabelNamesRequest, opts ...grpc.CallOption) (*storepb.LabelNamesResponse, error) {
|
|
out := new(storepb.LabelNamesResponse)
|
|
err := c.cc.Invoke(ctx, "/gatewaypb.StoreGateway/LabelNames", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *storeGatewayClient) LabelValues(ctx context.Context, in *storepb.LabelValuesRequest, opts ...grpc.CallOption) (*storepb.LabelValuesResponse, error) {
|
|
out := new(storepb.LabelValuesResponse)
|
|
err := c.cc.Invoke(ctx, "/gatewaypb.StoreGateway/LabelValues", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// StoreGatewayServer is the server API for StoreGateway service.
|
|
type StoreGatewayServer interface {
|
|
// Series streams each Series for given label matchers and time range.
|
|
//
|
|
// Series should strictly stream full series after series, optionally split by time. This means that a single frame can contain
|
|
// partition of the single series, but once a new series is started to be streamed it means that no more data will
|
|
// be sent for previous one.
|
|
//
|
|
// Series are sorted.
|
|
Series(*storepb.SeriesRequest, StoreGateway_SeriesServer) error
|
|
// LabelNames returns all label names that is available.
|
|
LabelNames(context.Context, *storepb.LabelNamesRequest) (*storepb.LabelNamesResponse, error)
|
|
// LabelValues returns all label values for given label name.
|
|
LabelValues(context.Context, *storepb.LabelValuesRequest) (*storepb.LabelValuesResponse, error)
|
|
}
|
|
|
|
// UnimplementedStoreGatewayServer can be embedded to have forward compatible implementations.
|
|
type UnimplementedStoreGatewayServer struct {
|
|
}
|
|
|
|
func (*UnimplementedStoreGatewayServer) Series(req *storepb.SeriesRequest, srv StoreGateway_SeriesServer) error {
|
|
return status.Errorf(codes.Unimplemented, "method Series not implemented")
|
|
}
|
|
func (*UnimplementedStoreGatewayServer) LabelNames(ctx context.Context, req *storepb.LabelNamesRequest) (*storepb.LabelNamesResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method LabelNames not implemented")
|
|
}
|
|
func (*UnimplementedStoreGatewayServer) LabelValues(ctx context.Context, req *storepb.LabelValuesRequest) (*storepb.LabelValuesResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method LabelValues not implemented")
|
|
}
|
|
|
|
func RegisterStoreGatewayServer(s *grpc.Server, srv StoreGatewayServer) {
|
|
s.RegisterService(&_StoreGateway_serviceDesc, srv)
|
|
}
|
|
|
|
func _StoreGateway_Series_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
m := new(storepb.SeriesRequest)
|
|
if err := stream.RecvMsg(m); err != nil {
|
|
return err
|
|
}
|
|
return srv.(StoreGatewayServer).Series(m, &storeGatewaySeriesServer{stream})
|
|
}
|
|
|
|
type StoreGateway_SeriesServer interface {
|
|
Send(*storepb.SeriesResponse) error
|
|
grpc.ServerStream
|
|
}
|
|
|
|
type storeGatewaySeriesServer struct {
|
|
grpc.ServerStream
|
|
}
|
|
|
|
func (x *storeGatewaySeriesServer) Send(m *storepb.SeriesResponse) error {
|
|
return x.ServerStream.SendMsg(m)
|
|
}
|
|
|
|
func _StoreGateway_LabelNames_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(storepb.LabelNamesRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(StoreGatewayServer).LabelNames(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/gatewaypb.StoreGateway/LabelNames",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(StoreGatewayServer).LabelNames(ctx, req.(*storepb.LabelNamesRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _StoreGateway_LabelValues_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(storepb.LabelValuesRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(StoreGatewayServer).LabelValues(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/gatewaypb.StoreGateway/LabelValues",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(StoreGatewayServer).LabelValues(ctx, req.(*storepb.LabelValuesRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
var _StoreGateway_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "gatewaypb.StoreGateway",
|
|
HandlerType: (*StoreGatewayServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "LabelNames",
|
|
Handler: _StoreGateway_LabelNames_Handler,
|
|
},
|
|
{
|
|
MethodName: "LabelValues",
|
|
Handler: _StoreGateway_LabelValues_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{
|
|
{
|
|
StreamName: "Series",
|
|
Handler: _StoreGateway_Series_Handler,
|
|
ServerStreams: true,
|
|
},
|
|
},
|
|
Metadata: "pkg/storegateway/storegatewaypb/gateway.proto",
|
|
}
|
|
|