cli

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2024 License: MIT Imports: 13 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
	LogFile         string
	Version         bool
	ServerAddr      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
}

func ParseParams

func ParseParams(cmd *cobra.Command, _ []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