resto

package
v0.115.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

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)
)

Functions

This section is empty.

Types

type Client

type Client struct {
	HTTPClient     *retryablehttp.Client
	URL            string
	Username       string
	AccessKey      string
	ArtifactConfig config.ArtifactDownload
}

Client http client.

func New

func New(url, username, accessKey string, timeout time.Duration) Client

New creates a new client.

func (*Client) DownloadArtifact added in v0.40.2

func (c *Client) DownloadArtifact(jobID, suiteName string, realDevice bool) []string

DownloadArtifact downloads artifacts and returns a list of what was downloaded.

func (*Client) GetBuildID added in v0.83.0

func (c *Client) GetBuildID(ctx context.Context, jobID string, buildSource build.Source) (string, error)

func (*Client) GetJobAssetFileContent added in v0.22.0

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

GetJobAssetFileContent returns the job asset file content.

func (*Client) GetJobAssetFileNames added in v0.37.0

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

GetJobAssetFileNames return the job assets list.

func (*Client) GetVirtualDevices added in v0.49.0

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

GetVirtualDevices returns the list of available virtual devices.

func (*Client) IsTunnelRunning added in v0.32.0

func (c *Client) 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 (*Client) PollJob added in v0.21.1

func (c *Client) 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 (*Client) ReadAllowedCCY added in v0.24.0

func (c *Client) ReadAllowedCCY(ctx context.Context) (int, error)

ReadAllowedCCY returns the allowed (max) concurrency for the current account.

func (*Client) ReadJob added in v0.21.1

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

ReadJob returns the job details.

func (*Client) StopJob added in v0.35.0

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

StopJob stops the job on the Sauce Cloud.

Jump to

Keyboard shortcuts

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