cli

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2024 License: AGPL-3.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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