Documentation
¶
Overview ¶
Package hostapi implements shared host search and backend listing for HTTP and MCP surfaces.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ListBackendsOutput ¶
type ListBackendsOutput struct {
ConfigPath string `json:"config_path"`
Backends []config.BackendRow `json:"backends"`
}
ListBackendsOutput matches MCP list_backends response shape.
func ListBackends ¶
func ListBackends(configPath string, searchReg *searchrun.Registry) (ListBackendsOutput, error)
ListBackends resolves config the same way as honey backends / MCP list_backends.
type SearchHostsInput ¶
type SearchHostsInput struct {
ConfigPath string `json:"config_path,omitempty" mod:"trim"`
Name string `json:"name,omitempty" mod:"trim"`
NameRegex string `json:"name_regex,omitempty" mod:"trim"`
Providers string `json:"providers,omitempty" mod:"trim"`
Backends string `json:"backends,omitempty" mod:"trim"`
SSHUser string `json:"ssh_user,omitempty" mod:"trim"`
CacheTTL string `json:"cache_ttl,omitempty" mod:"trim"`
CacheDir string `json:"cache_dir,omitempty" mod:"trim"`
NoCache bool `json:"no_cache,omitempty"`
Refresh bool `json:"refresh,omitempty"`
Overrides searchrun.ProviderOverrides `json:"overrides,omitempty"`
}
SearchHostsInput mirrors MCP search_hosts and the web /api/v1/search JSON body. Overrides is an opaque map passed through to provider factories — callers do not need to know which fields any specific provider accepts.
type SearchHostsOutput ¶
SearchHostsOutput is the JSON search result.
func SearchHosts ¶
func SearchHosts(ctx context.Context, in *SearchHostsInput, reg hostexec.Registry, searchReg *searchrun.Registry) (SearchHostsOutput, error)
SearchHosts runs the same search pipeline as honey search / MCP search_hosts.
Click to show internal directories.
Click to hide internal directories.