mcache

package
v0.0.0-...-740dce8 Latest Latest
Warning

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

Go to latest
Published: May 30, 2017 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

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

Entry represents a cache entry

func NewEntry

func NewEntry(log *log.Logger, clk clock.Clock) *Entry

NewEntry creates a basic unpopulated Entry

type EntryCache

type EntryCache struct {
	StableBackings []scache.Cache
	// contains filtered or unexported fields
}

EntryCache holds the entry and issuer caches with various other required state

func NewEntryCache

func NewEntryCache(clk clock.Clock, logger *log.Logger, monitorTick time.Duration, stableBackings []scache.Cache, client *http.Client, timeout time.Duration, issuers []*x509.Certificate, supportedHashes config.SupportedHashes, disableMonitor bool) *EntryCache

NewEntryCache constructs a EntryCache, starts the monitor, and returns it

func (*EntryCache) AddFromCertificate

func (c *EntryCache) AddFromCertificate(filename string, issuer *x509.Certificate, responders []string) error

AddFromCertificate creates an entry from a certificate on disk and adds it to the cache, a issuer or set of OCSP responders can be provided

func (*EntryCache) AddFromRequest

func (c *EntryCache) AddFromRequest(req *ocsp.Request, upstream []string) ([]byte, error)

AddFromRequest creates an entry from a OCSP request and adds it to the cache, a set of upstream OCSP responders can be provided

func (*EntryCache) LookupResponse

func (c *EntryCache) LookupResponse(request *ocsp.Request) ([]byte, bool)

LookupResponse looks up a entry in the cache and returns it's response if the entry exists

func (*EntryCache) Remove

func (c *EntryCache) Remove(name string) error

Remove removes a entry from the cache

Jump to

Keyboard shortcuts

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