Documentation ¶
Index ¶
- Constants
- type AccountDelegate
- type BlockDelegate
- type ChainNotifier
- func (n *ChainNotifier) BroadCastNewBlock(bm *pbs.BlockMined) error
- func (n *ChainNotifier) GetBlockDelegate() BlockDelegate
- func (n *ChainNotifier) IndexChange(idx Index)
- func (n *ChainNotifier) IndexSignal() chan Index
- func (n *ChainNotifier) NotifierFromP2pNetwork(w *worker.TopicWorker)
- func (n *ChainNotifier) NotifierSignal() chan *pbs.Notifier
- func (n *ChainNotifier) Notify(item *pbs.Notifier)
- func (n *ChainNotifier) SetAccountDelegate(ad AccountDelegate)
- func (n *ChainNotifier) SetBlockDelegate(bd BlockDelegate)
- func (n *ChainNotifier) SetID(id string)
- type Index
- type NotType
- type PeerSyncData
- type PeerSyncItem
- type PeerSyncType
Constants ¶
View Source
const ( NotInvalid NotType = iota GroupCreate = 11 GroupDismiss = 12 GroupChangeName = 13 GroupMemQuit = 14 GroupMemKickOut = 15 GroupMemberAdd = 16 AccountUpdate = 21 FriendUpdate = 31 )
View Source
const ( PSTAccount = 1 PSTGroup = 2 PSTAccGrp = 3 PSTFriends = 4 )
View Source
const ( BlockTimeInterval = time.Minute * 5 CachedChanSize = 1024 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountDelegate ¶
type BlockDelegate ¶
type BlockDelegate interface {
ProcMinedNewBlockByPrime(block *pbs.BlockMined) error
}
type ChainNotifier ¶
type ChainNotifier struct {
// contains filtered or unexported fields
}
func Inst ¶
func Inst() *ChainNotifier
func (*ChainNotifier) BroadCastNewBlock ¶
func (n *ChainNotifier) BroadCastNewBlock(bm *pbs.BlockMined) error
func (*ChainNotifier) GetBlockDelegate ¶
func (n *ChainNotifier) GetBlockDelegate() BlockDelegate
func (*ChainNotifier) IndexChange ¶
func (n *ChainNotifier) IndexChange(idx Index)
func (*ChainNotifier) IndexSignal ¶
func (n *ChainNotifier) IndexSignal() chan Index
func (*ChainNotifier) NotifierFromP2pNetwork ¶
func (n *ChainNotifier) NotifierFromP2pNetwork(w *worker.TopicWorker)
func (*ChainNotifier) NotifierSignal ¶
func (n *ChainNotifier) NotifierSignal() chan *pbs.Notifier
func (*ChainNotifier) Notify ¶
func (n *ChainNotifier) Notify(item *pbs.Notifier)
func (*ChainNotifier) SetAccountDelegate ¶
func (n *ChainNotifier) SetAccountDelegate(ad AccountDelegate)
func (*ChainNotifier) SetBlockDelegate ¶
func (n *ChainNotifier) SetBlockDelegate(bd BlockDelegate)
func (*ChainNotifier) SetID ¶
func (n *ChainNotifier) SetID(id string)
type Index ¶
type Index struct { Key string `json:"key"` Typ PeerSyncType `json:"type"` }
type PeerSyncData ¶
type PeerSyncData []*PeerSyncItem
type PeerSyncItem ¶
type PeerSyncType ¶
type PeerSyncType int8
Click to show internal directories.
Click to hide internal directories.