code: func New(config fab.EndpointConfig, opts ...Option) (*Orderer, error) {
  	orderer := &Orderer{
  		config:      config,
  		commManager: &defCommManager{},
  	}
  
  	for _, opt := range opts {
  		err := opt(orderer)
  
  		if err != nil {
  			return nil, err
  		}
  	}
  	var grpcOpts []grpc.DialOption
  	if orderer.kap.Time > 0 {
  		grpcOpts = append(grpcOpts, grpc.WithKeepaliveParams(orderer.kap))
  	}
  	grpcOpts = append(grpcOpts, grpc.WithDefaultCallOptions(grpc.WaitForReady(!orderer.failFast)))
  	if endpoint.AttemptSecured(orderer.url, orderer.allowInsecure) {
  		//tls config
  		tlsConfig, err := comm.TLSConfig(orderer.tlsCACert, orderer.serverName, config)
  		if err != nil {
  			return nil, err
  		}
  		tlsConfig.VerifyPeerCertificate = func(rawCerts [][]byte, verifiedChains [][]*x509.Certificate) error {
  			return verifier.VerifyPeerCertificate(rawCerts, verifiedChains)
  		}
  
  		grpcOpts = append(grpcOpts, grpc.WithTransportCredentials(credentials.NewTLS(tlsConfig)))
  	} else {
  		grpcOpts = append(grpcOpts, grpc.WithInsecure())
  	}
  
  	grpcOpts = append(grpcOpts, grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(maxCallRecvMsgSize),
  		grpc.MaxCallSendMsgSize(maxCallSendMsgSize)))
  
  	orderer.dialTimeout = config.Timeout(fab.OrdererConnection)
  	orderer.url = endpoint.ToAddress(orderer.url)
  	orderer.grpcDialOption = grpcOpts
  
  	return orderer, nil
  }
docs: // New Returns a Orderer instance