Strip cache from the client. Its only used externally in a wrapper

This commit is contained in:
Asim Aslam
2020-08-23 13:59:19 +01:00
parent 82e8298b73
commit f55701b374
3 changed files with 0 additions and 157 deletions

View File

@@ -36,9 +36,6 @@ type Options struct {
PoolSize int
PoolTTL time.Duration
// Response cache
Cache *Cache
// Middleware for client
Wrappers []Wrapper
@@ -55,8 +52,6 @@ type CallOptions struct {
Address []string
// Backoff func
Backoff BackoffFunc
// Duration to cache the response for
CacheExpiry time.Duration
// Transport Dial Timeout
DialTimeout time.Duration
// Number of Call attempts
@@ -109,7 +104,6 @@ type RequestOptions struct {
func NewOptions(options ...Option) Options {
opts := Options{
Cache: NewCache(),
Context: context.Background(),
ContentType: "application/protobuf",
Codecs: make(map[string]codec.NewCodec),
@@ -357,14 +351,6 @@ func WithAuthToken() CallOption {
}
}
// WithCache is a CallOption which sets the duration the response
// shoull be cached for
func WithCache(c time.Duration) CallOption {
return func(o *CallOptions) {
o.CacheExpiry = c
}
}
// WithNetwork is a CallOption which sets the network attribute
func WithNetwork(n string) CallOption {
return func(o *CallOptions) {