Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCleaner ¶
NewCleaner creates a cleaner task that deletes expired revocations.
func NoRevokedHopIntf ¶
NoRevokedHopIntf returns true if there is no on-segment revocation.
Types ¶
type Key ¶
Key denotes the key for the revocation cache.
type RevCache ¶
type RevCache interface { // Get items with the given keys from the cache. Returns all present requested items that are // not expired or an error if the query failed. Get(ctx context.Context, key Key) (*path_mgmt.RevInfo, error) // GetAll returns a channel that will provide all items in the revocation cache. If the cache // can't prepare the result channel a nil channel and the error are returned. If the querying // succeeded the channel will contain the revocations in the cache, or an error if the stored // data could not be parsed. Note that implementations can spawn a goroutine to fill the // channel, which means the channel must be fully drained to guarantee the destruction of the // goroutine. GetAll(ctx context.Context) (ResultChan, error) // Insert inserts or updates the given revocation into the cache. // Returns whether an insert was performed. Insert(ctx context.Context, rev *path_mgmt.RevInfo) (bool, error) // DeleteExpired deletes expired entries from the cache. // Users of the revcache should make sure to periodically call this method to prevent an // ever growing cache. // Returns the amount of deleted entries. DeleteExpired(ctx context.Context) (int64, error) db.LimitSetter io.Closer }
RevCache is a cache for revocations. Revcache implementations must be safe for concurrent usage.
Directories ¶
Path | Synopsis |
---|---|
Package mock_revcache is a generated GoMock package.
|
Package mock_revcache is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.