Skip to content

Commit

Permalink
Return struct from NewMemcachedClient()
Browse files Browse the repository at this point in the history
Signed-off-by: Marco Pracucci <[email protected]>
  • Loading branch information
pracucci committed Dec 16, 2019
1 parent 18683ae commit aba0bce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/cacheutil/memcached_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ type memcachedGetMultiResult struct {
}

// NewMemcachedClient makes a new MemcachedClient.
func NewMemcachedClient(logger log.Logger, provider *dns.Provider, config MemcachedClientConfig) (MemcachedClient, error) {
func NewMemcachedClient(logger log.Logger, provider *dns.Provider, config MemcachedClientConfig) (*memcachedClient, error) {
// We use a custom servers selector in order to use a jump hash
// for servers selection.
selector := &MemcachedJumpHashSelector{}
Expand All @@ -168,7 +168,7 @@ func NewMemcachedClient(logger log.Logger, provider *dns.Provider, config Memcac
return newMemcachedClient(logger, client, selector, provider, config)
}

func newMemcachedClient(logger log.Logger, client memcachedClientBackend, selector *MemcachedJumpHashSelector, provider *dns.Provider, config MemcachedClientConfig) (MemcachedClient, error) {
func newMemcachedClient(logger log.Logger, client memcachedClientBackend, selector *MemcachedJumpHashSelector, provider *dns.Provider, config MemcachedClientConfig) (*memcachedClient, error) {
config.applyDefaults()
if err := config.validate(); err != nil {
return nil, err
Expand Down

0 comments on commit aba0bce

Please sign in to comment.