Versions in this module Expand all Collapse all v0 v0.0.1 May 10, 2024 Changes in this version + func SetLogLevel(lvl logrus.Level) + func SetLogOutput(out io.Writer) + func SetLogger(l *logrus.Logger) + type BinapiClient struct + func (b *BinapiClient) CheckCompatiblity(msgs ...api.Message) error + func (b *BinapiClient) Close() + func (b *BinapiClient) Invoke(_ context.Context, request api.Message, reply api.Message) error + func (b *BinapiClient) NewStream(_ context.Context, _ ...api.StreamOption) (api.Stream, error) + func (b *BinapiClient) SendMultiRequest(msg api.Message) api.MultiRequestCtx + func (b *BinapiClient) SendRequest(msg api.Message) api.RequestCtx + func (b *BinapiClient) SetReplyTimeout(timeout time.Duration) + func (b *BinapiClient) SubscribeNotification(notifChan chan api.Message, event api.Message) (api.SubscriptionCtx, error) + type BinapiCompatibilityRequest struct + MsgNameCrcs []string + type BinapiCompatibilityResponse struct + CompatibleMsgs map[string][]string + IncompatibleMsgs map[string][]string + type BinapiRPC struct + func NewBinapiRPC(binapi adapter.VppAPI) (*BinapiRPC, error) + func (s *BinapiRPC) CloseStream(req RPCStreamReqResp, resp *RPCStreamReqResp) error + func (s *BinapiRPC) Compatibility(req BinapiCompatibilityRequest, resp *BinapiCompatibilityResponse) error + func (s *BinapiRPC) Invoke(req BinapiRequest, resp *BinapiResponse) error + func (s *BinapiRPC) NewAPIStream(req RPCStreamReqResp, resp *RPCStreamReqResp) error + func (s *BinapiRPC) ReceiveMessage(req RPCStreamReqResp, resp *RPCStreamReqResp) error + func (s *BinapiRPC) SendMessage(req RPCStreamReqResp, resp *RPCStreamReqResp) error + type BinapiRequest struct + IsMulti bool + Msg api.Message + ReplyMsg api.Message + Timeout time.Duration + type BinapiResponse struct + Msg api.Message + Msgs []api.Message + type Client struct + func Connect(addr string) (*Client, error) + func (c *Client) NewBinapiClient() (*BinapiClient, error) + func (c *Client) NewStatsClient() (*StatsClient, error) + type RPCStream struct + func (s *RPCStream) Close() error + func (s *RPCStream) Context() context.Context + func (s *RPCStream) RecvMsg() (api.Message, error) + func (s *RPCStream) SendMsg(msg api.Message) error + type RPCStreamReqResp struct + ID uint32 + Msg api.Message + type Server struct + func NewServer() (*Server, error) + func (p *Server) ConnectBinapi(binapi adapter.VppAPI) error + func (p *Server) ConnectStats(stats adapter.StatsAPI) error + func (p *Server) DisconnectBinapi() + func (p *Server) DisconnectStats() + func (p *Server) ListenAndServe(addr string) error + func (p *Server) ServeCodec(codec rpc.ServerCodec) + func (p *Server) ServeConn(conn io.ReadWriteCloser) + func (p *Server) ServeHTTP(w http.ResponseWriter, req *http.Request) + type StatsClient struct + func (s *StatsClient) GetBufferStats(bufStats *api.BufferStats) error + func (s *StatsClient) GetErrorStats(errStats *api.ErrorStats) error + func (s *StatsClient) GetInterfaceStats(ifaceStats *api.InterfaceStats) error + func (s *StatsClient) GetMemoryStats(memStats *api.MemoryStats) error + func (s *StatsClient) GetNodeStats(nodeStats *api.NodeStats) error + func (s *StatsClient) GetSystemStats(sysStats *api.SystemStats) error + type StatsRPC struct + func NewStatsRPC(stats adapter.StatsAPI) (*StatsRPC, error) + func (s *StatsRPC) GetStats(req StatsRequest, resp *StatsResponse) error + type StatsRequest struct + StatsType string + type StatsResponse struct + BufStats *api.BufferStats + ErrStats *api.ErrorStats + IfaceStats *api.InterfaceStats + MemStats *api.MemoryStats + NodeStats *api.NodeStats + SysStats *api.SystemStats