certloader

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package certloader contains a certicate loader.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CertLoader

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

CertLoader is a certificate loader. It watches for changes to the certificate and key files.

func New

func New(certPath, keyPath string, log logger.Writer) (*CertLoader, error)

New allocates a CertLoader.

func (*CertLoader) Close

func (cl *CertLoader) Close()

Close closes a CertLoader and releases any underlying resources.

func (*CertLoader) GetCertificate

func (cl *CertLoader) GetCertificate() func(*tls.ClientHelloInfo) (*tls.Certificate, error)

GetCertificate returns a function that returns the certificate for use in a tls.Config.

Jump to

Keyboard shortcuts

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