cli

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flags

type Flags struct {
	Version    versionFlag `name:"version" help:"Print version information and quit"`
	Pretty     bool        `type:"bool" default:"false" env:"HEARCHCO_PRETTY" help:"Make logs pretty"`
	Verbosity  int8        `type:"counter" default:"0" short:"v" env:"HEARCHCO_VERBOSITY" help:"Log level verbosity"`
	ConfigPath string      `type:"path" default:"hearchco.yaml" env:"HEARCHCO_CONFIG_PATH" help:"Config file path"`

	Profiler
}

func Setup

func Setup(ver string, timestamp string, commit string) (Flags, string)

Returns flags struct from parsed cli arguments.

type Profiler

type Profiler struct {
	ProfilerServe  bool `type:"bool" default:"false" help:"Run the profiler and serve at /debug/pprof/ http endpoint"`
	ProfilerCPU    bool `type:"bool" default:"false" help:"Use cpu profiling"`
	ProfilerHeap   bool `type:"bool" default:"false" help:"Use heap profiling"`
	ProfilerGOR    bool `type:"bool" default:"false" help:"Use goroutine profiling"`
	ProfilerThread bool `type:"bool" default:"false" help:"Use threadcreate profiling"`
	ProfilerAlloc  bool `type:"bool" default:"false" help:"Use alloc profiling"`
	ProfilerBlock  bool `type:"bool" default:"false" help:"Use block profiling"`
	ProfilerMutex  bool `type:"bool" default:"false" help:"Use mutex profiling"`
	ProfilerClock  bool `type:"bool" default:"false" help:"Use clock profiling"`
	ProfilerTrace  bool `type:"bool" default:"false" help:"Use trace profiling"`
}

Jump to

Keyboard shortcuts

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