Versions in this module Expand all Collapse all v1 v1.0.0 Mar 6, 2026 Changes in this version + type Client struct + func NewClient(zoektURL string) *Client + func (c *Client) Close() error + func (c *Client) Health(ctx context.Context) error + func (c *Client) ListRepos(ctx context.Context) ([]RepoInfo, error) + func (c *Client) Search(ctx context.Context, q Query) (*SearchResponse, error) + func (c *Client) StreamSearch(ctx context.Context, q Query) <-chan StreamSearchResult + type File struct + Language string + Matches []Match + Name string + type Match struct + After string + Before string + End int + Fragment string + Line string + LineNum int + Start int + type Query struct + CaseSensitive bool + FilePatterns []string + IsRegex bool + Languages []string + MaxResults int + Pattern string + Repos []string + type RepoInfo struct + Branches []string + Files int + Name string + Shard int + type Result struct + Branches []string + Files []File + Repo string + type ResultContext struct + After []string + Before []string + type SearchRequest struct + CaseSensitive bool + ContextLines int + FilePatterns []string + IsRegex bool + Languages []string + Limit int + Query string + Repos []string + type SearchResponse struct + Duration time.Duration + Results []Result + Stats Stats + TotalMatches int + type SearchResult struct + Column int + Content string + Context ResultContext + File string + Language string + Line int + MatchEnd int + MatchStart int + Repo string + type SearchResults struct + Duration time.Duration + Results []SearchResult + Stats SearchStats + TotalCount int + Truncated bool + type SearchStats struct + FilesSearched int + ReposSearched int + type Service struct + func NewService(zoektURL string) *Service + func NewShardedService(zoektURLs string) *Service + func (s *Service) Close() error + func (s *Service) Health(ctx context.Context) error + func (s *Service) ListIndexedRepos(ctx context.Context) ([]RepoInfo, error) + func (s *Service) Search(ctx context.Context, req SearchRequest) (*SearchResults, error) + func (s *Service) StreamSearch(ctx context.Context, req SearchRequest) <-chan StreamSearchEvent + type ShardedClient struct + func NewShardedClient(shardURLs string) *ShardedClient + func (sc *ShardedClient) Close() error + func (sc *ShardedClient) GetClientForRepo(repoName string) *Client + func (sc *ShardedClient) GetShardForRepo(repoName string) int + func (sc *ShardedClient) Health(ctx context.Context) error + func (sc *ShardedClient) ListRepos(ctx context.Context) ([]RepoInfo, error) + func (sc *ShardedClient) Search(ctx context.Context, q Query) (*SearchResponse, error) + func (sc *ShardedClient) ShardCount() int + func (sc *ShardedClient) ShardURLs() []string + func (sc *ShardedClient) StreamSearch(ctx context.Context, q Query) <-chan StreamSearchResult + type Stats struct + Duration time.Duration + FilesConsidered int + FilesLoaded int + FilesSkipped int + ShardsScanned int + type StreamSearchEvent struct + Done bool + Error error + Result *SearchResult + Stats *SearchStats + type StreamSearchResult struct + Done bool + Error error + Result *Result + Stats *Stats