quipo / statsd

Golang StatsD client
MIT License
164 stars 51 forks source link

Added CreateTCPSocket to interface and the NoopClient. #32

Closed gulyasm closed 8 years ago

gulyasm commented 8 years ago

What does this PR solve?

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)

Solution

Added CreateTCPSocket to Statsd interface and an empty noop function to NoopClient.

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.

gulyasm commented 8 years ago

@quipo Can I do anything to advance this PR?

quipo commented 8 years ago

thanks @gulyasm. Sorry, I hadn't seen the notification on your PR.