presentation

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2017 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Overview

Package presentation implements interactive and non-interactive reporting of cache activity.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StatProvider

type StatProvider func() Stats

StatProvider returns a snapshot of current runtime statistics.

type Stats

type Stats struct {
	// count of packets that entered the kernel BPF
	PacketsEnteredFilter int
	// count of packets that passed the BPF and queued or dropped by the kernel
	PacketsPassedFilter int
	// count of packets received from pcap
	PacketsCaptured int
	// count of packets dropped due to kernel buffer overflow
	PacketsDroppedKernel int
	// count of packets dropped due to analysis queue being full
	PacketsDroppedAnalysis int
	PacketsDroppedTotal    int
	ResponsesParsed        int
}

Stats collects statistics on runtime performance to be displayed to the user.

type UIHandler

type UIHandler interface {
	// Run starts this UIHandler running.
	// It does not return unless an error occurs.
	Run() error
	// Log displays a log message to the user.
	Log(items ...interface{})
}

UIHandler is the external API for an interactive user interface.

func New

func New(analysisPool *analysis.Pool, interval time.Duration, cumulative bool, statProvider StatProvider) UIHandler

New returns a UIHandler that is ready to run

Jump to

Keyboard shortcuts

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