Documentation ¶
Index ¶
- type Quota
- func (q *Quota) GetHard() (types.ResourceList, error)
- func (q *Quota) GetUsed() (types.ResourceList, error)
- func (q *Quota) GetWarningResources(warningPercent int) ([]types.ResourceName, error)
- func (q *Quota) MarshalJSON() ([]byte, error)
- func (q *Quota) SetHard(hardLimits types.ResourceList) *Quota
- func (q *Quota) SetUsed(used types.ResourceList) *Quota
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Quota ¶
type Quota struct { ID int64 `orm:"pk;auto;column(id)" json:"id"` Ref driver.RefObject `orm:"-" json:"ref"` Reference string `orm:"column(reference)" json:"-"` ReferenceID string `orm:"column(reference_id)" json:"-"` Hard string `orm:"column(hard);type(jsonb)" json:"-"` Used string `orm:"column(used);type(jsonb)" json:"-"` CreationTime time.Time `orm:"column(creation_time);auto_now_add" json:"creation_time"` UpdateTime time.Time `orm:"column(update_time);auto_now" json:"update_time"` HardVersion int64 `orm:"column(hard_version)" json:"-"` UsedVersion int64 `orm:"column(used_version)" json:"-"` HardChanged bool `orm:"-" json:"-"` UsedChanged bool `orm:"-" json:"-"` }
Quota quota model for manager
func (*Quota) GetHard ¶
func (q *Quota) GetHard() (types.ResourceList, error)
GetHard returns quota hard
func (*Quota) GetUsed ¶
func (q *Quota) GetUsed() (types.ResourceList, error)
GetUsed returns quota used
func (*Quota) GetWarningResources ¶
func (q *Quota) GetWarningResources(warningPercent int) ([]types.ResourceName, error)
GetWarningResources returns resource names which exceeded the warning percent
Click to show internal directories.
Click to hide internal directories.