http

package
v0.186.4 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: Apache-2.0 Imports: 44 Imported by: 0

Documentation

Index

Constants

View Source
const AutomaticRunMode = "automatic"

AutomaticRunMode indicates the job is automated

Variables

View Source
var (
	// ErrServerError is returned when the server was not able to correctly handle our request (status code >= 500).
	ErrServerError = errors.New(msg.InternalServerError)
	// ErrJobNotFound is returned when the requested job was not found.
	ErrJobNotFound = errors.New(msg.JobNotFound)
	// ErrAssetNotFound is returned when the requested asset was not found.
	ErrAssetNotFound = errors.New(msg.AssetNotFound)
	// ErrTunnelNotFound is returned when the requested tunnel was not found.
	ErrTunnelNotFound = errors.New(msg.TunnelNotFound)
)
View Source
var DefaultGitHub = GitHub{
	HTTPClient: &http.Client{
		Timeout:   4 * time.Second,
		Transport: &http.Transport{Proxy: http.ProxyFromEnvironment},
	},
	URL: "https://api.github.com",
}

DefaultGitHub is a preconfigured instance of GitHub.

Functions

func CheckProxy added in v0.134.0

func CheckProxy() error

CheckProxy checks that the HTTP_PROXY is valid if it exists.

func NewRequestWithContext added in v0.125.0

func NewRequestWithContext(ctx context.Context, method, url string, body io.Reader) (*http.Request, error)

NewRequestWithContext is a wrapper around http.NewRequestWithContext that modifies the request by adding additional headers.

func NewRetryableClient added in v0.126.0

func NewRetryableClient(timeout time.Duration) *retryablehttp.Client

NewRetryableClient returns a new pre-configured instance of retryablehttp.Client.

func NewRetryableRequestWithContext added in v0.126.0

func NewRetryableRequestWithContext(ctx context.Context, method, url string, body io.Reader) (*retryablehttp.Request, error)

NewRetryableRequestWithContext is a wrapper around retryablehttp.NewRequestWithContext that modifies the request by adding additional headers.

Types

type APITester added in v0.124.1

type APITester struct {
	HTTPClient         *retryablehttp.Client
	URL                string
	Username           string
	AccessKey          string
	RequestRateLimiter *rate.Limiter
}

APITester describes an interface to the api-testing rest endpoints.

func NewAPITester added in v0.124.1

func NewAPITester(url string, username string, accessKey string, timeout time.Duration) APITester

NewAPITester a new instance of APITester.

func (*APITester) DeleteVaultFile added in v0.147.0

func (c *APITester) DeleteVaultFile(ctx context.Context, projectID string, fileNames []string) error

DeleteVaultFile delete the files in the vault for the project identified by projectID

func (*APITester) GetEventResult added in v0.124.1

func (c *APITester) GetEventResult(ctx context.Context, hookID string, eventID string) (apitest.TestResult, error)

func (*APITester) GetHooks added in v0.124.1

func (c *APITester) GetHooks(ctx context.Context, projectID string) ([]apitest.Hook, error)

GetHooks returns the list of hooks available.

func (*APITester) GetProject added in v0.124.1

func (c *APITester) GetProject(ctx context.Context, hookID string) (apitest.ProjectMeta, error)

GetProject returns Project metadata for a given hookID.

func (*APITester) GetProjects added in v0.124.1

func (c *APITester) GetProjects(ctx context.Context) ([]apitest.ProjectMeta, error)

GetProjects returns the list of Project available.

func (*APITester) GetTest added in v0.124.1

func (c *APITester) GetTest(ctx context.Context, hookID string, testID string) (apitest.Test, error)

func (*APITester) GetVault added in v0.144.0

func (c *APITester) GetVault(ctx context.Context, hookID string) (apitest.Vault, error)

GetVault returns the vault for the project identified by hookID

func (*APITester) GetVaultFileContent added in v0.147.0

func (c *APITester) GetVaultFileContent(ctx context.Context, projectID string, fileID string) (io.ReadCloser, error)

GetVaultFileContent returns the content of a file in the vault for the project identified by projectID

func (*APITester) ListVaultFiles added in v0.147.0

func (c *APITester) ListVaultFiles(ctx context.Context, projectID string) ([]apitest.VaultFile, error)

ListVaultFiles returns the list of files in the vault for the project identified by projectID

func (*APITester) PutVault added in v0.144.0

