statsutil

package
v1.20210727.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMultiCollector

func NewMultiCollector(log logger.Log, opts ...MultiCollectorOption) (stats.Collector, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL