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 ¶
InvalidateCertificate removes certificate form cache for a given domain name if it exists.
Click to show internal directories.
Click to hide internal directories.