func (c *APITester) PutVault(ctx context.Context, hookID string, vault apitest.Vault) error

func (*APITester) PutVaultFile added in v0.147.0

func (c *APITester) PutVaultFile(ctx context.Context, projectID string, fileName string, fileBody io.ReadCloser) (apitest.VaultFile, error)

PutVaultFile stores the content of a file in the vault for the project identified by projectID

func (*APITester) RunAllAsync added in v0.124.1

func (c *APITester) RunAllAsync(ctx context.Context, hookID string, buildID string, tunnel config.Tunnel, test apitest.TestRequest) (apitest.AsyncResponse, error)

RunAllAsync runs all the tests for the project described by hookID and returns without waiting for their results.

func (*APITester) RunEphemeralAsync added in v0.124.1

func (c *APITester) RunEphemeralAsync(ctx context.Context, hookID string, buildID string, tunnel config.Tunnel, test apitest.TestRequest) (apitest.AsyncResponse, error)

RunEphemeralAsync runs the tests for the project described by hookID and returns without waiting for their results.

func (*APITester) RunTagAsync added in v0.124.1

func (c *APITester) RunTagAsync(ctx context.Context, hookID string, testTag string, buildID string, tunnel config.Tunnel, test apitest.TestRequest) (apitest.AsyncResponse, error)

RunTagAsync runs all the tests for a testTag for a project described by hookID and returns without waiting for results.

func (*APITester) RunTestAsync added in v0.124.1

func (c *APITester) RunTestAsync(ctx context.Context, hookID string, testID string, buildID string, tunnel config.Tunnel, test apitest.TestRequest) (apitest.AsyncResponse, error)

RunTestAsync runs a single test described by testID for the project described by hookID and returns without waiting for results.

type AppStore added in v0.124.1

type AppStore struct {
	HTTPClient *retryablehttp.Client
	URL        string
	Username   string
	AccessKey  string
}

AppStore implements a remote file storage for storage.AppService. See https://wiki.saucelabs.com/display/DOCS/Application+Storage for more details.

func NewAppStore added in v0.124.1

func NewAppStore(url, username, accessKey string, timeout time.Duration) *AppStore

NewAppStore returns an implementation for AppStore

func (*AppStore) Delete added in v0.159.0

func (s *AppStore) Delete(id string) error

func (*AppStore) Download added in v0.124.1

func (s *AppStore) Download(id string) (io.ReadCloser, int64, error)

Download downloads a file with the given id. It's the caller's responsibility to close the reader.

func (*AppStore) DownloadURL added in v0.124.1

func (s *AppStore) DownloadURL(url string) (io.ReadCloser, int64, error)

DownloadURL downloads a file from the url. It's the caller's responsibility to close the reader.

func (*AppStore) List added in v0.124.1

func (s *AppStore) List(opts storage.ListOptions) (storage.List, error)

List returns a list of items stored in the Sauce app storage that match the search criteria specified by opts.

func (*AppStore) UploadStream added in v0.124.1

func (s *AppStore) UploadStream(filename, description string, reader io.Reader) (storage.Item, error)

UploadStream uploads the contents of reader and stores them under the given filename.

type AsyncEventParser added in v0.172.0

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

func NewAsyncEventMgr added in v0.172.0

func NewAsyncEventMgr() (*AsyncEventParser, error)

func (*AsyncEventParser) IsLogIdle added in v0.172.0

func (a *AsyncEventParser) IsLogIdle() bool

func (*AsyncEventParser) ParseEvent added in v0.172.0

func (a *AsyncEventParser) ParseEvent(event string) (*imagerunner.AsyncEvent, error)

type AuthRequest added in v0.173.3

type AuthRequest struct {
	RegistryURL string `json:"registry_url"`
}

type AuthToken added in v0.167.0

type AuthToken struct {
	ExpiresAt time.Time `json:"expires_at"`
	Username  string    `json:"username"`
	Password  string    `json:"password"`
}

type Batch added in v0.124.1

type Batch struct {
	Framework        string              `json:"framework,omitempty"`
	FrameworkVersion string              `json:"frameworkVersion,omitempty"`
	RunnerVersion    string              `json:"runnerVersion,omitempty"`
	TestFile         string              `json:"testFile,omitempty"`
	Args             []map[string]string `json:"args,omitempty"`
	VideoFPS         int                 `json:"video_fps"`
	Env              []env               `json:"env,omitempty"`
}

Batch represents capabilities for batch frameworks.

