upstream

package
v0.13.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2021 License: ISC Imports: 15 Imported by: 0

Documentation

Overview

Package upstream - maintain REQ/REP connection to clients this allow for push of blocks, transactions... as well as polling for out of sync conditions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Upstream

type Upstream interface {
	ActiveInThePast(time.Duration) bool
	CachedRemoteDigestOfLocalHeight() blockdigest.Digest
	CachedRemoteHeight() uint64
	Connect(*util.Connection, []byte) error
	ConnectedTo() *zmqutil.Connected
	Destroy()
	GetBlockData(uint64) ([]byte, error)
	IsConnectedTo([]byte) bool
	IsConnected() bool
	LocalHeight() uint64
	Name() string
	RemoteAddr() (string, error)
	RemoteDigestOfHeight(uint64) (blockdigest.Digest, error)
	RemoteHeight() (uint64, error)
	ResetServer()
	ServerPublicKey() []byte
}

Upstream - upstream connection

func New

func New(privateKey []byte, publicKey []byte, timeout time.Duration) (Upstream, error)

New - create a connection to an upstream server

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL