···77 "net/http"
8899 "github.com/bluesky-social/indigo/atproto/syntax"
1010+ "golang.org/x/time/rate"
1011)
11121213// The zero value ('BaseDirectory{}') is a usable Directory.
1314type BaseDirectory struct {
1415 // if non-empty, this string should have URL method, hostname, and optional port; it should not have a path or trailing slash
1516 PLCURL string
1717+ // If not nil, this limiter will be used to rate-limit requests to the PLCURL
1818+ PLCLimiter *rate.Limiter
1919+ // If not nil, this function will be called inline with DID Web lookups, and can be used to limit the number of requests to a given hostname
2020+ DIDWebLimitFunc func(ctx context.Context, hostname string) error
1621 // HTTP client used for did:web, did:plc, and HTTP (well-known) handle resolution
1722 HTTPClient http.Client
1823 // DNS resolver used for DNS handle resolution. Calling code can use a custom Dialer to query against a specific DNS server, or re-implement the interface for even more control over the resolution process