Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KubeClientInterface ¶
KubeClientInterface mostly for testing.
type Metrics ¶
type Metrics struct { // Common MessageCounter *prometheus.CounterVec ErrorCounter *prometheus.CounterVec // Pull Server ACKMessageCounter *prometheus.CounterVec NACKMessageCounter *prometheus.CounterVec // Push Server ResponseCounter *prometheus.CounterVec }
func NewMetrics ¶
func NewMetrics() *Metrics
type PeriodicProwJobEvent ¶
type PeriodicProwJobEvent struct { Name string `json:"name"` Type string `json:"type"` Envs map[string]string `json:"envs,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` }
PeriodicProwJobEvent contains the minimum information required to start a ProwJob.
func (*PeriodicProwJobEvent) FromPayload ¶
func (pe *PeriodicProwJobEvent) FromPayload(data []byte) error
FromPayload set the PeriodicProwJobEvent from the PubSub message payload.
type PullServer ¶
type PullServer struct { Subscriber *Subscriber Client pubsubClientInterface }
PullServer listen to Pull Pub/Sub subscriptions and handle them.
func NewPullServer ¶
func NewPullServer(s *Subscriber) *PullServer
NewPullServer creates a new PullServer
type PushServer ¶
type PushServer struct { Subscriber *Subscriber TokenGenerator func() []byte }
PushServer implements http.Handler. It validates incoming Pub/Sub subscriptions handle them.
func (*PushServer) ServeHTTP ¶
func (s *PushServer) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP validates an incoming Push Pub/Sub subscription and handle them.
type Subscriber ¶
type Subscriber struct { ConfigAgent *config.Agent Metrics *Metrics KubeClient KubeClientInterface }
Subscriber handles Pub/Sub subscriptions, update metrics, validates them using Prow Configuration and use a KubeClientInterface to create Prow Jobs.
Click to show internal directories.
Click to hide internal directories.