github.com/networkservicemesh/govpp@v0.0.0-20240328101142-8a444680fbba/binapi/urpf/urpf_rpc.ba.go (about)

     1  // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
     2  
     3  package urpf
     4  
     5  import (
     6  	"context"
     7  
     8  	api "go.fd.io/govpp/api"
     9  )
    10  
    11  // RPCService defines RPC service urpf.
    12  type RPCService interface {
    13  	UrpfUpdate(ctx context.Context, in *UrpfUpdate) (*UrpfUpdateReply, error)
    14  	UrpfUpdateV2(ctx context.Context, in *UrpfUpdateV2) (*UrpfUpdateV2Reply, 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) UrpfUpdate(ctx context.Context, in *UrpfUpdate) (*UrpfUpdateReply, error) {
    26  	out := new(UrpfUpdateReply)
    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) UrpfUpdateV2(ctx context.Context, in *UrpfUpdateV2) (*UrpfUpdateV2Reply, error) {
    35  	out := new(UrpfUpdateV2Reply)
    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  }