discovery

package
v0.0.0-...-fbe82ab Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewService

func NewService(config Config, sup Support) *service

NewService创建新的发现服务实例

Types

type AccessControlSupport

type AccessControlSupport interface {
	//合格返回给定对等方是否有资格接收
	//service from the discovery service for a given channel
	EligibleForService(channel string, data common2.SignedData) error
}

访问控制支持检查客户是否有资格接受服务

type Config

type Config struct {
	TLS                          bool
	AuthCacheEnabled             bool
	AuthCacheMaxSize             int
	AuthCachePurgeRetentionRatio float64
}

config定义发现服务的配置

func (Config) String

func (c Config) String() string

string返回此配置的字符串表示形式

type ConfigSequenceSupport

type ConfigSequenceSupport interface {
	//configSequence返回给定通道的配置序列
	ConfigSequence(channel string) uint64
}

configSequenceSupport返回给定通道的配置序列

type ConfigSupport

type ConfigSupport interface {
	//config返回通道的配置
	Config(channel string) (*discprotos.ConfigResult, error)
}

配置支持提供对通道配置的访问

type EndorsementSupport

type EndorsementSupport interface {
	//PeersforElement返回给定对等方、通道和链码集的认可描述符
	PeersForEndorsement(channel common.ChainID, interest *discprotos.ChaincodeInterest) (*discprotos.EndorsementDescriptor, error)

	//PeersAuthorizedByCriteria returns the peers of the channel that are authorized by the given chaincode interest
	//这是考虑到,如果感兴趣的链码安装在对等端上,并且
	//考虑到对等端是否是链码集合的一部分。
	//如果传递了零利息或空利息,则不进行过滤。
	PeersAuthorizedByCriteria(chainID common.ChainID, interest *discprotos.ChaincodeInterest) (discovery.Members, error)
}

EndorsementSupport provides knowledge of endorsement policy selection 链码

type GossipSupport

type GossipSupport interface {
	//channel exists返回给定通道是否存在
	ChannelExists(channel string) bool

	//peersofchannel返回被认为是活动的网络成员
	//and also subscribed to the channel given
	PeersOfChannel(common.ChainID) discovery.Members

	//对等方返回被认为是活动的网络成员
	Peers() discovery.Members

	//IdentityInfo返回有关对等方的标识信息
	IdentityInfo() api.PeerIdentitySet
}

八卦支持聚合八卦模块 向发现服务提供,例如了解有关对等方的信息

type Support

Support defines an interface that allows the discovery service 获取其他对等组件拥有的信息

Directories

Path Synopsis
cmd
mocks
Code generated by mockery v1.0.0.
Code generated by mockery v1.0.0.
acl
mocks
伪造者生成的代码。
伪造者生成的代码。

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL