code: func New(
  	clusterDialer *cluster.PredicateDialer,
  	conf *localconfig.TopLevel,
  	srvConf comm.ServerConfig,
  	srv *comm.GRPCServer,
  	r *multichannel.Registrar,
  	icr InactiveChainRegistry,
  	metricsProvider metrics.Provider,
  ) *Consenter {
  	logger := flogging.MustGetLogger("orderer.consensus.etcdraft")
  
  	var cfg Config
  	if err := viperutil.Decode(conf.Consensus, &cfg); err != nil {
  		logger.Panicf("Failed to decode etcdraft configuration: %s", err)
  	}
  
  	consenter := &Consenter{
  		CreateChain:           r.CreateChain,
  		Cert:                  srvConf.SecOpts.Certificate,
  		Logger:                logger,
  		Chains:                r,
  		EtcdRaftConfig:        cfg,
  		OrdererConfig:         *conf,
  		Dialer:                clusterDialer,
  		Metrics:               NewMetrics(metricsProvider),
  		InactiveChainRegistry: icr,
  	}
  	consenter.Dispatcher = &Dispatcher{
  		Logger:        logger,
  		ChainSelector: consenter,
  	}
  
  	comm := createComm(clusterDialer, consenter, conf.General.Cluster, metricsProvider)
  	consenter.Communication = comm
  	svc := &cluster.Service{
  		CertExpWarningThreshold:          conf.General.Cluster.CertExpirationWarningThreshold,
  		MinimumExpirationWarningInterval: cluster.MinimumExpirationWarningInterval,
  		StreamCountReporter: &cluster.StreamCountReporter{
  			Metrics: comm.Metrics,
  		},
  		StepLogger: flogging.MustGetLogger("orderer.common.cluster.step"),
  		Logger:     flogging.MustGetLogger("orderer.common.cluster"),
  		Dispatcher: comm,
  	}
  	orderer.RegisterClusterServer(srv.Server(), svc)
  	return consenter
  }
docs: // New creates a etcdraft Consenter