1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
8 api "git.fd.io/govpp.git/api"
9 vpe "git.fd.io/govpp.git/binapi/vpe"
13 // RPCService defines RPC service bfd.
14 type RPCService interface {
15 BfdAuthDelKey(ctx context.Context, in *BfdAuthDelKey) (*BfdAuthDelKeyReply, error)
16 BfdAuthKeysDump(ctx context.Context, in *BfdAuthKeysDump) (RPCService_BfdAuthKeysDumpClient, error)
17 BfdAuthSetKey(ctx context.Context, in *BfdAuthSetKey) (*BfdAuthSetKeyReply, error)
18 BfdUDPAdd(ctx context.Context, in *BfdUDPAdd) (*BfdUDPAddReply, error)
19 BfdUDPAuthActivate(ctx context.Context, in *BfdUDPAuthActivate) (*BfdUDPAuthActivateReply, error)
20 BfdUDPAuthDeactivate(ctx context.Context, in *BfdUDPAuthDeactivate) (*BfdUDPAuthDeactivateReply, error)
21 BfdUDPDel(ctx context.Context, in *BfdUDPDel) (*BfdUDPDelReply, error)
22 BfdUDPDelEchoSource(ctx context.Context, in *BfdUDPDelEchoSource) (*BfdUDPDelEchoSourceReply, error)
23 BfdUDPGetEchoSource(ctx context.Context, in *BfdUDPGetEchoSource) (*BfdUDPGetEchoSourceReply, error)
24 BfdUDPMod(ctx context.Context, in *BfdUDPMod) (*BfdUDPModReply, error)
25 BfdUDPSessionDump(ctx context.Context, in *BfdUDPSessionDump) (RPCService_BfdUDPSessionDumpClient, error)
26 BfdUDPSessionSetFlags(ctx context.Context, in *BfdUDPSessionSetFlags) (*BfdUDPSessionSetFlagsReply, error)
27 BfdUDPSetEchoSource(ctx context.Context, in *BfdUDPSetEchoSource) (*BfdUDPSetEchoSourceReply, error)
28 WantBfdEvents(ctx context.Context, in *WantBfdEvents) (*WantBfdEventsReply, error)
31 type serviceClient struct {
35 func NewServiceClient(conn api.Connection) RPCService {
36 return &serviceClient{conn}
39 func (c *serviceClient) BfdAuthDelKey(ctx context.Context, in *BfdAuthDelKey) (*BfdAuthDelKeyReply, error) {
40 out := new(BfdAuthDelKeyReply)
41 err := c.conn.Invoke(ctx, in, out)
48 func (c *serviceClient) BfdAuthKeysDump(ctx context.Context, in *BfdAuthKeysDump) (RPCService_BfdAuthKeysDumpClient, error) {
49 stream, err := c.conn.NewStream(ctx)
53 x := &serviceClient_BfdAuthKeysDumpClient{stream}
54 if err := x.Stream.SendMsg(in); err != nil {
57 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
63 type RPCService_BfdAuthKeysDumpClient interface {
64 Recv() (*BfdAuthKeysDetails, error)
68 type serviceClient_BfdAuthKeysDumpClient struct {
72 func (c *serviceClient_BfdAuthKeysDumpClient) Recv() (*BfdAuthKeysDetails, error) {
73 msg, err := c.Stream.RecvMsg()
77 switch m := msg.(type) {
78 case *BfdAuthKeysDetails:
80 case *vpe.ControlPingReply:
83 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
87 func (c *serviceClient) BfdAuthSetKey(ctx context.Context, in *BfdAuthSetKey) (*BfdAuthSetKeyReply, error) {
88 out := new(BfdAuthSetKeyReply)
89 err := c.conn.Invoke(ctx, in, out)
96 func (c *serviceClient) BfdUDPAdd(ctx context.Context, in *BfdUDPAdd) (*BfdUDPAddReply, error) {
97 out := new(BfdUDPAddReply)
98 err := c.conn.Invoke(ctx, in, out)
105 func (c *serviceClient) BfdUDPAuthActivate(ctx context.Context, in *BfdUDPAuthActivate) (*BfdUDPAuthActivateReply, error) {
106 out := new(BfdUDPAuthActivateReply)
107 err := c.conn.Invoke(ctx, in, out)
114 func (c *serviceClient) BfdUDPAuthDeactivate(ctx context.Context, in *BfdUDPAuthDeactivate) (*BfdUDPAuthDeactivateReply, error) {
115 out := new(BfdUDPAuthDeactivateReply)
116 err := c.conn.Invoke(ctx, in, out)
123 func (c *serviceClient) BfdUDPDel(ctx context.Context, in *BfdUDPDel) (*BfdUDPDelReply, error) {
124 out := new(BfdUDPDelReply)
125 err := c.conn.Invoke(ctx, in, out)
132 func (c *serviceClient) BfdUDPDelEchoSource(ctx context.Context, in *BfdUDPDelEchoSource) (*BfdUDPDelEchoSourceReply, error) {
133 out := new(BfdUDPDelEchoSourceReply)
134 err := c.conn.Invoke(ctx, in, out)
141 func (c *serviceClient) BfdUDPGetEchoSource(ctx context.Context, in *BfdUDPGetEchoSource) (*BfdUDPGetEchoSourceReply, error) {
142 out := new(BfdUDPGetEchoSourceReply)
143 err := c.conn.Invoke(ctx, in, out)
150 func (c *serviceClient) BfdUDPMod(ctx context.Context, in *BfdUDPMod) (*BfdUDPModReply, error) {
151 out := new(BfdUDPModReply)
152 err := c.conn.Invoke(ctx, in, out)
159 func (c *serviceClient) BfdUDPSessionDump(ctx context.Context, in *BfdUDPSessionDump) (RPCService_BfdUDPSessionDumpClient, error) {
160 stream, err := c.conn.NewStream(ctx)
164 x := &serviceClient_BfdUDPSessionDumpClient{stream}
165 if err := x.Stream.SendMsg(in); err != nil {
168 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
174 type RPCService_BfdUDPSessionDumpClient interface {
175 Recv() (*BfdUDPSessionDetails, error)
179 type serviceClient_BfdUDPSessionDumpClient struct {
183 func (c *serviceClient_BfdUDPSessionDumpClient) Recv() (*BfdUDPSessionDetails, error) {
184 msg, err := c.Stream.RecvMsg()
188 switch m := msg.(type) {
189 case *BfdUDPSessionDetails:
191 case *vpe.ControlPingReply:
194 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
198 func (c *serviceClient) BfdUDPSessionSetFlags(ctx context.Context, in *BfdUDPSessionSetFlags) (*BfdUDPSessionSetFlagsReply, error) {
199 out := new(BfdUDPSessionSetFlagsReply)
200 err := c.conn.Invoke(ctx, in, out)
207 func (c *serviceClient) BfdUDPSetEchoSource(ctx context.Context, in *BfdUDPSetEchoSource) (*BfdUDPSetEchoSourceReply, error) {
208 out := new(BfdUDPSetEchoSourceReply)
209 err := c.conn.Invoke(ctx, in, out)
216 func (c *serviceClient) WantBfdEvents(ctx context.Context, in *WantBfdEvents) (*WantBfdEventsReply, error) {
217 out := new(WantBfdEventsReply)
218 err := c.conn.Invoke(ctx, in, out)