Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultTrustedConfig = TrustedConfig{
VotePercentage: 0.5,
SuperNodeMin: 2,
NodeTotalMin: 2,
}
View Source
var (
ErrPublishedContentEmpty = errors.New("published content is empty")
)
Functions ¶
func GetChannelTopics ¶
func GetChannelTopics(chainID string, c MessageChannel) string
Types ¶
type MessageCenter ¶
type MessageCenter interface { Push(msg *pubsub.Message, prefix string) PublishMessage(pmsg proto.Message, topic string) error TrustMessage() <-chan interface{} Refresh() PowerOn(ctx context.Context, chainID string, ind *core.IpfsNode) }
func NewCenter ¶
func NewCenter(ind *core.IpfsNode, cvfs vdb.CVFS, cnf TrustedConfig, asd ASD.StatDaemon) MessageCenter
type MessageChannel ¶
type MessageChannel string
const ( Version = "AyaMessageCenter V0.0.1" MessageChannelMiningBlock MessageChannel = "MiningBlock" MessageChannelMined MessageChannel = "Mined" MessageChannelChainInfo MessageChannel = "ChainInfo" )
type ReviewMessage ¶
func NewReviewMessage ¶
func (*ReviewMessage) AddConfirmNode ¶
func (msg *ReviewMessage) AddConfirmNode(confirmer *im.Node)
type TrustedConfig ¶
Click to show internal directories.
Click to hide internal directories.