vppcalls

package
v3.2.0-alpha Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2020 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Handler = vpp.RegisterHandler(vpp.HandlerDesc{
	Name:       "core",
	HandlerAPI: (*VppCoreAPI)(nil),
	NewFunc:    (*NewHandlerFunc)(nil),
})

Functions

func AddVersion

func AddVersion(version vpp.Version, msgs []govppapi.Message, h NewHandlerFunc)

AddVersion registers vppcalls Handler for the given version.

Types

type APIModule

type APIModule struct {
	Name  string
	Major uint32
	Minor uint32
	Patch uint32
}

APIModule contains info about VPP API module.

func (APIModule) String

func (m APIModule) String() string

type NewHandlerFunc

type NewHandlerFunc func(govppapi.Channel) VppCoreAPI

type PluginInfo

type PluginInfo struct {
	Name        string
	Path        string
	Version     string
	Description string
}

PluginInfo contains info about loaded VPP plugin.

func (PluginInfo) String

func (p PluginInfo) String() string

type SessionInfo

type SessionInfo struct {
	PID       uint32
	ClientIdx uint32
	Uptime    float64
}

SessionInfo contains info about VPP session.

type VersionInfo

type VersionInfo struct {
	Program        string
	Version        string
	BuildDate      string
	BuildDirectory string
}

VersionInfo contains VPP version info.

func (VersionInfo) Release

func (v VersionInfo) Release() string

Release returns version in shortened format YY.MM that describes release.

type VppCoreAPI

type VppCoreAPI interface {
	// Ping sends control ping to VPP.
	Ping(context.Context) error
	// RunCli sends CLI commmand to VPP.
	RunCli(ctx context.Context, cmd string) (string, error)
	// GetVersion retrieves info about VPP version.
	GetVersion(context.Context) (*VersionInfo, error)
	// GetSession retrieves info about active session.
	GetSession(context.Context) (*SessionInfo, error)
	// GetModules retrieves info about VPP API modules.
	GetModules(context.Context) ([]APIModule, error)
	// GetPlugins retrieves info about loaded VPP plugins.
	GetPlugins(context.Context) ([]PluginInfo, error)
}

VppCoreAPI provides methods for core VPP functionality.

func CompatibleHandler

func CompatibleHandler(c vpp.Client) VppCoreAPI

CompatibleHandler is helper for returning compatible Handler.

func NewHandler

func NewHandler(c vpp.Client) (VppCoreAPI, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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