Documentation ¶
Overview ¶
maintain REQ/REP connection to clients this allow for push of blocks, transactions... as well as polling for out of sync conditions
Index ¶
- type Upstream
- func (u *Upstream) Connect(address *util.Connection, serverPublicKey []byte) error
- func (u *Upstream) ConnectedTo() *zmqutil.Connected
- func (u *Upstream) Destroy()
- func (u *Upstream) GetBlockData(blockNumber uint64) ([]byte, error)
- func (u *Upstream) GetBlockDigest(blockNumber uint64) (blockdigest.Digest, error)
- func (u *Upstream) GetHeight() uint64
- func (u *Upstream) IsConnectedTo(serverPublicKey []byte) bool
- func (u *Upstream) IsOK() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Upstream ¶
func (*Upstream) Connect ¶
func (u *Upstream) Connect(address *util.Connection, serverPublicKey []byte) error
connect (or reconnect) to a specific server
func (*Upstream) ConnectedTo ¶
if registered the have avalid connection
func (*Upstream) GetBlockData ¶
fetch block data
func (*Upstream) GetBlockDigest ¶
func (u *Upstream) GetBlockDigest(blockNumber uint64) (blockdigest.Digest, error)
fetch block digest
func (*Upstream) IsConnectedTo ¶
check the current destination
does not mean actually connected, as could be in a timeout and reconnect state
Click to show internal directories.
Click to hide internal directories.