IndexClient implements the Search() and DocCount() subset of the bleve.Index interface by accessing a remote cbft server via REST protocol. This allows callers to add a IndexClient as a target of a bleve.IndexAlias, and implements cbft protocol features like query consistency and auth. TODO: Imple
| 83 | // |
| 84 | // TODO: Implement propagating auth info in IndexClient. |
| 85 | type IndexClient struct { |
| 86 | mgr *cbgt.Manager |
| 87 | name string |
| 88 | HostPort string |
| 89 | IndexName string |
| 90 | IndexUUID string |
| 91 | PIndexNames []string |
| 92 | QueryURL string |
| 93 | CountURL string |
| 94 | TaskRequestURL string |
| 95 | Consistency *cbgt.ConsistencyParams |
| 96 | httpClient *http.Client |
| 97 | |
| 98 | lastMutex sync.RWMutex |
| 99 | lastSearchStatus int |
| 100 | lastErrBody []byte |
| 101 | } |
| 102 | |
| 103 | func (r *IndexClient) GetLast() (int, []byte) { |
| 104 | r.lastMutex.RLock() |
nothing calls this directly
no outgoing calls
no test coverage detected