router

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2020 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const UnboundedInt int64 = int64(9_000_000_000_000_000_000)

Variables

View Source
var ContextCanceled = errors.New("context canceled")
View Source
var InvalidArgument = errors.New("invalid argument")
View Source
var LimitReached = errors.New("limit reached")

Functions

func NewCursorFromString

func NewCursorFromString(cursorStr string) (*cursor, error)

func NewCursorGate

func NewCursorGate(c *cursor, descending bool) *cursorGate

func NewDmeshPlanner

func NewDmeshPlanner(peerFetcher func() []*dmesh.SearchPeer, liveDriftThreshold uint64) *dmeshPlanner

Types

type BackendQuery

type BackendQuery struct {
	LastBlockRead int64
	// contains filtered or unexported fields
}

type PeerRange

type PeerRange struct {
	Conn             *grpc.ClientConn
	Addr             string
	LowBlockNum      uint64
	HighBlockNum     uint64
	ServesReversible bool
}

func NewPeerRange

func NewPeerRange(peer *dmesh.SearchPeer, lowBlockNum, highBlockNum uint64) *PeerRange

type Planner

type Planner interface {
	NextPeer(lowBlockNum uint64, highBlockNum uint64, descending bool, withReversible bool) *PeerRange
}

type QueryRange

type QueryRange struct {
	// contains filtered or unexported fields
}

type Router

type Router struct {
	*shutter.Shutter
	// contains filtered or unexported fields
}

func New

func New(dmeshClient dmeshClient.SearchClient, headDelayTolerance uint64, libDelayTolerance uint64, blockIDClient pbblockmeta.BlockIDClient, forksClient pbblockmeta.ForksClient, enableRetry bool) *Router

func (*Router) Check

Check only validates "router.ready" bool and the shutting down process. Does *not* depend on contiguousness

func (*Router) Launch

func (r *Router) Launch(grpcListenAddr string)

func (*Router) StreamMatches

func (r *Router) StreamMatches(req *pb.RouterRequest, stream pb.Router_StreamMatchesServer) error

Jump to

Keyboard shortcuts

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