cmd

package
v0.0.0-...-cdef871 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Logger xbus.ZeroLogger

Logger is a logger automatically configured by command line options

View Source
var RootCmd = &cobra.Command{
	Use:   "xbusctl",
	Short: "Xbus control utility",
	Long: `Xbus control utility

xbusctl is a utility for managing a xbus instance.`,
	Run: version.Cmd,
}

RootCmd represents the base command when called without any subcommands

Functions

func Execute

func Execute()

Execute adds all child commands to the root command sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func FmtStorageStat

func FmtStorageStat(stat control.StorageStat) string

FmtStorageStat formats a StorageStat

func GetClient

func GetClient(nocert bool) (*xbus.Client, error)

GetClient returns a XBusClient connected (if relevant) to the bus using the cli options

func Indent

func Indent(data, indent []byte) []byte

Indent a block of text

func IndentString

func IndentString(data, indent string) string

IndentString a block of text

Types

type IndentWriter

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

IndentWriter writes with added indentation

func (*IndentWriter) Write

func (w *IndentWriter) Write(data []byte) (int, error)

Jump to

Keyboard shortcuts

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