Documentation ¶
Index ¶
- Constants
- func Addrs(flags *kingpin.FlagClause) (target *addressSlice)
- func ModelDuration(flags *kingpin.FlagClause) *model.Duration
- func NewStaticPathContent(fromPath string) (*staticPathContent, error)
- func PathContentReloader(ctx context.Context, fileContent fileContent, logger log.Logger, ...) error
- func RegisterCommonObjStoreFlags(cmd FlagClause, suffix string, required bool, extraDesc ...string) *extflag.PathOrContent
- func RegisterCommonTracingFlags(app FlagClause) *extflag.PathOrContent
- func RegisterHTTPFlags(cmd FlagClause) (httpBindAddr *string, httpGracePeriod *model.Duration, httpTLSConfig *string)
- func RegisterRequestLoggingFlags(app FlagClause) *extflag.PathOrContent
- func RegisterSelectorRelabelFlags(cmd FlagClause) *extflag.PathOrContent
- type App
- type AppClause
- type FlagClause
- type SetupFunc
Constants ¶
const UsageTemplate = `` /* 1202-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func ModelDuration ¶ added in v0.17.0
func NewStaticPathContent ¶ added in v0.29.0
NewStaticPathContent creates a new content that can be used to serve a static configuration. It copies the configuration from `fromPath` into `destPath` to avoid confusion with file watchers.
func PathContentReloader ¶ added in v0.29.0
func PathContentReloader(ctx context.Context, fileContent fileContent, logger log.Logger, reloadFunc func(), debounceTime time.Duration) error
PathContentReloader runs the reloadFunc when it detects that the contents of fileContent have changed.
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 RegisterHTTPFlags ¶ added in v0.17.0
func RegisterHTTPFlags(cmd FlagClause) (httpBindAddr *string, httpGracePeriod *model.Duration, httpTLSConfig *string)
RegisterHTTPFlags 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.
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
}