Documentation ¶
Index ¶
- type GroupTracker
- type Manager
- func (m *Manager) ClearGroupTrackers()
- func (m *Manager) ClearUserTrackers()
- func (m *Manager) DecreaseTrackedResource(queuePath string, applicationID string, usage *resources.Resource, ...) error
- func (m *Manager) GetGroupResources(group string) *resources.Resource
- func (m *Manager) GetGroupTracker(group string) *GroupTracker
- func (m *Manager) GetGroupsResources() []*GroupTracker
- func (m *Manager) GetUserResources(user security.UserGroup) *resources.Resource
- func (m *Manager) GetUserTracker(user string) *UserTracker
- func (m *Manager) GetUsersResources() []*UserTracker
- func (m *Manager) IncreaseTrackedResource(queuePath string, applicationID string, usage *resources.Resource, ...) error
- type QueueTracker
- type Tracker
- type UserTracker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GroupTracker ¶
func (*GroupTracker) GetGroupResourceUsageDAOInfo ¶
func (gt *GroupTracker) GetGroupResourceUsageDAOInfo() *dao.GroupResourceUsageDAOInfo
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager implements tracker. A User Group Manager to track the usage for both user and groups. Holds object of both user and group trackers
func GetUserManager ¶
func GetUserManager() *Manager
func (*Manager) ClearGroupTrackers ¶
func (m *Manager) ClearGroupTrackers()
func (*Manager) ClearUserTrackers ¶
func (m *Manager) ClearUserTrackers()
ClearUserTrackers only for tests
func (*Manager) DecreaseTrackedResource ¶
func (m *Manager) DecreaseTrackedResource(queuePath string, applicationID string, usage *resources.Resource, user security.UserGroup, removeApp bool) error
DecreaseTrackedResource Decrease the resource usage for the given user group and queue path combination. As and when every allocation or asks release happens, corresponding user and group resource usage would be decreased against specific application. When the final asks release happens, removeApp should be set to true and application itself would be removed from the tracker and no more usage would be tracked further for that specific application.
func (*Manager) GetGroupResources ¶
func (*Manager) GetGroupTracker ¶
func (m *Manager) GetGroupTracker(group string) *GroupTracker
func (*Manager) GetGroupsResources ¶
func (m *Manager) GetGroupsResources() []*GroupTracker
func (*Manager) GetUserResources ¶
func (*Manager) GetUserTracker ¶
func (m *Manager) GetUserTracker(user string) *UserTracker
func (*Manager) GetUsersResources ¶
func (m *Manager) GetUsersResources() []*UserTracker
func (*Manager) IncreaseTrackedResource ¶
func (m *Manager) IncreaseTrackedResource(queuePath string, applicationID string, usage *resources.Resource, user security.UserGroup) error
IncreaseTrackedResource Increase the resource usage for the given user group and queue path combination. As and when every allocation or asks requests fulfilled on application, corresponding user and group resource usage would be increased against specific application.
type QueueTracker ¶
type QueueTracker struct {
// contains filtered or unexported fields
}
type Tracker ¶
type Tracker interface { GetUserResources(user security.UserGroup) *resources.Resource GetGroupResources(group string) *resources.Resource GetUsersResources() []*UserTracker GetGroupsResources() []*GroupTracker IncreaseTrackedResource(queuePath, applicationID string, usage *resources.Resource, user security.UserGroup) error DecreaseTrackedResource(queuePath, applicationID string, usage *resources.Resource, user security.UserGroup, removeApp bool) error }
Tracker Defines a set of interfaces to track and retrieve the user group resource usage
type UserTracker ¶
func (*UserTracker) GetUserResourceUsageDAOInfo ¶
func (ut *UserTracker) GetUserResourceUsageDAOInfo() *dao.UserResourceUsageDAOInfo