Documentation ¶
Index ¶
Constants ¶
View Source
const ( // BackendName is the name of this backend. BackendName = "graphite" // DefaultAddress is the default address of Graphite server. DefaultAddress = "localhost:2003" // DefaultDialTimeout is the default net.Dial timeout. DefaultDialTimeout = 5 * time.Second // DefaultWriteTimeout is the default socket write timeout. DefaultWriteTimeout = 30 * time.Second // DefaultGlobalPrefix is the default global prefix. DefaultGlobalPrefix = "stats" // DefaultPrefixCounter is the default counters prefix. DefaultPrefixCounter = "counters" // DefaultPrefixTimer is the default timers prefix. DefaultPrefixTimer = "timers" // DefaultPrefixGauge is the default gauges prefix. DefaultPrefixGauge = "gauges" // DefaultPrefixSet is the default sets prefix. DefaultPrefixSet = "sets" // DefaultGlobalSuffix is the default global suffix. DefaultGlobalSuffix = "" // DefaultLegacyNamespace controls whether legacy namespace should be used by default. DefaultLegacyNamespace = true )
Variables ¶
This section is empty.
Functions ¶
func NewClient ¶
func NewClient(config *Config) (backendTypes.Backend, error)
NewClient constructs a Graphite backend object.
func NewClientFromViper ¶
func NewClientFromViper(v *viper.Viper) (backendTypes.Backend, error)
NewClientFromViper constructs a GraphiteClient object by connecting to an address.
Types ¶
type Config ¶
type Config struct { Address *string DialTimeout *time.Duration WriteTimeout *time.Duration GlobalPrefix *string PrefixCounter *string PrefixTimer *string PrefixGauge *string PrefixSet *string GlobalSuffix *string LegacyNamespace *bool }
Config holds configuration for the Graphite backend.
Click to show internal directories.
Click to hide internal directories.