extkingpin

package
v0.23.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2021 License: Apache-2.0 Imports: 14 Imported by: 2

Documentation

Index

Constants

View Source
const UsageTemplate = `` /* 1202-byte string literal not displayed */

Variables

This section is empty.

Functions

func ModelDuration added in v0.17.0

func ModelDuration(flags *kingpin.FlagClause) *model.Duration

func RegisterCommonObjStoreFlags added in v0.17.0

func RegisterCommonObjStoreFlags(cmd FlagClause, suffix string, required bool, extraDesc ...string) *extflag.PathOrContent

RegisterCommonObjStoreFlags register flags to specify object storage configuration.

func RegisterCommonTracingFlags added in v0.17.0

func RegisterCommonTracingFlags(app FlagClause) *extflag.PathOrContent

RegisterCommonTracingFlags registers flags to pass a tracing configuration to be used with OpenTracing.

func RegisterGRPCFlags added in v0.17.0

func RegisterGRPCFlags(cmd FlagClause) (
	grpcBindAddr *string,
	grpcGracePeriod *model.Duration,
	grpcTLSSrvCert *string,
	grpcTLSSrvKey *string,
	grpcTLSSrvClientCA *string,
	grpcMaxConnectionAge *time.Duration,
)

RegisterGRPCFlags registers flags commonly used to configure gRPC servers with.

func RegisterHTTPFlags added in v0.17.0

func RegisterHTTPFlags(cmd FlagClause) (httpBindAddr *string, httpGracePeriod *model.Duration, httpTLSConfig *string)

RegisterCommonObjStoreFlags register flags commonly used to configure http servers with.

func RegisterRequestLoggingFlags added in v0.20.0

func RegisterRequestLoggingFlags(app FlagClause) *extflag.PathOrContent

RegisterRequestLoggingFlags registers flags to pass a request logging configuration to be used.

func RegisterSelectorRelabelFlags added in v0.17.0

func RegisterSelectorRelabelFlags(cmd FlagClause) *extflag.PathOrContent

RegisterSelectorRelabelFlags register flags to specify relabeling configuration selecting blocks to process.

Types

type App

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

App is a wrapper around kingping.Application for easier use.

func NewApp

func NewApp(app *kingpin.Application) *App

NewApp returns new App.

func (*App) Command

func (a *App) Command(cmd, help string) AppClause

func (*App) Parse

func (a *App) Parse() (cmd string, setup SetupFunc)

type AppClause

type AppClause interface {
	FlagClause
	Command(cmd string, help string) AppClause
	Flags() []*kingpin.FlagModel
	Setup(s SetupFunc)
}

type FlagClause

type FlagClause interface {
	Flag(name, help string) *kingpin.FlagClause
}

type SetupFunc

type SetupFunc func(*run.Group, log.Logger, *prometheus.Registry, opentracing.Tracer, <-chan struct{}, bool) error

TODO(bwplotka): Consider some extkingpin package that will not depend on those. Needed: Generics!

Jump to

Keyboard shortcuts

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