cache implements the caching functionality for both signing and encryption keys.
| 77 | |
| 78 | // cache implements the caching functionality for both signing and encryption keys. |
| 79 | type cache struct { |
| 80 | ctx context.Context |
| 81 | cancel context.CancelFunc |
| 82 | clock quartz.Clock |
| 83 | fetcher Fetcher |
| 84 | logger slog.Logger |
| 85 | feature codersdk.CryptoKeyFeature |
| 86 | |
| 87 | mu sync.Mutex |
| 88 | keys map[int32]codersdk.CryptoKey |
| 89 | lastFetch time.Time |
| 90 | refresher *quartz.Timer |
| 91 | fetching bool |
| 92 | closed bool |
| 93 | cond *sync.Cond |
| 94 | } |
| 95 | |
| 96 | type CacheOption func(*cache) |
| 97 |
nothing calls this directly
no outgoing calls
no test coverage detected