Skip to content
This repository has been archived by the owner on Dec 3, 2019. It is now read-only.

Commit

Permalink
Logrus package change fix
Browse files Browse the repository at this point in the history
  • Loading branch information
datoug committed Jun 17, 2017
1 parent ccfe5e5 commit 454d7c2
Show file tree
Hide file tree
Showing 21 changed files with 59 additions and 53 deletions.
2 changes: 1 addition & 1 deletion client/cherami/authprovider.go
Expand Up @@ -32,7 +32,7 @@ type (
}

// BypassAuthProvider is a dummy implementation for AuthProvider
BypassAuthProvider struct {}
BypassAuthProvider struct{}
)

// NewBypassAuthProvider creates a dummy AuthProvider instance
Expand Down
18 changes: 9 additions & 9 deletions client/cherami/basePublisher.go
Expand Up @@ -30,25 +30,25 @@ import (

"github.com/uber-common/bark"

"github.com/uber/cherami-thrift/.generated/go/cherami"
"github.com/uber/cherami-client-go/common"
"github.com/uber/cherami-client-go/common/backoff"
"github.com/uber/cherami-client-go/common/metrics"
"github.com/uber/cherami-thrift/.generated/go/cherami"
)

type (
// basePublisher contains the data/code
// common to all types of Publisher
// implementations
basePublisher struct {
idCounter int64
path string
client Client
logger bark.Logger
reporter metrics.Reporter
retryPolicy backoff.RetryPolicy
checksumOption cherami.ChecksumOption
reconfigurationPollingInterval time.Duration
idCounter int64
path string
client Client
logger bark.Logger
reporter metrics.Reporter
retryPolicy backoff.RetryPolicy
checksumOption cherami.ChecksumOption
reconfigurationPollingInterval time.Duration
}

// publishError represents a message publishing error
Expand Down
12 changes: 6 additions & 6 deletions client/cherami/client.go
Expand Up @@ -32,8 +32,8 @@ import (
"github.com/uber/cherami-client-go/common/metrics"
"github.com/uber/cherami-thrift/.generated/go/cherami"

log "github.com/Sirupsen/logrus"
"github.com/pborman/uuid"
log "github.com/sirupsen/logrus"
"github.com/uber-common/bark"
"github.com/uber/tchannel-go"
"github.com/uber/tchannel-go/thrift"
Expand Down Expand Up @@ -357,17 +357,17 @@ func getDefaultLogger() bark.Logger {

func getDefaultOptions() *ClientOptions {
return &ClientOptions{
Timeout: time.Minute,
Logger: getDefaultLogger(),
MetricsReporter: metrics.NewNullReporter(),
Timeout: time.Minute,
Logger: getDefaultLogger(),
MetricsReporter: metrics.NewNullReporter(),
ReconfigurationPollingInterval: defaultReconfigurationPollingInterval,
}
}

// verifyOptions is used to verify if we have a metrics reporter and
// a logger. If not, just setup a default logger and a null reporter
// it also validate the timeout is sane
func verifyOptions(opts *ClientOptions) (*ClientOptions, error){
func verifyOptions(opts *ClientOptions) (*ClientOptions, error) {
if opts == nil {
opts = getDefaultOptions()
}
Expand Down Expand Up @@ -417,4 +417,4 @@ func isTransientError(err error) bool {

func getMetricTagValueForPath(path string) string {
return strings.Replace(path, "/", "_", -1)
}
}
2 changes: 1 addition & 1 deletion client/cherami/client_test.go
Expand Up @@ -26,7 +26,7 @@ import (

"github.com/uber/cherami-client-go/common/metrics"

log "github.com/Sirupsen/logrus"
log "github.com/sirupsen/logrus"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
Expand Down
2 changes: 1 addition & 1 deletion client/cherami/connection_test.go
Expand Up @@ -35,7 +35,7 @@ import (
mc "github.com/uber/cherami-client-go/mocks/clients/cherami"
"github.com/uber/cherami-thrift/.generated/go/cherami"

log "github.com/Sirupsen/logrus"
log "github.com/sirupsen/logrus"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
Expand Down
2 changes: 1 addition & 1 deletion client/cherami/delivery_test.go
Expand Up @@ -27,8 +27,8 @@ import (

"github.com/stretchr/testify/suite"

"github.com/uber/cherami-thrift/.generated/go/cherami"
"github.com/uber/cherami-client-go/common"
"github.com/uber/cherami-thrift/.generated/go/cherami"

"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion client/cherami/outputhostconnection_test.go
Expand Up @@ -36,7 +36,7 @@ import (
mc "github.com/uber/cherami-client-go/mocks/clients/cherami"
"github.com/uber/cherami-thrift/.generated/go/cherami"

log "github.com/Sirupsen/logrus"
log "github.com/sirupsen/logrus"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
"github.com/uber-common/bark"
Expand Down
2 changes: 1 addition & 1 deletion client/cherami/reconfigurable.go
Expand Up @@ -23,8 +23,8 @@ package cherami
import (
"time"

"github.com/uber/cherami-client-go/common"
"github.com/uber-common/bark"
"github.com/uber/cherami-client-go/common"
)

type (
Expand Down
10 changes: 5 additions & 5 deletions client/cherami/tchanPublisher.go
Expand Up @@ -78,11 +78,11 @@ var _ Publisher = (*tchannelBatchPublisher)(nil)

func newTChannelBatchPublisher(client Client, tchan *tchannel.Channel, path string, logger bark.Logger, metricsReporter metrics.Reporter, reconfigurationPollingInterval time.Duration) Publisher {
base := basePublisher{
client: client,
retryPolicy: createDefaultPublisherRetryPolicy(),
path: path,
logger: logger.WithField(common.TagDstPth, common.FmtDstPth(path)),
reporter: metricsReporter,
client: client,
retryPolicy: createDefaultPublisherRetryPolicy(),
path: path,
logger: logger.WithField(common.TagDstPth, common.FmtDstPth(path)),
reporter: metricsReporter,
reconfigurationPollingInterval: reconfigurationPollingInterval,
}
return &tchannelBatchPublisher{
Expand Down
2 changes: 1 addition & 1 deletion client/cherami/tchanPublisher_test.go
Expand Up @@ -27,7 +27,7 @@ import (
"testing"
"time"

log "github.com/Sirupsen/logrus"
log "github.com/sirupsen/logrus"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
Expand Down
2 changes: 1 addition & 1 deletion client/cherami/wsconnector.go
Expand Up @@ -25,10 +25,10 @@ import (
"net/http"
"reflect"

"github.com/uber/cherami-thrift/.generated/go/cherami"
"github.com/uber/cherami-client-go/common"
"github.com/uber/cherami-client-go/common/websocket"
"github.com/uber/cherami-client-go/stream"
"github.com/uber/cherami-thrift/.generated/go/cherami"
)

type (
Expand Down
2 changes: 1 addition & 1 deletion common/util.go
Expand Up @@ -37,7 +37,7 @@ import (

"github.com/uber/cherami-thrift/.generated/go/cherami"

log "github.com/Sirupsen/logrus"
log "github.com/sirupsen/logrus"
"github.com/uber/tchannel-go"
"github.com/uber/tchannel-go/hyperbahn"
)
Expand Down
2 changes: 1 addition & 1 deletion common/websocket/base_test.go
Expand Up @@ -26,8 +26,8 @@ import (
"reflect"
"sync"

log "github.com/sirupsen/logrus"
"github.com/uber/cherami-thrift/.generated/go/cherami"
log "github.com/Sirupsen/logrus"
)

// -- Websocket Streaming Server -- //
Expand Down
2 changes: 1 addition & 1 deletion common/websocket/serverclient_test.go
Expand Up @@ -27,7 +27,7 @@ import (
"time"

// "github.com/stretchr/testify/mock"
log "github.com/Sirupsen/logrus"
log "github.com/sirupsen/logrus"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
)
Expand Down
2 changes: 1 addition & 1 deletion common/websocket/stream.go
Expand Up @@ -27,9 +27,9 @@ import (
"sync/atomic"
"time"

"github.com/uber/cherami-client-go/common"
"github.com/apache/thrift/lib/go/thrift"
gorilla "github.com/gorilla/websocket"
"github.com/uber/cherami-client-go/common"
)

type (
Expand Down
2 changes: 1 addition & 1 deletion common/websocket/stream_test.go
Expand Up @@ -36,9 +36,9 @@ import (
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"

"github.com/uber/cherami-thrift/.generated/go/cherami"
"github.com/uber/cherami-client-go/common"
mockWS "github.com/uber/cherami-client-go/mocks/common/websocket"
"github.com/uber/cherami-thrift/.generated/go/cherami"
)

type (
Expand Down
6 changes: 3 additions & 3 deletions example.go
Expand Up @@ -27,9 +27,9 @@ import (
"runtime/debug"
"time"

cthrift "github.com/uber/cherami-thrift/.generated/go/cherami"
"github.com/uber/cherami-client-go/client/cherami"
"github.com/apache/thrift/lib/go/thrift"
"github.com/uber/cherami-client-go/client/cherami"
cthrift "github.com/uber/cherami-thrift/.generated/go/cherami"
)

var host = flag.String("host", "127.0.0.1", "cherami-frontend host IP")
Expand Down Expand Up @@ -59,7 +59,7 @@ func main() {
// First, create the client to interact with Cherami
// Here we directly connect to cherami running on host:port
cClient, err := cherami.NewClient("cherami-example", *host, *port, &cherami.ClientOptions{
Timeout: time.Minute,
Timeout: time.Minute,
AuthProvider: cherami.NewBypassAuthProvider(),
})
exitIfError(err)
Expand Down
34 changes: 20 additions & 14 deletions glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion glide.yaml
Expand Up @@ -4,7 +4,7 @@ import:
version: v1.20.0
subpackages:
- .generated/go/cherami
- package: github.com/Sirupsen/logrus
- package: github.com/sirupsen/logrus
- package: github.com/apache/thrift
subpackages:
- lib/go/thrift
Expand Down
2 changes: 1 addition & 1 deletion mocks/clients/cherami/MockTChanBInClient.go
Expand Up @@ -21,8 +21,8 @@
package cherami

import (
"github.com/uber/cherami-thrift/.generated/go/cherami"
"github.com/uber/cherami-client-go/stream"
"github.com/uber/cherami-thrift/.generated/go/cherami"

"github.com/stretchr/testify/mock"
"github.com/uber/tchannel-go/thrift"
Expand Down
2 changes: 1 addition & 1 deletion mocks/clients/cherami/MockTChanBOutClient.go
Expand Up @@ -21,8 +21,8 @@
package cherami

import (
"github.com/uber/cherami-thrift/.generated/go/cherami"
"github.com/uber/cherami-client-go/stream"
"github.com/uber/cherami-thrift/.generated/go/cherami"

"github.com/stretchr/testify/mock"
"github.com/uber/tchannel-go/thrift"
Expand Down

0 comments on commit 454d7c2

Please sign in to comment.