metric

package
v0.0.0-...-5561049 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TruncateTags

func TruncateTags(maxLength int, tags map[string]string) map[string]string

Types

type Connection

type Connection struct {
	// contains filtered or unexported fields
}

func NewConnection

func NewConnection(newSender SenderFactory) *Connection

func (*Connection) Close

func (c *Connection) Close()

func (*Connection) Connect

func (c *Connection) Connect(addr string) error

func (*Connection) Flush

func (c *Connection) Flush()

func (*Connection) Send

func (c *Connection) Send(metrics []Metric)

type Metric

type Metric struct {
	Name          string
	Value         float64
	Source        string
	Tags          map[string]string
	ComponentName string
}

func Common

func Common(clusterName string, ms []Metric) []Metric

type Sender

type Sender interface {
	SendMetric(name string, value float64, ts int64, source string, tags map[string]string) error
	Flush() error
	Close()
}

type SenderFactory

type SenderFactory func(addr string) (Sender, error)

func WavefrontSenderFactory

func WavefrontSenderFactory(options ...senders.Option) SenderFactory

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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