certificateCache

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2017 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCertificateNotFound = errors.New("certificate not found")

ErrCertificateNotFound is error that is returned if certificate in cache is nil.

Functions

This section is empty.

Types

type Cache

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

Cache represents a structure that holds cache map and certificate service.

func NewCache

func NewCache(certificateGetter certificate.Getter, ttl, ttlNoCert time.Duration) Cache

NewCache creates a new instance of Cache.

func (Cache) Certificate

func (cc Cache) Certificate(name string) (c *tls.Certificate, err error)

Certificate returns a tls.Certificate from cache or fetches it from certificate service.

func (Cache) InvalidateCertificate

func (cc Cache) InvalidateCertificate(name string)

InvalidateCertificate removes certificate form cache for a given domain name if it exists.

Jump to

Keyboard shortcuts

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