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

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
datoug committed Mar 17, 2017
1 parent 19a34aa commit fe270a7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
18 changes: 2 additions & 16 deletions client/cherami/client.go
Expand Up @@ -100,22 +100,6 @@ func NewClientWithFEClient(feClient cherami.TChanBFrontend, options *ClientOptio
}, nil
}

// NewClientWithFEClient is used by Cherami Frontend to create a Cherami client for itself.
// Cherami customers shouldn't need to use this function.
// This function is deprecated, use NewClientWithFEClient instead
func NewClientWithFE(feClient cherami.TChanBFrontend, options *ClientOptions) Client {
options, err := verifyOptions(options)
if err != nil {
panic(fmt.Sprintf(`Client option is invalid (and NewClientWithFEn is deprecated, use NewClientWithFEClient instead). Error: %v`, err))
}

return &clientImpl{
client: feClient,
options: options,
retryPolicy: createDefaultRetryPolicy(),
}
}

func newClientWithTChannel(ch *tchannel.Channel, options *ClientOptions) (Client, error) {
options, err := verifyOptions(options)
if err != nil {
Expand Down Expand Up @@ -277,6 +261,8 @@ func (c *clientImpl) CreatePublisher(request *CreatePublisherRequest) Publisher

func (c *clientImpl) CreateConsumer(request *CreateConsumerRequest) Consumer {
if request.Options != nil {
c.options.Logger.Warn(`CreateConsumerRequest.Options is deprecated. Client options should be set when creating the client`)

var err error
if request.Options, err = verifyOptions(request.Options); err != nil {
panic(fmt.Sprintf(`Client option is invalid (and CreateConsumerRequest.Options is deprecated). Error: %v`, err))
Expand Down
2 changes: 1 addition & 1 deletion common/util.go
Expand Up @@ -283,7 +283,7 @@ func ValidateTimeout(t time.Duration) error {
return nil
}

return errors.New(fmt.Sprintf(`Configured timeout is out of range: %v`, t))
return errors.New(fmt.Sprintf(`Configured timeout [%v] must be in range [100ms-5min]`, t))
}

// MinInt returns the minimum of values (a, b)
Expand Down

0 comments on commit fe270a7

Please sign in to comment.