Documentation ¶
Overview ¶
Package discovery package implements helpers for clients to discover language drivers supported by Babelfish.
The drivers discovery process uses Github API under the hood to get the most up-to-date information. This process may fail in case of Github rate limiting, and the discovery will fallback to a drivers list hosted by Babelfish project, which must be reasonably up-to-date.
It is also possible to provide Github API token by setting the GITHUB_TOKEN environment variable to prevent the rate limiting.
Index ¶
Constants ¶
const (
GithubOrg = "bblfsh"
)
Variables ¶
This section is empty.
Functions ¶
func GithubClient ¶ added in v3.3.1
GithubClient returns a lazily-initialized singleton Github API client.
API token can be provided with GITHUB_TOKEN environment variable. The public API rate limits will apply without it.
Types ¶
type Driver ¶
Driver is an object describing language driver and it's repository-related information.
func OfficialDrivers ¶
OfficialDrivers lists all available language drivers for Babelfish.
func (*Driver) LatestVersion ¶ added in v3.2.0
LatestVersion returns a latest version of the driver. It returns an empty version if there are no releases of the driver.
func (Driver) RepositoryURL ¶
RepositoryURL returns Github repository URL for browsers (not git).
type Options ¶
type Options struct { Organization string // Github organization name NamesOnly bool // driver manifest will only have Language field populated NoMaintainers bool // do not load maintainers list NoSDKVersion bool // do not check SDK version NoBuildInfo bool // do not load build info NoStatic bool // do not use a static manifest - discover drivers }
Options controls how drivers are being discovered and what information is fetched for them.