type BuildService added in v0.186.4

type BuildService struct {
	Client    *retryablehttp.Client
	AppURL    string
	URL       string
	Username  string
	AccessKey string
}

func NewBuildService added in v0.186.4

func NewBuildService(
	r region.Region, username, accessKey string, timeout time.Duration,
) BuildService

func (*BuildService) FindBuild added in v0.186.4

func (c *BuildService) FindBuild(
	ctx context.Context, jobID string, realDevice bool,
) (build.Build, error)

type Capabilities added in v0.124.1

type Capabilities struct {
	AlwaysMatch MatchingCaps `json:"alwaysMatch,omitempty"`
}

Capabilities represents the webdriver capabilities. https://www.w3.org/TR/webdriver/

type ContainersResp added in v0.172.0

type ContainersResp struct {
	Items []imagerunner.Runner `json:"content"`
}

type DeviceQuery added in v0.124.1

type DeviceQuery struct {
	Type                         string `json:"type"`
	DeviceDescriptorID           string `json:"device_descriptor_id,omitempty"`
	PrivateDevicesOnly           bool   `json:"private_devices_only,omitempty"`
	CarrierConnectivityRequested bool   `json:"carrier_connectivity_requested,omitempty"`
	RequestedDeviceType          string `json:"requested_device_type,omitempty"`
	DeviceName                   string `json:"device_name,omitempty"`
	PlatformVersion              string `json:"platform_version,omitempty"`
}

DeviceQuery represents the device selection query for RDC.

type DriveErrResponse added in v0.147.0

type DriveErrResponse struct {
	Error   string `json:"error"`
	Message string `json:"message"`
}

DriveErrResponse describes the response when drive API returns an error.

type FrameworkResponse added in v0.124.1

type FrameworkResponse struct {
	Name        string    `json:"name"`
	Version     string    `json:"version"`
	EOLDate     time.Time `json:"eolDate"`
	RemovalDate time.Time `json:"removalDate"`
	Runner      runner    `json:"runner"`
	Platforms   []struct {
		Name     string
		Browsers []string
	} `json:"platforms"`
	BrowserDefaults map[string]string `json:"browserDefaults"`
	Runtimes        []string          `json:"runtimes"`
}

FrameworkResponse represents the response body for framework information.

type GitHub added in v0.124.1

type GitHub struct {
	HTTPClient *http.Client
	URL        string
}

GitHub represents the GitHub HTTP API client.

func (*GitHub) IsUpdateAvailable added in v0.124.1

func (c *GitHub) IsUpdateAvailable(version string) (string, error)

IsUpdateAvailable returns the latest version if it's semantically higher than the given one.

type ImageRunner

type ImageRunner struct {
	Client            *retryablehttp.Client
	URL               string
	Creds             iam.Credentials
	AsyncEventManager imagerunner.AsyncEventManager
	// contains filtered or unexported fields
}

func NewImageRunner

func NewImageRunner(url string, creds iam.Credentials, timeout time.Duration,
	asyncEventManager imagerunner.AsyncEventManager) ImageRunner

func (*ImageRunner) DownloadArtifacts added in v0.131.0

func (c *ImageRunner) DownloadArtifacts(ctx context.Context, id string) (io.ReadCloser, error)

func (*ImageRunner) GetLiveLogs added in v0.172.0

func (c *ImageRunner) GetLiveLogs(ctx context.Context, id string) error

func (*ImageRunner) GetLogs

func (c *ImageRunner) GetLogs(ctx context.Context, id string) (string, error)

func (*ImageRunner) GetStatus

func (c *ImageRunner) GetStatus(ctx context.Context, id string) (imagerunner.Runner, error)

func (*ImageRunner) ListContainers added in v0.172.0

func (c *ImageRunner) ListContainers(ctx context.Context) (ContainersResp, error)

func (*ImageRunner) OpenAsyncEventsWebSocket added in v0.172.0

func (c *ImageRunner) OpenAsyncEventsWebSocket(id string, lastSeq string, wait bool) (*websocket.Conn, error)

func (*ImageRunner) RegistryLogin added in v0.167.0

func (c *ImageRunner) RegistryLogin(ctx context.Context, repo string) (AuthToken, error)

func (*ImageRunner) StopRun

func (c *ImageRunner) StopRun(ctx context.Context, runID string) error

func (*ImageRunner) StreamLiveLogs added in v0.172.0

