Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Get ¶
func Get() (memserviceapi.Service, error)
Get returns the Membership Service instance. If the service hasn't been initialized yet then it will be initialized.
func NewNetworkMember ¶
func NewNetworkMember(pkiID gcommon.PKIidType, endpoint string, ledgerHeight uint64) discovery.NetworkMember
NewNetworkMember creates a new NetworkMember instance
Types ¶
type MspNetworkMembers ¶
type MspNetworkMembers struct { MspID api.OrgIdentityType NetworkMembers []discovery.NetworkMember }
MspNetworkMembers contains an array of network members for a given MSP
func NewMSPNetworkMembers ¶
func NewMSPNetworkMembers(mspID []byte, networkMembers ...discovery.NetworkMember) MspNetworkMembers
NewMSPNetworkMembers creates a new MspNetworkMembers instance
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service provides functions to query peers
func NewServiceWithMocks ¶
func NewServiceWithMocks(localMSPID api.OrgIdentityType, localPeerAddress string, bcInfo []*mockbcinfo.ChannelBCInfo, members ...MspNetworkMembers) *Service
NewServiceWithMocks creates a membership service with the given mocks. - localMSPID is the ID of the peer's local MSP - localPeerAddress is the address (host:port) of the local peer - bcInfo is an array of block chain info for all the channels to which the peer is joined - members contains zero or more MSP network members
func (*Service) GetAllPeers ¶
func (s *Service) GetAllPeers() []*memserviceapi.PeerEndpoint
GetAllPeers returns all peers on the gossip network
func (*Service) GetPeersOfChannel ¶
func (s *Service) GetPeersOfChannel(channelID string) ([]*memserviceapi.PeerEndpoint, error)
GetPeersOfChannel returns all peers on the gossip network joined to the given channel