func (ds *discoveryService) GetPeers() ([]apifabclient.Peer, error) {
	return ds.peers, nil
}
GetPeers is used to get peers
package staticdiscovery
import (
	"github.com/hyperledger/fabric-sdk-go/api/apiconfig"
	"github.com/hyperledger/fabric-sdk-go/api/apifabclient"
	"github.com/hyperledger/fabric-sdk-go/pkg/fabric-client/peer"
	"github.com/pkg/errors"
)
type DiscoveryProvider struct {
	config apiconfig.Config
}
type discoveryService struct {
	config apiconfig.Config
	peers  []apifabclient.Peer
}
func NewDiscoveryProvider(config apiconfig.Config) (*DiscoveryProvider, error) {
	return &DiscoveryProvider{config: config}, nil
}
func (dp *DiscoveryProvider) NewDiscoveryService(channelID string) (apifabclient.DiscoveryService, error) {
	peers := []apifabclient.Peer{}
	if channelID != "" {
		chPeers, err := dp.config.ChannelPeers(channelID)
		if err != nil {
			return nil, errors.WithMessage(err, "unable to read configuration for channel peers")
		}
		for _, p := range chPeers {
			newPeer, err := peer.New(dp.config, peer.FromPeerConfig(&p.NetworkPeer))
			if err != nil || newPeer == nil {
				return nil, errors.WithMessage(err, "NewPeer failed")
			}
			peers = append(peers, newPeer)
		}
	} else {  
		netPeers, err := dp.config.NetworkPeers()
		if err != nil {
			return nil, errors.WithMessage(err, "unable to read configuration for network peers")
		}
		for _, p := range netPeers {
			newPeer, err := peer.New(dp.config, peer.FromPeerConfig(&p))
			if err != nil {
				return nil, errors.WithMessage(err, "NewPeerFromConfig failed")
			}
			peers = append(peers, newPeer)
		}
	}
	return &discoveryService{config: dp.config, peers: peers}, nil
}