Documentation
¶
Overview ¶
Package vppagent provides a simple StartAndDialContext function that will start up a local vppagent, dial it, and return the grpc.ClientConnInterface
Index ¶
Constants ¶
const ( // DefaultRootDir - Default value for RootDir DefaultRootDir = "" // DefaultGrpcPort - Default value for GRPC port DefaultGrpcPort = 9111 // DefaultHTTPPort - Default value for HTTP port DefaultHTTPPort = 9191 )
Variables ¶
This section is empty.
Functions ¶
func StartAndDialContext ¶
func StartAndDialContext(ctx context.Context, opts ...Option) (vppagentCC grpc.ClientConnInterface, errCh chan error)
StartAndDialContext - starts vppagent (and vpp), dials them using any provided options and returns the resulting grpc.ClientConnInterface, and an error chan that will receive the error from the lifecycle of the vppagent and vpp and be closed when both have exited. Stdout and Stderr for the vppagent and 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 WithGrpcPort ¶
WithGrpcPort - set the grpc port for vppagent to listen on
func WithHTTPPort ¶
WithHTTPPort - set the http port for vppagent to listen on
func WithRootDir ¶
WithRootDir - set a root dir (usually a tmpDir) for all conf files.