code: func New(context context.Client, chConfig fab.ChannelCfg, discoveryService fab.DiscoveryService, connectionProvider api.ConnectionProvider, opts ...options.Opt) *Dispatcher {
  	params := defaultParams(context, chConfig.ID())
  	options.Apply(params, opts)
  
  	dispatcher := &Dispatcher{
  		Dispatcher:         esdispatcher.New(opts...),
  		params:             *params,
  		context:            context,
  		chConfig:           chConfig,
  		discoveryService:   discoveryService,
  		connectionProvider: connectionProvider,
  	}
  	dispatcher.peerResolver = params.peerResolverProvider(dispatcher, context, chConfig.ID(), opts...)
  
  	return dispatcher
  }
docs: // New creates a new dispatcher