NewCertCache creates a new certificate cache that maps hostnames to their generated TLS certificates.
()
| 20 | // NewCertCache creates a new certificate cache that maps hostnames to their |
| 21 | // generated TLS certificates. |
| 22 | func NewCertCache() *CertCache { |
| 23 | return &CertCache{ |
| 24 | certs: make(map[string]*tls.Certificate), |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | // Fetch retrieves a cached certificate for the given hostname, or generates |
| 29 | // and caches a new one using the provided generator function. |
no outgoing calls