Documentation ¶
Overview ¶
Package socketclient is a pure Go implementation of adapter.VppAPI, which uses unix domain sockets as the transport for connecting to the VPP binary API.
The current implementation only supports VPP binary API, the VPP stats API is not supported and clients still have to use vppapiclient for retrieving stats.
Requirements ¶
The socketclient will connect to /run/vpp-api.sock by default. However this is not enabled in VPP configuration by default.
To enable the socket in VPP, add following section to VPP config.
socksvr { default }
Index ¶
Constants ¶
View Source
const ( // DefaultSocketName is default VPP API socket file path. DefaultSocketName = adapter.DefaultBinapiSocket )
Variables ¶
View Source
var ( // DefaultConnectTimeout is default timeout for connecting DefaultConnectTimeout = time.Second * 3 // DefaultDisconnectTimeout is default timeout for discconnecting DefaultDisconnectTimeout = time.Millisecond * 100 // MaxWaitReady defines maximum duration before waiting for socket file // times out MaxWaitReady = time.Second * 15 // ClientName is used for identifying client in socket registration ClientName = "govppsock" )
Functions ¶
func NewVppClient ¶
func NewVppClient(sockAddr string) *vppClient
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.