Documentation
¶
Overview ¶
Package web supplies Node-owned public web reads and configured search.
Index ¶
- func NewPublicHTTPSClient(timeout time.Duration, maxRedirects int) *http.Client
- func SearchNative(ctx context.Context, search NativeSearch) (protocol.SearchPage, error)
- type Auth
- type FetchOptions
- type Fetcher
- type NativeSearch
- type Renderer
- type SearchOptions
- type SearchPlan
- type Searcher
- func (searcher *Searcher) Configure(settings protocol.SearchSettings)
- func (searcher *Searcher) Search(ctx context.Context, plan SearchPlan, input protocol.SearchRequest) (protocol.SearchPage, error)
- func (searcher *Searcher) SearchFresh(ctx context.Context, plan SearchPlan, input protocol.SearchRequest, fresh bool) (protocol.SearchPage, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPublicHTTPSClient ¶ added in v0.2.4
NewPublicHTTPSClient fetches automatic public resources under the policy of model web reads, through the system proxy when one applies.
func SearchNative ¶
func SearchNative(ctx context.Context, search NativeSearch) (protocol.SearchPage, error)
Types ¶
type FetchOptions ¶
type Fetcher ¶
type Fetcher struct {
// contains filtered or unexported fields
}
func NewFetcher ¶
func NewFetcher(options FetchOptions) *Fetcher
type NativeSearch ¶
type NativeSearch struct {
Provider protocol.ConversationProvider
Model string
Input protocol.SearchRequest
Session protocol.SessionID
Request protocol.RequestID
Prepare func(context.Context, map[string]any) (*http.Request, error)
Record func(context.Context, canonical.Usage) error
Transport http.RoundTripper
Secrets []protocol.Secret
Fetch func(context.Context, protocol.WebRequest) (protocol.WebPage, error)
Now func() time.Time
}
NativeSearch uses one frozen provider binding. Prepare owns authorization and declared model policies; Record owns the caller turn's canonical usage append.
type Renderer ¶
type Renderer struct {
Endpoint string
Key protocol.Secret
Transport http.RoundTripper
}
type SearchOptions ¶
type SearchOptions struct {
Now func() time.Time
Transport http.RoundTripper
Endpoints map[protocol.SearchDriver]string
Model func(context.Context, SearchPlan, protocol.SearchRequest) (protocol.SearchPage, error)
}
type SearchPlan ¶
type SearchPlan struct {
Settings protocol.SearchSettings
Credentials map[protocol.SearchDriver]Auth
Model func(context.Context, protocol.SearchRequest) (protocol.SearchPage, error)
}
type Searcher ¶
type Searcher struct {
// contains filtered or unexported fields
}
func NewSearcher ¶
func NewSearcher(options SearchOptions) *Searcher
func (*Searcher) Configure ¶
func (searcher *Searcher) Configure(settings protocol.SearchSettings)
func (*Searcher) Search ¶
func (searcher *Searcher) Search(ctx context.Context, plan SearchPlan, input protocol.SearchRequest) (protocol.SearchPage, error)
func (*Searcher) SearchFresh ¶
func (searcher *Searcher) SearchFresh(ctx context.Context, plan SearchPlan, input protocol.SearchRequest, fresh bool) (protocol.SearchPage, error)