top

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTopCmd

func NewTopCmd() *cobra.Command

Types

type CommonTopFlags

type CommonTopFlags struct {
	utils.CommonFlags

	OutputInterval int
	MaxRows        int
	SortBy         string
	ParsedSortBy   []string
}

type EbpfParser

type EbpfParser struct {
	commonutils.BaseParser[types.Stats]
	// contains filtered or unexported fields
}

type TopGadget added in v0.11.0

type TopGadget[Stats any] struct {
	sync.Mutex
	// contains filtered or unexported fields
}

TopGadget represents a gadget belonging to the top category.

func (*TopGadget[Stats]) Callback added in v0.11.0

func (g *TopGadget[Stats]) Callback(line string, node string)

func (*TopGadget[Stats]) PrintHeader added in v0.11.0

func (g *TopGadget[Stats]) PrintHeader()

func (*TopGadget[Stats]) PrintStats added in v0.11.0

func (g *TopGadget[Stats]) PrintStats()

func (*TopGadget[Stats]) Run added in v0.11.0

func (g *TopGadget[Stats]) Run(args []string) error

func (*TopGadget[Stats]) StartPrintLoop added in v0.11.0

func (g *TopGadget[Stats]) StartPrintLoop()

type TopParser added in v0.11.0

type TopParser[Stats any] interface {
	// BuildColumnsHeader returns a header to be used when the user requests to
	// present the output in columns.
	BuildColumnsHeader() string
	TransformIntoColumns(*Stats) string
}

TopParser defines the interface that every top-gadget parser has to implement.

Jump to

Keyboard shortcuts

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