func (c *ImageRunner) StreamLiveLogs(ctx context.Context, id string, wait bool) error

func (*ImageRunner) TriggerRun

type InsightsService added in v0.124.1

type InsightsService struct {
	HTTPClient  *http.Client
	URL         string
	Credentials iam.Credentials
}

func NewInsightsService added in v0.124.1

func NewInsightsService(url string, creds iam.Credentials, timeout time.Duration) InsightsService

func (*InsightsService) GetHistory added in v0.124.1

func (c *InsightsService) GetHistory(ctx context.Context, user iam.User, sortBy string) (insights.JobHistory, error)

func (*InsightsService) ListJobs added in v0.124.1

func (c *InsightsService) ListJobs(ctx context.Context, opts insights.ListJobsOptions) ([]job.Job, error)

ListJobs returns job list

func (*InsightsService) PostTestRun added in v0.124.1

func (c *InsightsService) PostTestRun(ctx context.Context, runs []insights.TestRun) error

PostTestRun publish test-run results to insights API.

func (*InsightsService) ReadJob added in v0.124.1

func (c *InsightsService) ReadJob(ctx context.Context, id string) (job.Job, error)

type Item added in v0.124.1

type Item struct {
	ID              string `json:"id"`
	Name            string `json:"name"`
	Size            int    `json:"size"`
	UploadTimestamp int64  `json:"upload_timestamp"`
}

Item represents the metadata about the uploaded file.

type Links struct {
	Self string `json:"self"`
	Prev string `json:"prev"`
	Next string `json:"next"`
}

Links represents the pagination information returned by the app store.

type ListResponse added in v0.124.1

type ListResponse struct {
	Items      []Item `json:"items"`
	Links      Links  `json:"links"`
	Page       int    `json:"page"`
	PerPage    int    `json:"per_page"`
	TotalItems int    `json:"total_items"`
}

ListResponse represents the response as is returned by the app store.

type MatchingCaps added in v0.124.1

type MatchingCaps struct {
	App               string    `json:"app,omitempty"`
	TestApp           string    `json:"testApp,omitempty"`
	OtherApps         []string  `json:"otherApps,omitempty"`
	BrowserName       string    `json:"browserName,omitempty"`
	BrowserVersion    string    `json:"browserVersion,omitempty"`
	PlatformName      string    `json:"platformName,omitempty"`
	SauceOptions      SauceOpts `json:"sauce:options,omitempty"`
	PlatformVersion   string    `json:"platformVersion,omitempty"`
	DeviceName        string    `json:"deviceName,omitempty"`
	DeviceOrientation string    `json:"deviceOrientation,omitempty"`
}

MatchingCaps are specific attributes that together form the capabilities that are used to match a session.

type PublishedTest added in v0.124.1

type PublishedTest struct {
	Published apitest.Test
}

PublishedTest describes a published test.

type RDCService added in v0.124.1

type RDCService struct {
	Client    *retryablehttp.Client
	AppURL    string
	URL       string
	Username  string
	AccessKey string
}

RDCService http client.

func NewRDCService added in v0.124.1

func NewRDCService(r region.Region, username, accessKey string, timeout time.Duration) RDCService

NewRDCService creates a new client.

func (*RDCService) Artifact added in v0.186.4

func (c *RDCService) Artifact(ctx context.Context, jobID, fileName string, realDevice bool) ([]byte, error)

Artifact returns the job asset file content.

func (*RDCService) ArtifactNames added in v0.186.4

func (c *RDCService) ArtifactNames(ctx context.Context, jobID string, realDevice bool) ([]string, error)

ArtifactNames returns all assets files available.

func (*RDCService) GetDevices added in v0.124.1

func (c *RDCService) GetDevices(ctx context.Context, OS string) ([]devices.Device, error)

GetDevices returns the list of available devices using a specific operating system.

func (*RDCService) Job added in v0.186.4

func (c *RDCService) Job(ctx context.Context, id string, realDevice bool) (job.Job, error)

Job returns the job details.

func (*RDCService) PollJob added in v0.124.1

func (c *RDCService) PollJob(ctx context.Context, id string, interval, timeout time.Duration, realDevice bool) (job.Job, error)

PollJob polls job details at an interval, until timeout has been reached or until the job has ended, whether successfully or due to an error.

func (*RDCService) StartJob added in v0.124.1

func (c *RDCService) StartJob(ctx context.Context, opts job.StartOptions) (job.Job, error)

