inspect

package
v1.12.7 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 License: MPL-2.0 Imports: 20 Imported by: 40 modules, 37 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	PrettyFormat string = "pretty"
	JSONFormat   string = "json"
)
View Source
const (
	BYTE = 1 << (10 * iota)
	KILOBYTE
	MEGABYTE
	GIGABYTE
	TERABYTE
)

Variables

This section is empty.

Functions

func ByteSize added in v1.9.0

func ByteSize(bytes uint64) string

func GetSupportedFormats added in v1.10.0

func GetSupportedFormats() []string

func New

func New(ui cli.Ui) *cmd

Types

type Formatter added in v1.10.0

type Formatter interface {
	Format(*OutputFormat) (string, error)
}

func NewFormatter added in v1.10.0

func NewFormatter(format string) (Formatter, error)

type MetadataInfo added in v1.10.0

type MetadataInfo struct {
	ID      string
	Size    int64
	Index   uint64
	Term    uint64
	Version raft.SnapshotVersion
}

MetadataInfo is used for passing information through the formatter

type OutputFormat added in v1.10.0

type OutputFormat struct {
	Meta        *MetadataInfo
	Stats       []typeStats
	StatsKV     []typeStats
	TotalSize   int
	TotalSizeKV int
}

OutputFormat is used for passing information through the formatter

type SnapshotInfo added in v1.10.0

type SnapshotInfo struct {
	Meta        MetadataInfo
	Stats       map[structs.MessageType]typeStats
	StatsKV     map[string]typeStats
	TotalSize   int
	TotalSizeKV int
}

SnapshotInfo is used for passing snapshot stat information between functions

Jump to

Keyboard shortcuts

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