Documentation ¶
Overview ¶
Package statsclient is pure Go implementation of VPP stats API client.
Index ¶
- Constants
- Variables
- type StatsClient
- func (c *StatsClient) Connect() error
- func (c *StatsClient) Disconnect() error
- func (c *StatsClient) DumpStats(patterns ...string) (entries []adapter.StatEntry, err error)
- func (c *StatsClient) DumpVPCStats(vni ...uint64) (entries []adapter.StatEntry, err error)
- func (c *StatsClient) GetVPCStats(stats []adapter.StatEntry, vni ...uint64) (map[uint64]*VPCCounter, error)
- func (c *StatsClient) ListStats(patterns ...string) (names []string, err error)
- func (c *StatsClient) PrepareDir(patterns ...string) (*adapter.StatDir, error)
- func (c *StatsClient) UpdateDir(dir *adapter.StatDir) (err error)
- type VPCCounter
Constants ¶
View Source
const ( // DefaultSocketName is default VPP stats socket file path. DefaultSocketName = adapter.DefaultStatsSocket )
Variables ¶
View Source
var ( // Debug is global variable that determines debug mode Debug = os.Getenv("DEBUG_GOVPP_STATS") != "" // Log is global logger Log = logger.New() )
View Source
var ( MaxWaitInProgress = time.Millisecond * 100 CheckDelayInProgress = time.Microsecond * 10 )
View Source
var (
ErrStatDataLenIncorrect = fmt.Errorf("stat data length incorrect")
)
Functions ¶
This section is empty.
Types ¶
type StatsClient ¶
type StatsClient struct {
// contains filtered or unexported fields
}
StatsClient is the pure Go implementation for VPP stats API.
func NewStatsClient ¶
func NewStatsClient(sockAddr string) *StatsClient
NewStatsClient returns new VPP stats API client.
func (*StatsClient) Connect ¶
func (c *StatsClient) Connect() error
func (*StatsClient) Disconnect ¶
func (c *StatsClient) Disconnect() error
func (*StatsClient) DumpStats ¶
func (c *StatsClient) DumpStats(patterns ...string) (entries []adapter.StatEntry, err error)
func (*StatsClient) DumpVPCStats ¶ added in v0.3.7
func (c *StatsClient) DumpVPCStats(vni ...uint64) (entries []adapter.StatEntry, err error)
func (*StatsClient) GetVPCStats ¶ added in v0.3.7
func (c *StatsClient) GetVPCStats(stats []adapter.StatEntry, vni ...uint64) (map[uint64]*VPCCounter, error)
GetVPCStats returns the summed statistical value of each thread
func (*StatsClient) ListStats ¶
func (c *StatsClient) ListStats(patterns ...string) (names []string, err error)
func (*StatsClient) PrepareDir ¶ added in v0.3.7
func (c *StatsClient) PrepareDir(patterns ...string) (*adapter.StatDir, error)
Click to show internal directories.
Click to hide internal directories.