Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Topics = [...]topicBuf{ topicBuf{Version, *(bytes.NewBuffer([]byte{byte(Version)})), "version"}, topicBuf{VerAck, *(bytes.NewBuffer([]byte{byte(VerAck)})), "verack"}, topicBuf{Ping, *(bytes.NewBuffer([]byte{byte(Ping)})), "ping"}, topicBuf{Pong, *(bytes.NewBuffer([]byte{byte(Pong)})), "pong"}, topicBuf{Addr, *(bytes.NewBuffer([]byte{byte(Addr)})), "addr"}, topicBuf{GetAddr, *(bytes.NewBuffer([]byte{byte(GetAddr)})), "getaddr"}, topicBuf{GetData, *(bytes.NewBuffer([]byte{byte(GetData)})), "getdata"}, topicBuf{GetBlocks, *(bytes.NewBuffer([]byte{byte(GetBlocks)})), "getblocks"}, topicBuf{GetHeaders, *(bytes.NewBuffer([]byte{byte(GetHeaders)})), "getheaders"}, topicBuf{Tx, *(bytes.NewBuffer([]byte{byte(Tx)})), "tx"}, topicBuf{Block, *(bytes.NewBuffer([]byte{byte(Block)})), "block"}, topicBuf{AcceptedBlock, *(bytes.NewBuffer([]byte{byte(AcceptedBlock)})), "acceptedblock"}, topicBuf{Headers, *(bytes.NewBuffer([]byte{byte(Headers)})), "headers"}, topicBuf{MemPool, *(bytes.NewBuffer([]byte{byte(MemPool)})), "mempool"}, topicBuf{Inv, *(bytes.NewBuffer([]byte{byte(Inv)})), "inv"}, topicBuf{Certificate, *(bytes.NewBuffer([]byte{byte(Certificate)})), "certificate"}, topicBuf{GetRoundResults, *(bytes.NewBuffer([]byte{byte(GetRoundResults)})), "getroundresults"}, topicBuf{RoundResults, *(bytes.NewBuffer([]byte{byte(RoundResults)})), "roundresults"}, topicBuf{GetCandidate, *(bytes.NewBuffer([]byte{byte(GetCandidate)})), "getcandidate"}, topicBuf{Candidate, *(bytes.NewBuffer([]byte{byte(Candidate)})), "candidate"}, topicBuf{Score, *(bytes.NewBuffer([]byte{byte(Score)})), "score"}, topicBuf{Reduction, *(bytes.NewBuffer([]byte{byte(Reduction)})), "reduction"}, topicBuf{Agreement, *(bytes.NewBuffer([]byte{byte(Agreement)})), "agreement"}, topicBuf{StartConsensus, *(bytes.NewBuffer([]byte{byte(StartConsensus)})), "startconsensus"}, topicBuf{Gossip, *(bytes.NewBuffer([]byte{byte(Gossip)})), "gossip"}, topicBuf{NotFound, *(bytes.NewBuffer([]byte{byte(NotFound)})), "notfound"}, topicBuf{Unknown, *(bytes.NewBuffer([]byte{byte(Unknown)})), "unknown"}, topicBuf{Reject, *(bytes.NewBuffer([]byte{byte(Reject)})), "reject"}, topicBuf{Initialization, *(bytes.NewBuffer([]byte{byte(Initialization)})), "initialization"}, topicBuf{RoundUpdate, *(bytes.NewBuffer([]byte{byte(RoundUpdate)})), "roundupdate"}, topicBuf{BestScore, *(bytes.NewBuffer([]byte{byte(BestScore)})), "bestscore"}, topicBuf{Quit, *(bytes.NewBuffer([]byte{byte(Quit)})), "quit"}, topicBuf{Log, *(bytes.NewBuffer([]byte{byte(Log)})), "log"}, topicBuf{Monitor, *(bytes.NewBuffer([]byte{byte(Log)})), "monitor_topic"}, topicBuf{Test, *(bytes.NewBuffer([]byte{byte(Test)})), "__test"}, topicBuf{StepVotes, *(bytes.NewBuffer([]byte{byte(StepVotes)})), "stepvotes"}, topicBuf{ScoreEvent, *(bytes.NewBuffer([]byte{byte(ScoreEvent)})), "scoreevent"}, topicBuf{Generation, *(bytes.NewBuffer([]byte{byte(Generation)})), "generation"}, topicBuf{Restart, *(bytes.NewBuffer([]byte{byte(Restart)})), "restart"}, topicBuf{StopConsensus, *(bytes.NewBuffer([]byte{byte(StopConsensus)})), "stopconsensus"}, topicBuf{IntermediateBlock, *(bytes.NewBuffer([]byte{byte(IntermediateBlock)})), "intermediateblock"}, topicBuf{HighestSeen, *(bytes.NewBuffer([]byte{byte(HighestSeen)})), "highestseen"}, }
Functions ¶
Types ¶
type Topic ¶
type Topic uint8
Topic defines a topic
const ( // Standard topics Version Topic = iota VerAck Ping Pong // Data exchange topics Addr GetAddr GetData GetBlocks GetHeaders Tx Block AcceptedBlock Headers MemPool Inv Certificate GetRoundResults RoundResults GetCandidate // Consensus topics Candidate Score Reduction Agreement StartConsensus // Peer topics Gossip // Error topics NotFound Unknown Reject //Internal Initialization RoundUpdate BestScore Quit Log Monitor Test StepVotes ScoreEvent Generation Restart StopConsensus IntermediateBlock HighestSeen )
A list of all valid topics
func StringToTopic ¶ added in v0.2.0
StringToTopic turns a string into a Topic if the Topic is in the enum of known topics. Return Unknown topic if the string is not coupled with any
Click to show internal directories.
Click to hide internal directories.