statsdtest

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server represents an in-memory statsd server for testing.

func NewServer

func NewServer(t *testing.T) *Server

NewServer creates a new in-memory statsd server for testing.

func (*Server) Addr

func (s *Server) Addr() net.Addr

Addr returns the net.Addr that the UDP server is listening on.

func (*Server) Aggregated

func (s *Server) Aggregated() map[string]int

Aggregated returns an aggregated stats value.

func (*Server) Close

func (s *Server) Close()

Close stops the listener.

func (*Server) Stats

func (s *Server) Stats() statsdtest.Stats

Stats returns all stats that have been received by this server, keeping only Stat and Value.

Jump to

Keyboard shortcuts

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