tls

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

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