Documentation
¶
Index ¶
- func GetMeshLIB(getAllPeers GetSearchPeersFunc, backendThreshold int) bstream.BlockRef
- type GetSearchPeersFunc
- type IndexedBlock
- type LiveBackend
- func (b *LiveBackend) Check(ctx context.Context, in *pbhealth.HealthCheckRequest) (*pbhealth.HealthCheckResponse, error)
- func (b *LiveBackend) GetHeadInfo(ctx context.Context, r *pbhead.HeadInfoRequest) (*pbhead.HeadInfoResponse, error)
- func (b *LiveBackend) Launch(grpcListenAddr string)
- func (b *LiveBackend) SetupSubscriptionHub(startBlock bstream.BlockRef, blockMapper search.BlockMapper, ...) error
- func (b *LiveBackend) StreamHeadInfo(r *pbhead.HeadInfoRequest, ...) error
- func (b *LiveBackend) StreamMatches(req *pb.BackendRequest, stream pb.Backend_StreamMatchesServer) error
- func (b *LiveBackend) WaitHubReady()
- type LiveQuery
- func (q *LiveQuery) ForwardProcessBlock(blk *bstream.Block, obj interface{}) error
- func (q *LiveQuery) ProcessMatches(matches []search.SearchMatch, blk *bstream.Block, irrBlockNum uint64, ...) error
- func (q *LiveQuery) ProcessSingleBlocks(ctx context.Context, indexedBlock *IndexedBlock, ...) (err error)
- type TailManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMeshLIB ¶
func GetMeshLIB(getAllPeers GetSearchPeersFunc, backendThreshold int) bstream.BlockRef
Types ¶
type GetSearchPeersFunc ¶
type GetSearchPeersFunc func() []*dmesh.SearchPeer
type IndexedBlock ¶
type IndexedBlock struct { Idx *search.SingleIndex Blk *bstream.Block }
type LiveBackend ¶
func New ¶
func New(dmeshClient dmeshClient.SearchClient, searchPeer *dmesh.SearchPeer, headDelayTolerance uint64, shutdownDelay time.Duration) *LiveBackend
func (*LiveBackend) Check ¶
func (b *LiveBackend) Check(ctx context.Context, in *pbhealth.HealthCheckRequest) (*pbhealth.HealthCheckResponse, error)
func (*LiveBackend) GetHeadInfo ¶
func (b *LiveBackend) GetHeadInfo(ctx context.Context, r *pbhead.HeadInfoRequest) (*pbhead.HeadInfoResponse, error)
func (*LiveBackend) Launch ¶
func (b *LiveBackend) Launch(grpcListenAddr string)
func (*LiveBackend) SetupSubscriptionHub ¶
func (*LiveBackend) StreamHeadInfo ¶
func (b *LiveBackend) StreamHeadInfo(r *pbhead.HeadInfoRequest, stream pbhead.StreamingHeadInfo_StreamHeadInfoServer) error
func (*LiveBackend) StreamMatches ¶
func (b *LiveBackend) StreamMatches(req *pb.BackendRequest, stream pb.Backend_StreamMatchesServer) error
Backend.StreamMatches gRPC implementation
func (*LiveBackend) WaitHubReady ¶
func (b *LiveBackend) WaitHubReady()
type LiveQuery ¶
type LiveQuery struct { Ctx context.Context MatchCollector search.MatchCollector Request *pb.BackendRequest BleveQuery *search.BleveQuery IncomingMatches chan *pb.SearchMatch LastBlockRead uint64 // fwd only LiveMarkerReached bool LiveMarkerLastSentBlockNum uint64 // contains filtered or unexported fields }
func (*LiveQuery) ForwardProcessBlock ¶
func (*LiveQuery) ProcessMatches ¶
func (*LiveQuery) ProcessSingleBlocks ¶
func (q *LiveQuery) ProcessSingleBlocks(ctx context.Context, indexedBlock *IndexedBlock, matchCollector search.MatchCollector, incomingMatches chan *pb.SearchMatch) (err error)
type TailManager ¶
TailManager truncates the buffer under the guard of the LowBlockGuard (populated by the SubscriptionHub), as well as managing which lower block is published on dmesh, to slowly drain our requests that we're about to truncate.. then truncates the buffer, and cleans up the bleve indexes below.
func NewTailManager ¶
func NewTailManager(getSearchPeers GetSearchPeersFunc, dmeshClient dmeshClient.Client, searchPeer *dmesh.SearchPeer, buffer *bstream.Buffer, minTargetBufferSize int, backendThreshold int, targetLIB bstream.BlockRef) *TailManager
func (*TailManager) CurrentLIB ¶
func (t *TailManager) CurrentLIB() bstream.BlockRef
func (*TailManager) Launch ¶
func (t *TailManager) Launch()
func (*TailManager) Ready ¶
func (t *TailManager) Ready() bool
func (*TailManager) TailLock ¶
func (t *TailManager) TailLock(startBlockNum uint64) (releaseFunc func(), err error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.