StartJob creates a new job in Sauce Labs.

func (*RDCService) StopJob added in v0.173.0

func (c *RDCService) StopJob(ctx context.Context, id string, realDevice bool) (job.Job, error)

type RDCSessionRequest added in v0.124.1

type RDCSessionRequest struct {
	TestFramework       string            `json:"test_framework,omitempty"`
	AppID               string            `json:"app_id,omitempty"`
	TestAppID           string            `json:"test_app_id,omitempty"`
	OtherApps           []string          `json:"other_apps,omitempty"`
	DeviceQuery         DeviceQuery       `json:"device_query,omitempty"`
	TestOptions         map[string]string `json:"test_options,omitempty"`
	TestsToRun          []string          `json:"tests_to_run,omitempty"`
	TestsToSkip         []string          `json:"tests_to_skip,omitempty"`
	TestName            string            `json:"test_name,omitempty"`
	TunnelName          string            `json:"tunnel_name,omitempty"`
	TunnelOwner         string            `json:"tunnel_owner,omitempty"`
	UseTestOrchestrator bool              `json:"use_test_orchestrator,omitempty"`
	Tags                []string          `json:"tags,omitempty"`
	Build               string            `json:"build,omitempty"`
	AppSettings         job.AppSettings   `json:"settings_overwrite,omitempty"`
	RealDeviceKind      string            `json:"kind,omitempty"`
}

RDCSessionRequest represents the RDC session request.

type Release added in v0.185.0

type Release struct {
	Version     string    `json:"version"`
	Aliases     []string  `json:"aliases"`
	EOLDate     time.Time `json:"eolDate"`
	RemovalDate time.Time `json:"removalDate"`
	Default     bool      `json:"default"`

	Extra map[string]string `json:"extra"`
}

type Resto added in v0.124.1

type Resto struct {
	Client    *retryablehttp.Client
	AppURL    string
	URL       string
	Username  string
	AccessKey string
}

Resto http client.

func NewResto added in v0.124.1

func NewResto(r region.Region, username, accessKey string, timeout time.Duration) Resto

NewResto creates a new client.

func (*Resto) Artifact added in v0.186.4

func (c *Resto) Artifact(ctx context.Context, jobID, fileName string, realDevice bool) ([]byte, error)

Artifact returns the job asset file content.

func (*Resto) ArtifactNames added in v0.186.4

func (c *Resto) ArtifactNames(ctx context.Context, jobID string, realDevice bool) ([]string, error)

ArtifactNames return the job assets list.

func (*Resto) GetVirtualDevices added in v0.124.1

func (c *Resto) GetVirtualDevices(ctx context.Context, kind string) ([]vmd.VirtualDevice, error)

GetVirtualDevices returns the list of available virtual devices.

func (*Resto) IsTunnelRunning added in v0.124.1

func (c *Resto) IsTunnelRunning(ctx context.Context, id, owner string, filter tunnels.Filter, wait time.Duration) error

IsTunnelRunning checks whether tunnelID is running. If not, it will wait for the tunnel to become available or timeout. Whichever comes first.

func (*Resto) Job added in v0.186.4

func (c *Resto) Job(ctx context.Context, id string, realDevice bool) (job.Job, error)

Job returns the job details.

func (*Resto) PollJob added in v0.124.1

func (c *Resto) PollJob(ctx context.Context, id string, interval, timeout time.Duration, realDevice bool) (job.Job, error)

PollJob polls job details at an interval, until timeout has been reached or until the job has ended, whether successfully or due to an error.

func (*Resto) StopJob added in v0.124.1

func (c *Resto) StopJob(ctx context.Context, jobID string, realDevice bool) (job.Job, error)

StopJob stops the job on the Sauce Cloud.

type RuntimeResponse added in v0.185.0

type RuntimeResponse struct {
	Name     string    `json:"name"`
	Releases []Release `json:"releases"`
}

RuntimeResponse represents the response body for getting runtimes.

type SauceOpts added in v0.124.1

type SauceOpts struct {
	TestName         string   `json:"name,omitempty"`
	Tags             []string `json:"tags,omitempty"`
	BuildName        string   `json:"build,omitempty"`
	Batch            Batch    `json:"_batch,omitempty"`
	IdleTimeout      int      `json:"idleTimeout,omitempty"`
	MaxDuration      int      `json:"maxDuration,omitempty"`
	TunnelName       string   `json:"tunnelName,omitempty"`
	TunnelOwner      string   `json:"tunnelOwner,omitempty"`
	ScreenResolution string   `json:"screen_resolution,omitempty"`
	UserAgent        string   `json:"user_agent,omitempty"`
	TimeZone         string   `json:"timeZone,omitempty"`
	Visibility       string   `json:"public,omitempty"`
	NodeVersion      string   `json:"nodeVersion,omitempty"`

	ARMRequired bool `json:"armRequired,omitempty"`
}

