github.com/edwarnicke/govpp@v0.0.0-20230130211138-14ef5d20b1d0/binapi/vlib/vlib_rpc.ba.go (about) 1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT. 2 3 package vlib 4 5 import ( 6 "context" 7 8 api "git.fd.io/govpp.git/api" 9 ) 10 11 // RPCService defines RPC service vlib. 12 type RPCService interface { 13 AddNodeNext(ctx context.Context, in *AddNodeNext) (*AddNodeNextReply, error) 14 Cli(ctx context.Context, in *Cli) (*CliReply, error) 15 CliInband(ctx context.Context, in *CliInband) (*CliInbandReply, error) 16 GetF64EndianValue(ctx context.Context, in *GetF64EndianValue) (*GetF64EndianValueReply, error) 17 GetF64IncrementByOne(ctx context.Context, in *GetF64IncrementByOne) (*GetF64IncrementByOneReply, error) 18 GetNextIndex(ctx context.Context, in *GetNextIndex) (*GetNextIndexReply, error) 19 GetNodeGraph(ctx context.Context, in *GetNodeGraph) (*GetNodeGraphReply, error) 20 GetNodeIndex(ctx context.Context, in *GetNodeIndex) (*GetNodeIndexReply, error) 21 ShowThreads(ctx context.Context, in *ShowThreads) (*ShowThreadsReply, error) 22 } 23 24 type serviceClient struct { 25 conn api.Connection 26 } 27 28 func NewServiceClient(conn api.Connection) RPCService { 29 return &serviceClient{conn} 30 } 31 32 func (c *serviceClient) AddNodeNext(ctx context.Context, in *AddNodeNext) (*AddNodeNextReply, error) { 33 out := new(AddNodeNextReply) 34 err := c.conn.Invoke(ctx, in, out) 35 if err != nil { 36 return nil, err 37 } 38 return out, api.RetvalToVPPApiError(out.Retval) 39 } 40 41 func (c *serviceClient) Cli(ctx context.Context, in *Cli) (*CliReply, error) { 42 out := new(CliReply) 43 err := c.conn.Invoke(ctx, in, out) 44 if err != nil { 45 return nil, err 46 } 47 return out, api.RetvalToVPPApiError(out.Retval) 48 } 49 50 func (c *serviceClient) CliInband(ctx context.Context, in *CliInband) (*CliInbandReply, error) { 51 out := new(CliInbandReply) 52 err := c.conn.Invoke(ctx, in, out) 53 if err != nil { 54 return nil, err 55 } 56 return out, api.RetvalToVPPApiError(out.Retval) 57 } 58 59 func (c *serviceClient) GetF64EndianValue(ctx context.Context, in *GetF64EndianValue) (*GetF64EndianValueReply, error) { 60 out := new(GetF64EndianValueReply) 61 err := c.conn.Invoke(ctx, in, out) 62 if err != nil { 63 return nil, err 64 } 65 return out, api.RetvalToVPPApiError(int32(out.Retval)) 66 } 67 68 func (c *serviceClient) GetF64IncrementByOne(ctx context.Context, in *GetF64IncrementByOne) (*GetF64IncrementByOneReply, error) { 69 out := new(GetF64IncrementByOneReply) 70 err := c.conn.Invoke(ctx, in, out) 71 if err != nil { 72 return nil, err 73 } 74 return out, api.RetvalToVPPApiError(int32(out.Retval)) 75 } 76 77 func (c *serviceClient) GetNextIndex(ctx context.Context, in *GetNextIndex) (*GetNextIndexReply, error) { 78 out := new(GetNextIndexReply) 79 err := c.conn.Invoke(ctx, in, out) 80 if err != nil { 81 return nil, err 82 } 83 return out, api.RetvalToVPPApiError(out.Retval) 84 } 85 86 func (c *serviceClient) GetNodeGraph(ctx context.Context, in *GetNodeGraph) (*GetNodeGraphReply, error) { 87 out := new(GetNodeGraphReply) 88 err := c.conn.Invoke(ctx, in, out) 89 if err != nil { 90 return nil, err 91 } 92 return out, api.RetvalToVPPApiError(out.Retval) 93 } 94 95 func (c *serviceClient) GetNodeIndex(ctx context.Context, in *GetNodeIndex) (*GetNodeIndexReply, error) { 96 out := new(GetNodeIndexReply) 97 err := c.conn.Invoke(ctx, in, out) 98 if err != nil { 99 return nil, err 100 } 101 return out, api.RetvalToVPPApiError(out.Retval) 102 } 103 104 func (c *serviceClient) ShowThreads(ctx context.Context, in *ShowThreads) (*ShowThreadsReply, error) { 105 out := new(ShowThreadsReply) 106 err := c.conn.Invoke(ctx, in, out) 107 if err != nil { 108 return nil, err 109 } 110 return out, api.RetvalToVPPApiError(out.Retval) 111 }