Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Versions = map[string]HandlerVersion{}
Functions ¶
This section is empty.
Types ¶
type BuffersInfo ¶
type BuffersInfo struct {
Items []BuffersItem `json:"items"`
}
BuffersInfo contains values returned from 'show buffers'
func (*BuffersInfo) GetItems ¶
func (i *BuffersInfo) GetItems() []BuffersItem
GetItems is safe getter for items,
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 HandlerVersion ¶
type HandlerVersion struct { Msgs []govppapi.Message New func(govppapi.Channel, govppapi.StatsProvider) TelemetryVppAPI }
type MemoryInfo ¶
type MemoryInfo struct {
Threads []MemoryThread `json:"threads"`
}
MemoryInfo contains values returned from 'show memory'
func (*MemoryInfo) GetThreads ¶
func (i *MemoryInfo) GetThreads() []MemoryThread
GetThreads is safe getter for threads,
type MemoryThread ¶
type MemoryThread struct { ID uint `json:"id"` Name string `json:"name"` Size uint64 `json:"size"` Objects uint64 `json:"objects"` Used uint64 `json:"used"` Total uint64 `json:"total"` Free uint64 `json:"free"` Reclaimed uint64 `json:"reclaimed"` Overhead uint64 `json:"overhead"` Pages uint64 `json:"pages"` PageSize uint64 `json:"page_size"` }
MemoryThread represents single thread memory counters
type NodeCounter ¶
type NodeCounter struct { Value uint64 `json:"value"` Node string `json:"node"` Name string `json:"name"` }
NodeCounter represents single node counter
type NodeCounterInfo ¶
type NodeCounterInfo struct {
Counters []NodeCounter `json:"counters"`
}
NodeErrorCounterInfo contains values returned from 'show node counters'
func (*NodeCounterInfo) GetCounters ¶
func (i *NodeCounterInfo) GetCounters() []NodeCounter
GetCounters is safe getter for counters,
type RuntimeInfo ¶
type RuntimeInfo struct {
Threads []RuntimeThread `json:"threads"`
}
RuntimeInfo contains values returned from 'show runtime'
func (*RuntimeInfo) GetThreads ¶
func (i *RuntimeInfo) GetThreads() []RuntimeThread
GetThreads is safe getter for threads,
type RuntimeItem ¶
type RuntimeItem struct { Index uint `json:"index"` 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 TelemetryVppAPI ¶
type TelemetryVppAPI interface { GetMemory(context.Context) (*MemoryInfo, error) GetNodeCounters(context.Context) (*NodeCounterInfo, error) GetRuntimeInfo(context.Context) (*RuntimeInfo, error) GetBuffersInfo(context.Context) (*BuffersInfo, error) GetInterfaceStats(context.Context) (*govppapi.InterfaceStats, error) }
TelemetryVppAPI provides API for retrieving telemetry data from VPP.
func CompatibleTelemetryHandler ¶
func CompatibleTelemetryHandler(ch govppapi.Channel, vpp govppapi.StatsProvider) TelemetryVppAPI