github.com/muhammadn/cortex@v1.9.1-0.20220510110439-46bb7000d03d/pkg/storegateway/storegatewaypb/gateway.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: gateway.proto 3 4 package storegatewaypb 5 6 import ( 7 context "context" 8 fmt "fmt" 9 proto "github.com/gogo/protobuf/proto" 10 storepb "github.com/thanos-io/thanos/pkg/store/storepb" 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("gateway.proto", fileDescriptor_f1a937782ebbded5) } 29 30 var fileDescriptor_f1a937782ebbded5 = []byte{ 31 // 257 bytes of a gzipped FileDescriptorProto 32 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4d, 0x4f, 0x2c, 0x49, 33 0x2d, 0x4f, 0xac, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x84, 0x72, 0x0b, 0x92, 0xa4, 34 0xcc, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0x4b, 0x32, 0x12, 0xf3, 35 0xf2, 0x8b, 0x75, 0x33, 0xf3, 0xa1, 0x2c, 0xfd, 0x82, 0xec, 0x74, 0xfd, 0xe2, 0x92, 0xfc, 0xa2, 36 0x54, 0x08, 0x59, 0x90, 0xa4, 0x5f, 0x54, 0x90, 0x0c, 0x31, 0xc3, 0xe8, 0x1a, 0x23, 0x17, 0x4f, 37 0x30, 0x48, 0xd4, 0x1d, 0x62, 0x96, 0x90, 0x25, 0x17, 0x5b, 0x70, 0x6a, 0x51, 0x66, 0x6a, 0xb1, 38 0x90, 0xa8, 0x1e, 0x44, 0xbf, 0x1e, 0x84, 0x1f, 0x94, 0x5a, 0x58, 0x9a, 0x5a, 0x5c, 0x22, 0x25, 39 0x86, 0x2e, 0x5c, 0x5c, 0x90, 0x9f, 0x57, 0x9c, 0x6a, 0xc0, 0x28, 0xe4, 0xcc, 0xc5, 0xe5, 0x93, 40 0x98, 0x94, 0x9a, 0xe3, 0x97, 0x98, 0x9b, 0x5a, 0x2c, 0x24, 0x09, 0x53, 0x87, 0x10, 0x83, 0x19, 41 0x21, 0x85, 0x4d, 0x0a, 0x62, 0x8c, 0x90, 0x1b, 0x17, 0x37, 0x58, 0x34, 0x2c, 0x31, 0xa7, 0x34, 42 0xb5, 0x58, 0x08, 0x55, 0x29, 0x44, 0x10, 0x66, 0x8c, 0x34, 0x56, 0x39, 0x88, 0x39, 0x4e, 0x2e, 43 0x17, 0x1e, 0xca, 0x31, 0xdc, 0x78, 0x28, 0xc7, 0xf0, 0xe1, 0xa1, 0x1c, 0x63, 0xc3, 0x23, 0x39, 44 0xc6, 0x15, 0x8f, 0xe4, 0x18, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 45 0x39, 0xc6, 0x17, 0x8f, 0xe4, 0x18, 0x3e, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 46 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0xf8, 0xc0, 0x21, 0x04, 0x0f, 0xd7, 0x24, 0x36, 47 0x70, 0x28, 0x19, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x1b, 0xec, 0xe6, 0x0a, 0x7a, 0x01, 0x00, 48 0x00, 49 } 50 51 // Reference imports to suppress errors if they are not otherwise used. 52 var _ context.Context 53 var _ grpc.ClientConn 54 55 // This is a compile-time assertion to ensure that this generated file 56 // is compatible with the grpc package it is being compiled against. 57 const _ = grpc.SupportPackageIsVersion4 58 59 // StoreGatewayClient is the client API for StoreGateway service. 60 // 61 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 62 type StoreGatewayClient interface { 63 // Series streams each Series for given label matchers and time range. 64 // 65 // Series should strictly stream full series after series, optionally split by time. This means that a single frame can contain 66 // partition of the single series, but once a new series is started to be streamed it means that no more data will 67 // be sent for previous one. 68 // 69 // Series are sorted. 70 Series(ctx context.Context, in *storepb.SeriesRequest, opts ...grpc.CallOption) (StoreGateway_SeriesClient, error) 71 // LabelNames returns all label names that is available. 72 LabelNames(ctx context.Context, in *storepb.LabelNamesRequest, opts ...grpc.CallOption) (*storepb.LabelNamesResponse, error) 73 // LabelValues returns all label values for given label name. 74 LabelValues(ctx context.Context, in *storepb.LabelValuesRequest, opts ...grpc.CallOption) (*storepb.LabelValuesResponse, error) 75 } 76 77 type storeGatewayClient struct { 78 cc *grpc.ClientConn 79 } 80 81 func NewStoreGatewayClient(cc *grpc.ClientConn) StoreGatewayClient { 82 return &storeGatewayClient{cc} 83 } 84 85 func (c *storeGatewayClient) Series(ctx context.Context, in *storepb.SeriesRequest, opts ...grpc.CallOption) (StoreGateway_SeriesClient, error) { 86 stream, err := c.cc.NewStream(ctx, &_StoreGateway_serviceDesc.Streams[0], "/gatewaypb.StoreGateway/Series", opts...) 87 if err != nil { 88 return nil, err 89 } 90 x := &storeGatewaySeriesClient{stream} 91 if err := x.ClientStream.SendMsg(in); err != nil { 92 return nil, err 93 } 94 if err := x.ClientStream.CloseSend(); err != nil { 95 return nil, err 96 } 97 return x, nil 98 } 99 100 type StoreGateway_SeriesClient interface { 101 Recv() (*storepb.SeriesResponse, error) 102 grpc.ClientStream 103 } 104 105 type storeGatewaySeriesClient struct { 106 grpc.ClientStream 107 } 108 109 func (x *storeGatewaySeriesClient) Recv() (*storepb.SeriesResponse, error) { 110 m := new(storepb.SeriesResponse) 111 if err := x.ClientStream.RecvMsg(m); err != nil { 112 return nil, err 113 } 114 return m, nil 115 } 116 117 func (c *storeGatewayClient) LabelNames(ctx context.Context, in *storepb.LabelNamesRequest, opts ...grpc.CallOption) (*storepb.LabelNamesResponse, error) { 118 out := new(storepb.LabelNamesResponse) 119 err := c.cc.Invoke(ctx, "/gatewaypb.StoreGateway/LabelNames", in, out, opts...) 120 if err != nil { 121 return nil, err 122 } 123 return out, nil 124 } 125 126 func (c *storeGatewayClient) LabelValues(ctx context.Context, in *storepb.LabelValuesRequest, opts ...grpc.CallOption) (*storepb.LabelValuesResponse, error) { 127 out := new(storepb.LabelValuesResponse) 128 err := c.cc.Invoke(ctx, "/gatewaypb.StoreGateway/LabelValues", in, out, opts...) 129 if err != nil { 130 return nil, err 131 } 132 return out, nil 133 } 134 135 // StoreGatewayServer is the server API for StoreGateway service. 136 type StoreGatewayServer interface { 137 // Series streams each Series for given label matchers and time range. 138 // 139 // Series should strictly stream full series after series, optionally split by time. This means that a single frame can contain 140 // partition of the single series, but once a new series is started to be streamed it means that no more data will 141 // be sent for previous one. 142 // 143 // Series are sorted. 144 Series(*storepb.SeriesRequest, StoreGateway_SeriesServer) error 145 // LabelNames returns all label names that is available. 146 LabelNames(context.Context, *storepb.LabelNamesRequest) (*storepb.LabelNamesResponse, error) 147 // LabelValues returns all label values for given label name. 148 LabelValues(context.Context, *storepb.LabelValuesRequest) (*storepb.LabelValuesResponse, error) 149 } 150 151 // UnimplementedStoreGatewayServer can be embedded to have forward compatible implementations. 152 type UnimplementedStoreGatewayServer struct { 153 } 154 155 func (*UnimplementedStoreGatewayServer) Series(req *storepb.SeriesRequest, srv StoreGateway_SeriesServer) error { 156 return status.Errorf(codes.Unimplemented, "method Series not implemented") 157 } 158 func (*UnimplementedStoreGatewayServer) LabelNames(ctx context.Context, req *storepb.LabelNamesRequest) (*storepb.LabelNamesResponse, error) { 159 return nil, status.Errorf(codes.Unimplemented, "method LabelNames not implemented") 160 } 161 func (*UnimplementedStoreGatewayServer) LabelValues(ctx context.Context, req *storepb.LabelValuesRequest) (*storepb.LabelValuesResponse, error) { 162 return nil, status.Errorf(codes.Unimplemented, "method LabelValues not implemented") 163 } 164 165 func RegisterStoreGatewayServer(s *grpc.Server, srv StoreGatewayServer) { 166 s.RegisterService(&_StoreGateway_serviceDesc, srv) 167 } 168 169 func _StoreGateway_Series_Handler(srv interface{}, stream grpc.ServerStream) error { 170 m := new(storepb.SeriesRequest) 171 if err := stream.RecvMsg(m); err != nil { 172 return err 173 } 174 return srv.(StoreGatewayServer).Series(m, &storeGatewaySeriesServer{stream}) 175 } 176 177 type StoreGateway_SeriesServer interface { 178 Send(*storepb.SeriesResponse) error 179 grpc.ServerStream 180 } 181 182 type storeGatewaySeriesServer struct { 183 grpc.ServerStream 184 } 185 186 func (x *storeGatewaySeriesServer) Send(m *storepb.SeriesResponse) error { 187 return x.ServerStream.SendMsg(m) 188 } 189 190 func _StoreGateway_LabelNames_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 191 in := new(storepb.LabelNamesRequest) 192 if err := dec(in); err != nil { 193 return nil, err 194 } 195 if interceptor == nil { 196 return srv.(StoreGatewayServer).LabelNames(ctx, in) 197 } 198 info := &grpc.UnaryServerInfo{ 199 Server: srv, 200 FullMethod: "/gatewaypb.StoreGateway/LabelNames", 201 } 202 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 203 return srv.(StoreGatewayServer).LabelNames(ctx, req.(*storepb.LabelNamesRequest)) 204 } 205 return interceptor(ctx, in, info, handler) 206 } 207 208 func _StoreGateway_LabelValues_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 209 in := new(storepb.LabelValuesRequest) 210 if err := dec(in); err != nil { 211 return nil, err 212 } 213 if interceptor == nil { 214 return srv.(StoreGatewayServer).LabelValues(ctx, in) 215 } 216 info := &grpc.UnaryServerInfo{ 217 Server: srv, 218 FullMethod: "/gatewaypb.StoreGateway/LabelValues", 219 } 220 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 221 return srv.(StoreGatewayServer).LabelValues(ctx, req.(*storepb.LabelValuesRequest)) 222 } 223 return interceptor(ctx, in, info, handler) 224 } 225 226 var _StoreGateway_serviceDesc = grpc.ServiceDesc{ 227 ServiceName: "gatewaypb.StoreGateway", 228 HandlerType: (*StoreGatewayServer)(nil), 229 Methods: []grpc.MethodDesc{ 230 { 231 MethodName: "LabelNames", 232 Handler: _StoreGateway_LabelNames_Handler, 233 }, 234 { 235 MethodName: "LabelValues", 236 Handler: _StoreGateway_LabelValues_Handler, 237 }, 238 }, 239 Streams: []grpc.StreamDesc{ 240 { 241 StreamName: "Series", 242 Handler: _StoreGateway_Series_Handler, 243 ServerStreams: true, 244 }, 245 }, 246 Metadata: "gateway.proto", 247 }