Documentation ¶
Overview ¶
Package vpphelper provides a simple Start function that will start up a local vpp, dial it, and return the grpc.ClientConnInterface
Index ¶
- Constants
- func DialContext(ctx context.Context, filename string) api.Connection
- func NewVPPConfigFile(configTemplate string, params VPPConfigParameters) string
- func StartAndDialContext(ctx context.Context, opts ...Option) (conn api.Connection, errCh <-chan error)
- type Option
- type VPPConfigParameters
Constants ¶
const (
// DefaultRootDir - Default value for RootDir
DefaultRootDir = ""
)
const ( // DefaultVPPConfTemplate - template for VPP config DefaultVPPConfTemplate = `` /* 5387-byte string literal not displayed */ )
Variables ¶
This section is empty.
Functions ¶
func DialContext ¶
func DialContext(ctx context.Context, filename string) api.Connection
DialContext - Dials vpp and returns a Connection DialContext is 'lazy' meaning that if there is no socket yet at filename, we will continue to try until there is one or the ctx is canceled.
func NewVPPConfigFile ¶
func NewVPPConfigFile(configTemplate string, params VPPConfigParameters) string
NewVPPConfigFile creates new VPP config based on parameters
func StartAndDialContext ¶
func StartAndDialContext(ctx context.Context, opts ...Option) (conn api.Connection, errCh <-chan error)
StartAndDialContext - starts vpp Stdout and Stderr for vpp are set to be log.Entry(ctx).Writer().
Types ¶
type Option ¶
type Option func(opt *option)
Option - Option for use with vppagent.Start(...)
func WithRootDir ¶
WithRootDir - set a root dir (usually a tmpDir) for all conf files.
func WithVppConfig ¶
WithVppConfig - vpp.conf template %[1]s will be replaced in the template with the value of the rootDir
type VPPConfigParameters ¶
VPPConfigParameters - custom parameters used by VPP config
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package extendtimeout - provides a wrapper for vpp connection that uses extended timeout for all vpp operations
|
Package extendtimeout - provides a wrapper for vpp connection that uses extended timeout for all vpp operations |