removed latency; left just stats
Karrick S. McDermott
5 years ago
40 | 40 |
|
41 | 41 |
// GCTimeout specifies how long the GC should wait for values to unlock.
|
42 | 42 |
GCTimeout time.Duration
|
43 | |
|
44 | |
// StoreWhenLatencyExceeds specifies the threshold for storing key-value
|
45 | |
// pairs. When not the default 0 value, if a Lookup for a particular key
|
46 | |
// takes longer than the specified threshold, the key-value will be stored
|
47 | |
// in the cache. Otherwise it will not be stored.
|
48 | |
StoreWhenLatencyExceeds time.Duration
|
49 | 43 |
}
|
50 | 44 |
|
51 | 45 |
const defaultGCTimeout = 10 * time.Second
|
22 | 22 |
halt chan struct{}
|
23 | 23 |
closeError chan error
|
24 | 24 |
gcFlag int32
|
25 | |
|
26 | |
// latencyThreshold is optional parameter that, when not the default 0
|
27 | |
// value, will only store a key-value pair if invocation of the Lookup took
|
28 | |
// longer than the threshold.
|
29 | |
latencyThreshold time.Duration
|
30 | 25 |
|
31 | 26 |
stats Stats
|
32 | 27 |
}
|