Documentation ¶
Index ¶
- Constants
- type Beacon
- type Config
- type Peer
- func (this *Peer) AddDropPeerListener(listener PeerListener) uint64
- func (this *Peer) AddNewPeerListener(listener PeerListener) uint64
- func (peer *Peer) Bind() <-chan error
- func (peer *Peer) Cancel(name string)
- func (peer *Peer) Config() Config
- func (peer *Peer) Destroy()
- func (peer *Peer) Handle(name string, hnd ...interface{})
- func (this *Peer) RemoveDropPeerListener(idx uint64)
- func (this *Peer) RemoveNewPeerListener(idx uint64)
- type PeerListener
Constants ¶
View Source
const ( UuidSize = 16 PING = "PING" PeerAddressKey = "peer.address" )
defaults
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Beacon ¶
type Beacon struct { Addr string `json:"addr"` Name string `json:"name"` MaxDatagramSize int `json:"maxDatagramSize"` Interval time.Duration `json:"interval"` MaxInterval time.Duration `json:"maxInterval"` // BeaconCountdown is the number of consecutive UDP pings inside the ping window // to reactivate the UDP health check Countdown int `json:"countdown"` }
type Peer ¶
func (*Peer) AddDropPeerListener ¶
func (this *Peer) AddDropPeerListener(listener PeerListener) uint64
func (*Peer) AddNewPeerListener ¶
func (this *Peer) AddNewPeerListener(listener PeerListener) uint64
func (*Peer) RemoveDropPeerListener ¶
RemoveSendListener removes a previously added listener on send messages
func (*Peer) RemoveNewPeerListener ¶
RemoveSendListener removes a previously added listener on send messages
type PeerListener ¶
Click to show internal directories.
Click to hide internal directories.