inspect

package
v1.16.4 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: MPL-2.0 Imports: 19 Imported by: 0

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

func ByteSize(bytes uint64) string

func GetSupportedFormats

func GetSupportedFormats() []string

func New

func New(ui cli.Ui) *cmd

Types

type Formatter

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

func NewFormatter

func NewFormatter(format string) (Formatter, error)

type MetadataInfo

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

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

OutputFormat is used for passing information through the formatter

type SnapshotInfo

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