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:
84 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
88 func (c *serviceClient) BfdAuthSetKey(ctx context.Context, in *BfdAuthSetKey) (*BfdAuthSetKeyReply, error) {
89 out := new(BfdAuthSetKeyReply)
90 err := c.conn.Invoke(ctx, in, out)
94 return out, api.RetvalToVPPApiError(out.Retval)
97 func (c *serviceClient) BfdUDPAdd(ctx context.Context, in *BfdUDPAdd) (*BfdUDPAddReply, error) {
98 out := new(BfdUDPAddReply)
99 err := c.conn.Invoke(ctx, in, out)
103 return out, api.RetvalToVPPApiError(out.Retval)
106 func (c *serviceClient) BfdUDPAuthActivate(ctx context.Context, in *BfdUDPAuthActivate) (*BfdUDPAuthActivateReply, error) {
107 out := new(BfdUDPAuthActivateReply)
108 err := c.conn.Invoke(ctx, in, out)
112 return out, api.RetvalToVPPApiError(out.Retval)
115 func (c *serviceClient) BfdUDPAuthDeactivate(ctx context.Context, in *BfdUDPAuthDeactivate) (*BfdUDPAuthDeactivateReply, error) {
116 out := new(BfdUDPAuthDeactivateReply)
117 err := c.conn.Invoke(ctx, in, out)
121 return out, api.RetvalToVPPApiError(out.Retval)
124 func (c *serviceClient) BfdUDPDel(ctx context.Context, in *BfdUDPDel) (*BfdUDPDelReply, error) {
125 out := new(BfdUDPDelReply)
126 err := c.conn.Invoke(ctx, in, out)
130 return out, api.RetvalToVPPApiError(out.Retval)
133 func (c *serviceClient) BfdUDPDelEchoSource(ctx context.Context, in *BfdUDPDelEchoSource) (*BfdUDPDelEchoSourceReply, error) {
134 out := new(BfdUDPDelEchoSourceReply)
135 err := c.conn.Invoke(ctx, in, out)
139 return out, api.RetvalToVPPApiError(out.Retval)
142 func (c *serviceClient) BfdUDPGetEchoSource(ctx context.Context, in *BfdUDPGetEchoSource) (*BfdUDPGetEchoSourceReply, error) {
143 out := new(BfdUDPGetEchoSourceReply)
144 err := c.conn.Invoke(ctx, in, out)
148 return out, api.RetvalToVPPApiError(out.Retval)
151 func (c *serviceClient) BfdUDPMod(ctx context.Context, in *BfdUDPMod) (*BfdUDPModReply, error) {
152 out := new(BfdUDPModReply)
153 err := c.conn.Invoke(ctx, in, out)
157 return out, api.RetvalToVPPApiError(out.Retval)
160 func (c *serviceClient) BfdUDPSessionDump(ctx context.Context, in *BfdUDPSessionDump) (RPCService_BfdUDPSessionDumpClient, error) {
161 stream, err := c.conn.NewStream(ctx)
165 x := &serviceClient_BfdUDPSessionDumpClient{stream}
166 if err := x.Stream.SendMsg(in); err != nil {
169 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
175 type RPCService_BfdUDPSessionDumpClient interface {
176 Recv() (*BfdUDPSessionDetails, error)
180 type serviceClient_BfdUDPSessionDumpClient struct {
184 func (c *serviceClient_BfdUDPSessionDumpClient) Recv() (*BfdUDPSessionDetails, error) {
185 msg, err := c.Stream.RecvMsg()
189 switch m := msg.(type) {
190 case *BfdUDPSessionDetails:
192 case *vpe.ControlPingReply:
195 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
199 func (c *serviceClient) BfdUDPSessionSetFlags(ctx context.Context, in *BfdUDPSessionSetFlags) (*BfdUDPSessionSetFlagsReply, error) {
200 out := new(BfdUDPSessionSetFlagsReply)
201 err := c.conn.Invoke(ctx, in, out)
205 return out, api.RetvalToVPPApiError(out.Retval)
208 func (c *serviceClient) BfdUDPSetEchoSource(ctx context.Context, in *BfdUDPSetEchoSource) (*BfdUDPSetEchoSourceReply, error) {
209 out := new(BfdUDPSetEchoSourceReply)
210 err := c.conn.Invoke(ctx, in, out)
214 return out, api.RetvalToVPPApiError(out.Retval)
217 func (c *serviceClient) WantBfdEvents(ctx context.Context, in *WantBfdEvents) (*WantBfdEventsReply, error) {
218 out := new(WantBfdEventsReply)
219 err := c.conn.Invoke(ctx, in, out)
223 return out, api.RetvalToVPPApiError(out.Retval)