vppcalls

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2018 License: Apache-2.0 Imports: 7 Imported by: 163

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunCliCommand

func RunCliCommand(vppChan VPPChannel, cmd string) ([]byte, 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 VPPChannel) (*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 VPPChannel) (*MemoryInfo, error)

GetNodeCounters retrieves node counters 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 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 VPPChannel) (*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 VPPChannel) (*RuntimeInfo, error)

GetNodeCounters retrieves node counters 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 VPPChannel

type VPPChannel interface {
	SendRequest(msg govppapi.Message) *govppapi.RequestCtx
}

VPPChannel is interface for send request to VPP channel

type VersionInfo

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

VersionInfo contains values returned from ShowVersion

func GetVersionInfo

func GetVersionInfo(vppChan VPPChannel) (*VersionInfo, error)

GetVersionInfo retrieves version info

Jump to

Keyboard shortcuts

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