1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
10 api "git.fd.io/govpp.git/api"
11 vpe "git.fd.io/govpp.git/binapi/vpe"
14 // RPCService defines RPC service bfd.
15 type RPCService interface {
16 BfdAuthDelKey(ctx context.Context, in *BfdAuthDelKey) (*BfdAuthDelKeyReply, error)
17 BfdAuthKeysDump(ctx context.Context, in *BfdAuthKeysDump) (RPCService_BfdAuthKeysDumpClient, error)
18 BfdAuthSetKey(ctx context.Context, in *BfdAuthSetKey) (*BfdAuthSetKeyReply, error)
19 BfdUDPAdd(ctx context.Context, in *BfdUDPAdd) (*BfdUDPAddReply, error)
20 BfdUDPAuthActivate(ctx context.Context, in *BfdUDPAuthActivate) (*BfdUDPAuthActivateReply, error)
21 BfdUDPAuthDeactivate(ctx context.Context, in *BfdUDPAuthDeactivate) (*BfdUDPAuthDeactivateReply, error)
22 BfdUDPDel(ctx context.Context, in *BfdUDPDel) (*BfdUDPDelReply, error)
23 BfdUDPDelEchoSource(ctx context.Context, in *BfdUDPDelEchoSource) (*BfdUDPDelEchoSourceReply, error)
24 BfdUDPGetEchoSource(ctx context.Context, in *BfdUDPGetEchoSource) (*BfdUDPGetEchoSourceReply, error)
25 BfdUDPMod(ctx context.Context, in *BfdUDPMod) (*BfdUDPModReply, error)
26 BfdUDPSessionDump(ctx context.Context, in *BfdUDPSessionDump) (RPCService_BfdUDPSessionDumpClient, error)
27 BfdUDPSessionSetFlags(ctx context.Context, in *BfdUDPSessionSetFlags) (*BfdUDPSessionSetFlagsReply, error)
28 BfdUDPSetEchoSource(ctx context.Context, in *BfdUDPSetEchoSource) (*BfdUDPSetEchoSourceReply, error)
29 WantBfdEvents(ctx context.Context, in *WantBfdEvents) (*WantBfdEventsReply, error)
32 type serviceClient struct {
36 func NewServiceClient(conn api.Connection) RPCService {
37 return &serviceClient{conn}
40 func (c *serviceClient) BfdAuthDelKey(ctx context.Context, in *BfdAuthDelKey) (*BfdAuthDelKeyReply, error) {
41 out := new(BfdAuthDelKeyReply)
42 err := c.conn.Invoke(ctx, in, out)
46 return out, api.RetvalToVPPApiError(out.Retval)
49 func (c *serviceClient) BfdAuthKeysDump(ctx context.Context, in *BfdAuthKeysDump) (RPCService_BfdAuthKeysDumpClient, error) {
50 stream, err := c.conn.NewStream(ctx)
54 x := &serviceClient_BfdAuthKeysDumpClient{stream}
55 if err := x.Stream.SendMsg(in); err != nil {
58 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
64 type RPCService_BfdAuthKeysDumpClient interface {
65 Recv() (*BfdAuthKeysDetails, error)
69 type serviceClient_BfdAuthKeysDumpClient struct {
73 func (c *serviceClient_BfdAuthKeysDumpClient) Recv() (*BfdAuthKeysDetails, error) {
74 msg, err := c.Stream.RecvMsg()
78 switch m := msg.(type) {
79 case *BfdAuthKeysDetails:
81 case *vpe.ControlPingReply:
82 err = c.Stream.Close()
88 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
92 func (c *serviceClient) BfdAuthSetKey(ctx context.Context, in *BfdAuthSetKey) (*BfdAuthSetKeyReply, error) {
93 out := new(BfdAuthSetKeyReply)
94 err := c.conn.Invoke(ctx, in, out)
98 return out, api.RetvalToVPPApiError(out.Retval)
101 func (c *serviceClient) BfdUDPAdd(ctx context.Context, in *BfdUDPAdd) (*BfdUDPAddReply, error) {
102 out := new(BfdUDPAddReply)
103 err := c.conn.Invoke(ctx, in, out)
107 return out, api.RetvalToVPPApiError(out.Retval)
110 func (c *serviceClient) BfdUDPAuthActivate(ctx context.Context, in *BfdUDPAuthActivate) (*BfdUDPAuthActivateReply, error) {
111 out := new(BfdUDPAuthActivateReply)
112 err := c.conn.Invoke(ctx, in, out)
116 return out, api.RetvalToVPPApiError(out.Retval)
119 func (c *serviceClient) BfdUDPAuthDeactivate(ctx context.Context, in *BfdUDPAuthDeactivate) (*BfdUDPAuthDeactivateReply, error) {
120 out := new(BfdUDPAuthDeactivateReply)
121 err := c.conn.Invoke(ctx, in, out)
125 return out, api.RetvalToVPPApiError(out.Retval)
128 func (c *serviceClient) BfdUDPDel(ctx context.Context, in *BfdUDPDel) (*BfdUDPDelReply, error) {
129 out := new(BfdUDPDelReply)
130 err := c.conn.Invoke(ctx, in, out)
134 return out, api.RetvalToVPPApiError(out.Retval)
137 func (c *serviceClient) BfdUDPDelEchoSource(ctx context.Context, in *BfdUDPDelEchoSource) (*BfdUDPDelEchoSourceReply, error) {
138 out := new(BfdUDPDelEchoSourceReply)
139 err := c.conn.Invoke(ctx, in, out)
143 return out, api.RetvalToVPPApiError(out.Retval)
146 func (c *serviceClient) BfdUDPGetEchoSource(ctx context.Context, in *BfdUDPGetEchoSource) (*BfdUDPGetEchoSourceReply, error) {
147 out := new(BfdUDPGetEchoSourceReply)
148 err := c.conn.Invoke(ctx, in, out)
152 return out, api.RetvalToVPPApiError(out.Retval)
155 func (c *serviceClient) BfdUDPMod(ctx context.Context, in *BfdUDPMod) (*BfdUDPModReply, error) {
156 out := new(BfdUDPModReply)
157 err := c.conn.Invoke(ctx, in, out)
161 return out, api.RetvalToVPPApiError(out.Retval)
164 func (c *serviceClient) BfdUDPSessionDump(ctx context.Context, in *BfdUDPSessionDump) (RPCService_BfdUDPSessionDumpClient, error) {
165 stream, err := c.conn.NewStream(ctx)
169 x := &serviceClient_BfdUDPSessionDumpClient{stream}
170 if err := x.Stream.SendMsg(in); err != nil {
173 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
179 type RPCService_BfdUDPSessionDumpClient interface {
180 Recv() (*BfdUDPSessionDetails, error)
184 type serviceClient_BfdUDPSessionDumpClient struct {
188 func (c *serviceClient_BfdUDPSessionDumpClient) Recv() (*BfdUDPSessionDetails, error) {
189 msg, err := c.Stream.RecvMsg()
193 switch m := msg.(type) {
194 case *BfdUDPSessionDetails:
196 case *vpe.ControlPingReply:
197 err = c.Stream.Close()
203 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
207 func (c *serviceClient) BfdUDPSessionSetFlags(ctx context.Context, in *BfdUDPSessionSetFlags) (*BfdUDPSessionSetFlagsReply, error) {
208 out := new(BfdUDPSessionSetFlagsReply)
209 err := c.conn.Invoke(ctx, in, out)
213 return out, api.RetvalToVPPApiError(out.Retval)
216 func (c *serviceClient) BfdUDPSetEchoSource(ctx context.Context, in *BfdUDPSetEchoSource) (*BfdUDPSetEchoSourceReply, error) {
217 out := new(BfdUDPSetEchoSourceReply)
218 err := c.conn.Invoke(ctx, in, out)
222 return out, api.RetvalToVPPApiError(out.Retval)
225 func (c *serviceClient) WantBfdEvents(ctx context.Context, in *WantBfdEvents) (*WantBfdEventsReply, error) {
226 out := new(WantBfdEventsReply)
227 err := c.conn.Invoke(ctx, in, out)
231 return out, api.RetvalToVPPApiError(out.Retval)