Documentation
¶
Overview ¶
Package simbad is the library behind the simbad command line: the HTTP client, request shaping, and the typed data models for the SIMBAD Astronomical Database at simbad.u-strasbg.fr.
The Client here is the spine every command shares. It sets a real User-Agent, paces requests so a busy session stays polite, and retries the transient failures (429 and 5xx) that any public site throws under load.
Index ¶
Constants ¶
const DefaultUserAgent = "simbad-cli/0.1 (tamnd87@gmail.com)"
DefaultUserAgent identifies the client to SIMBAD. A real, honest User-Agent is both polite and the thing most likely to keep you unblocked.
const Host = "simbad.u-strasbg.fr"
Host is the site this client talks to, and the host the URI driver in domain.go claims.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client talks to SIMBAD over HTTP.
type Config ¶
type Config struct {
BaseURL string
UserAgent string
Rate time.Duration
Timeout time.Duration
Retries int
}
Config holds all tunables for the Client.
type Domain ¶
type Domain struct{}
Domain is the SIMBAD driver. It carries no state; the per-run client is built by the factory Register hands kit.
func (Domain) Info ¶
func (Domain) Info() kit.DomainInfo
Info describes the scheme, the hostnames a pasted link is matched against, and the identity reused for the binary's help and version.