(opts *kmeta.ListOptions)
| 380 | } |
| 381 | |
| 382 | func (c *Client) ListPods(opts *kmeta.ListOptions) ([]kcore.Pod, error) { |
| 383 | if opts == nil { |
| 384 | opts = &kmeta.ListOptions{} |
| 385 | } |
| 386 | podList, err := c.podClient.List(context.Background(), *opts) |
| 387 | if err != nil { |
| 388 | return nil, errors.WithStack(err) |
| 389 | } |
| 390 | for i := range podList.Items { |
| 391 | podList.Items[i].TypeMeta = _podTypeMeta |
| 392 | } |
| 393 | return podList.Items, nil |
| 394 | } |
| 395 | |
| 396 | func (c *Client) ListPodsByLabels(labels map[string]string) ([]kcore.Pod, error) { |
| 397 | opts := &kmeta.ListOptions{ |
no test coverage detected