tls

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2026 License: Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DynTLSCfg

type DynTLSCfg struct {
	sync.Mutex
	// contains filtered or unexported fields
}

DynTLSCfg implements a periodically refreshed tls config that can be used by servers and clients

func NewDynTLSCfg

func NewDynTLSCfg(keyPath, certPath, cacertPath string) (*DynTLSCfg, error)

NewDynTLSCfg returns a DynTLSCfg

func (*DynTLSCfg) ClientCfg

func (d *DynTLSCfg) ClientCfg() *tls.Config

ClientCfg returns tls config that can be used for a tls client CA cannot be refreshed for clients. Instead a warning is logged.

func (*DynTLSCfg) Close

func (d *DynTLSCfg) Close()

Close stops the poller go routine

func (*DynTLSCfg) ServerCfg

func (d *DynTLSCfg) ServerCfg() *tls.Config

ServerCfg returns a tls config that can be used by tls servers. The config including CA is synced with the source files.

func (*DynTLSCfg) WithTLSCfg

func (d *DynTLSCfg) WithTLSCfg(cfg *tls.Config) *DynTLSCfg

WithTLSCfg allows a tls config to be passed in

Jump to

Keyboard shortcuts

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