Skip to content

Commit

Permalink
use transmission.Response
Browse files Browse the repository at this point in the history
  • Loading branch information
lizthegrey committed Feb 28, 2020
1 parent f972b96 commit b383011
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions leash.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ import (
"syscall"
"time"

"github.com/sirupsen/logrus"
dynsampler "github.com/honeycombio/dynsampler-go"
"github.com/honeycombio/libhoney-go"
"github.com/honeycombio/libhoney-go/transmission"
"github.com/honeycombio/urlshaper"
"github.com/sirupsen/logrus"

"github.com/honeycombio/honeytail/event"
"github.com/honeycombio/honeytail/parsers"
Expand Down Expand Up @@ -173,7 +174,7 @@ func run(ctx context.Context, options GlobalOptions) {
go sendToLibhoney(ctx, realToBeSent, toBeResent, delaySending, doneSending)

// start a goroutine that reads from responses and logs.
responses := libhoney.Responses()
responses := libhoney.TxResponses()
responsesWG.Add(1)
go func() {
handleResponses(responses, stats, toBeResent, delaySending, options)
Expand Down Expand Up @@ -620,7 +621,7 @@ func sendEvent(ev event.Event) {

// handleResponses reads from the response queue, logging a summary and debug
// re-enqueues any events that failed to send in a retryable way
func handleResponses(responses chan libhoney.Response, stats *responseStats,
func handleResponses(responses chan transmission.Response, stats *responseStats,
toBeResent chan event.Event, delaySending chan int,
options GlobalOptions) {
go logStats(stats, options.StatusInterval)
Expand Down
6 changes: 3 additions & 3 deletions response_stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"sync"
"time"

"github.com/sirupsen/logrus"
"github.com/honeycombio/honeytail/event"
"github.com/honeycombio/libhoney-go"
"github.com/honeycombio/libhoney-go/transmission"
"github.com/sirupsen/logrus"
)

// responseStats is a container for collecting statistics about events sent
Expand Down Expand Up @@ -42,7 +42,7 @@ func newResponseStats() *responseStats {
}

// update adds a response into the stats container
func (r *responseStats) update(rsp libhoney.Response) {
func (r *responseStats) update(rsp transmission.Response) {
r.lock.Lock()
defer r.lock.Unlock()
r.count += 1
Expand Down

0 comments on commit b383011

Please sign in to comment.