This section is empty.


This section is empty.


func BuildersClient

func BuildersClient(c context.Context) (buildbucketpb.BuildersClient, error)

    BuildersClient returns a buildbucketpb.BuildersClient.

    func GetGitiles

    func GetGitiles(c context.Context, URL string) ([]byte, error)

      GetGitiles fetches gitiles raw text content with required authentication headers. Note that this currently only works from AppEngine due to gaeauth dependencies.

      func GetGitilesCached

      func GetGitilesCached(c context.Context, URL string) ([]byte, error)

        GetGitilesCached fetches gitiles content through memcache. Note that this currently only works from AppEngine due to memcache and gaeauth dependencies.

        func GetMonorailIssueResourceName

        func GetMonorailIssueResourceName(projectID string, bugID string) string

          GetMonorailIssueResourceName generates Monorail issue resource from projectID and bugID

          func GetMonorailPriorityField

          func GetMonorailPriorityField(c context.Context, projectID string) (string, error)

            GetMonorailPriorityField get the fieldName for priority. TODO (nqmtuan): Put this in admin config.

            func GetMonorailProjectResourceName

            func GetMonorailProjectResourceName(projectID string) string

              GetMonorailProjectResourceName generates Monorail project resource from projectID

              func GetMonorailTypeField

              func GetMonorailTypeField(c context.Context, projectID string) (string, error)

                GetMonorailTypeField get the fieldName for type (e.g. Bug, Feature...). TODO (nqmtuan): Put this in admin config.

                func ListBuildersByBucket

                func ListBuildersByBucket(c context.Context, client BBBuildersClient, project string, bucket string) ([]*buildbucketpb.BuilderItem, error)

                  ListBuildersByBucket queries BuildBucket for a list of builders for a bucket.

                  func NewMonorail

                  func NewMonorail(c context.Context, baseURL string) monorail.MonorailClient

                    NewMonorail registers a new Monorail client instance pointed at baseURL.

                    func NewMonorailV3Client

                    func NewMonorailV3Client(c context.Context) (*prpc.Client, error)

                      NewMonorailV3Client creates a Monorail V3 prpc client

                      func NewMonorailV3ClientByHost

                      func NewMonorailV3ClientByHost(c context.Context, host string, audience string) (*prpc.Client, error)

                        NewMonorailV3ClientByHost creates a Monorail V3 prpc client given host host is something like audience is something like

                        func ParseMonorailIssueName

                        func ParseMonorailIssueName(issueName string) (string, string, error)

                          ParseMonorailIssueName gets projectID, bugID from issue resource name

                          func ProdClients

                          func ProdClients(ctx context.Context) (FindIt, CrBug, monorail.MonorailClient)

                            ProdClients returns a set of service clients pointed at production.

                            func StagingClients

                            func StagingClients(ctx context.Context) (FindIt, CrBug, monorail.MonorailClient)

                              StagingClients returns a set of service clients pointed at instances suitable for a staging environment.


                              type BBBuildersClient

                              type BBBuildersClient interface {
                              	ListBuilders(c context.Context, in *buildbucketpb.ListBuildersRequest, opts ...grpc.CallOption) (*buildbucketpb.ListBuildersResponse, error)

                                BBBuildersClient is for testing purpose.

                                type CrBug

                                type CrBug interface {
                                	// CrBugItems returns issue matching label.
                                	CrbugItems(ctx context.Context, label string) ([]messages.CrbugItem, error)

                                  CrBug returns bug information.

                                  type CrBugs

                                  type CrBugs struct {
                                  	// contains filtered or unexported fields

                                    CrBugs is a minimal Monorail client for fetching issues.

                                    func (*CrBugs) CrbugItems

                                    func (cr *CrBugs) CrbugItems(ctx context.Context, label string) ([]messages.CrbugItem, error)

                                      CrbugItems returns a slice of issues that match label.

                                      type CrRev

                                      type CrRev interface {
                                      	// GetRedirect gets the redirect for a commit position.
                                      	GetRedirect(c context.Context, pos string) (map[string]string, error)

                                        CrRev returns redirects for commit positions.

                                        func NewCrRev

                                        func NewCrRev(baseURL string) CrRev

                                          NewCrRev returns a crrev client.

                                          type FindIt

                                          type FindIt interface {
                                          	// FinditBuildbucket returns FindIt results for a build. Both input and output are using buildbucket concepts.
                                          	FinditBuildbucket(ctx context.Context, buildID int64, failedSteps []string) ([]*messages.FinditResultV2, error)

                                            FindIt returns FindIt information.

                                            func NewFindit

                                            func NewFindit(host string) FindIt

                                              NewFindit registers a findit client pointed at host.

                                              type FinditAPIResponseV2

                                              type FinditAPIResponseV2 struct {
                                              	Responses []*messages.FinditResultV2 `json:"responses"`

                                                FinditAPIResponseV2 represents a response from the findit api.

                                                type Test

                                                type Test struct {
                                                	Builders []string `json:"builders"`

                                                  Test represents information about Tests in a builder group.

                                                  type Writer

                                                  type Writer interface {
                                                  	// PostAlerts posts alerts to Sheriff-o-Matic.
                                                  	PostAlerts(ctx context.Context, alerts *messages.AlertsSummary) error

                                                    Writer writes out data to other services, most notably sheriff-o-matic.

                                                    func NewWriter

                                                    func NewWriter(alertsBase string, transport http.RoundTripper) Writer

                                                      NewWriter returns a new Client, which will post alerts to alertsBase.


                                                      Path Synopsis