vppagent

package
v0.0.0-...-83e77c6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 20, 2021 License: Apache-2.0 Imports: 9 Imported by: 1

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

View Source
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

func WithGrpcPort(grpcPort int) Option

WithGrpcPort - set the grpc port for vppagent to listen on

func WithHTTPPort

func WithHTTPPort(httpPort int) Option

WithHTTPPort - set the http port for vppagent to listen on

func WithRootDir

func WithRootDir(rootDir string) Option

WithRootDir - set a root dir (usually a tmpDir) for all conf files.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL