statsdtest

package
v1.71.0-rc.4 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2025 License: Apache-2.0, BSD-3-Clause, Apache-2.0 Imports: 5 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 added in v1.71.0

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 added in v1.71.0

func (t TestStatsdCall) IntVal() int64

func (TestStatsdCall) Name added in v1.71.0

func (t TestStatsdCall) Name() string

func (TestStatsdCall) Tags added in v1.71.0

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) CountWithTimestamp added in v1.70.0

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 added in v1.71.0

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 added in v1.70.0

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

func (*TestStatsdClient) GetCallsByName added in v1.71.0

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