Documentation
¶
Overview ¶
Package types contains all the types needed by Flare providers without the underlying implementation and dependencies. This allows components to offer flare capabilities without linking to the flare dependencies when the flare feature is not built in the binary.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FlareArgs ¶ added in v0.52.3
type FlareArgs = flarebuilder.FlareArgs
FlareArgs contains the args passed in by the caller to the flare generation process see the aliased type for the full description
type FlareBuilder ¶
type FlareBuilder = flarebuilder.FlareBuilder
FlareBuilder contains all the helpers to add files to a flare archive. see the aliased type for the full description
type FlareCallback ¶
type FlareCallback func(fb FlareBuilder) error
FlareCallback is a function that can be registered as a data provider for flares by way of the FlareProvider struct. This function, if registered, will be called everytime a flare is created.
type FlareFiller ¶ added in v0.52.3
type FlareFiller struct {
Callback FlareCallback
Timeout FlareTimeout
}
FlareFiller is a struct that can be registered as a data provider for flares. This struct's callback, if registered, will be called everytime a flare is created.
func NewFiller ¶ added in v0.52.3
func NewFiller(callback FlareCallback) *FlareFiller
NewFiller wraps the callback with the default FlareProvider configuration. This function is exposed via the public api to support legacy flare functionality that has not yet been componetized. New callers are strongly encouraged to utilize the NewProvider or NewProviderWithTimeout functions instead.
type FlareTimeout ¶ added in v0.52.3
type FlareTimeout func(fb FlareBuilder) time.Duration
FlareTimeout is a function that provides the maximum expected runtime duration of a FlareProvider's callback. Return 0 from this function to utilize the default timeout instead.
type ProfileData ¶ added in v0.52.3
ProfileData maps (pprof) profile names to the profile data.
type Provider ¶
type Provider struct {
fx.Out
FlareFiller *FlareFiller `group:"flare"`
}
Provider is provided by other components to register themselves to provide flare data.
func NewProvider ¶
func NewProvider(callback FlareCallback) Provider
NewProvider returns a new Provider to be called when a flare is created
func NewProviderWithTimeout ¶ added in v0.52.3
func NewProviderWithTimeout(callback FlareCallback, timeout FlareTimeout) Provider
NewProviderWithTimeout returns a new Provider to be called when a flare is created