Documentation ¶
Overview ¶
Package govppmux implements the GoVPPMux plugin that allows multiple plugins to share single connection to VPP.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶ added in v1.0.4
type API interface { // NewAPIChannel returns a new API channel for communication with VPP via govpp core. // It uses default buffer sizes for the request and reply Go channels. // // Example of binary API call from some plugin using GOVPP: // ch, _ := govpp_mux.NewAPIChannel() // ch.SendRequest(req).ReceiveReply NewAPIChannel() (*api.Channel, error) // NewAPIChannelBuffered returns a new API channel for communication with VPP via govpp core. // It allows to specify custom buffer sizes for the request and reply Go channels. // // Example of binary API call from some plugin using GOVPP: // ch, _ := govpp_mux.NewAPIChannelBuffered(100, 100) // ch.SendRequest(req).ReceiveReply NewAPIChannelBuffered(reqChanBufSize, replyChanBufSize int) (*api.Channel, error) }
API for other plugins to get connectivity to VPP
type Config ¶ added in v1.0.5
type Config struct { HealthCheckProbeInterval time.Duration `json:"health-check-probe-interval"` HealthCheckReplyTimeout time.Duration `json:"health-check-reply-timeout"` HealthCheckThreshold int `json:"health-check-threshold"` }
Config groups the configurable parameter of GoVpp
type Deps ¶ added in v1.0.2
type Deps struct {
local.PluginInfraDeps // inject
}
Deps is here to group injected dependencies of plugin to not mix with other plugin fields.
type GOVPPPlugin ¶
type GOVPPPlugin struct { Deps // inject // contains filtered or unexported fields }
GOVPPPlugin implements the govppmux plugin interface.
func FromExistingAdapter ¶
func FromExistingAdapter(vppAdapter adapter.VppAdapter) *GOVPPPlugin
FromExistingAdapter is used mainly for testing purposes.
func (*GOVPPPlugin) Close ¶
func (plugin *GOVPPPlugin) Close() error
Close cleans up the resources allocated by the govppmux plugin.
func (*GOVPPPlugin) Init ¶
func (plugin *GOVPPPlugin) Init() error
Init is the entry point called by Agent Core. A single binary-API connection to VPP is established.
func (*GOVPPPlugin) NewAPIChannel ¶
func (plugin *GOVPPPlugin) NewAPIChannel() (*api.Channel, error)
NewAPIChannel returns a new API channel for communication with VPP via govpp core. It uses default buffer sizes for the request and reply Go channels.
Example of binary API call from some plugin using GOVPP:
ch, _ := govpp_mux.NewAPIChannel() ch.SendRequest(req).ReceiveReply
func (*GOVPPPlugin) NewAPIChannelBuffered ¶
func (plugin *GOVPPPlugin) NewAPIChannelBuffered(reqChanBufSize, replyChanBufSize int) (*api.Channel, error)
NewAPIChannelBuffered returns a new API channel for communication with VPP via govpp core. It allows to specify custom buffer sizes for the request and reply Go channels.
Example of binary API call from some plugin using GOVPP:
ch, _ := govpp_mux.NewAPIChannelBuffered(100, 100) ch.SendRequest(req).ReceiveReply