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 ¶
const (
// DefaultRootDir - Default value for RootDir
DefaultRootDir = ""
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection interface { api.Connection api.ChannelProvider }
Connection Combination of api.Connection and api.ChannelProvider
func DialContext ¶
func DialContext(ctx context.Context, filename string) 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 StartAndDialContext ¶
func StartAndDialContext(ctx context.Context, opts ...Option) (conn Connection, errCh <-chan error)
StartAndDialContext - starts vpp Stdout and Stderr for vpp are set to be log.Entry(ctx).Writer().
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