SauceOpts represents the Sauce Labs specific capabilities.

type SessionRequest added in v0.124.1

type SessionRequest struct {
	Capabilities        Capabilities `json:"capabilities,omitempty"`
	DesiredCapabilities MatchingCaps `json:"desiredCapabilities,omitempty"`
}

SessionRequest represents the webdriver session request.

type TestComposer added in v0.124.1

type TestComposer struct {
	HTTPClient  *retryablehttp.Client
	URL         string // e.g. https://api.<region>.saucelabs.com
	Credentials iam.Credentials
}

TestComposer service

func NewTestComposer added in v0.124.1

func NewTestComposer(url string, creds iam.Credentials, timeout time.Duration) TestComposer

func (*TestComposer) Frameworks added in v0.124.1

func (c *TestComposer) Frameworks(ctx context.Context) ([]string, error)

Frameworks returns the list of available frameworks.

func (*TestComposer) GetSlackToken added in v0.124.1

func (c *TestComposer) GetSlackToken(ctx context.Context) (string, error)

GetSlackToken gets slack token.

func (*TestComposer) Runtimes added in v0.185.0

func (c *TestComposer) Runtimes(ctx context.Context) ([]runtime.Runtime, error)

func (*TestComposer) UploadAsset added in v0.124.1

func (c *TestComposer) UploadAsset(jobID string, _ bool, fileName string, contentType string, content []byte) error

UploadAsset uploads an asset to the specified jobID.

func (*TestComposer) Versions added in v0.124.1

func (c *TestComposer) Versions(ctx context.Context, frameworkName string) ([]framework.Metadata, error)

Versions return the list of available versions for a specific framework and region.

type TokenResponse added in v0.124.1

type TokenResponse struct {
	Token string `json:"token"`
}

TokenResponse represents the response body for slack token.

type UploadResponse added in v0.124.1

type UploadResponse struct {
	Item Item `json:"item"`
}

UploadResponse represents the response as is returned by the app store.

type UserService added in v0.124.1

type UserService struct {
	HTTPClient  *http.Client
	URL         string
	Credentials iam.Credentials
}

func NewUserService added in v0.124.1

func NewUserService(url string, creds iam.Credentials, timeout time.Duration) UserService

func (*UserService) Concurrency added in v0.126.0

func (c *UserService) Concurrency(ctx context.Context) (iam.Concurrency, error)

Concurrency returns the concurrency settings for the current account.

func (*UserService) User added in v0.126.0

func (c *UserService) User(ctx context.Context) (iam.User, error)

type VaultErrResponse added in v0.144.0

type VaultErrResponse struct {
	Message struct {
		Errors []vaultErr `json:"errors,omitempty"`
	} `json:"message,omitempty"`
	Status string `json:"status,omitempty"`
}

VaultErrResponse describes the response when a malformed Vault is unable to be parsed

type WebSocketAsyncEventTransport added in v0.172.0

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

func NewWebSocketAsyncEventTransport added in v0.172.0

func NewWebSocketAsyncEventTransport(ws *websocket.Conn) *WebSocketAsyncEventTransport

func (*WebSocketAsyncEventTransport) Close added in v0.172.0

func (aet *WebSocketAsyncEventTransport) Close() error

func (*WebSocketAsyncEventTransport) ReadMessage added in v0.172.0

func (aet *WebSocketAsyncEventTransport) ReadMessage() (string, error)

type Webdriver added in v0.124.1

type Webdriver struct {
	HTTPClient  *http.Client
	AppURL      string
	URL         string
	Credentials iam.Credentials
}

Webdriver service

func NewWebdriver added in v0.124.1

func NewWebdriver(r region.Region, creds iam.Credentials, timeout time.Duration) Webdriver

func (*Webdriver) StartJob added in v0.124.1

func (c *Webdriver) StartJob(ctx context.Context, opts job.StartOptions) (job.Job, error)

StartJob creates a new job in Sauce Labs.

Jump to

Keyboard shortcuts

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