Documentation
¶
Index ¶
- Variables
- func NewAPI(url string, cfg *config.ServerConnectorConfig, client *http.Client) *apiConnector
- func NewBrowser(url string, cfg *config.BrowserConnectorConfig) *browserConnector
- func NewFile(cfg *config.FileConnectorConfig) *fileConnector
- func NewStatic(cfg *config.StaticConnectorConfig) *staticConnector
- type Connector
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultUserAgent = "fitter (+https://github.com/PxyUp/fitter)"
DefaultUserAgent identifies fitter's HTTP requests when a config sets no User-Agent header (previously the requests went out with Go's generic "Go-http-client/1.1"). Override it per request by setting a "User-Agent" header in server_config; override the default globally by reassigning this variable (e.g. to embed the build version).
Functions ¶
func NewAPI ¶
func NewAPI(url string, cfg *config.ServerConnectorConfig, client *http.Client) *apiConnector
func NewBrowser ¶
func NewBrowser(url string, cfg *config.BrowserConnectorConfig) *browserConnector
func NewFile ¶ added in v0.0.39
func NewFile(cfg *config.FileConnectorConfig) *fileConnector
func NewStatic ¶ added in v0.0.10
func NewStatic(cfg *config.StaticConnectorConfig) *staticConnector
Types ¶
type Connector ¶
type Connector interface {
Get(ctx context.Context, parsedValue builder.Interfacable, index *uint32, input builder.Interfacable) ([]byte, error)
}
func WithAttempts ¶
Click to show internal directories.
Click to hide internal directories.