connectors

package
v1.8.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 34 Imported by: 0

README

Connector

Package which provide data for parsing:

  1. Server - pure http calls and parsing response
  2. Browser - emulation of the real browser: Chromium/Docker/Cypress

Documentation

Index

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 NullSafe added in v1.0.7

func NullSafe(original Connector) Connector

func WithAttempts

func WithAttempts(original Connector, attempts uint32) Connector

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL