Documentation
¶
Overview ¶
Package client implements the current runner management protocol. Its caller owns the SSH connection; ending an HTTP request never cancels accepted jobs.
Index ¶
- Variables
- type Client
- func (client *Client) Command(ctx context.Context, command jobcontract.Command) (jobcontract.CommandConfirmation, error)
- func (client *Client) DownloadPerformanceArchive(ctx context.Context, jobID string, reference jobcontract.ReportReference, ...) error
- func (client *Client) DownloadReport(ctx context.Context, jobID string, reference jobcontract.ReportReference, ...) error
- func (client *Client) GetJob(ctx context.Context, id string) (jobcontract.Snapshot, error)
- func (client *Client) ListJobs(ctx context.Context, after uint64, limit uint32) (jobhost.JobPage, error)
- func (client *Client) Probe(ctx context.Context) (jobcontract.RunnerInfo, error)
- func (client *Client) ReadEvents(ctx context.Context, query EventQuery) (jobhost.EventPage, error)
- func (client *Client) SetTaskConcurrency(ctx context.Context, expected uint32, limit uint32) (jobcontract.RunnerInfo, error)
- func (client *Client) Submit(ctx context.Context, submission *jobcontract.Submission) (jobcontract.Receipt, error)
- func (client *Client) UploadContent(ctx context.Context, identity jobcontract.ContentIdentity, ...) (receipt jobcontract.AssetReceipt, err error)
- type EventQuery
- type Identity
- type RemoteError
- type Transport
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Command ¶
func (client *Client) Command( ctx context.Context, command jobcontract.Command, ) (jobcontract.CommandConfirmation, error)
func (*Client) DownloadPerformanceArchive ¶
func (client *Client) DownloadPerformanceArchive( ctx context.Context, jobID string, reference jobcontract.ReportReference, file io.ReadWriteSeeker, ) error
DownloadPerformanceArchive retrieves the statistical archive referenced by an EventReport. Full execution results use DownloadReport with their own digest.
func (*Client) DownloadReport ¶
func (client *Client) DownloadReport( ctx context.Context, jobID string, reference jobcontract.ReportReference, file io.ReadWriteSeeker, ) error
DownloadReport resumes only against the supplied immutable reference. The caller owns its private partial file and publishes it only after nil return. Download time never changes metrics in the stored report.
func (*Client) Probe ¶
func (client *Client) Probe(ctx context.Context) (jobcontract.RunnerInfo, error)
func (*Client) ReadEvents ¶
func (*Client) SetTaskConcurrency ¶
func (client *Client) SetTaskConcurrency( ctx context.Context, expected uint32, limit uint32, ) (jobcontract.RunnerInfo, error)
func (*Client) Submit ¶
func (client *Client) Submit(ctx context.Context, submission *jobcontract.Submission) (jobcontract.Receipt, error)
func (*Client) UploadContent ¶
func (client *Client) UploadContent( ctx context.Context, identity jobcontract.ContentIdentity, source io.ReadCloser, ) (receipt jobcontract.AssetReceipt, err error)
UploadContent takes ownership of source on entry and closes it on every exit. source must support concurrent Close that promptly unblocks a pending Read. A lost acknowledgement is returned to the caller; retry requires a fresh, complete source for the same identity and never submits a job.
type EventQuery ¶
type RemoteError ¶
RemoteError retains only a fixed public code and retry advice. Server message text and response bodies never become errors or diagnostics.
func (*RemoteError) Error ¶
func (err *RemoteError) Error() string