cli

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: Apache-2.0 Imports: 18 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 MetricsBuilder added in v0.11.1

type MetricsBuilder interface {
	Build() (io.Reader, error)
}

type Runner added in v0.1.1

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

type Telemetry

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

func (Telemetry) CustomMetricsHandlerFor added in v0.11.1

func (t Telemetry) CustomMetricsHandlerFor(reg prometheus.Gatherer, mb MetricsBuilder) http.Handler

func (Telemetry) PrometheusMetricsHandler added in v0.1.1

func (t Telemetry) PrometheusMetricsHandler() http.Handler

func (Telemetry) PrometheusMetricsHandlerFor added in v0.11.0

func (t Telemetry) PrometheusMetricsHandlerFor(r *prometheus.Registry) 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