extkingpin

package
v0.16.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2020 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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 string, 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