code: func (c *Configurator) Update(config Config) error {
  	cert, err := loadKeyPair(config.CertFile, config.KeyFile)
  	if err != nil {
  		return err
  	}
  	cas, err := loadCAs(config.CAFile, config.CAPath)
  	if err != nil {
  		return err
  	}
  
  	if err = c.check(config, cas, cert); err != nil {
  		return err
  	}
  	c.Lock()
  	c.base = &config
  	c.cert = cert
  	c.cas = cas
  	c.version++
  	c.Unlock()
  	c.log("Update")
  	return nil
  }
docs: // Update updates the internal configuration which is used to generate
  // *tls.Config.
  // This function acquires a write lock because it writes the new config.