vppcalls

package
v3.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2022 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(vpp.Client) 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 ThreadInfo added in v3.2.0

type ThreadInfo struct {
	Name      string
	ID        uint32
	Type      string
	PID       uint32
	CPUID     uint32
	Core      uint32
	CPUSocket uint32
}

ThreadInfo wraps all thread data counters.

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 command 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)
	// GetThreads retrieves info about VPP threads.
	GetThreads(ctx context.Context) ([]ThreadInfo, 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