Documentation ¶
Index ¶
- type Client
- func (c *Client) GetConstraintTemplate(ctx context.Context, constraintKind string) (*unstructured.Unstructured, error)
- func (c *Client) GetResourceByKind(ctx context.Context, kind, name, namespace string, ...) (*unstructured.Unstructured, error)
- func (c *Client) GetViolatedConstraints(ctx context.Context, groupResources []schema.GroupResource) (map[types.UID]*unstructured.Unstructured, error)
- func (c *Client) SetTimeout(timeout time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a dynamic.Interface wrapper
func (*Client) GetConstraintTemplate ¶
func (c *Client) GetConstraintTemplate(ctx context.Context, constraintKind string) (*unstructured.Unstructured, error)
GetConstraintTemplate returns the constraint template for the provided constraint Kind
func (*Client) GetResourceByKind ¶
func (c *Client) GetResourceByKind(ctx context.Context, kind, name, namespace string, kindToGVR map[string][]schema.GroupVersionResource) (*unstructured.Unstructured, error)
GetResourceByKind returns a resource by trying all the kind-to-GVR mappings See explanation in kind.go
func (*Client) GetViolatedConstraints ¶
func (c *Client) GetViolatedConstraints(ctx context.Context, groupResources []schema.GroupResource) (map[types.UID]*unstructured.Unstructured, error)
GetViolatedConstraints find all constraints that have violations. To remove duplicates, it returns a map of constraint UID to constraint.
Click to show internal directories.
Click to hide internal directories.