cli

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithContext

func WithContext(runner Runner) func(cmd *cobra.Command, args []string) error

Types

type App

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

func NewApp

func NewApp(name, desc string) *App

func (*App) AddCommands

func (a *App) AddCommands(cmds ...*cobra.Command)

func (*App) Run

func (a *App) Run() error

type Runner

type Runner func(ctx context.Context, telemetry Telemetry) error

type Telemetry

type Telemetry struct {
	Logger *zap.Logger
	Flags  TelemetryFlags
}

func (Telemetry) PrometheusMetricsHandler

func (t Telemetry) PrometheusMetricsHandler() http.Handler

type TelemetryFlags

type TelemetryFlags struct {
	LogLevel                string
	LogEncoding             string
	Profile                 bool
	ProfileDebugLogging     bool
	ProfilerCredentialsFile string
	Metrics                 bool
}

Jump to

Keyboard shortcuts

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