func (v *Config) Set(val interface{}) {
	configsGuard.Lock()
	defer configsGuard.Unlock()
	v.val = val
}
Set sets the ComponentConfig for this Config.
package configz
import (
	"encoding/json"
	"fmt"
	"net/http"
	"sync"
)
var (
	configsGuard sync.RWMutex
	configs      = map[string]*Config{}
)
type Config struct {
	val interface{}
}
func InstallHandler(m mux) {
	m.Handle("/configz", http.HandlerFunc(handle))
}
type mux interface {
	Handle(string, http.Handler)
}
func New(name string) (*Config, error) {
	configsGuard.Lock()
	defer configsGuard.Unlock()
	if _, found := configs[name]; found {
		return nil, fmt.Errorf("register config %q twice", name)
	}
	newConfig := Config{}
	configs[name] = &newConfig
	return &newConfig, nil
}
func Delete(name string) {
	configsGuard.Lock()
	defer configsGuard.Unlock()
	delete(configs, name)
}