rdc

package
v0.83.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2022 License: Apache-2.0 Imports: 21 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 is not found.
	ErrAssetNotFound = errors.New(msg.AssetNotFound)
)

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, artifactConfig config.ArtifactDownload) Client

New creates a new client.

func (*Client) DownloadArtifact

func (c *Client) DownloadArtifact(jobID string)

DownloadArtifact does downloading artifacts

func (*Client) GetDevices added in v0.49.0

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

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

func (*Client) GetJobAssetFileContent

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

GetJobAssetFileContent returns the job asset file content.

func (*Client) GetJobAssetFileNames

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

GetJobAssetFileNames returns all assets files available.

func (*Client) PollJob

func (c *Client) PollJob(ctx context.Context, id string, interval, timeout time.Duration) (j job.Job, err 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

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

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

func (*Client) ReadJob

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

ReadJob returns the job details.

Jump to

Keyboard shortcuts

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