code: func NewEndpointDiscoveryWrapper(ctx context.Client, channelID string, target fab.DiscoveryService, opts ...Opt) (*DiscoveryWrapper, error) {
  	chpeers := ctx.EndpointConfig().ChannelPeers(channelID)
  	if len(chpeers) == 0 {
  		return nil, errors.Errorf("no channel peers for channel [%s]", channelID)
  	}
  
  	s := &DiscoveryWrapper{
  		DiscoveryService: target,
  		chPeers:          chpeers,
  		ctx:              ctx,
  	}
  
  	for _, opt := range opts {
  		opt(s)
  	}
  
  	if s.filter != nil {
  		s.DiscoveryService = discovery.NewDiscoveryFilterService(target, s.filter)
  	}
  
  	return s, nil
  }
docs: // NewEndpointDiscoveryWrapper returns a new event endpoint discovery service
  // that wraps a given target discovery service and adds endpoint data to each
  // of the discovered peers.