revcache

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterNew added in v0.3.1

func FilterNew(revCache RevCache,
	revocations []*path_mgmt.SignedRevInfo) []*path_mgmt.SignedRevInfo

FilterNew filters the given revocations against the revCache, only the ones which are not in the cache are returned. Note: Modifies revocations slice.

func GetAll added in v0.3.0

func GetAll(revCache RevCache, keys map[Key]struct{}) []*path_mgmt.SignedRevInfo

GetAll gets all revocations for the given keys from the given revCache.

Types

type Key

type Key struct {
	// contains filtered or unexported fields
}

Key denotes the key for the revocation cache.

func NewKey

func NewKey(ia addr.IA, ifid common.IFIDType) *Key

NewKey creates a new key for the revocation cache.

func (Key) String

func (k Key) String() string

type RevCache

type RevCache interface {
	// Get item with key k from the cache. Returns the item or nil,
	// and a bool indicating whether the key was found.
	Get(k *Key) (*path_mgmt.SignedRevInfo, bool)
	// Insert inserts or updates the given revocation into the cache.
	// Returns whether an insert was performed.
	Insert(rev *path_mgmt.SignedRevInfo) bool
}

RevCache is a cache for revocations.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL