github.com/edwarnicke/govpp@v0.0.0-20230130211138-14ef5d20b1d0/binapi/trace/trace_rpc.ba.go (about)

     1  // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
     2  
     3  package trace
     4  
     5  import (
     6  	"context"
     7  
     8  	api "git.fd.io/govpp.git/api"
     9  )
    10  
    11  // RPCService defines RPC service trace.
    12  type RPCService interface {
    13  	TraceProfileAdd(ctx context.Context, in *TraceProfileAdd) (*TraceProfileAddReply, error)
    14  	TraceProfileDel(ctx context.Context, in *TraceProfileDel) (*TraceProfileDelReply, error)
    15  	TraceProfileShowConfig(ctx context.Context, in *TraceProfileShowConfig) (*TraceProfileShowConfigReply, error)
    16  }
    17  
    18  type serviceClient struct {
    19  	conn api.Connection
    20  }
    21  
    22  func NewServiceClient(conn api.Connection) RPCService {
    23  	return &serviceClient{conn}
    24  }
    25  
    26  func (c *serviceClient) TraceProfileAdd(ctx context.Context, in *TraceProfileAdd) (*TraceProfileAddReply, error) {
    27  	out := new(TraceProfileAddReply)
    28  	err := c.conn.Invoke(ctx, in, out)
    29  	if err != nil {
    30  		return nil, err
    31  	}
    32  	return out, api.RetvalToVPPApiError(out.Retval)
    33  }
    34  
    35  func (c *serviceClient) TraceProfileDel(ctx context.Context, in *TraceProfileDel) (*TraceProfileDelReply, error) {
    36  	out := new(TraceProfileDelReply)
    37  	err := c.conn.Invoke(ctx, in, out)
    38  	if err != nil {
    39  		return nil, err
    40  	}
    41  	return out, api.RetvalToVPPApiError(out.Retval)
    42  }
    43  
    44  func (c *serviceClient) TraceProfileShowConfig(ctx context.Context, in *TraceProfileShowConfig) (*TraceProfileShowConfigReply, error) {
    45  	out := new(TraceProfileShowConfigReply)
    46  	err := c.conn.Invoke(ctx, in, out)
    47  	if err != nil {
    48  		return nil, err
    49  	}
    50  	return out, api.RetvalToVPPApiError(out.Retval)
    51  }