statsdtest

package
v2.2.0-dev Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2025 License: Apache-2.0, BSD-3-Clause, Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestStatsdCall

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

func FilterCallsByName

func FilterCallsByName(calls []TestStatsdCall, name string) []TestStatsdCall

FilterCallsByName returns a slice of TestStatsdCalls with the provided name, from the list of provided TestStatsdCalls

func (TestStatsdCall) IntVal

func (t TestStatsdCall) IntVal() int64

func (TestStatsdCall) Name

func (t TestStatsdCall) Name() string

func (TestStatsdCall) Tags

func (t TestStatsdCall) Tags() []string

type TestStatsdClient

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

func (*TestStatsdClient) CallNames

func (tg *TestStatsdClient) CallNames() []string

func (*TestStatsdClient) CallsByName

func (tg *TestStatsdClient) CallsByName() map[string]int

func (*TestStatsdClient) Close

func (tg *TestStatsdClient) Close() error

func (*TestStatsdClient) Closed

func (tg *TestStatsdClient) Closed() bool

func (*TestStatsdClient) Count

func (tg *TestStatsdClient) Count(name string, value int64, tags []string, rate float64) error

func (*TestStatsdClient) CountCalls

func (tg *TestStatsdClient) CountCalls() []TestStatsdCall

func (*TestStatsdClient) CountCallsByTag

func (tg *TestStatsdClient) CountCallsByTag(calls []TestStatsdCall, tag string) int64

func (*TestStatsdClient) CountWithTimestamp

func (tg *TestStatsdClient) CountWithTimestamp(name string, value int64, tags []string, rate float64, _ time.Time) error

func (*TestStatsdClient) Counts

func (tg *TestStatsdClient) Counts() map[string]int64

func (*TestStatsdClient) DistributionSamples

func (tg *TestStatsdClient) DistributionSamples(_ string, _ []float64, _ []string, _ float64) error

func (*TestStatsdClient) Flush

func (tg *TestStatsdClient) Flush() error

func (*TestStatsdClient) Flushed

func (tg *TestStatsdClient) Flushed() int

func (*TestStatsdClient) Gauge

func (tg *TestStatsdClient) Gauge(name string, value float64, tags []string, rate float64) error

func (*TestStatsdClient) GaugeCalls

func (tg *TestStatsdClient) GaugeCalls() []TestStatsdCall

func (*TestStatsdClient) GaugeWithTimestamp

func (tg *TestStatsdClient) GaugeWithTimestamp(name string, value float64, tags []string, rate float64, _ time.Time) error

func (*TestStatsdClient) GetCallsByName

func (tg *TestStatsdClient) GetCallsByName(name string) (calls []TestStatsdCall)

GetCallsByName returns a slice of TestStatsdCalls with the provided name on the TestStatsdClient It's useful if you want to use any TestStatsdCall method calls on the result(s)

func (*TestStatsdClient) Incr

func (tg *TestStatsdClient) Incr(name string, tags []string, rate float64) error

func (*TestStatsdClient) IncrCalls

func (tg *TestStatsdClient) IncrCalls() []TestStatsdCall

func (*TestStatsdClient) Reset

func (tg *TestStatsdClient) Reset()

func (*TestStatsdClient) Tags

func (tg *TestStatsdClient) Tags() []string

func (*TestStatsdClient) Timing

func (tg *TestStatsdClient) Timing(name string, value time.Duration, tags []string, rate float64) error

func (*TestStatsdClient) TimingCalls

func (tg *TestStatsdClient) TimingCalls() []TestStatsdCall

func (*TestStatsdClient) Wait

func (tg *TestStatsdClient) Wait(asserts *assert.Assertions, n int, d time.Duration) error

Wait blocks until n metrics have been reported using the statsdtest.TestStatsdClient or until duration d passes. If d passes, or a wait is already active, an error is returned.

Jump to

Keyboard shortcuts

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