Closed gulyasm closed 8 years ago
CreateTCPSocket function introduced in #24 is not in the Statsd interface and in the NoopClient.
Run the following code:
var client statsd.Statsd client = statsd.NewStatsdClient("localhost:8125", "testprefix") err := client.CreateTCPSocket() if err != nil { log.Fatalf("Error occured setting up statsd. Error: %q\n", err.Error()) }
Result from my use case:
$ go build ./monitoring.go:48: statsdclient.CreateTCPSocket undefined (type statsd.Statsd has no field or method CreateTCPSocket)
Added CreateTCPSocket to Statsd interface and an empty noop function to NoopClient.
CreateTCPSocket
NoopClient
Run the code snippet before and after the fix.
None, this is a backwards compatible change, not affecting other parts of the code.
@quipo Can I do anything to advance this PR?
thanks @gulyasm. Sorry, I hadn't seen the notification on your PR.
What does this PR solve?
CreateTCPSocket function introduced in #24 is not in the Statsd interface and in the NoopClient.
Run the following code:
Result from my use case:
Solution
Added
CreateTCPSocket
to Statsd interface and an empty noop function toNoopClient
.How to test
Run the code snippet before and after the fix.
Risk
None, this is a backwards compatible change, not affecting other parts of the code.