cli

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFlags

func AddFlags(rootCmd *cobra.Command)

func GetLogger added in v0.7.0

func GetLogger(params *Params) *log.Logger

GetLogger returns a file logger, according to params.

func HandleProfMem added in v0.7.0

func HandleProfMem(logger *log.Logger, p *Params)

func RootCmd

func RootCmd(fn RootFn) *cobra.Command

func StartCpuProfile added in v0.7.0

func StartCpuProfile(logger *log.Logger, p *Params) func()

func StartCpuProfileSrv added in v0.7.0

func StartCpuProfileSrv(ctx context.Context, logger *log.Logger, p *Params)

Types

type Params

type Params struct {
	LogLevel        am.LogLevel
	Version         bool
	ListenAddr      string
	DebugAddr       string
	ImportData      string
	StartupMachine  string
	StartupView     string
	StartupTx       int
	EnableMouse     bool
	CleanOnConnect  bool
	SelectConnected bool
	ProfMem         bool
	ProfCpu         bool
	ProfSrv         string
	MaxMemMb        int
	Log2Ttl         time.Duration
	Reader          bool
	FwdData         []string
	ViewNarrow      bool
	ViewRain        bool

	OutputDir     string
	Graph         int
	OutputClients bool
	Timelines     int
	Rain          bool
	TailMode      bool
	OutputTx      bool
	MachUrl       string
}

func ParseParams

func ParseParams(cmd *cobra.Command, args []string) Params

type RootFn

type RootFn func(cmd *cobra.Command, args []string, params Params)

Jump to

Keyboard shortcuts

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