github.com/edwarnicke/govpp@v0.0.0-20230130211138-14ef5d20b1d0/binapi/lisp/lisp_rpc.ba.go (about) 1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT. 2 3 package lisp 4 5 import ( 6 "context" 7 "fmt" 8 "io" 9 10 api "git.fd.io/govpp.git/api" 11 memclnt "github.com/edwarnicke/govpp/binapi/memclnt" 12 ) 13 14 // RPCService defines RPC service lisp. 15 type RPCService interface { 16 LispAddDelAdjacency(ctx context.Context, in *LispAddDelAdjacency) (*LispAddDelAdjacencyReply, error) 17 LispAddDelLocalEid(ctx context.Context, in *LispAddDelLocalEid) (*LispAddDelLocalEidReply, error) 18 LispAddDelLocator(ctx context.Context, in *LispAddDelLocator) (*LispAddDelLocatorReply, error) 19 LispAddDelLocatorSet(ctx context.Context, in *LispAddDelLocatorSet) (*LispAddDelLocatorSetReply, error) 20 LispAddDelMapRequestItrRlocs(ctx context.Context, in *LispAddDelMapRequestItrRlocs) (*LispAddDelMapRequestItrRlocsReply, error) 21 LispAddDelMapResolver(ctx context.Context, in *LispAddDelMapResolver) (*LispAddDelMapResolverReply, error) 22 LispAddDelMapServer(ctx context.Context, in *LispAddDelMapServer) (*LispAddDelMapServerReply, error) 23 LispAddDelRemoteMapping(ctx context.Context, in *LispAddDelRemoteMapping) (*LispAddDelRemoteMappingReply, error) 24 LispAdjacenciesGet(ctx context.Context, in *LispAdjacenciesGet) (*LispAdjacenciesGetReply, error) 25 LispEidTableAddDelMap(ctx context.Context, in *LispEidTableAddDelMap) (*LispEidTableAddDelMapReply, error) 26 LispEidTableDump(ctx context.Context, in *LispEidTableDump) (RPCService_LispEidTableDumpClient, error) 27 LispEidTableMapDump(ctx context.Context, in *LispEidTableMapDump) (RPCService_LispEidTableMapDumpClient, error) 28 LispEidTableVniDump(ctx context.Context, in *LispEidTableVniDump) (RPCService_LispEidTableVniDumpClient, error) 29 LispEnableDisable(ctx context.Context, in *LispEnableDisable) (*LispEnableDisableReply, error) 30 LispGetMapRequestItrRlocs(ctx context.Context, in *LispGetMapRequestItrRlocs) (*LispGetMapRequestItrRlocsReply, error) 31 LispLocatorDump(ctx context.Context, in *LispLocatorDump) (RPCService_LispLocatorDumpClient, error) 32 LispLocatorSetDump(ctx context.Context, in *LispLocatorSetDump) (RPCService_LispLocatorSetDumpClient, error) 33 LispMapRegisterEnableDisable(ctx context.Context, in *LispMapRegisterEnableDisable) (*LispMapRegisterEnableDisableReply, error) 34 LispMapRequestMode(ctx context.Context, in *LispMapRequestMode) (*LispMapRequestModeReply, error) 35 LispMapResolverDump(ctx context.Context, in *LispMapResolverDump) (RPCService_LispMapResolverDumpClient, error) 36 LispMapServerDump(ctx context.Context, in *LispMapServerDump) (RPCService_LispMapServerDumpClient, error) 37 LispPitrSetLocatorSet(ctx context.Context, in *LispPitrSetLocatorSet) (*LispPitrSetLocatorSetReply, error) 38 LispRlocProbeEnableDisable(ctx context.Context, in *LispRlocProbeEnableDisable) (*LispRlocProbeEnableDisableReply, error) 39 LispUsePetr(ctx context.Context, in *LispUsePetr) (*LispUsePetrReply, error) 40 ShowLispMapRegisterState(ctx context.Context, in *ShowLispMapRegisterState) (*ShowLispMapRegisterStateReply, error) 41 ShowLispMapRequestMode(ctx context.Context, in *ShowLispMapRequestMode) (*ShowLispMapRequestModeReply, error) 42 ShowLispPitr(ctx context.Context, in *ShowLispPitr) (*ShowLispPitrReply, error) 43 ShowLispRlocProbeState(ctx context.Context, in *ShowLispRlocProbeState) (*ShowLispRlocProbeStateReply, error) 44 ShowLispStatus(ctx context.Context, in *ShowLispStatus) (*ShowLispStatusReply, error) 45 ShowLispUsePetr(ctx context.Context, in *ShowLispUsePetr) (*ShowLispUsePetrReply, error) 46 } 47 48 type serviceClient struct { 49 conn api.Connection 50 } 51 52 func NewServiceClient(conn api.Connection) RPCService { 53 return &serviceClient{conn} 54 } 55 56 func (c *serviceClient) LispAddDelAdjacency(ctx context.Context, in *LispAddDelAdjacency) (*LispAddDelAdjacencyReply, error) { 57 out := new(LispAddDelAdjacencyReply) 58 err := c.conn.Invoke(ctx, in, out) 59 if err != nil { 60 return nil, err 61 } 62 return out, api.RetvalToVPPApiError(out.Retval) 63 } 64 65 func (c *serviceClient) LispAddDelLocalEid(ctx context.Context, in *LispAddDelLocalEid) (*LispAddDelLocalEidReply, error) { 66 out := new(LispAddDelLocalEidReply) 67 err := c.conn.Invoke(ctx, in, out) 68 if err != nil { 69 return nil, err 70 } 71 return out, api.RetvalToVPPApiError(out.Retval) 72 } 73 74 func (c *serviceClient) LispAddDelLocator(ctx context.Context, in *LispAddDelLocator) (*LispAddDelLocatorReply, error) { 75 out := new(LispAddDelLocatorReply) 76 err := c.conn.Invoke(ctx, in, out) 77 if err != nil { 78 return nil, err 79 } 80 return out, api.RetvalToVPPApiError(out.Retval) 81 } 82 83 func (c *serviceClient) LispAddDelLocatorSet(ctx context.Context, in *LispAddDelLocatorSet) (*LispAddDelLocatorSetReply, error) { 84 out := new(LispAddDelLocatorSetReply) 85 err := c.conn.Invoke(ctx, in, out) 86 if err != nil { 87 return nil, err 88 } 89 return out, api.RetvalToVPPApiError(out.Retval) 90 } 91 92 func (c *serviceClient) LispAddDelMapRequestItrRlocs(ctx context.Context, in *LispAddDelMapRequestItrRlocs) (*LispAddDelMapRequestItrRlocsReply, error) { 93 out := new(LispAddDelMapRequestItrRlocsReply) 94 err := c.conn.Invoke(ctx, in, out) 95 if err != nil { 96 return nil, err 97 } 98 return out, api.RetvalToVPPApiError(out.Retval) 99 } 100 101 func (c *serviceClient) LispAddDelMapResolver(ctx context.Context, in *LispAddDelMapResolver) (*LispAddDelMapResolverReply, error) { 102 out := new(LispAddDelMapResolverReply) 103 err := c.conn.Invoke(ctx, in, out) 104 if err != nil { 105 return nil, err 106 } 107 return out, api.RetvalToVPPApiError(out.Retval) 108 } 109 110 func (c *serviceClient) LispAddDelMapServer(ctx context.Context, in *LispAddDelMapServer) (*LispAddDelMapServerReply, error) { 111 out := new(LispAddDelMapServerReply) 112 err := c.conn.Invoke(ctx, in, out) 113 if err != nil { 114 return nil, err 115 } 116 return out, api.RetvalToVPPApiError(out.Retval) 117 } 118 119 func (c *serviceClient) LispAddDelRemoteMapping(ctx context.Context, in *LispAddDelRemoteMapping) (*LispAddDelRemoteMappingReply, error) { 120 out := new(LispAddDelRemoteMappingReply) 121 err := c.conn.Invoke(ctx, in, out) 122 if err != nil { 123 return nil, err 124 } 125 return out, api.RetvalToVPPApiError(out.Retval) 126 } 127 128 func (c *serviceClient) LispAdjacenciesGet(ctx context.Context, in *LispAdjacenciesGet) (*LispAdjacenciesGetReply, error) { 129 out := new(LispAdjacenciesGetReply) 130 err := c.conn.Invoke(ctx, in, out) 131 if err != nil { 132 return nil, err 133 } 134 return out, api.RetvalToVPPApiError(out.Retval) 135 } 136 137 func (c *serviceClient) LispEidTableAddDelMap(ctx context.Context, in *LispEidTableAddDelMap) (*LispEidTableAddDelMapReply, error) { 138 out := new(LispEidTableAddDelMapReply) 139 err := c.conn.Invoke(ctx, in, out) 140 if err != nil { 141 return nil, err 142 } 143 return out, api.RetvalToVPPApiError(out.Retval) 144 } 145 146 func (c *serviceClient) LispEidTableDump(ctx context.Context, in *LispEidTableDump) (RPCService_LispEidTableDumpClient, error) { 147 stream, err := c.conn.NewStream(ctx) 148 if err != nil { 149 return nil, err 150 } 151 x := &serviceClient_LispEidTableDumpClient{stream} 152 if err := x.Stream.SendMsg(in); err != nil { 153 return nil, err 154 } 155 if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil { 156 return nil, err 157 } 158 return x, nil 159 } 160 161 type RPCService_LispEidTableDumpClient interface { 162 Recv() (*LispEidTableDetails, error) 163 api.Stream 164 } 165 166 type serviceClient_LispEidTableDumpClient struct { 167 api.Stream 168 } 169 170 func (c *serviceClient_LispEidTableDumpClient) Recv() (*LispEidTableDetails, error) { 171 msg, err := c.Stream.RecvMsg() 172 if err != nil { 173 return nil, err 174 } 175 switch m := msg.(type) { 176 case *LispEidTableDetails: 177 return m, nil 178 case *memclnt.ControlPingReply: 179 err = c.Stream.Close() 180 if err != nil { 181 return nil, err 182 } 183 return nil, io.EOF 184 default: 185 return nil, fmt.Errorf("unexpected message: %T %v", m, m) 186 } 187 } 188 189 func (c *serviceClient) LispEidTableMapDump(ctx context.Context, in *LispEidTableMapDump) (RPCService_LispEidTableMapDumpClient, error) { 190 stream, err := c.conn.NewStream(ctx) 191 if err != nil { 192 return nil, err 193 } 194 x := &serviceClient_LispEidTableMapDumpClient{stream} 195 if err := x.Stream.SendMsg(in); err != nil { 196 return nil, err 197 } 198 if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil { 199 return nil, err 200 } 201 return x, nil 202 } 203 204 type RPCService_LispEidTableMapDumpClient interface { 205 Recv() (*LispEidTableMapDetails, error) 206 api.Stream 207 } 208 209 type serviceClient_LispEidTableMapDumpClient struct { 210 api.Stream 211 } 212 213 func (c *serviceClient_LispEidTableMapDumpClient) Recv() (*LispEidTableMapDetails, error) { 214 msg, err := c.Stream.RecvMsg() 215 if err != nil { 216 return nil, err 217 } 218 switch m := msg.(type) { 219 case *LispEidTableMapDetails: 220 return m, nil 221 case *memclnt.ControlPingReply: 222 err = c.Stream.Close() 223 if err != nil { 224 return nil, err 225 } 226 return nil, io.EOF 227 default: 228 return nil, fmt.Errorf("unexpected message: %T %v", m, m) 229 } 230 } 231 232 func (c *serviceClient) LispEidTableVniDump(ctx context.Context, in *LispEidTableVniDump) (RPCService_LispEidTableVniDumpClient, error) { 233 stream, err := c.conn.NewStream(ctx) 234 if err != nil { 235 return nil, err 236 } 237 x := &serviceClient_LispEidTableVniDumpClient{stream} 238 if err := x.Stream.SendMsg(in); err != nil { 239 return nil, err 240 } 241 if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil { 242 return nil, err 243 } 244 return x, nil 245 } 246 247 type RPCService_LispEidTableVniDumpClient interface { 248 Recv() (*LispEidTableVniDetails, error) 249 api.Stream 250 } 251 252 type serviceClient_LispEidTableVniDumpClient struct { 253 api.Stream 254 } 255 256 func (c *serviceClient_LispEidTableVniDumpClient) Recv() (*LispEidTableVniDetails, error) { 257 msg, err := c.Stream.RecvMsg() 258 if err != nil { 259 return nil, err 260 } 261 switch m := msg.(type) { 262 case *LispEidTableVniDetails: 263 return m, nil 264 case *memclnt.ControlPingReply: 265 err = c.Stream.Close() 266 if err != nil { 267 return nil, err 268 } 269 return nil, io.EOF 270 default: 271 return nil, fmt.Errorf("unexpected message: %T %v", m, m) 272 } 273 } 274 275 func (c *serviceClient) LispEnableDisable(ctx context.Context, in *LispEnableDisable) (*LispEnableDisableReply, error) { 276 out := new(LispEnableDisableReply) 277 err := c.conn.Invoke(ctx, in, out) 278 if err != nil { 279 return nil, err 280 } 281 return out, api.RetvalToVPPApiError(out.Retval) 282 } 283 284 func (c *serviceClient) LispGetMapRequestItrRlocs(ctx context.Context, in *LispGetMapRequestItrRlocs) (*LispGetMapRequestItrRlocsReply, error) { 285 out := new(LispGetMapRequestItrRlocsReply) 286 err := c.conn.Invoke(ctx, in, out) 287 if err != nil { 288 return nil, err 289 } 290 return out, api.RetvalToVPPApiError(out.Retval) 291 } 292 293 func (c *serviceClient) LispLocatorDump(ctx context.Context, in *LispLocatorDump) (RPCService_LispLocatorDumpClient, error) { 294 stream, err := c.conn.NewStream(ctx) 295 if err != nil { 296 return nil, err 297 } 298 x := &serviceClient_LispLocatorDumpClient{stream} 299 if err := x.Stream.SendMsg(in); err != nil { 300 return nil, err 301 } 302 if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil { 303 return nil, err 304 } 305 return x, nil 306 } 307 308 type RPCService_LispLocatorDumpClient interface { 309 Recv() (*LispLocatorDetails, error) 310 api.Stream 311 } 312 313 type serviceClient_LispLocatorDumpClient struct { 314 api.Stream 315 } 316 317 func (c *serviceClient_LispLocatorDumpClient) Recv() (*LispLocatorDetails, error) { 318 msg, err := c.Stream.RecvMsg() 319 if err != nil { 320 return nil, err 321 } 322 switch m := msg.(type) { 323 case *LispLocatorDetails: 324 return m, nil 325 case *memclnt.ControlPingReply: 326 err = c.Stream.Close() 327 if err != nil { 328 return nil, err 329 } 330 return nil, io.EOF 331 default: 332 return nil, fmt.Errorf("unexpected message: %T %v", m, m) 333 } 334 } 335 336 func (c *serviceClient) LispLocatorSetDump(ctx context.Context, in *LispLocatorSetDump) (RPCService_LispLocatorSetDumpClient, error) { 337 stream, err := c.conn.NewStream(ctx) 338 if err != nil { 339 return nil, err 340 } 341 x := &serviceClient_LispLocatorSetDumpClient{stream} 342 if err := x.Stream.SendMsg(in); err != nil { 343 return nil, err 344 } 345 if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil { 346 return nil, err 347 } 348 return x, nil 349 } 350 351 type RPCService_LispLocatorSetDumpClient interface { 352 Recv() (*LispLocatorSetDetails, error) 353 api.Stream 354 } 355 356 type serviceClient_LispLocatorSetDumpClient struct { 357 api.Stream 358 } 359 360 func (c *serviceClient_LispLocatorSetDumpClient) Recv() (*LispLocatorSetDetails, error) { 361 msg, err := c.Stream.RecvMsg() 362 if err != nil { 363 return nil, err 364 } 365 switch m := msg.(type) { 366 case *LispLocatorSetDetails: 367 return m, nil 368 case *memclnt.ControlPingReply: 369 err = c.Stream.Close() 370 if err != nil { 371 return nil, err 372 } 373 return nil, io.EOF 374 default: 375 return nil, fmt.Errorf("unexpected message: %T %v", m, m) 376 } 377 } 378 379 func (c *serviceClient) LispMapRegisterEnableDisable(ctx context.Context, in *LispMapRegisterEnableDisable) (*LispMapRegisterEnableDisableReply, error) { 380 out := new(LispMapRegisterEnableDisableReply) 381 err := c.conn.Invoke(ctx, in, out) 382 if err != nil { 383 return nil, err 384 } 385 return out, api.RetvalToVPPApiError(out.Retval) 386 } 387 388 func (c *serviceClient) LispMapRequestMode(ctx context.Context, in *LispMapRequestMode) (*LispMapRequestModeReply, error) { 389 out := new(LispMapRequestModeReply) 390 err := c.conn.Invoke(ctx, in, out) 391 if err != nil { 392 return nil, err 393 } 394 return out, api.RetvalToVPPApiError(out.Retval) 395 } 396 397 func (c *serviceClient) LispMapResolverDump(ctx context.Context, in *LispMapResolverDump) (RPCService_LispMapResolverDumpClient, error) { 398 stream, err := c.conn.NewStream(ctx) 399 if err != nil { 400 return nil, err 401 } 402 x := &serviceClient_LispMapResolverDumpClient{stream} 403 if err := x.Stream.SendMsg(in); err != nil { 404 return nil, err 405 } 406 if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil { 407 return nil, err 408 } 409 return x, nil 410 } 411 412 type RPCService_LispMapResolverDumpClient interface { 413 Recv() (*LispMapResolverDetails, error) 414 api.Stream 415 } 416 417 type serviceClient_LispMapResolverDumpClient struct { 418 api.Stream 419 } 420 421 func (c *serviceClient_LispMapResolverDumpClient) Recv() (*LispMapResolverDetails, error) { 422 msg, err := c.Stream.RecvMsg() 423 if err != nil { 424 return nil, err 425 } 426 switch m := msg.(type) { 427 case *LispMapResolverDetails: 428 return m, nil 429 case *memclnt.ControlPingReply: 430 err = c.Stream.Close() 431 if err != nil { 432 return nil, err 433 } 434 return nil, io.EOF 435 default: 436 return nil, fmt.Errorf("unexpected message: %T %v", m, m) 437 } 438 } 439 440 func (c *serviceClient) LispMapServerDump(ctx context.Context, in *LispMapServerDump) (RPCService_LispMapServerDumpClient, error) { 441 stream, err := c.conn.NewStream(ctx) 442 if err != nil { 443 return nil, err 444 } 445 x := &serviceClient_LispMapServerDumpClient{stream} 446 if err := x.Stream.SendMsg(in); err != nil { 447 return nil, err 448 } 449 if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil { 450 return nil, err 451 } 452 return x, nil 453 } 454 455 type RPCService_LispMapServerDumpClient interface { 456 Recv() (*LispMapServerDetails, error) 457 api.Stream 458 } 459 460 type serviceClient_LispMapServerDumpClient struct { 461 api.Stream 462 } 463 464 func (c *serviceClient_LispMapServerDumpClient) Recv() (*LispMapServerDetails, error) { 465 msg, err := c.Stream.RecvMsg() 466 if err != nil { 467 return nil, err 468 } 469 switch m := msg.(type) { 470 case *LispMapServerDetails: 471 return m, nil 472 case *memclnt.ControlPingReply: 473 err = c.Stream.Close() 474 if err != nil { 475 return nil, err 476 } 477 return nil, io.EOF 478 default: 479 return nil, fmt.Errorf("unexpected message: %T %v", m, m) 480 } 481 } 482 483 func (c *serviceClient) LispPitrSetLocatorSet(ctx context.Context, in *LispPitrSetLocatorSet) (*LispPitrSetLocatorSetReply, error) { 484 out := new(LispPitrSetLocatorSetReply) 485 err := c.conn.Invoke(ctx, in, out) 486 if err != nil { 487 return nil, err 488 } 489 return out, api.RetvalToVPPApiError(out.Retval) 490 } 491 492 func (c *serviceClient) LispRlocProbeEnableDisable(ctx context.Context, in *LispRlocProbeEnableDisable) (*LispRlocProbeEnableDisableReply, error) { 493 out := new(LispRlocProbeEnableDisableReply) 494 err := c.conn.Invoke(ctx, in, out) 495 if err != nil { 496 return nil, err 497 } 498 return out, api.RetvalToVPPApiError(out.Retval) 499 } 500 501 func (c *serviceClient) LispUsePetr(ctx context.Context, in *LispUsePetr) (*LispUsePetrReply, error) { 502 out := new(LispUsePetrReply) 503 err := c.conn.Invoke(ctx, in, out) 504 if err != nil { 505 return nil, err 506 } 507 return out, api.RetvalToVPPApiError(out.Retval) 508 } 509 510 func (c *serviceClient) ShowLispMapRegisterState(ctx context.Context, in *ShowLispMapRegisterState) (*ShowLispMapRegisterStateReply, error) { 511 out := new(ShowLispMapRegisterStateReply) 512 err := c.conn.Invoke(ctx, in, out) 513 if err != nil { 514 return nil, err 515 } 516 return out, api.RetvalToVPPApiError(out.Retval) 517 } 518 519 func (c *serviceClient) ShowLispMapRequestMode(ctx context.Context, in *ShowLispMapRequestMode) (*ShowLispMapRequestModeReply, error) { 520 out := new(ShowLispMapRequestModeReply) 521 err := c.conn.Invoke(ctx, in, out) 522 if err != nil { 523 return nil, err 524 } 525 return out, api.RetvalToVPPApiError(out.Retval) 526 } 527 528 func (c *serviceClient) ShowLispPitr(ctx context.Context, in *ShowLispPitr) (*ShowLispPitrReply, error) { 529 out := new(ShowLispPitrReply) 530 err := c.conn.Invoke(ctx, in, out) 531 if err != nil { 532 return nil, err 533 } 534 return out, api.RetvalToVPPApiError(out.Retval) 535 } 536 537 func (c *serviceClient) ShowLispRlocProbeState(ctx context.Context, in *ShowLispRlocProbeState) (*ShowLispRlocProbeStateReply, error) { 538 out := new(ShowLispRlocProbeStateReply) 539 err := c.conn.Invoke(ctx, in, out) 540 if err != nil { 541 return nil, err 542 } 543 return out, api.RetvalToVPPApiError(out.Retval) 544 } 545 546 func (c *serviceClient) ShowLispStatus(ctx context.Context, in *ShowLispStatus) (*ShowLispStatusReply, error) { 547 out := new(ShowLispStatusReply) 548 err := c.conn.Invoke(ctx, in, out) 549 if err != nil { 550 return nil, err 551 } 552 return out, api.RetvalToVPPApiError(out.Retval) 553 } 554 555 func (c *serviceClient) ShowLispUsePetr(ctx context.Context, in *ShowLispUsePetr) (*ShowLispUsePetrReply, error) { 556 out := new(ShowLispUsePetrReply) 557 err := c.conn.Invoke(ctx, in, out) 558 if err != nil { 559 return nil, err 560 } 561 return out, api.RetvalToVPPApiError(out.Retval) 562 }