From 65da18a986da59b58746d0d5c72369e11bda9581 Mon Sep 17 00:00:00 2001 From: Daniel Nephin Date: Wed, 28 Apr 2021 12:01:04 -0400 Subject: [PATCH] submatview: fix godoc and comment typos Co-authored-by: Paul Banks --- agent/submatview/store.go | 11 +++++++---- sdk/testutil/retry/retry.go | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/agent/submatview/store.go b/agent/submatview/store.go index e7f9a18e7..cf9985708 100644 --- a/agent/submatview/store.go +++ b/agent/submatview/store.go @@ -14,15 +14,18 @@ import ( ) // 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. // 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 // stored values. type Store struct { - logger hclog.Logger - lock sync.RWMutex - byKey map[string]entry + logger hclog.Logger + lock sync.RWMutex + byKey map[string]entry + + // expiryHeap tracks entries with 0 remaining requests. Entries are ordered + // by most recent expiry first. expiryHeap *ttlcache.ExpiryHeap // idleTTL is the duration of time an entry should remain in the Store after the diff --git a/sdk/testutil/retry/retry.go b/sdk/testutil/retry/retry.go index e2b3efc1f..0b6e1d707 100644 --- a/sdk/testutil/retry/retry.go +++ b/sdk/testutil/retry/retry.go @@ -177,7 +177,7 @@ func ThreeTimes() *Counter { // Retryer provides an interface for repeating operations // until they succeed or an exit condition is met. 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. Continue() bool }