Documentation ¶
Index ¶
- type Neighbour
- func (n *Neighbour) GetAddress() string
- func (n *Neighbour) GetConnLock() *sync.RWMutex
- func (n *Neighbour) GetEncoder() codec.Encoder
- func (n *Neighbour) GetID() string
- func (n *Neighbour) GetPK() string
- func (n *Neighbour) GetType() string
- func (n *Neighbour) IsAlive() bool
- func (n *Neighbour) MarshalAndSend(message message.Message)
- func (n *Neighbour) Send(buf []byte)
- func (n *Neighbour) SetConnAndEncoderAndSignalAlive(conn *net.TCPConn)
- func (n *Neighbour) WaitUntilAlive()
- type Node
- type Remote
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Neighbour ¶
type Neighbour struct { util.Neighbour Encoder *codec.BinaryEncoder WaitUntilAliveChan chan int // Dummy channel that we use to block other processes until the connection becomes live ConnLock *sync.RWMutex }
func NewNeighbour ¶
func (*Neighbour) GetAddress ¶
func (*Neighbour) GetConnLock ¶
func (*Neighbour) GetEncoder ¶
GetEncoder will block until connection is alive
func (*Neighbour) MarshalAndSend ¶
func (*Neighbour) SetConnAndEncoderAndSignalAlive ¶
func (*Neighbour) WaitUntilAlive ¶
func (n *Neighbour) WaitUntilAlive()
type Node ¶
type Node struct { Address string Encoder *codec.BinaryEncoder WaitUntilAliveChan chan int }
func (*Node) GetAddress ¶
func (*Node) GetEncoder ¶
GetEncoder will block until connection is alive
func (*Node) SetConnAndEncoderAndSignalAlive ¶
func (*Node) WaitUntilAlive ¶
func (n *Node) WaitUntilAlive()
Click to show internal directories.
Click to hide internal directories.