api

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildInfo

type BuildInfo struct {
	Version       string
	BuildUser     string    `json:",omitempty"`
	BuildHost     string    `json:",omitempty"`
	BuildDate     time.Time `json:",omitempty"`
	BuildLocation string    `json:",omitempty"`
	Compiler      string    `json:",omitempty"`
}

type IfaceCounter added in v0.2.0

type IfaceCounter struct {
	Bytes   uint64
	Packets uint64
	Errors  uint64
	Mcast   uint64
}

type IfaceStats added in v0.2.0

type IfaceStats struct {
	RX *InterfaceCounter `json:"RX,omitempty"`
	TX *InterfaceCounter `json:"TX,omitempty"`
}

type Interface

type Interface struct {
	Index      uint32
	Name       string
	Tag        string
	Type       string
	DeviceType string
	Status     Status

	MAC  string
	MTUs MTU
	IPs  []string
	VRF  VRF
}

type InterfaceCounter added in v0.2.0

type InterfaceCounter struct {
	Packets uint64
	Bytes   uint64
}

type InterfaceStats added in v0.2.0

type InterfaceStats struct {
	Rx *InterfaceCounter `json:"RX,omitempty"`
	Tx *InterfaceCounter `json:"TX,omitempty"`

	RxErrors uint64 `json:",omitempty"`
	TxErrors uint64 `json:",omitempty"`

	RxUnicast   *InterfaceCounter `json:",omitempty"`
	RxMulticast *InterfaceCounter `json:",omitempty"`
	RxBroadcast *InterfaceCounter `json:",omitempty"`
	TxUnicast   *InterfaceCounter `json:",omitempty"`
	TxMulticast *InterfaceCounter `json:",omitempty"`
	TxBroadcast *InterfaceCounter `json:",omitempty"`

	Drops   uint64 `json:",omitempty"`
	Punts   uint64 `json:",omitempty"`
	IP4     uint64 `json:",omitempty"`
	IP6     uint64 `json:",omitempty"`
	RxNoBuf uint64 `json:",omitempty"`
	RxMiss  uint64 `json:",omitempty"`
	Mpls    uint64 `json:",omitempty"`
}

type MTU

type MTU struct {
	L3       uint
	IP4, IP6 uint
	MPLS     uint
	Link     uint
}

type Plugin added in v0.2.0

type Plugin struct {
	Name        string
	Version     string
	Path        string `json:",omitempty"`
	Description string `json:",omitempty"`
}

type RuntimeInfo added in v0.2.0

type RuntimeInfo struct {
	Pid    int
	Uptime Uptime     `json:",omitempty"`
	Clock  *time.Time `json:",omitempty"`
}

type Status

type Status struct {
	Up   bool
	Link bool
}

type Uptime added in v0.2.0

type Uptime uint64

Uptime is elapsed time in seconds since VPP started.

func (Uptime) MarshalText added in v0.2.0

func (uptime Uptime) MarshalText() (text []byte, err error)

func (Uptime) String added in v0.2.0

func (uptime Uptime) String() string

type VPP

type VPP interface {
	GetBuildInfo() (*BuildInfo, error)
	GetSystemInfo() (*RuntimeInfo, error)

	GetLogs(since time.Time) ([]string, error)
	DumpLogs() ([]string, error)

	ListInterfaces() ([]*Interface, error)

	ListStats() ([]string, error)
	DumpStats() (*VppStats, error)
}

type VRF

type VRF struct {
	IP4, IP6 uint
}

type VppConfig added in v0.2.0

type VppConfig struct {
	Interfaces []Interface
}

VppConfig contains a configuration settings of VPP.

type VppInfo

type VppInfo struct {
	Build   BuildInfo
	Runtime RuntimeInfo
	Plugins []Plugin `json:",omitempty"`
}

VppInfo contains a generic information from VPP.

type VppStats added in v0.2.0

type VppStats struct {
	System govppapi.SystemStats
	//govppapi.NodeStats `json:",omitempty"`
	Nodes      []govppapi.NodeCounters `json:",omitempty"`
	Interfaces map[string]InterfaceStats
	Counters   map[string]uint64
}

VppStats contains a statistics data from VPP.

Jump to

Keyboard shortcuts

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