Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDirectorySearcher ¶
NewDirectorySearcher returns a searcher instance that loads all shards corresponding to a glob into memory.
func NewDirectorySearcherWithOptions ¶
func NewDirectorySearcherWithOptions( dir string, opts DirectorySearcherOptions, ) (zoekt.Streamer, error)
NewDirectorySearcherWithOptions is like NewDirectorySearcher, with control over how shard files are opened.
Types ¶
type DirectorySearcherOptions ¶
type DirectorySearcherOptions struct {
// IndexFileOpener defaults to index.NewIndexFile.
IndexFileOpener IndexFileOpener
}
DirectorySearcherOptions configures how a directory searcher loads shards.
type DirectoryWatcher ¶
type DirectoryWatcher struct {
// contains filtered or unexported fields
}
func (*DirectoryWatcher) Stop ¶
func (sw *DirectoryWatcher) Stop()
func (*DirectoryWatcher) String ¶
func (s *DirectoryWatcher) String() string
func (*DirectoryWatcher) WaitUntilReady ¶
func (s *DirectoryWatcher) WaitUntilReady() error
type IndexFileOpener ¶
IndexFileOpener constructs an index file and takes ownership of f. A directory searcher may call the opener concurrently for different shards.
type ReadySearcher ¶
ReadySearcher is a Streamer that reports whether its initial load is complete.
func NewDirectorySearcherFast ¶
func NewDirectorySearcherFast(dir string) (ReadySearcher, error)
NewDirectorySearcherFast is like NewDirectorySearcher, but does not block on the initial loading of shards.
This exists since in the case of zoekt-webserver we are happy with having partial availability since that is better than no availability on large instances.
func NewDirectorySearcherFastWithOptions ¶
func NewDirectorySearcherFastWithOptions( dir string, opts DirectorySearcherOptions, ) (ReadySearcher, error)
NewDirectorySearcherFastWithOptions is like NewDirectorySearcherFast, with control over how shard files are opened.