code: func NewProvider(config *ProviderConfig) (*Provider, error) {
  	if err := validateConfig(config); err != nil {
  		return nil, err
  	}
  
  	// Create logger
  	if config.LogOutput == nil {
  		config.LogOutput = os.Stderr
  	}
  	logger := log.New(config.LogOutput, "", log.LstdFlags)
  
  	p := &Provider{
  		config:     config,
  		logger:     logger,
  		shutdownCh: make(chan struct{}),
  	}
  	go p.run()
  	return p, nil
  }
docs: // NewProvider is used to create a new provider