Skip to content

Commit

Permalink
feat: makes clientside timeout setting name consistent w/ type (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
eaddingtonwhite authored Jan 28, 2023
1 parent 389b3f5 commit 03fc249
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ type Configuration interface {
// GetClientSideTimeout Returns the current configuration options for client side timeout with the Momento service
GetClientSideTimeout() time.Duration

// WithClientTimeoutMillis Copy constructor for overriding TransportStrategy client side timeout. Returns a new Configuration object
// with the specified momento.TransportStrategy using passed client side timeout.
WithClientTimeoutMillis(clientTimeoutMillis time.Duration) Configuration
// WithClientTimeout Copy constructor for overriding TransportStrategy client side timeout. Returns a new
//Configuration object with the specified momento.TransportStrategy using passed client side timeout.
WithClientTimeout(clientTimeoutMillis time.Duration) Configuration
}

type SimpleCacheConfiguration struct {
Expand All @@ -46,7 +46,7 @@ func (s *SimpleCacheConfiguration) WithTransportStrategy(transportStrategy Trans
}
}

func (s *SimpleCacheConfiguration) WithClientTimeoutMillis(clientTimeout time.Duration) Configuration {
func (s *SimpleCacheConfiguration) WithClientTimeout(clientTimeout time.Duration) Configuration {
return &SimpleCacheConfiguration{
transportStrategy: s.transportStrategy.WithClientTimeout(clientTimeout),
}
Expand Down
2 changes: 1 addition & 1 deletion momento/simple_cache_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ func TestClientInitialization(t *testing.T) {
})
if tt.requestTimeout != nil {
c, err = NewSimpleCacheClient(&SimpleCacheClientProps{
Configuration: config.LatestLaptopConfig().WithClientTimeoutMillis(*tt.requestTimeout),
Configuration: config.LatestLaptopConfig().WithClientTimeout(*tt.requestTimeout),
CredentialProvider: testCredentialProvider,
DefaultTTLSeconds: tt.defaultTTLSeconds,
})
Expand Down

0 comments on commit 03fc249

Please sign in to comment.