(opts *kmeta.ListOptions)
| 33 | } |
| 34 | |
| 35 | func (c *Client) ListNodes(opts *kmeta.ListOptions) ([]kcore.Node, error) { |
| 36 | if opts == nil { |
| 37 | opts = &kmeta.ListOptions{} |
| 38 | } |
| 39 | nodeList, err := c.nodeClient.List(context.Background(), *opts) |
| 40 | if err != nil { |
| 41 | return nil, errors.WithStack(err) |
| 42 | } |
| 43 | for i := range nodeList.Items { |
| 44 | nodeList.Items[i].TypeMeta = _nodeTypeMeta |
| 45 | } |
| 46 | return nodeList.Items, nil |
| 47 | } |
| 48 | |
| 49 | func (c *Client) ListNodesByLabels(labels map[string]string) ([]kcore.Node, error) { |
| 50 | opts := &kmeta.ListOptions{ |
no test coverage detected