Versions in this module Expand all Collapse all v0 v0.0.1 Jun 11, 2020 Changes in this version + const ChainHeadEv + const DelPeerNotify + const DisconectCtrl + const EndSize + const NewMinedEv + const NewPeerNotify + const NewPeerPassedNotify + const NewTxs + const OneMinuteLimited + const P2PBlockBodiesMsg + const P2PBlockHashMsg + const P2PBlockHeadersMsg + const P2PEndSize + const P2PGetBlockBodiesMsg + const P2PGetBlockHashMsg + const P2PGetBlockHeadersMsg + const P2PGetStatus + const P2PNewBlockHashesMsg + const P2PRouterTestInt + const P2PRouterTestInt64 + const P2PRouterTestString + const P2PStatusMsg + const P2PTxMsg + func Ack(s Station) (uint64, time.Duration) + func AdaptorRegister(adaptor ProtoAdaptor) + func AddAck(s Station, dur time.Duration) (uint64, time.Duration) + func AddCPU(s Station, dur time.Duration) time.Duration + func AddErr(s Station, n uint64) uint64 + func AddNetIn(s Station, pkg uint64) uint64 + func AddNetOut(s Station, pkg uint64) uint64 + func AddThread(s Station, c int64) uint64 + func CPU(s Station) time.Duration + func Err(s Station) uint64 + func GetDDosLimit(t int) int + func GetTypeByCode(typecode int) reflect.Type + func NetIn(s Station) uint64 + func NetOut(s Station) uint64 + func ReplyEvent(e *Event, typecode int, data interface{}) + func Reset() + func Score(s Station) uint64 + func SendEvent(e *Event) (nsent int) + func SendEvents(es []*Event) (nsent int) + func SendTo(from, to Station, typecode int, data interface{}) int + func StationRegister(station Station) + func StationUnregister(station Station) + func Thread(s Station) uint64 + type BaseStation struct + func (bs *BaseStation) Data() interface{} + func (bs *BaseStation) Name() string + type BroadcastStation struct + func (*BroadcastStation) IsBroadcast() bool + func (*BroadcastStation) IsRemote() bool + type Event struct + Data interface{} + From Station + To Station + Typecode int + type Feed struct + func (f *Feed) Send(value interface{}) (nsent int) + func (f *Feed) Subscribe(channel interface{}) Subscription + type LocalStation struct + func (*LocalStation) IsBroadcast() bool + func (*LocalStation) IsRemote() bool + type ProtoAdaptor interface + SendOut func(*Event) error + type RemoteStation struct + func (*RemoteStation) IsBroadcast() bool + func (*RemoteStation) IsRemote() bool + type Router struct + func New() *Router + func (router *Router) AdaptorRegister(adaptor ProtoAdaptor) + func (router *Router) GetStationByName(name string) Station + func (router *Router) SendEvent(e *Event) (nsent int) + func (router *Router) StationRegister(station Station) + func (router *Router) StationUnregister(station Station) + func (router *Router) Subscribe(station Station, channel chan *Event, typecode int, data interface{}) Subscription + type Station interface + Data func() interface{} + IsBroadcast func() bool + IsRemote func() bool + Name func() string + func GetStationByName(name string) Station + func NewBroadcastStation(name string, data interface{}) Station + func NewLocalStation(name string, data interface{}) Station + func NewRemoteStation(name string, data interface{}) Station + func WorstStation() Station + type Subscription interface + Err func() <-chan error + Unsubscribe func() + func Subscribe(station Station, channel chan *Event, typecode int, data interface{}) Subscription