statsd

package
v0.9.1-0...-94679d8 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package statsd implements a component to get a statsd client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Module

func Module() fxutil.Module

Module defines the fx options for this component.

Types

type Component

type Component interface {
	// Get a pre-configured and shared statsd client (requires STATSD_URL to be set)
	// The client gets created uppon the first Get() call
	Get() (ddgostatsd.ClientInterface, error)

	// Create a pre-configured statsd client
	Create(options ...ddgostatsd.Option) (ddgostatsd.ClientInterface, error)

	// CreateForAddr returns a pre-configured statsd client that defaults to `addr` if no env var is set
	CreateForAddr(addr string, options ...ddgostatsd.Option) (ddgostatsd.ClientInterface, error)

	// CreateForHostPort returns a pre-configured statsd client that defaults to `host:port` if no env var is set
	CreateForHostPort(host string, port int, options ...ddgostatsd.Option) (ddgostatsd.ClientInterface, error)
}

Component is the component type.

Jump to

Keyboard shortcuts

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