func WithWatcher(watcher contract.ConfigWatcher) Option {
	return func(option *KoanfAdapter) {
		option.watcher = watcher
	}
}
WithWatcher is an option for *KoanfAdapter that adds a config watcher. The watcher should notify the configurations
whenever a reload event is triggered.
package config
import (
	"context"
	"fmt"
	"reflect"
	"sync"
	"time"
	"github.com/DoNewsCode/core/contract"
	"github.com/DoNewsCode/core/events"
	"github.com/knadh/koanf"
	"github.com/knadh/koanf/providers/confmap"
	"github.com/mitchellh/mapstructure"
)
type KoanfAdapter struct {
	layers     []ProviderSet
	validators []Validator
	watcher    contract.ConfigWatcher
	dispatcher contract.Dispatcher
	delimiter  string
	rwlock     sync.RWMutex
	K          *koanf.Koanf
}
type ProviderSet struct {
	Parser   koanf.Parser
	Provider koanf.Provider
}
type Option func(option *KoanfAdapter)
func WithProviderLayer(provider koanf.Provider, parser koanf.Parser) Option {
	return func(option *KoanfAdapter) {
		option.layers = append(option.layers, ProviderSet{Provider: provider, Parser: parser})
	}
}