Documentation ¶
Index ¶
- func NewMultiCollector(log logger.Log, opts ...MultiCollectorOption) (stats.Collector, error)
- type MultiCollectorOption
- func OptDatadogConfig(cfg datadog.Config) MultiCollectorOption
- func OptDefaultTags(tags ...string) MultiCollectorOption
- func OptHostname(hostname string) MultiCollectorOption
- func OptMetaConfig(meta configmeta.Meta) MultiCollectorOption
- func OptPrinter(printer bool) MultiCollectorOption
- func OptPrometheusConfig(cfg statsd.Config) MultiCollectorOption
- func OptServiceEnv(serviceEnv string) MultiCollectorOption
- func OptServiceName(serviceName string) MultiCollectorOption
- func OptVersion(version string) MultiCollectorOption
- type MultiCollectorOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMultiCollector ¶
NewMultiCollector initializes the stats collector(s).
Types ¶
type MultiCollectorOption ¶
type MultiCollectorOption func(*MultiCollectorOptions)
MultiCollectorOption mutates MultiCollectorOptions.
func OptDatadogConfig ¶
func OptDatadogConfig(cfg datadog.Config) MultiCollectorOption
OptDatadogConfig sets the datadog config.
func OptDefaultTags ¶
func OptDefaultTags(tags ...string) MultiCollectorOption
OptDefaultTags adds default tags.
func OptHostname ¶
func OptHostname(hostname string) MultiCollectorOption
OptHostname sets the default hostname.
func OptMetaConfig ¶
func OptMetaConfig(meta configmeta.Meta) MultiCollectorOption
OptMetaConfig sets the datadog config.
func OptPrinter ¶
func OptPrinter(printer bool) MultiCollectorOption
OptPrinter sets if we should enable the printer.
func OptPrometheusConfig ¶
func OptPrometheusConfig(cfg statsd.Config) MultiCollectorOption
OptPrometheusConfig sets the prometheus config.
func OptServiceEnv ¶
func OptServiceEnv(serviceEnv string) MultiCollectorOption
OptServiceEnv sets the default service env.
func OptServiceName ¶
func OptServiceName(serviceName string) MultiCollectorOption
OptServiceName sets the default service name.
func OptVersion ¶
func OptVersion(version string) MultiCollectorOption
OptVersion sets the default version tag.
type MultiCollectorOptions ¶
type MultiCollectorOptions struct { configmeta.Meta DefaultTags []string Datadog datadog.Config Prometheus statsd.Config Printer bool }
MultiCollectorOptions are the options for the multi-collector.
Click to show internal directories.
Click to hide internal directories.