github.com/networkservicemesh/govpp@v0.0.0-20240328101142-8a444680fbba/binapi/avf/avf_rpc.ba.go (about) 1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT. 2 3 package avf 4 5 import ( 6 "context" 7 8 api "go.fd.io/govpp/api" 9 ) 10 11 // RPCService defines RPC service avf. 12 type RPCService interface { 13 AvfCreate(ctx context.Context, in *AvfCreate) (*AvfCreateReply, error) 14 AvfDelete(ctx context.Context, in *AvfDelete) (*AvfDeleteReply, error) 15 } 16 17 type serviceClient struct { 18 conn api.Connection 19 } 20 21 func NewServiceClient(conn api.Connection) RPCService { 22 return &serviceClient{conn} 23 } 24 25 func (c *serviceClient) AvfCreate(ctx context.Context, in *AvfCreate) (*AvfCreateReply, error) { 26 out := new(AvfCreateReply) 27 err := c.conn.Invoke(ctx, in, out) 28 if err != nil { 29 return nil, err 30 } 31 return out, api.RetvalToVPPApiError(out.Retval) 32 } 33 34 func (c *serviceClient) AvfDelete(ctx context.Context, in *AvfDelete) (*AvfDeleteReply, error) { 35 out := new(AvfDeleteReply) 36 err := c.conn.Invoke(ctx, in, out) 37 if err != nil { 38 return nil, err 39 } 40 return out, api.RetvalToVPPApiError(out.Retval) 41 }