github.com/onosproject/onos-api/go@v0.10.32/onos/fabricsim/fabricsim.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: onos/fabricsim/fabricsim.proto 3 4 package fabricsim 5 6 import ( 7 context "context" 8 fmt "fmt" 9 proto "github.com/gogo/protobuf/proto" 10 misc "github.com/onosproject/onos-api/go/onos/misc" 11 grpc "google.golang.org/grpc" 12 codes "google.golang.org/grpc/codes" 13 status "google.golang.org/grpc/status" 14 io "io" 15 math "math" 16 math_bits "math/bits" 17 ) 18 19 // Reference imports to suppress errors if they are not otherwise used. 20 var _ = proto.Marshal 21 var _ = fmt.Errorf 22 var _ = math.Inf 23 24 // This is a compile-time assertion to ensure that this generated file 25 // is compatible with the proto package it is being compiled against. 26 // A compilation error at this line likely means your copy of the 27 // proto package needs to be updated. 28 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 29 30 type GetIOStatsRequest struct { 31 } 32 33 func (m *GetIOStatsRequest) Reset() { *m = GetIOStatsRequest{} } 34 func (m *GetIOStatsRequest) String() string { return proto.CompactTextString(m) } 35 func (*GetIOStatsRequest) ProtoMessage() {} 36 func (*GetIOStatsRequest) Descriptor() ([]byte, []int) { 37 return fileDescriptor_f82323040cd66729, []int{0} 38 } 39 func (m *GetIOStatsRequest) XXX_Unmarshal(b []byte) error { 40 return m.Unmarshal(b) 41 } 42 func (m *GetIOStatsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 43 if deterministic { 44 return xxx_messageInfo_GetIOStatsRequest.Marshal(b, m, deterministic) 45 } else { 46 b = b[:cap(b)] 47 n, err := m.MarshalToSizedBuffer(b) 48 if err != nil { 49 return nil, err 50 } 51 return b[:n], nil 52 } 53 } 54 func (m *GetIOStatsRequest) XXX_Merge(src proto.Message) { 55 xxx_messageInfo_GetIOStatsRequest.Merge(m, src) 56 } 57 func (m *GetIOStatsRequest) XXX_Size() int { 58 return m.Size() 59 } 60 func (m *GetIOStatsRequest) XXX_DiscardUnknown() { 61 xxx_messageInfo_GetIOStatsRequest.DiscardUnknown(m) 62 } 63 64 var xxx_messageInfo_GetIOStatsRequest proto.InternalMessageInfo 65 66 type GetIOStatsResponse struct { 67 Stats []*misc.IOStats `protobuf:"bytes,1,rep,name=stats,proto3" json:"stats,omitempty"` 68 } 69 70 func (m *GetIOStatsResponse) Reset() { *m = GetIOStatsResponse{} } 71 func (m *GetIOStatsResponse) String() string { return proto.CompactTextString(m) } 72 func (*GetIOStatsResponse) ProtoMessage() {} 73 func (*GetIOStatsResponse) Descriptor() ([]byte, []int) { 74 return fileDescriptor_f82323040cd66729, []int{1} 75 } 76 func (m *GetIOStatsResponse) XXX_Unmarshal(b []byte) error { 77 return m.Unmarshal(b) 78 } 79 func (m *GetIOStatsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 80 if deterministic { 81 return xxx_messageInfo_GetIOStatsResponse.Marshal(b, m, deterministic) 82 } else { 83 b = b[:cap(b)] 84 n, err := m.MarshalToSizedBuffer(b) 85 if err != nil { 86 return nil, err 87 } 88 return b[:n], nil 89 } 90 } 91 func (m *GetIOStatsResponse) XXX_Merge(src proto.Message) { 92 xxx_messageInfo_GetIOStatsResponse.Merge(m, src) 93 } 94 func (m *GetIOStatsResponse) XXX_Size() int { 95 return m.Size() 96 } 97 func (m *GetIOStatsResponse) XXX_DiscardUnknown() { 98 xxx_messageInfo_GetIOStatsResponse.DiscardUnknown(m) 99 } 100 101 var xxx_messageInfo_GetIOStatsResponse proto.InternalMessageInfo 102 103 func (m *GetIOStatsResponse) GetStats() []*misc.IOStats { 104 if m != nil { 105 return m.Stats 106 } 107 return nil 108 } 109 110 func init() { 111 proto.RegisterType((*GetIOStatsRequest)(nil), "onos.fabricsim.GetIOStatsRequest") 112 proto.RegisterType((*GetIOStatsResponse)(nil), "onos.fabricsim.GetIOStatsResponse") 113 } 114 115 func init() { proto.RegisterFile("onos/fabricsim/fabricsim.proto", fileDescriptor_f82323040cd66729) } 116 117 var fileDescriptor_f82323040cd66729 = []byte{ 118 // 194 bytes of a gzipped FileDescriptorProto 119 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcb, 0xcf, 0xcb, 0x2f, 120 0xd6, 0x4f, 0x4b, 0x4c, 0x2a, 0xca, 0x4c, 0x2e, 0xce, 0xcc, 0x45, 0xb0, 0xf4, 0x0a, 0x8a, 0xf2, 121 0x4b, 0xf2, 0x85, 0xf8, 0x40, 0xf2, 0x7a, 0x70, 0x51, 0x29, 0x11, 0xb0, 0xfa, 0xdc, 0xcc, 0xe2, 122 0x64, 0x30, 0x01, 0x51, 0xa5, 0x24, 0xcc, 0x25, 0xe8, 0x9e, 0x5a, 0xe2, 0xe9, 0x1f, 0x5c, 0x92, 123 0x58, 0x52, 0x1c, 0x94, 0x5a, 0x58, 0x9a, 0x5a, 0x5c, 0xa2, 0x64, 0xc7, 0x25, 0x84, 0x2c, 0x58, 124 0x5c, 0x90, 0x9f, 0x57, 0x9c, 0x2a, 0xa4, 0xc1, 0xc5, 0x5a, 0x0c, 0x12, 0x90, 0x60, 0x54, 0x60, 125 0xd6, 0xe0, 0x36, 0x12, 0xd2, 0x03, 0x5b, 0x00, 0x36, 0x0b, 0xa6, 0x14, 0xa2, 0xc0, 0x28, 0x8d, 126 0x8b, 0xdf, 0x0d, 0x6c, 0x6f, 0x70, 0x66, 0x6e, 0x69, 0x4e, 0x62, 0x49, 0x7e, 0x91, 0x50, 0x30, 127 0x17, 0x17, 0xc2, 0x48, 0x21, 0x45, 0x3d, 0x54, 0xc7, 0xe9, 0x61, 0xb8, 0x41, 0x4a, 0x09, 0x9f, 128 0x12, 0x88, 0x8b, 0x9c, 0x24, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 129 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0x89, 130 0x0d, 0xec, 0x3b, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x67, 0x1f, 0xc4, 0xc2, 0x25, 0x01, 131 0x00, 0x00, 132 } 133 134 // Reference imports to suppress errors if they are not otherwise used. 135 var _ context.Context 136 var _ grpc.ClientConn 137 138 // This is a compile-time assertion to ensure that this generated file 139 // is compatible with the grpc package it is being compiled against. 140 const _ = grpc.SupportPackageIsVersion4 141 142 // FabricSimulatorClient is the client API for FabricSimulator service. 143 // 144 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 145 type FabricSimulatorClient interface { 146 // GetIOStats returns list of aggregate I/O stats. 147 GetIOStats(ctx context.Context, in *GetIOStatsRequest, opts ...grpc.CallOption) (*GetIOStatsResponse, error) 148 } 149 150 type fabricSimulatorClient struct { 151 cc *grpc.ClientConn 152 } 153 154 func NewFabricSimulatorClient(cc *grpc.ClientConn) FabricSimulatorClient { 155 return &fabricSimulatorClient{cc} 156 } 157 158 func (c *fabricSimulatorClient) GetIOStats(ctx context.Context, in *GetIOStatsRequest, opts ...grpc.CallOption) (*GetIOStatsResponse, error) { 159 out := new(GetIOStatsResponse) 160 err := c.cc.Invoke(ctx, "/onos.fabricsim.FabricSimulator/GetIOStats", in, out, opts...) 161 if err != nil { 162 return nil, err 163 } 164 return out, nil 165 } 166 167 // FabricSimulatorServer is the server API for FabricSimulator service. 168 type FabricSimulatorServer interface { 169 // GetIOStats returns list of aggregate I/O stats. 170 GetIOStats(context.Context, *GetIOStatsRequest) (*GetIOStatsResponse, error) 171 } 172 173 // UnimplementedFabricSimulatorServer can be embedded to have forward compatible implementations. 174 type UnimplementedFabricSimulatorServer struct { 175 } 176 177 func (*UnimplementedFabricSimulatorServer) GetIOStats(ctx context.Context, req *GetIOStatsRequest) (*GetIOStatsResponse, error) { 178 return nil, status.Errorf(codes.Unimplemented, "method GetIOStats not implemented") 179 } 180 181 func RegisterFabricSimulatorServer(s *grpc.Server, srv FabricSimulatorServer) { 182 s.RegisterService(&_FabricSimulator_serviceDesc, srv) 183 } 184 185 func _FabricSimulator_GetIOStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 186 in := new(GetIOStatsRequest) 187 if err := dec(in); err != nil { 188 return nil, err 189 } 190 if interceptor == nil { 191 return srv.(FabricSimulatorServer).GetIOStats(ctx, in) 192 } 193 info := &grpc.UnaryServerInfo{ 194 Server: srv, 195 FullMethod: "/onos.fabricsim.FabricSimulator/GetIOStats", 196 } 197 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 198 return srv.(FabricSimulatorServer).GetIOStats(ctx, req.(*GetIOStatsRequest)) 199 } 200 return interceptor(ctx, in, info, handler) 201 } 202 203 var _FabricSimulator_serviceDesc = grpc.ServiceDesc{ 204 ServiceName: "onos.fabricsim.FabricSimulator", 205 HandlerType: (*FabricSimulatorServer)(nil), 206 Methods: []grpc.MethodDesc{ 207 { 208 MethodName: "GetIOStats", 209 Handler: _FabricSimulator_GetIOStats_Handler, 210 }, 211 }, 212 Streams: []grpc.StreamDesc{}, 213 Metadata: "onos/fabricsim/fabricsim.proto", 214 } 215 216 func (m *GetIOStatsRequest) Marshal() (dAtA []byte, err error) { 217 size := m.Size() 218 dAtA = make([]byte, size) 219 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 220 if err != nil { 221 return nil, err 222 } 223 return dAtA[:n], nil 224 } 225 226 func (m *GetIOStatsRequest) MarshalTo(dAtA []byte) (int, error) { 227 size := m.Size() 228 return m.MarshalToSizedBuffer(dAtA[:size]) 229 } 230 231 func (m *GetIOStatsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 232 i := len(dAtA) 233 _ = i 234 var l int 235 _ = l 236 return len(dAtA) - i, nil 237 } 238 239 func (m *GetIOStatsResponse) Marshal() (dAtA []byte, err error) { 240 size := m.Size() 241 dAtA = make([]byte, size) 242 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 243 if err != nil { 244 return nil, err 245 } 246 return dAtA[:n], nil 247 } 248 249 func (m *GetIOStatsResponse) MarshalTo(dAtA []byte) (int, error) { 250 size := m.Size() 251 return m.MarshalToSizedBuffer(dAtA[:size]) 252 } 253 254 func (m *GetIOStatsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 255 i := len(dAtA) 256 _ = i 257 var l int 258 _ = l 259 if len(m.Stats) > 0 { 260 for iNdEx := len(m.Stats) - 1; iNdEx >= 0; iNdEx-- { 261 { 262 size, err := m.Stats[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 263 if err != nil { 264 return 0, err 265 } 266 i -= size 267 i = encodeVarintFabricsim(dAtA, i, uint64(size)) 268 } 269 i-- 270 dAtA[i] = 0xa 271 } 272 } 273 return len(dAtA) - i, nil 274 } 275 276 func encodeVarintFabricsim(dAtA []byte, offset int, v uint64) int { 277 offset -= sovFabricsim(v) 278 base := offset 279 for v >= 1<<7 { 280 dAtA[offset] = uint8(v&0x7f | 0x80) 281 v >>= 7 282 offset++ 283 } 284 dAtA[offset] = uint8(v) 285 return base 286 } 287 func (m *GetIOStatsRequest) Size() (n int) { 288 if m == nil { 289 return 0 290 } 291 var l int 292 _ = l 293 return n 294 } 295 296 func (m *GetIOStatsResponse) Size() (n int) { 297 if m == nil { 298 return 0 299 } 300 var l int 301 _ = l 302 if len(m.Stats) > 0 { 303 for _, e := range m.Stats { 304 l = e.Size() 305 n += 1 + l + sovFabricsim(uint64(l)) 306 } 307 } 308 return n 309 } 310 311 func sovFabricsim(x uint64) (n int) { 312 return (math_bits.Len64(x|1) + 6) / 7 313 } 314 func sozFabricsim(x uint64) (n int) { 315 return sovFabricsim(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 316 } 317 func (m *GetIOStatsRequest) Unmarshal(dAtA []byte) error { 318 l := len(dAtA) 319 iNdEx := 0 320 for iNdEx < l { 321 preIndex := iNdEx 322 var wire uint64 323 for shift := uint(0); ; shift += 7 { 324 if shift >= 64 { 325 return ErrIntOverflowFabricsim 326 } 327 if iNdEx >= l { 328 return io.ErrUnexpectedEOF 329 } 330 b := dAtA[iNdEx] 331 iNdEx++ 332 wire |= uint64(b&0x7F) << shift 333 if b < 0x80 { 334 break 335 } 336 } 337 fieldNum := int32(wire >> 3) 338 wireType := int(wire & 0x7) 339 if wireType == 4 { 340 return fmt.Errorf("proto: GetIOStatsRequest: wiretype end group for non-group") 341 } 342 if fieldNum <= 0 { 343 return fmt.Errorf("proto: GetIOStatsRequest: illegal tag %d (wire type %d)", fieldNum, wire) 344 } 345 switch fieldNum { 346 default: 347 iNdEx = preIndex 348 skippy, err := skipFabricsim(dAtA[iNdEx:]) 349 if err != nil { 350 return err 351 } 352 if (skippy < 0) || (iNdEx+skippy) < 0 { 353 return ErrInvalidLengthFabricsim 354 } 355 if (iNdEx + skippy) > l { 356 return io.ErrUnexpectedEOF 357 } 358 iNdEx += skippy 359 } 360 } 361 362 if iNdEx > l { 363 return io.ErrUnexpectedEOF 364 } 365 return nil 366 } 367 func (m *GetIOStatsResponse) Unmarshal(dAtA []byte) error { 368 l := len(dAtA) 369 iNdEx := 0 370 for iNdEx < l { 371 preIndex := iNdEx 372 var wire uint64 373 for shift := uint(0); ; shift += 7 { 374 if shift >= 64 { 375 return ErrIntOverflowFabricsim 376 } 377 if iNdEx >= l { 378 return io.ErrUnexpectedEOF 379 } 380 b := dAtA[iNdEx] 381 iNdEx++ 382 wire |= uint64(b&0x7F) << shift 383 if b < 0x80 { 384 break 385 } 386 } 387 fieldNum := int32(wire >> 3) 388 wireType := int(wire & 0x7) 389 if wireType == 4 { 390 return fmt.Errorf("proto: GetIOStatsResponse: wiretype end group for non-group") 391 } 392 if fieldNum <= 0 { 393 return fmt.Errorf("proto: GetIOStatsResponse: illegal tag %d (wire type %d)", fieldNum, wire) 394 } 395 switch fieldNum { 396 case 1: 397 if wireType != 2 { 398 return fmt.Errorf("proto: wrong wireType = %d for field Stats", wireType) 399 } 400 var msglen int 401 for shift := uint(0); ; shift += 7 { 402 if shift >= 64 { 403 return ErrIntOverflowFabricsim 404 } 405 if iNdEx >= l { 406 return io.ErrUnexpectedEOF 407 } 408 b := dAtA[iNdEx] 409 iNdEx++ 410 msglen |= int(b&0x7F) << shift 411 if b < 0x80 { 412 break 413 } 414 } 415 if msglen < 0 { 416 return ErrInvalidLengthFabricsim 417 } 418 postIndex := iNdEx + msglen 419 if postIndex < 0 { 420 return ErrInvalidLengthFabricsim 421 } 422 if postIndex > l { 423 return io.ErrUnexpectedEOF 424 } 425 m.Stats = append(m.Stats, &misc.IOStats{}) 426 if err := m.Stats[len(m.Stats)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 427 return err 428 } 429 iNdEx = postIndex 430 default: 431 iNdEx = preIndex 432 skippy, err := skipFabricsim(dAtA[iNdEx:]) 433 if err != nil { 434 return err 435 } 436 if (skippy < 0) || (iNdEx+skippy) < 0 { 437 return ErrInvalidLengthFabricsim 438 } 439 if (iNdEx + skippy) > l { 440 return io.ErrUnexpectedEOF 441 } 442 iNdEx += skippy 443 } 444 } 445 446 if iNdEx > l { 447 return io.ErrUnexpectedEOF 448 } 449 return nil 450 } 451 func skipFabricsim(dAtA []byte) (n int, err error) { 452 l := len(dAtA) 453 iNdEx := 0 454 depth := 0 455 for iNdEx < l { 456 var wire uint64 457 for shift := uint(0); ; shift += 7 { 458 if shift >= 64 { 459 return 0, ErrIntOverflowFabricsim 460 } 461 if iNdEx >= l { 462 return 0, io.ErrUnexpectedEOF 463 } 464 b := dAtA[iNdEx] 465 iNdEx++ 466 wire |= (uint64(b) & 0x7F) << shift 467 if b < 0x80 { 468 break 469 } 470 } 471 wireType := int(wire & 0x7) 472 switch wireType { 473 case 0: 474 for shift := uint(0); ; shift += 7 { 475 if shift >= 64 { 476 return 0, ErrIntOverflowFabricsim 477 } 478 if iNdEx >= l { 479 return 0, io.ErrUnexpectedEOF 480 } 481 iNdEx++ 482 if dAtA[iNdEx-1] < 0x80 { 483 break 484 } 485 } 486 case 1: 487 iNdEx += 8 488 case 2: 489 var length int 490 for shift := uint(0); ; shift += 7 { 491 if shift >= 64 { 492 return 0, ErrIntOverflowFabricsim 493 } 494 if iNdEx >= l { 495 return 0, io.ErrUnexpectedEOF 496 } 497 b := dAtA[iNdEx] 498 iNdEx++ 499 length |= (int(b) & 0x7F) << shift 500 if b < 0x80 { 501 break 502 } 503 } 504 if length < 0 { 505 return 0, ErrInvalidLengthFabricsim 506 } 507 iNdEx += length 508 case 3: 509 depth++ 510 case 4: 511 if depth == 0 { 512 return 0, ErrUnexpectedEndOfGroupFabricsim 513 } 514 depth-- 515 case 5: 516 iNdEx += 4 517 default: 518 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 519 } 520 if iNdEx < 0 { 521 return 0, ErrInvalidLengthFabricsim 522 } 523 if depth == 0 { 524 return iNdEx, nil 525 } 526 } 527 return 0, io.ErrUnexpectedEOF 528 } 529 530 var ( 531 ErrInvalidLengthFabricsim = fmt.Errorf("proto: negative length found during unmarshaling") 532 ErrIntOverflowFabricsim = fmt.Errorf("proto: integer overflow") 533 ErrUnexpectedEndOfGroupFabricsim = fmt.Errorf("proto: unexpected end of group") 534 )