func (cw *CertFileWatcher) Reload() (err error) {
	defer func() {
		if cw.notifyReload != nil {
			cw.notifyReload <- struct{}{}
		}
		if cw.onReload != nil && err == nil {
			err = cw.onReload(cw)
		}
	}()

	cert, loadErr := tls.LoadX509KeyPair(cw.keyPair.CertPath, cw.keyPair.KeyPath)
	if loadErr != nil {
		err = ex.New(loadErr)
		return
	}
	cw.certificateMu.Lock()
	cw.certificate = &cert
	cw.certificateMu.Unlock()
	return
}
// Reload forces the reload of the underlying certificate.
Reload forces the reload of the underlying certificate.
// Reload forces the reload of the underlying certificate .
func (cw *CertFileWatcher) Reload() (err error) {
	defer func() {
		if cw.notifyReload != nil {
			cw.notifyReload <- struct{}{}
		}
		if cw.onReload != nil && err == nil {
			err = cw.onReload(cw)
		}
	}()
	cert, loadErr := tls.LoadX509KeyPair(cw.keyPair.CertPath, cw.keyPair.KeyPath)
	if loadErr != nil {
		err = ex.New(loadErr)
		return
	}
	cw.certificateMu.Lock()
	cw.certificate = &cert
	cw.certificateMu.Unlock()
	return
}
func ( cw * CertFileWatcher ) Reload ( ) ( err error ) { defer func ( ) { if cw . notifyReload != nil { cw . notifyReload <- struct { } { } } if cw . onReload != nil && err == nil { err = cw . onReload ( cw ) } } ( ) cert , loadErr := tls . LoadX509KeyPair ( cw . keyPair . CertPath , cw . keyPair . KeyPath ) if loadErr != nil { err = ex . New ( loadErr ) return } cw . certificateMu . Lock ( ) cw . certificate = & cert cw . certificateMu . Unlock ( ) return }
Reload forces the reload of the underlying certificate.
Reload forces the reload of the underlying certificate .