Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthConfig ¶
func AuthConfig(filterOptions ...AuthConfigOptions) (*promauth.Config, error)
AuthConfig returns promauth.Config based on the given params
Types ¶
type AuthConfigOptions ¶
type AuthConfigOptions func(config *promauth.HTTPClientConfig)
AuthConfigOptions options which helps build promauth.Config
func WithBasicAuth ¶
func WithBasicAuth(username, password, passwordFile string) AuthConfigOptions
WithBasicAuth returns AuthConfigOptions and initialized promauth.BasicAuthConfig based on given params
func WithBearer ¶
func WithBearer(token, tokenFile string) AuthConfigOptions
WithBearer returns AuthConfigOptions and set BearerToken or BearerTokenFile based on given params
func WithHeaders ¶
func WithHeaders(headers string) AuthConfigOptions
WithHeaders returns AuthConfigOptions and set Headers based on the given params
type Counter ¶
Counter is a metrics.Counter with Name
func GetOrCreateCounter ¶
GetOrCreateCounter creates a new Counter with the given name
func (Counter) Unregister ¶
func (nm Counter) Unregister()
Unregister removes the metric by name from default registry
type ErrGroup ¶
type ErrGroup struct {
// contains filtered or unexported fields
}
ErrGroup accumulates multiple errors and produces single error message.
type Gauge ¶
Gauge is a metrics.Gauge with Name
func GetOrCreateGauge ¶
GetOrCreateGauge creates a new Gauge with the given name
func (Gauge) Unregister ¶
func (nm Gauge) Unregister()
Unregister removes the metric by name from default registry
type Summary ¶
Summary is a metrics.Summary with Name
func GetOrCreateSummary ¶
GetOrCreateSummary creates a new Summary with the given name
func (Summary) Unregister ¶
func (nm Summary) Unregister()
Unregister removes the metric by name from default registry