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

Struct GrpcClient

grpc_client.go:42–57  ·  view source on GitHub ↗

GrpcClient implements the Search() and DocCount() subset of the bleve.Index interface by accessing a remote cbft server via grpc protocol. This allows callers to add a GrpcClient as a target of a bleve.IndexAlias, and implements cbft protocol features like query consistency and auth.

Source from the content-addressed store, hash-verified

40// a bleve.IndexAlias, and implements cbft protocol features like
41// query consistency and auth.
42type GrpcClient struct {
43 Mgr *cbgt.Manager
44 name string
45 HostPort string
46 IndexName string
47 IndexUUID string
48 PIndexNames []string
49
50 Consistency *cbgt.ConsistencyParams
51 GrpcCli pb.SearchServiceClient
52
53 lastMutex sync.RWMutex
54 lastSearchStatus int
55 lastErrBody []byte
56 sc streamHandler
57}
58
59func (g *GrpcClient) SetStreamHandler(sc streamHandler) {
60 g.sc = sc

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected