(opts *kmeta.ListOptions)
| 137 | } |
| 138 | |
| 139 | func (c *Client) ListJobs(opts *kmeta.ListOptions) ([]kbatch.Job, error) { |
| 140 | if opts == nil { |
| 141 | opts = &kmeta.ListOptions{} |
| 142 | } |
| 143 | jobList, err := c.jobClient.List(context.Background(), *opts) |
| 144 | if err != nil { |
| 145 | return nil, errors.WithStack(err) |
| 146 | } |
| 147 | for i := range jobList.Items { |
| 148 | jobList.Items[i].TypeMeta = _jobTypeMeta |
| 149 | } |
| 150 | return jobList.Items, nil |
| 151 | } |
| 152 | |
| 153 | func (c *Client) ListJobsByLabels(labels map[string]string) ([]kbatch.Job, error) { |
| 154 | opts := &kmeta.ListOptions{ |
no test coverage detected