OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The LUCI Authors. All rights reserved. |
| 2 // Use of this source code is governed under the Apache License, Version 2.0 |
| 3 // that can be found in the LICENSE file. |
| 4 |
| 5 package buildsource |
| 6 |
| 7 import ( |
| 8 "golang.org/x/net/context" |
| 9 |
| 10 "github.com/luci/luci-go/milo/api/resp" |
| 11 ) |
| 12 |
| 13 // ID represents a universal 'build' ID. Each subpackage of buildsource |
| 14 // implements an ID (as the type BuildID, e.g. swarming.BuildID), which has |
| 15 // buildsource-specific fields, but always implements this ID interface. |
| 16 // |
| 17 // The frontend constructs an ID from the appropriate buildsource, then calls |
| 18 // its .Get() method to get the generic MiloBuild representation. |
| 19 type ID interface { |
| 20 Get(c context.Context) (*resp.MiloBuild, error) |
| 21 |
| 22 // GetLog is only implemented by swarming; this is for serving the depre
cated |
| 23 // swarming/task/<id>/steps/<logname> |
| 24 // API. Once that's removed, this should be removed as well. |
| 25 GetLog(c context.Context, logname string) (text string, closed bool, err
error) |
| 26 } |
OLD | NEW |