lgr := util.GetLogger(util.LoggingGossipModule, conf.ID)
g := &gossipServiceImpl{
selfOrg: secAdvisor.OrgByPeerIdentity(selfIdentity),
secAdvisor: secAdvisor,
selfIdentity: selfIdentity,
presumedDead: make(chan common.PKIidType, presumedDeadChanSize),
disc: nil,
mcs: mcs,
conf: conf,
ChannelDeMultiplexer: comm.NewChannelDemultiplexer(),
logger: lgr,
toDieChan: make(chan struct{}, 1),
stopFlag: int32(0),
stopSignal: &sync.WaitGroup{},
includeIdentityPeriod: time.Now().Add(conf.PublishCertPeriod),
}
fabric的部分源码。在赋值的时候直接使用变量赋值初始化,我在网上没找到这种用法,能有前辈解释一下吗
有疑问加站长微信联系(非本文作者)