vppcalls

package
v2.0.0-beta+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetACLPluginVersion

func GetACLPluginVersion(ch govppapi.Channel) (string, error)

GetACLPluginVersion retrieves ACL plugin version.

func RunCliCommand

func RunCliCommand(vppChan govppapi.Channel, cmd string) (string, error)

RunCliCommand executes CLI command and returns output

Types

type BuffersInfo

type BuffersInfo struct {
	Items []BuffersItem `json:"items"`
}

BuffersInfo contains values returned from 'show buffers'

func GetBuffersInfo

func GetBuffersInfo(vppChan govppapi.Channel) (*BuffersInfo, error)

GetBuffersInfo retrieves buffers info

type BuffersItem

type BuffersItem struct {
	ThreadID uint   `json:"thread_id"`
	Name     string `json:"name"`
	Index    uint   `json:"index"`
	Size     uint64 `json:"size"`
	Alloc    uint64 `json:"alloc"`
	Free     uint64 `json:"free"`
	NumAlloc uint64 `json:"num_alloc"`
	NumFree  uint64 `json:"num_free"`
}

BuffersItem represents single buffers item

type MemoryInfo

type MemoryInfo struct {
	Threads []MemoryThread `json:"threads"`
}

MemoryInfo contains values returned from 'show memory'

func GetMemory

func GetMemory(vppChan govppapi.Channel) (*MemoryInfo, error)

GetMemory retrieves `show memory` info.

type MemoryThread

type MemoryThread struct {
	ID        uint   `json:"id"`
	Name      string `json:"name"`
	Objects   uint64 `json:"objects"`
	Used      uint64 `json:"used"`
	Total     uint64 `json:"total"`
	Free      uint64 `json:"free"`
	Reclaimed uint64 `json:"reclaimed"`
	Overhead  uint64 `json:"overhead"`
	Capacity  uint64 `json:"capacity"`
}

MemoryThread represents single thread memory counters

type ModuleVersion

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

type NodeCounter

type NodeCounter struct {
	Count  uint64 `json:"count"`
	Node   string `json:"node"`
	Reason string `json:"reason"`
}

NodeCounter represents single node counter

type NodeCounterInfo

type NodeCounterInfo struct {
	Counters []NodeCounter `json:"counters"`
}

NodeCounterInfo contains values returned from 'show node counters'

func GetNodeCounters

func GetNodeCounters(vppChan govppapi.Channel) (*NodeCounterInfo, error)

GetNodeCounters retrieves node counters info.

type RuntimeInfo

type RuntimeInfo struct {
	Threads []RuntimeThread `json:"threads"`
}

RuntimeInfo contains values returned from 'show runtime'

func GetRuntimeInfo

func GetRuntimeInfo(vppChan govppapi.Channel) (*RuntimeInfo, error)

GetRuntimeInfo retrieves how runtime info.

type RuntimeItem

type RuntimeItem struct {
	Name           string  `json:"name"`
	State          string  `json:"state"`
	Calls          uint64  `json:"calls"`
	Vectors        uint64  `json:"vectors"`
	Suspends       uint64  `json:"suspends"`
	Clocks         float64 `json:"clocks"`
	VectorsPerCall float64 `json:"vectors_per_call"`
}

RuntimeItem represents single runtime item

type RuntimeThread

type RuntimeThread struct {
	ID                  uint          `json:"id"`
	Name                string        `json:"name"`
	Time                float64       `json:"time"`
	AvgVectorsPerNode   float64       `json:"avg_vectors_per_node"`
	LastMainLoops       uint64        `json:"last_main_loops"`
	VectorsPerMainLoop  float64       `json:"vectors_per_main_loop"`
	VectorLengthPerNode float64       `json:"vector_length_per_node"`
	VectorRatesIn       float64       `json:"vector_rates_in"`
	VectorRatesOut      float64       `json:"vector_rates_out"`
	VectorRatesDrop     float64       `json:"vector_rates_drop"`
	VectorRatesPunt     float64       `json:"vector_rates_punt"`
	Items               []RuntimeItem `json:"items"`
}

RuntimeThread represents single runtime thread

type VersionInfo

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

VersionInfo contains values returned from ShowVersion

func GetVersionInfo

func GetVersionInfo(vppChan govppapi.Channel) (*VersionInfo, error)

GetVersionInfo retrieves version info

type VpeInfo

type VpeInfo struct {
	PID            uint32
	ClientIdx      uint32
	ModuleVersions map[string]ModuleVersion
}

VpeInfo contains information about VPP connection and process.

func GetVpeInfo

func GetVpeInfo(vppChan govppapi.Channel) (*VpeInfo, error)

GetVpeInfo retrieves vpe information.

Jump to

Keyboard shortcuts

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