certificate.Store: Mention GetCertificate usage
This commit is contained in:
parent
8190e819e8
commit
32f40523ed
@ -77,6 +77,8 @@ func (s *Store) Add(scope string, cert tls.Certificate) error {
|
|||||||
// Get retrieves a certificate for the given hostname.
|
// Get retrieves a certificate for the given hostname.
|
||||||
// If no matching scope has been registered, Get returns an error.
|
// If no matching scope has been registered, Get returns an error.
|
||||||
// Get generates new certificates as needed and rotates expired certificates.
|
// Get generates new certificates as needed and rotates expired certificates.
|
||||||
|
//
|
||||||
|
// Get is suitable for use in a gemini.Server's GetCertificate field.
|
||||||
func (s *Store) Get(hostname string) (*tls.Certificate, error) {
|
func (s *Store) Get(hostname string) (*tls.Certificate, error) {
|
||||||
s.mu.RLock()
|
s.mu.RLock()
|
||||||
defer s.mu.RUnlock()
|
defer s.mu.RUnlock()
|
||||||
|
Loading…
Reference in New Issue
Block a user