MCPcopy Create free account
hub / github.com/couchbase/cbft / newStreamHandler

Function newStreamHandler

stream.go:48–64  ·  view source on GitHub ↗
(index string, req *bleve.SearchRequest,
	outStream pb.SearchService_SearchServer)

Source from the content-addressed store, hash-verified

46}
47
48func newStreamHandler(index string, req *bleve.SearchRequest,
49 outStream pb.SearchService_SearchServer) *streamer {
50 rv := &streamer{
51 index: index,
52 curSize: int(req.Size),
53 curSkip: int(req.From),
54 stream: outStream,
55 req: req,
56 }
57 if req.Size > 0 {
58 rv.sizeSet = true
59 }
60 if req.From > 0 {
61 rv.skipSet = true
62 }
63 return rv
64}
65
66func (s *streamer) write(b []byte, offsets []uint64, hitsCount int) error {
67 s.m.Lock()

Callers 1

SearchMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected