Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FinishRequest ¶
type FinishRequest struct { // ImportPath is the import path of the package that was built. ImportPath string `json:"importPath"` // FinishToken is forwarded from [*StartResponse.FinishToken], and cannot be // blank. FinishToken string `json:"token"` // Files is a list of files produced by the compilation task, associated to // a user-defined label. Files map[Label]string `json:"extra,omitempty"` // Error is the error that occurred as a result of this compilation task, if // any. Error *string `json:"error,omitempty"` }
FinishRequest informs the job server about the result of a compilation task.
func (FinishRequest) ResponseIs ¶
func (FinishRequest) ResponseIs(*FinishResponse)
func (FinishRequest) Subject ¶
func (FinishRequest) Subject() string
type FinishResponse ¶
type FinishResponse struct { }
type Label ¶
type Label string
Label is a label identifying an additional object produced by a task. It must be a valid part of a file name.
type StartRequest ¶
StartRequest informs the job server that the caller is starting a new compilation task for the specified [StartRequest.ImportPath].
func (StartRequest) ResponseIs ¶
func (StartRequest) ResponseIs(*StartResponse)
func (StartRequest) Subject ¶
func (StartRequest) Subject() string
type StartResponse ¶
type StartResponse struct { // FinishToken is the token to be forwarded to the [FinishRequest] to inform // the job server about the outcome of the build. It cannot be blank unless // [*StartResponse.ArchivePath] is not blank. FinishToken string `json:"token,omitempty"` // Files is the set of files produced by the original task, by label. These // files must be re-used instead of re-created. Always blank if // [*StartResponse.FinishToken] is not blank. Files map[Label]string `json:"extra,omitempty"` }
StartResponse informs the caller about what should be done with the compilation task. If a [*StartResponse.FinishToken] is present, the caller must proceed with the task, then send a FinishRequest using that token. If a [*StartResponse.ArchivePath] is present, the caller must skip the task and instead re-use the file at the specified path.