Documentation ¶
Overview ¶
Package appflag contains functionality to work with flags.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder interface { BindRoot(flagSet *pflag.FlagSet) NewRunFunc(func(context.Context, Container) error) func(context.Context, app.Container) error }
Builder builds run functions.
func NewBuilder ¶
func NewBuilder(appName string, options ...BuilderOption) Builder
NewBuilder returns a new Builder.
type BuilderOption ¶
type BuilderOption func(*builder)
BuilderOption is an option for a new Builder
func BuilderWithTimeout ¶
func BuilderWithTimeout(defaultTimeout time.Duration) BuilderOption
BuilderWithTimeout returns a new BuilderOption that adds a timeout flag and the default timeout.
func BuilderWithTracing ¶ added in v0.25.0
func BuilderWithTracing() BuilderOption
BuilderWithTracing enables zap tracing for the builder.
Click to show internal directories.
Click to hide internal directories.