Documentation ¶
Index ¶
- Constants
- func BytesToStrings(bytes [][]byte) []string
- func Contains(s string, a []string) bool
- func GetDurationOrDefault(key string, defVal time.Duration) time.Duration
- func GetFloat64OrDefault(key string, defVal float64) float64
- func GetIntOrDefault(key string, defVal int) int
- func GetRandomIndices(indiceCount, highestIndex int) []int
- func IndexInSlice(array interface{}, o interface{}, equals Equals) int
- func PrintStackTrace()
- func PrivateRWSets(rwsets ...PrivateRWSet) [][]byte
- func RandomInt(n int) int
- func RandomUInt64() uint64
- func SetVal(key string, val interface{})
- func SetupTestLogging()
- func StringsToBytes(strings []string) [][]byte
- type Equals
- type Logger
- type MembershipStore
- func (m *MembershipStore) MsgByID(pkiID common.PKIidType) *proto.SignedGossipMessage
- func (m *MembershipStore) Put(pkiID common.PKIidType, msg *proto.SignedGossipMessage)
- func (m *MembershipStore) Remove(pkiID common.PKIidType)
- func (m *MembershipStore) Size() int
- func (m *MembershipStore) ToSlice() []*proto.SignedGossipMessage
- type PrivateRWSet
- type PrivateRWSetWithConfig
- type PubSub
- type PvtDataCollections
- type Set
- type Subscription
Constants ¶
View Source
const ( ChannelLogger = "gossip.channel" CommLogger = "gossip.comm" DiscoveryLogger = "gossip.discovery" ElectionLogger = "gossip.election" GossipLogger = "gossip.gossip" CommMockLogger = "gossip.comm.mock" PullLogger = "gossip.pull" ServiceLogger = "gossip.service" StateLogger = "gossip.state" PrivateDataLogger = "gossip.privdata" )
用于记录器初始化的记录器名称。
Variables ¶
This section is empty.
Functions ¶
func BytesToStrings ¶
func GetDurationOrDefault ¶
GetDurationOrDefault返回配置中的持续时间值(如果存在),否则返回默认值
func GetFloat64OrDefault ¶
如果存在,则getfloat64ordefault从config返回float64值,否则返回默认值。
func GetIntOrDefault ¶
如果存在,则getIntorDefault返回config中的int值,否则返回默认值
func GetRandomIndices ¶
GetRandomIndexs返回一段随机索引 从0到给定的高位
func IndexInSlice ¶
indexinslice返回数组中给定对象o的索引
func StringsToBytes ¶
Types ¶
type Logger ¶
type Logger interface { Debug(args ...interface{}) Debugf(format string, args ...interface{}) Error(args ...interface{}) Errorf(format string, args ...interface{}) Fatal(args ...interface{}) Fatalf(format string, args ...interface{}) Info(args ...interface{}) Infof(format string, args ...interface{}) Panic(args ...interface{}) Panicf(format string, args ...interface{}) Warning(args ...interface{}) Warningf(format string, args ...interface{}) IsEnabledFor(l zapcore.Level) bool }
type MembershipStore ¶
封装的MembershipStore结构 成员身份消息存储抽象
func (*MembershipStore) MsgByID ¶
func (m *MembershipStore) MsgByID(pkiID common.PKIidType) *proto.SignedGossipMessage
msgbyid返回由特定ID或nil存储的消息 如果找不到这样的身份证
func (*MembershipStore) Put ¶
func (m *MembershipStore) Put(pkiID common.PKIidType, msg *proto.SignedGossipMessage)
将关联的MSG与给定的PKIID一起放置
func (*MembershipStore) Remove ¶
func (m *MembershipStore) Remove(pkiID common.PKIidType)
删除删除具有给定pkiid的邮件
func (*MembershipStore) ToSlice ¶
func (m *MembershipStore) ToSlice() []*proto.SignedGossipMessage
ToSlice返回由元素支持的切片 成员关系存储区的
type PrivateRWSetWithConfig ¶
type PrivateRWSetWithConfig struct { RWSet []PrivateRWSet CollectionConfig *common.CollectionConfig }
privaterwsetwithconfig封装了私有读写集 其中与集合相关的配置信息
type PubSub ¶
pubsub定义了一个可以用来: -将项目发布到多个订阅服务器的主题 -订阅主题中的项目 订阅有一个TTL,当它通过时将被清除。
type PvtDataCollections ¶
用于封装集合的pvtDataCollections数据类型 私人数据
func (*PvtDataCollections) Marshal ¶
func (pvt *PvtDataCollections) Marshal() ([][]byte, error)
封送将私有集合编码为字节数组
func (*PvtDataCollections) Unmarshal ¶
func (pvt *PvtDataCollections) Unmarshal(data [][]byte) error
解组读取和解组收集私人数据 从给定的字节数组
type Subscription ¶
type Subscription interface { //在发布之前侦听块 //订阅,或者如果 //订阅的TTL已通过 Listen() (interface{}, error) }
订阅定义对主题的订阅 可用于接收发布
Click to show internal directories.
Click to hide internal directories.