topic

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PermissionEventNodeUpdate uint8 = iota
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EventAddP2PStreamMsg

type EventAddP2PStreamMsg struct {
	PeerID   string
	PeerInfo string
}

type EventBandwidthStats

type EventBandwidthStats struct {
	TotalIn  int64
	TotalOut int64
	RateIn   float64
	RateOut  float64
}

type EventBroadcastMsg

type EventBroadcastMsg struct {
	Type    MessageType
	Message interface{}
}

type EventConfirmReqMsg

type EventConfirmReqMsg struct {
	Blocks []*types.StateBlock
	From   string
}

type EventDeleteP2PStreamMsg

type EventDeleteP2PStreamMsg struct {
	PeerID string
}

type EventP2PConnectPeersMsg

type EventP2PConnectPeersMsg struct {
	PeersInfo []*types.PeerInfo
}

type EventP2POnlinePeersMsg

type EventP2POnlinePeersMsg struct {
	PeersInfo []*types.PeerInfo
}

type EventP2PSyncStateMsg

type EventP2PSyncStateMsg struct {
	P2pSyncState SyncState
}

type EventPovRecvBlockMsg

type EventPovRecvBlockMsg struct {
	Block   *types.PovBlock
	From    types.PovBlockFrom
	MsgPeer string

	ResponseChan chan interface{}
}

type EventPrivacyRecvReqMsg

type EventPrivacyRecvReqMsg struct {
	EnclaveKey []byte

	ReqData interface{}
	RspChan chan *EventPrivacyRecvRspMsg
}

type EventPrivacyRecvRspMsg

type EventPrivacyRecvRspMsg struct {
	ReqData interface{}

	Err        error
	RawPayload []byte
}

type EventPrivacySendReqMsg

type EventPrivacySendReqMsg struct {
	RawPayload     types.HexBytes
	PrivateFrom    string
	PrivateFor     []string
	PrivateGroupID string

	ReqData interface{}
	RspChan chan *EventPrivacySendRspMsg
}

type EventPrivacySendRspMsg

type EventPrivacySendRspMsg struct {
	ReqData interface{}

	Err        error
	EnclaveKey []byte
}

type EventPublishMsg

type EventPublishMsg struct {
	Block *types.StateBlock
	From  string
}

type EventRPCSyncCallMsg

type EventRPCSyncCallMsg struct {
	Name string
	In   interface{}
	Out  interface{}

	ResponseChan chan interface{}
}

type MessageType

type MessageType byte

MessageType a string for message type.

const (
	PublishReq      MessageType = iota //PublishReq
	ConfirmReq                         //ConfirmReq
	ConfirmAck                         //ConfirmAck
	FrontierRequest                    //FrontierReq
	FrontierRsp                        //FrontierRsp
	BulkPullRequest                    //BulkPullRequest
	BulkPullRsp                        //BulkPullRsp
	BulkPushBlock                      //BulkPushBlock
	MessageResponse                    //MessageResponse
	PovStatus
	PovPublishReq
	PovBulkPullReq
	PovBulkPullRsp
)

Message Type

type PermissionEvent

type PermissionEvent struct {
	EventType uint8
	NodeId    string
	NodeUrl   string
}

type SyncState

type SyncState uint

Sync state

const (
	SyncNotStart SyncState = iota
	Syncing
	SyncDone
	SyncFinish
)

func (SyncState) IsSyncExited

func (s SyncState) IsSyncExited() bool

func (SyncState) String

func (s SyncState) String() string

type TopicType

type TopicType string
const (
	EventPublish           TopicType = "publish"
	EventConfirmReq        TopicType = "confirmReq"
	EventConfirmAck        TopicType = "confirmAck"
	EventSyncBlock         TopicType = "syncBlock"
	EventConfirmedBlock    TopicType = "confirmedBlock"
	EventBroadcast         TopicType = "broadcast"
	EventPeersInfo         TopicType = "peersInfo"
	EventOnlinePeersInfo   TopicType = "onlinePeersInfo"
	EventSyncStatus        TopicType = "syncing"
	EventGetBandwidthStats TopicType = "getBandwidthStats"
	EventAddRelation       TopicType = "addRelation"
	EventAddSyncBlocks     TopicType = "addSyncBlocks"
	EventDeleteRelation    TopicType = "deleteRelation"
	EventGenerateBlock     TopicType = "generateBlock"
	EventRollback          TopicType = "rollback"
	EventRestartChain      TopicType = "restartChain"

	EventSendMsgToSingle TopicType = "sendMsgToSingle"
	EventAddP2PStream    TopicType = "addP2PStream"
	EventDeleteP2PStream TopicType = "deleteP2PStream"
	EventPovPeerStatus   TopicType = "povPeerStatus"
	EventPovRecvBlock    TopicType = "povRecvBlock"
	EventPovBulkPullReq  TopicType = "povBulkPullReq"
	EventPovBulkPullRsp  TopicType = "povBulkPullRsp"
	EventPovSyncState    TopicType = "povSyncState"

	EventPovConnectBestBlock    TopicType = "povConnectBestBlock"
	EventPovDisconnectBestBlock TopicType = "povDisconnectBestBlock"
	EventRpcSyncCall            TopicType = "rpcSyncCall"
	EventFrontiersReq           TopicType = "FrontiersReq"
	EventFrontierConsensus      TopicType = "frontierConsensus"
	EventFrontierConfirmed      TopicType = "frontierConfirmed"
	EventSyncStateChange        TopicType = "syncStateChange"
	EventConsensusSyncFinished  TopicType = "consensusSyncFinished"
	EventRepresentativeNode     TopicType = "representativeNode"

	EventAddBlockCache        TopicType = "addBlockCache"
	EventPermissionNodeUpdate TopicType = "permissionNodeUpdate"

	EventPrivacySendReq TopicType = "privacySendReq"
	EventPrivacySendRsp TopicType = "privacySendRsp"
	EventPrivacyRecvReq TopicType = "privacyRecvReq"
	EventPrivacyRecvRsp TopicType = "privacyRecvRsp"
)

Topic type

Jump to

Keyboard shortcuts

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