Documentation
¶
Index ¶
- func CheckExpiryDate(TRQCopy *apps_v1alpha.TotalResourceQuota) bool
- func Start(kubernetes kubernetes.Interface, edgenet versioned.Interface)
- type Handler
- func (t *Handler) Create(name string)
- func (t *Handler) Init(kubernetes kubernetes.Interface, edgenet versioned.Interface)
- func (t *Handler) ObjectCreated(obj interface{})
- func (t *Handler) ObjectDeleted(obj interface{})
- func (t *Handler) ObjectUpdated(obj, updated interface{})
- func (t *Handler) ResourceConsumptionControl(TRQCopy *apps_v1alpha.TotalResourceQuota, CPUDemand int64, memoryDemand int64) (*apps_v1alpha.TotalResourceQuota, bool)
- type HandlerInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckExpiryDate ¶
func CheckExpiryDate(TRQCopy *apps_v1alpha.TotalResourceQuota) bool
CheckExpiryDate to checker whether there is an item with expiry date
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler implementation
func (*Handler) Init ¶
func (t *Handler) Init(kubernetes kubernetes.Interface, edgenet versioned.Interface)
Init handles any handler initialization
func (*Handler) ObjectCreated ¶
func (t *Handler) ObjectCreated(obj interface{})
ObjectCreated is called when an object is created
func (*Handler) ObjectDeleted ¶
func (t *Handler) ObjectDeleted(obj interface{})
ObjectDeleted is called when an object is deleted
func (*Handler) ObjectUpdated ¶
func (t *Handler) ObjectUpdated(obj, updated interface{})
ObjectUpdated is called when an object is updated
func (*Handler) ResourceConsumptionControl ¶
func (t *Handler) ResourceConsumptionControl(TRQCopy *apps_v1alpha.TotalResourceQuota, CPUDemand int64, memoryDemand int64) (*apps_v1alpha.TotalResourceQuota, bool)
ResourceConsumptionControl both calculates the total resource quota and the total consumption in the authority. Additionally, when a Slice created it comes along with a resource consumption demand. This function also allows us to compare free resources with demands as well.
type HandlerInterface ¶
type HandlerInterface interface {
Init(kubernetes kubernetes.Interface, edgenet versioned.Interface)
ObjectCreated(obj interface{})
ObjectUpdated(obj, updated interface{})
ObjectDeleted(obj interface{})
}
HandlerInterface interface contains the methods that are required
Click to show internal directories.
Click to hide internal directories.