github.com/alibaba/ilogtail/pkg@v0.0.0-20250526110833-c53b480d046c/protocol/sls_logs_transfer.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: sls_logs_transfer.proto 3 4 package protocol 5 6 import ( 7 context "context" 8 fmt "fmt" 9 _ "github.com/gogo/protobuf/gogoproto" 10 github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" 11 proto "github.com/gogo/protobuf/proto" 12 grpc "google.golang.org/grpc" 13 codes "google.golang.org/grpc/codes" 14 status "google.golang.org/grpc/status" 15 io "io" 16 math "math" 17 math_bits "math/bits" 18 ) 19 20 // Reference imports to suppress errors if they are not otherwise used. 21 var _ = proto.Marshal 22 var _ = fmt.Errorf 23 var _ = math.Inf 24 25 // This is a compile-time assertion to ensure that this generated file 26 // is compatible with the proto package it is being compiled against. 27 // A compilation error at this line likely means your copy of the 28 // proto package needs to be updated. 29 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 30 31 type ResponseCode int32 32 33 const ( 34 ResponseCode_Success ResponseCode = 0 35 ResponseCode_Failure ResponseCode = 1 36 ) 37 38 var ResponseCode_name = map[int32]string{ 39 0: "Success", 40 1: "Failure", 41 } 42 43 var ResponseCode_value = map[string]int32{ 44 "Success": 0, 45 "Failure": 1, 46 } 47 48 func (x ResponseCode) Enum() *ResponseCode { 49 p := new(ResponseCode) 50 *p = x 51 return p 52 } 53 54 func (x ResponseCode) String() string { 55 return proto.EnumName(ResponseCode_name, int32(x)) 56 } 57 58 func (x *ResponseCode) UnmarshalJSON(data []byte) error { 59 value, err := proto.UnmarshalJSONEnum(ResponseCode_value, data, "ResponseCode") 60 if err != nil { 61 return err 62 } 63 *x = ResponseCode(value) 64 return nil 65 } 66 67 func (ResponseCode) EnumDescriptor() ([]byte, []int) { 68 return fileDescriptor_6bc5040594756632, []int{0} 69 } 70 71 type Response struct { 72 Code ResponseCode `protobuf:"varint,1,req,name=code,enum=sls_logs.ResponseCode" json:"code"` 73 Message string `protobuf:"bytes,2,req,name=message" json:"message"` 74 } 75 76 func (m *Response) Reset() { *m = Response{} } 77 func (m *Response) String() string { return proto.CompactTextString(m) } 78 func (*Response) ProtoMessage() {} 79 func (*Response) Descriptor() ([]byte, []int) { 80 return fileDescriptor_6bc5040594756632, []int{0} 81 } 82 func (m *Response) XXX_Unmarshal(b []byte) error { 83 return m.Unmarshal(b) 84 } 85 func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 86 if deterministic { 87 return xxx_messageInfo_Response.Marshal(b, m, deterministic) 88 } else { 89 b = b[:cap(b)] 90 n, err := m.MarshalToSizedBuffer(b) 91 if err != nil { 92 return nil, err 93 } 94 return b[:n], nil 95 } 96 } 97 func (m *Response) XXX_Merge(src proto.Message) { 98 xxx_messageInfo_Response.Merge(m, src) 99 } 100 func (m *Response) XXX_Size() int { 101 return m.Size() 102 } 103 func (m *Response) XXX_DiscardUnknown() { 104 xxx_messageInfo_Response.DiscardUnknown(m) 105 } 106 107 var xxx_messageInfo_Response proto.InternalMessageInfo 108 109 func (m *Response) GetCode() ResponseCode { 110 if m != nil { 111 return m.Code 112 } 113 return ResponseCode_Success 114 } 115 116 func (m *Response) GetMessage() string { 117 if m != nil { 118 return m.Message 119 } 120 return "" 121 } 122 123 func init() { 124 proto.RegisterEnum("sls_logs.ResponseCode", ResponseCode_name, ResponseCode_value) 125 proto.RegisterType((*Response)(nil), "sls_logs.Response") 126 } 127 128 func init() { proto.RegisterFile("sls_logs_transfer.proto", fileDescriptor_6bc5040594756632) } 129 130 var fileDescriptor_6bc5040594756632 = []byte{ 131 // 281 bytes of a gzipped FileDescriptorProto 132 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x90, 0xcf, 0x4a, 0xf3, 0x40, 133 0x14, 0xc5, 0x67, 0x4a, 0xa1, 0xfd, 0xe6, 0x93, 0x52, 0x66, 0xa1, 0x25, 0x8b, 0xb1, 0x74, 0x15, 134 0x04, 0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, 0x1a, 0xa4, 0xe7, 0xfc, 0x67, 0xcc, 0x02, 0xd5, 0xad, 0xc5, 0x60, 146 0x22, 0xfe, 0x77, 0xe0, 0x84, 0xc4, 0x74, 0x7e, 0xb9, 0x2f, 0x05, 0x3d, 0x94, 0x82, 0xbe, 0x97, 147 0x82, 0xbe, 0x54, 0x82, 0x1c, 0x2a, 0x41, 0x5e, 0x2b, 0x41, 0xee, 0x23, 0x8d, 0xca, 0x67, 0xb9, 148 0x36, 0x3a, 0xa8, 0xbc, 0x48, 0xcc, 0x93, 0x6a, 0xae, 0x25, 0x51, 0x7f, 0x04, 0x00, 0x00, 0xff, 149 0xff, 0x45, 0x20, 0x1d, 0x03, 0x6b, 0x01, 0x00, 0x00, 150 } 151 152 // Reference imports to suppress errors if they are not otherwise used. 153 var _ context.Context 154 var _ grpc.ClientConn 155 156 // This is a compile-time assertion to ensure that this generated file 157 // is compatible with the grpc package it is being compiled against. 158 const _ = grpc.SupportPackageIsVersion4 159 160 // LogReportServiceClient is the client API for LogReportService service. 161 // 162 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 163 type LogReportServiceClient interface { 164 Collect(ctx context.Context, opts ...grpc.CallOption) (LogReportService_CollectClient, error) 165 } 166 167 type logReportServiceClient struct { 168 cc *grpc.ClientConn 169 } 170 171 func NewLogReportServiceClient(cc *grpc.ClientConn) LogReportServiceClient { 172 return &logReportServiceClient{cc} 173 } 174 175 func (c *logReportServiceClient) Collect(ctx context.Context, opts ...grpc.CallOption) (LogReportService_CollectClient, error) { 176 stream, err := c.cc.NewStream(ctx, &_LogReportService_serviceDesc.Streams[0], "/sls_logs.LogReportService/collect", opts...) 177 if err != nil { 178 return nil, err 179 } 180 x := &logReportServiceCollectClient{stream} 181 return x, nil 182 } 183 184 type LogReportService_CollectClient interface { 185 Send(*LogGroup) error 186 CloseAndRecv() (*Response, error) 187 grpc.ClientStream 188 } 189 190 type logReportServiceCollectClient struct { 191 grpc.ClientStream 192 } 193 194 func (x *logReportServiceCollectClient) Send(m *LogGroup) error { 195 return x.ClientStream.SendMsg(m) 196 } 197 198 func (x *logReportServiceCollectClient) CloseAndRecv() (*Response, error) { 199 if err := x.ClientStream.CloseSend(); err != nil { 200 return nil, err 201 } 202 m := new(Response) 203 if err := x.ClientStream.RecvMsg(m); err != nil { 204 return nil, err 205 } 206 return m, nil 207 } 208 209 // LogReportServiceServer is the server API for LogReportService service. 210 type LogReportServiceServer interface { 211 Collect(LogReportService_CollectServer) error 212 } 213 214 // UnimplementedLogReportServiceServer can be embedded to have forward compatible implementations. 215 type UnimplementedLogReportServiceServer struct { 216 } 217 218 func (*UnimplementedLogReportServiceServer) Collect(srv LogReportService_CollectServer) error { 219 return status.Errorf(codes.Unimplemented, "method Collect not implemented") 220 } 221 222 func RegisterLogReportServiceServer(s *grpc.Server, srv LogReportServiceServer) { 223 s.RegisterService(&_LogReportService_serviceDesc, srv) 224 } 225 226 func _LogReportService_Collect_Handler(srv interface{}, stream grpc.ServerStream) error { 227 return srv.(LogReportServiceServer).Collect(&logReportServiceCollectServer{stream}) 228 } 229 230 type LogReportService_CollectServer interface { 231 SendAndClose(*Response) error 232 Recv() (*LogGroup, error) 233 grpc.ServerStream 234 } 235 236 type logReportServiceCollectServer struct { 237 grpc.ServerStream 238 } 239 240 func (x *logReportServiceCollectServer) SendAndClose(m *Response) error { 241 return x.ServerStream.SendMsg(m) 242 } 243 244 func (x *logReportServiceCollectServer) Recv() (*LogGroup, error) { 245 m := new(LogGroup) 246 if err := x.ServerStream.RecvMsg(m); err != nil { 247 return nil, err 248 } 249 return m, nil 250 } 251 252 var _LogReportService_serviceDesc = grpc.ServiceDesc{ 253 ServiceName: "sls_logs.LogReportService", 254 HandlerType: (*LogReportServiceServer)(nil), 255 Methods: []grpc.MethodDesc{}, 256 Streams: []grpc.StreamDesc{ 257 { 258 StreamName: "collect", 259 Handler: _LogReportService_Collect_Handler, 260 ClientStreams: true, 261 }, 262 }, 263 Metadata: "sls_logs_transfer.proto", 264 } 265 266 func (m *Response) Marshal() (dAtA []byte, err error) { 267 size := m.Size() 268 dAtA = make([]byte, size) 269 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 270 if err != nil { 271 return nil, err 272 } 273 return dAtA[:n], nil 274 } 275 276 func (m *Response) MarshalTo(dAtA []byte) (int, error) { 277 size := m.Size() 278 return m.MarshalToSizedBuffer(dAtA[:size]) 279 } 280 281 func (m *Response) MarshalToSizedBuffer(dAtA []byte) (int, error) { 282 i := len(dAtA) 283 _ = i 284 var l int 285 _ = l 286 i -= len(m.Message) 287 copy(dAtA[i:], m.Message) 288 i = encodeVarintSlsLogsTransfer(dAtA, i, uint64(len(m.Message))) 289 i-- 290 dAtA[i] = 0x12 291 i = encodeVarintSlsLogsTransfer(dAtA, i, uint64(m.Code)) 292 i-- 293 dAtA[i] = 0x8 294 return len(dAtA) - i, nil 295 } 296 297 func encodeVarintSlsLogsTransfer(dAtA []byte, offset int, v uint64) int { 298 offset -= sovSlsLogsTransfer(v) 299 base := offset 300 for v >= 1<<7 { 301 dAtA[offset] = uint8(v&0x7f | 0x80) 302 v >>= 7 303 offset++ 304 } 305 dAtA[offset] = uint8(v) 306 return base 307 } 308 func (m *Response) Size() (n int) { 309 if m == nil { 310 return 0 311 } 312 var l int 313 _ = l 314 n += 1 + sovSlsLogsTransfer(uint64(m.Code)) 315 l = len(m.Message) 316 n += 1 + l + sovSlsLogsTransfer(uint64(l)) 317 return n 318 } 319 320 func sovSlsLogsTransfer(x uint64) (n int) { 321 return (math_bits.Len64(x|1) + 6) / 7 322 } 323 func sozSlsLogsTransfer(x uint64) (n int) { 324 return sovSlsLogsTransfer(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 325 } 326 func (m *Response) Unmarshal(dAtA []byte) error { 327 var hasFields [1]uint64 328 l := len(dAtA) 329 iNdEx := 0 330 for iNdEx < l { 331 preIndex := iNdEx 332 var wire uint64 333 for shift := uint(0); ; shift += 7 { 334 if shift >= 64 { 335 return ErrIntOverflowSlsLogsTransfer 336 } 337 if iNdEx >= l { 338 return io.ErrUnexpectedEOF 339 } 340 b := dAtA[iNdEx] 341 iNdEx++ 342 wire |= uint64(b&0x7F) << shift 343 if b < 0x80 { 344 break 345 } 346 } 347 fieldNum := int32(wire >> 3) 348 wireType := int(wire & 0x7) 349 if wireType == 4 { 350 return fmt.Errorf("proto: Response: wiretype end group for non-group") 351 } 352 if fieldNum <= 0 { 353 return fmt.Errorf("proto: Response: illegal tag %d (wire type %d)", fieldNum, wire) 354 } 355 switch fieldNum { 356 case 1: 357 if wireType != 0 { 358 return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) 359 } 360 m.Code = 0 361 for shift := uint(0); ; shift += 7 { 362 if shift >= 64 { 363 return ErrIntOverflowSlsLogsTransfer 364 } 365 if iNdEx >= l { 366 return io.ErrUnexpectedEOF 367 } 368 b := dAtA[iNdEx] 369 iNdEx++ 370 m.Code |= ResponseCode(b&0x7F) << shift 371 if b < 0x80 { 372 break 373 } 374 } 375 hasFields[0] |= uint64(0x00000001) 376 case 2: 377 if wireType != 2 { 378 return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) 379 } 380 var stringLen uint64 381 for shift := uint(0); ; shift += 7 { 382 if shift >= 64 { 383 return ErrIntOverflowSlsLogsTransfer 384 } 385 if iNdEx >= l { 386 return io.ErrUnexpectedEOF 387 } 388 b := dAtA[iNdEx] 389 iNdEx++ 390 stringLen |= uint64(b&0x7F) << shift 391 if b < 0x80 { 392 break 393 } 394 } 395 intStringLen := int(stringLen) 396 if intStringLen < 0 { 397 return ErrInvalidLengthSlsLogsTransfer 398 } 399 postIndex := iNdEx + intStringLen 400 if postIndex < 0 { 401 return ErrInvalidLengthSlsLogsTransfer 402 } 403 if postIndex > l { 404 return io.ErrUnexpectedEOF 405 } 406 m.Message = string(dAtA[iNdEx:postIndex]) 407 iNdEx = postIndex 408 hasFields[0] |= uint64(0x00000002) 409 default: 410 iNdEx = preIndex 411 skippy, err := skipSlsLogsTransfer(dAtA[iNdEx:]) 412 if err != nil { 413 return err 414 } 415 if (skippy < 0) || (iNdEx+skippy) < 0 { 416 return ErrInvalidLengthSlsLogsTransfer 417 } 418 if (iNdEx + skippy) > l { 419 return io.ErrUnexpectedEOF 420 } 421 iNdEx += skippy 422 } 423 } 424 if hasFields[0]&uint64(0x00000001) == 0 { 425 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("code") 426 } 427 if hasFields[0]&uint64(0x00000002) == 0 { 428 return github_com_gogo_protobuf_proto.NewRequiredNotSetError("message") 429 } 430 431 if iNdEx > l { 432 return io.ErrUnexpectedEOF 433 } 434 return nil 435 } 436 func skipSlsLogsTransfer(dAtA []byte) (n int, err error) { 437 l := len(dAtA) 438 iNdEx := 0 439 depth := 0 440 for iNdEx < l { 441 var wire uint64 442 for shift := uint(0); ; shift += 7 { 443 if shift >= 64 { 444 return 0, ErrIntOverflowSlsLogsTransfer 445 } 446 if iNdEx >= l { 447 return 0, io.ErrUnexpectedEOF 448 } 449 b := dAtA[iNdEx] 450 iNdEx++ 451 wire |= (uint64(b) & 0x7F) << shift 452 if b < 0x80 { 453 break 454 } 455 } 456 wireType := int(wire & 0x7) 457 switch wireType { 458 case 0: 459 for shift := uint(0); ; shift += 7 { 460 if shift >= 64 { 461 return 0, ErrIntOverflowSlsLogsTransfer 462 } 463 if iNdEx >= l { 464 return 0, io.ErrUnexpectedEOF 465 } 466 iNdEx++ 467 if dAtA[iNdEx-1] < 0x80 { 468 break 469 } 470 } 471 case 1: 472 iNdEx += 8 473 case 2: 474 var length int 475 for shift := uint(0); ; shift += 7 { 476 if shift >= 64 { 477 return 0, ErrIntOverflowSlsLogsTransfer 478 } 479 if iNdEx >= l { 480 return 0, io.ErrUnexpectedEOF 481 } 482 b := dAtA[iNdEx] 483 iNdEx++ 484 length |= (int(b) & 0x7F) << shift 485 if b < 0x80 { 486 break 487 } 488 } 489 if length < 0 { 490 return 0, ErrInvalidLengthSlsLogsTransfer 491 } 492 iNdEx += length 493 case 3: 494 depth++ 495 case 4: 496 if depth == 0 { 497 return 0, ErrUnexpectedEndOfGroupSlsLogsTransfer 498 } 499 depth-- 500 case 5: 501 iNdEx += 4 502 default: 503 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 504 } 505 if iNdEx < 0 { 506 return 0, ErrInvalidLengthSlsLogsTransfer 507 } 508 if depth == 0 { 509 return iNdEx, nil 510 } 511 } 512 return 0, io.ErrUnexpectedEOF 513 } 514 515 var ( 516 ErrInvalidLengthSlsLogsTransfer = fmt.Errorf("proto: negative length found during unmarshaling") 517 ErrIntOverflowSlsLogsTransfer = fmt.Errorf("proto: integer overflow") 518 ErrUnexpectedEndOfGroupSlsLogsTransfer = fmt.Errorf("proto: unexpected end of group") 519 )