Documentation ¶
Index ¶
- Constants
- Variables
- func AddBanner(build *ui.MiloBuildLegacy, tags strpair.Map)
- func AddProjectInfo(build *ui.MiloBuildLegacy, tags strpair.Map)
- func AddRecipeLink(build *ui.MiloBuildLegacy, tags strpair.Map)
- func GetBuild(c context.Context, host, taskID string) (*ui.MiloBuildLegacy, error)
- func RedirectsFromTask(c context.Context, host, taskID string) (int64, string, error)
- func SwarmingBuildImpl(c context.Context, svc swarmingService, taskID string) (*ui.MiloBuildLegacy, error)
- func TaskPageURL(swarmingHostname, taskID string) *url.URL
- type BuildID
Constants ¶
const URLBase = "/swarming/task"
URLBase is the routing prefix for swarming endpoints. It's here so that it can be a constant between the swarmingURLBuilder and the frontend.
Variables ¶
var ErrNotMiloJob = errors.New("Not a Milo Job or access denied", grpcutil.PermissionDeniedTag)
ErrNotMiloJob is returned if a Swarming task is fetched that does not self- identify as a Milo job.
Functions ¶
func AddBanner ¶
func AddBanner(build *ui.MiloBuildLegacy, tags strpair.Map)
AddBanner adds an OS banner derived from "os" swarming tag, if present.
func AddProjectInfo ¶
func AddProjectInfo(build *ui.MiloBuildLegacy, tags strpair.Map)
AddProjectInfo adds the luci_project swarming tag to the build.
func AddRecipeLink ¶
func AddRecipeLink(build *ui.MiloBuildLegacy, tags strpair.Map)
AddRecipeLink adds links to the recipe to the build.
func RedirectsFromTask ¶
RedirectsFromTask returns either
- The ID of the buildbucket build corresponding to this task. OR
- The build.proto logdog stream from this swarming task.
If the task does not represent a buildbucket build, returns (0, "", nil).
func SwarmingBuildImpl ¶
func SwarmingBuildImpl(c context.Context, svc swarmingService, taskID string) (*ui.MiloBuildLegacy, error)
SwarmingBuildImpl fetches data from Swarming and LogDog and produces a resp.MiloBuildLegacy representation of a build state given a Swarming TaskID.
func TaskPageURL ¶
TaskPageURL returns a URL to a human-consumable page of a swarming task. Supports host aliases.