Versions in this module Expand all Collapse all v0 v0.1.0 Jul 3, 2019 Changes in this version + const BufferStatsPrefix + const BufferStats_Available + const BufferStats_Cached + const BufferStats_Used + const CounterStatsPrefix + const DefaultMaxReconnectAttempts + const DefaultReconnectInterval + const InterfaceStatsPrefix + const InterfaceStats_Drops + const InterfaceStats_IP4 + const InterfaceStats_IP6 + const InterfaceStats_Names + const InterfaceStats_Punt + const InterfaceStats_Rx + const InterfaceStats_RxBroadcast + const InterfaceStats_RxError + const InterfaceStats_RxMiss + const InterfaceStats_RxMulticast + const InterfaceStats_RxNoBuf + const InterfaceStats_RxUnicast + const InterfaceStats_Tx + const InterfaceStats_TxBroadcast + const InterfaceStats_TxError + const InterfaceStats_TxMulticast + const InterfaceStats_TxUnicastMiss + const NetworkStatsPrefix + const NetworkStats_Adjacency + const NetworkStats_MRoute + const NetworkStats_Punt + const NetworkStats_RouteTo + const NetworkStats_RouteVia + const NodeStatsPrefix + const NodeStats_Calls + const NodeStats_Clocks + const NodeStats_Names + const NodeStats_Suspends + const NodeStats_Vectors + const SystemStatsPrefix + const SystemStats_Heartbeat + const SystemStats_InputRate + const SystemStats_LastStatsClear + const SystemStats_LastUpdate + const SystemStats_VectorRate + var DefaultReplyTimeout = time.Second + var ErrInvalidRequestCtx = errors.New("invalid request context") + var ErrNotConnected = errors.New("not connected to VPP, ignoring the request") + var ErrProbeTimeout = errors.New("probe reply not received within timeout period") + var HealthCheckProbeInterval = time.Second + var HealthCheckReplyTimeout = time.Millisecond * 100 + var HealthCheckThreshold = 1 + var NotificationChanBufSize = 100 + var ReplyChanBufSize = 100 + var ReplyChannelTimeout = time.Millisecond * 100 + var RequestChanBufSize = 100 + func SetControlPing(m api.Message) + func SetControlPingReply(m api.Message) + func SetLogLevel(lvl logger.Level) + func SetLogger(l *logger.Logger) + type Channel struct + func (ch *Channel) CheckCompatiblity(msgs ...api.Message) error + func (ch *Channel) Close() + func (ch *Channel) GetID() uint16 + func (ch *Channel) SendMultiRequest(msg api.Message) api.MultiRequestCtx + func (ch *Channel) SendRequest(msg api.Message) api.RequestCtx + func (ch *Channel) SetReplyTimeout(timeout time.Duration) + func (ch *Channel) SubscribeNotification(notifChan chan api.Message, event api.Message) (api.SubscriptionCtx, error) + type Connection struct + func AsyncConnect(binapi adapter.VppAPI, attempts int, interval time.Duration) (*Connection, chan ConnectionEvent, error) + func Connect(binapi adapter.VppAPI) (*Connection, error) + func (c *Connection) Disconnect() + func (c *Connection) GetMessageID(msg api.Message) (uint16, error) + func (c *Connection) LookupByID(msgID uint16) (api.Message, error) + func (c *Connection) NewAPIChannel() (api.Channel, error) + func (c *Connection) NewAPIChannelBuffered(reqChanBufSize, replyChanBufSize int) (api.Channel, error) + type ConnectionEvent struct + Error error + State ConnectionState + Timestamp time.Time + type ConnectionState int + const Connected + const Disconnected + const Failed + func (s ConnectionState) String() string + type ControlPing struct + func (*ControlPing) GetCrcString() string + func (*ControlPing) GetMessageName() string + func (*ControlPing) GetMessageType() api.MessageType + type ControlPingReply struct + ClientIndex uint32 + Retval int32 + VpePID uint32 + func (*ControlPingReply) GetCrcString() string + func (*ControlPingReply) GetMessageName() string + func (*ControlPingReply) GetMessageType() api.MessageType + type MessageCodec interface + DecodeMsg func(data []byte, msg api.Message) error + EncodeMsg func(msg api.Message, msgID uint16) ([]byte, error) + type MessageIdentifier interface + GetMessageID func(msg api.Message) (uint16, error) + LookupByID func(msgID uint16) (api.Message, error) + type StatsConnection struct + func ConnectStats(stats adapter.StatsAPI) (*StatsConnection, error) + func (c *StatsConnection) Disconnect() + func (c *StatsConnection) GetBufferStats() (*api.BufferStats, error) + func (c *StatsConnection) GetErrorStats(names ...string) (*api.ErrorStats, error) + func (c *StatsConnection) GetInterfaceStats() (*api.InterfaceStats, error) + func (c *StatsConnection) GetNodeStats() (*api.NodeStats, error) + func (c *StatsConnection) GetSystemStats() (*api.SystemStats, error)