submatview: fix godoc and comment typos
Co-authored-by: Paul Banks <banks@banksco.de>
This commit is contained in:
parent
6d444fd063
commit
65da18a986
|
@ -14,15 +14,18 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// Store of Materializers. Store implements an interface similar to
|
// Store of Materializers. Store implements an interface similar to
|
||||||
// agent/cache.Cache, and allows a single Materliazer to fulfill multiple requests
|
// agent/cache.Cache, and allows a single Materializer to fulfil multiple requests
|
||||||
// as long as the requests are identical.
|
// as long as the requests are identical.
|
||||||
// Store is used in place of agent/cache.Cache because with the streaming
|
// Store is used in place of agent/cache.Cache because with the streaming
|
||||||
// backend there is no longer any need to run a background goroutine to refresh
|
// backend there is no longer any need to run a background goroutine to refresh
|
||||||
// stored values.
|
// stored values.
|
||||||
type Store struct {
|
type Store struct {
|
||||||
logger hclog.Logger
|
logger hclog.Logger
|
||||||
lock sync.RWMutex
|
lock sync.RWMutex
|
||||||
byKey map[string]entry
|
byKey map[string]entry
|
||||||
|
|
||||||
|
// expiryHeap tracks entries with 0 remaining requests. Entries are ordered
|
||||||
|
// by most recent expiry first.
|
||||||
expiryHeap *ttlcache.ExpiryHeap
|
expiryHeap *ttlcache.ExpiryHeap
|
||||||
|
|
||||||
// idleTTL is the duration of time an entry should remain in the Store after the
|
// idleTTL is the duration of time an entry should remain in the Store after the
|
||||||
|
|
|
@ -177,7 +177,7 @@ func ThreeTimes() *Counter {
|
||||||
// Retryer provides an interface for repeating operations
|
// Retryer provides an interface for repeating operations
|
||||||
// until they succeed or an exit condition is met.
|
// until they succeed or an exit condition is met.
|
||||||
type Retryer interface {
|
type Retryer interface {
|
||||||
// NextOr returns true if the operation should be repeated, otherwise it
|
// Continue returns true if the operation should be repeated, otherwise it
|
||||||
// returns false to indicate retrying should stop.
|
// returns false to indicate retrying should stop.
|
||||||
Continue() bool
|
Continue() bool
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue