reporter

package
v0.0.0-...-d7867ec Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package reporter contains helpers for publishing statues to Pub statuses in Github.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
}

Client is a reporter client fed to crier controller

func NewReporter

func NewReporter() *Client

NewReporter creates a new Pub/Sub reporter

func (*Client) GetName

func (c *Client) GetName() string

GetName returns the name of the reporter

func (*Client) Report

func (c *Client) Report(pj *kube.ProwJob) error

Report takes a prowjob, and generate a pubsub ReportMessage and publish to specific Pub/Sub topic based on Pub/Sub related labels if they exist in this prowjob

func (*Client) ShouldReport

func (c *Client) ShouldReport(pj *kube.ProwJob) bool

ShouldReport tells if a prowjob should be reported by this reporter

type ReportMessage

type ReportMessage struct {
	Project string            `json:"project"`
	Topic   string            `json:"topic"`
	RunID   string            `json:"runid"`
	Status  kube.ProwJobState `json:"status"`
	URL     string            `json:"url"`
}

ReportMessage is a message structure used to pass a prowjob status to Pub/Sub topic.s

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL