writer

package
v0.0.0-...-04720bc Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CgStatsDisplayWriter

type CgStatsDisplayWriter struct {
	// contains filtered or unexported fields
}

CgStatsDisplayWriter will display stats for a set of cgroups to the screen

func (*CgStatsDisplayWriter) Write

type CgStatsVerboseWriter

type CgStatsVerboseWriter struct {
	// contains filtered or unexported fields
}

func (*CgStatsVerboseWriter) Write

type CgroupStatsCsvWriter

type CgroupStatsCsvWriter struct {
	// contains filtered or unexported fields
}

CgroupStatsCsvWriter is an implementation of StatsWriter which will write cgroup stats to a CSV file.

func NewCgroupStatsCsvWriter

func NewCgroupStatsCsvWriter(filename string) (*CgroupStatsCsvWriter, error)

func (*CgroupStatsCsvWriter) Write

type DisplayVerbosity

type DisplayVerbosity int
const (
	Normal  DisplayVerbosity = 0
	Verbose DisplayVerbosity = 1
)

type StatsWriter

type StatsWriter interface {
	// Write will output the given CgroupStatsCollection to either the display or to a file.
	Write(cgroupStats common.CgroupStatsCollection) error
}

func NewCgStatsDisplayWriter

func NewCgStatsDisplayWriter() StatsWriter

func NewCgroupStatsVerboseWriter

func NewCgroupStatsVerboseWriter() StatsWriter

func NewViewWriters

func NewViewWriters(options []ViewWriterOptions) []StatsWriter

type ViewWriterOptions

type ViewWriterOptions func() (StatsWriter, error)

func WithCSVWriter

func WithCSVWriter(filename string) ViewWriterOptions

func WithDisplayWriter

func WithDisplayWriter(verbosity DisplayVerbosity) ViewWriterOptions

Jump to

Keyboard shortcuts

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