prow/kube/client.go
func (c *Client) ListProwJobs(selector string) ([]prowapi.ProwJob, error) {
	c.log("ListProwJobs", selector)
	var jl struct {
		Items []prowapi.ProwJob `json:"items"`
	}
	err := c.request(&request{
		path:     fmt.Sprintf("/apis/prow.k8s.io/v1/namespaces/%s/prowjobs", c.namespace),
		deckPath: "/prowjobs.js",
		query:    map[string]string{"labelSelector": selector},
	}, &jl)
	if err == nil {
		var pjs []prowapi.ProwJob
		for _, pj := range jl.Items {
			pjs = append(pjs, pj)
		}
		jl.Items = pjs
	}
	return jl.Items, err
}
func (c *Client) ListProwJobs(selector string) ([]prowapi.ProwJob, error) {
	c.log("ListProwJobs", selector)
	var jl struct {
		Items []prowapi.ProwJob `json:"items"`
	}
	err := c.request(&request{
		path:     fmt.Sprintf("/apis/prow.k8s.io/v1/namespaces/%s/prowjobs", c.namespace),
		deckPath: "/prowjobs.js",
		query:    map[string]string{"labelSelector": selector},
	}, &jl)
	if err == nil {
		var pjs []prowapi.ProwJob
		for _, pj := range jl.Items {
			pjs = append(pjs, pj)
		}
		jl.Items = pjs
	}
	return jl.Items, err
}
func ( c * Client ) ListProwJobs ( selector string ) ( [ ] prowapi . ProwJob , error ) { c . log ( " " , selector ) var jl struct { Items [ ] prowapi . ProwJob `json:"items"` } err := c . request ( & request { path : fmt . Sprintf ( " " , c . namespace ) , deckPath : " " , query : map [ string ] string { " " : selector } , } , & jl ) if err == nil { var pjs [ ] prowapi . ProwJob for _ , pj := range jl . Items { pjs = append ( pjs , pj ) } jl . Items = pjs } return jl . Items , err }
// ListProwJobs lists prowjobs using the specified labelSelector in the client's specified namespace.
//
// Analogous to kubectl get prowjobs --selector=SELECTOR --namespace=client.namespace
ListProwJobs lists prowjobs using the specified labelSelector in the client s specified namespace . Analogous to kubectl get prowjobs -- selector = SELECTOR -- namespace = client . namespace