Documentation ¶
Index ¶
- Variables
- type Client
- func (c *Client) DownloadArtifact(jobID string)
- func (c *Client) GetDevices(ctx context.Context, OS string) ([]devices.Device, error)
- func (c *Client) GetJobAssetFileContent(ctx context.Context, jobID, fileName string) ([]byte, error)
- func (c *Client) GetJobAssetFileNames(ctx context.Context, jobID string) ([]string, error)
- func (c *Client) PollJob(ctx context.Context, id string, interval, timeout time.Duration) (j job.Job, err error)
- func (c *Client) ReadAllowedCCY(ctx context.Context) (int, error)
- func (c *Client) ReadJob(ctx context.Context, id string) (job.Job, error)
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("internal server error") // ErrJobNotFound is returned when the requested job was not found. ErrJobNotFound = errors.New("job was not found") // ErrAssetNotFound is returned when the requested asset is not found. ErrAssetNotFound = errors.New("asset not found") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { HTTPClient *http.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 ¶
DownloadArtifact does downloading artifacts
func (*Client) GetDevices ¶ added in v0.49.0
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 ¶
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 ¶
ReadAllowedCCY returns the allowed (max) concurrency for the current account.
Click to show internal directories.
Click to hide internal directories.