1package statsd
2
3import "time"
4
5// NoOpClient is a statsd client that does nothing. Can be useful in testing
6// situations for library users.
7type NoOpClient struct{}
8
9// Gauge does nothing and returns nil
10func (n *NoOpClient) Gauge(name string, value float64, tags []string, rate float64) error {
11	return nil
12}
13
14// Count does nothing and returns nil
15func (n *NoOpClient) Count(name string, value int64, tags []string, rate float64) error {
16	return nil
17}
18
19// Histogram does nothing and returns nil
20func (n *NoOpClient) Histogram(name string, value float64, tags []string, rate float64) error {
21	return nil
22}
23
24// Distribution does nothing and returns nil
25func (n *NoOpClient) Distribution(name string, value float64, tags []string, rate float64) error {
26	return nil
27}
28
29// Decr does nothing and returns nil
30func (n *NoOpClient) Decr(name string, tags []string, rate float64) error {
31	return nil
32}
33
34// Incr does nothing and returns nil
35func (n *NoOpClient) Incr(name string, tags []string, rate float64) error {
36	return nil
37}
38
39// Set does nothing and returns nil
40func (n *NoOpClient) Set(name string, value string, tags []string, rate float64) error {
41	return nil
42}
43
44// Timing does nothing and returns nil
45func (n *NoOpClient) Timing(name string, value time.Duration, tags []string, rate float64) error {
46	return nil
47}
48
49// TimeInMilliseconds does nothing and returns nil
50func (n *NoOpClient) TimeInMilliseconds(name string, value float64, tags []string, rate float64) error {
51	return nil
52}
53
54// Event does nothing and returns nil
55func (n *NoOpClient) Event(e *Event) error {
56	return nil
57}
58
59// SimpleEvent does nothing and returns nil
60func (n *NoOpClient) SimpleEvent(title, text string) error {
61	return nil
62}
63
64// ServiceCheck does nothing and returns nil
65func (n *NoOpClient) ServiceCheck(sc *ServiceCheck) error {
66	return nil
67}
68
69// SimpleServiceCheck does nothing and returns nil
70func (n *NoOpClient) SimpleServiceCheck(name string, status ServiceCheckStatus) error {
71	return nil
72}
73
74// Close does nothing and returns nil
75func (n *NoOpClient) Close() error {
76	return nil
77}
78
79// Flush does nothing and returns nil
80func (n *NoOpClient) Flush() error {
81	return nil
82}
83
84// SetWriteTimeout does nothing and returns nil
85func (n *NoOpClient) SetWriteTimeout(d time.Duration) error {
86	return nil
87}
88
89// Verify that NoOpClient implements the ClientInterface.
90// https://golang.org/doc/faq#guarantee_satisfies_interface
91var _ ClientInterface = &NoOpClient{}
92