Back to godoc.org

Package router

v0.0.1
Latest Go to latest

The latest major version is .

Published: Jun 22, 2020 | License: Apache-2.0 | Module: github.com/dfuse-io/search

Index

Constants

const UnboundedInt int64 = int64(9_000_000_000_000_000_000)

Variables

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

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

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

func (r *Router) Check(ctx context.Context, in *pbhealth.HealthCheckRequest) (*pbhealth.HealthCheckResponse, error)

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

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier