code: func New(config fab.EndpointConfig, opts ...Option) (*Peer, error) {
  	peer := &Peer{
  		config:      config,
  		commManager: &defCommManager{},
  	}
  
  	for _, opt := range opts {
  		err := opt(peer)
  
  		if err != nil {
  			return nil, err
  		}
  	}
  
  	if peer.processor == nil {
  		// TODO: config is declaring TLS but cert & serverHostOverride is being passed-in...
  		endorseRequest := peerEndorserRequest{
  			target:             peer.url,
  			certificate:        peer.certificate,
  			serverHostOverride: peer.serverName,
  			config:             peer.config,
  			kap:                peer.kap,
  			failFast:           peer.failFast,
  			allowInsecure:      peer.inSecure,
  			commManager:        peer.commManager,
  		}
  		processor, err := newPeerEndorser(&endorseRequest)
  
  		if err != nil {
  			return nil, err
  		}
  		peer.processor = processor
  	}
  
  	return peer, nil
  }
docs: // New Returns a new Peer instance