Documentation
¶
Index ¶
- Variables
- type Client
- func (c *Client) CheckQuotaConsistency(ctx context.Context, organizationID string, quota *unikornv1.Quota, ...) error
- func (c *Client) GetAllocations(ctx context.Context, organizationID string) (*unikornv1.AllocationList, error)
- func (c *Client) GetQuota(ctx context.Context, organizationID string) (*unikornv1.Quota, bool, error)
- func (c *Client) ProjectNamespace(ctx context.Context, organizationID, projectID string) (*corev1.Namespace, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrConsistency = errors.New("consistency error")
)
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps up control plane related management handling.
func (*Client) CheckQuotaConsistency ¶
func (c *Client) CheckQuotaConsistency(ctx context.Context, organizationID string, quota *unikornv1.Quota, allocation *unikornv1.Allocation) error
CheckQuotaConsistency by default loads up the organization's quota and all allocations and checks that the total of alloocations does not exceed the quota. If you pass in a quota argument, i.e. when updating the quotas, this will override the read from the organization. If you pass in an allocation, i.e. when creating or updating an allocation, this will be unioned with the organization's allocations, overriding an existing one if it exists.
func (*Client) GetAllocations ¶
Click to show internal directories.
Click to hide internal directories.