web

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package web implements a web transaction driver based on chromedp/FQL.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Server URL for the chrome developer protocol to be used for tests
	// can be overridden by the "cdp_server_url" in the transaction config inputs
	ServerURL string `json:"server_url" yaml:"server_url"`

	// Perform DNS discovery with the server hostname
	// The web driver needs to maintain the same cdp server across multiple http
	// requests. This needed when using multiple cdp servers that are load balanced
	// by DNS round robin, like a kubernetes headless service.
	DNSDiscovery bool `json:"dns_discovery" yaml:"dns_discovery"`

	// Path to chrome binary
	BinaryPath string `json:"binary_path" yaml:"binary_path"`

	// Arguments for launching chrome
	BinaryArgs []string `json:"binary_args" yaml:"binary_args"`

	// Interval for recycling chrome processes
	RecycleInterval time.Duration
	// contains filtered or unexported fields
}

Config for web driver

type Driver

type Driver struct {
	// contains filtered or unexported fields
}

Driver for web based transactions using the chrome developer protocol

func New

func New(c Config) (d *Driver, err error)

New creates a new web driver

func (*Driver) New

func (d *Driver) New(config transaction.Config) (tx transaction.Transaction, err error)

New creates a web transaction

func (*Driver) Type

func (d *Driver) Type() (t string)

Type returns this driver type

type Transaction

type Transaction struct {
	// contains filtered or unexported fields
}

Transaction is a pre-compiled replicant transaction for web applications

func (*Transaction) Config

func (t *Transaction) Config() (config transaction.Config)

Config returns the transaction config

func (*Transaction) Run

func (t *Transaction) Run(ctx context.Context) (result transaction.Result)

Run executes the web transaction

Jump to

Keyboard shortcuts

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