Documentation ¶
Overview ¶
Package resource defines the interface that each resource manager needs to implement to get compute units
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config[T any] struct { Clusters []T `yaml:"clusters"` }
Config contains the configuration of resource manager cluster(s)
type Fetcher ¶
type Fetcher interface { // FetchUnits fetches compute units between start and end times FetchUnits(start time.Time, end time.Time) ([]models.ClusterUnits, error) // FetchUsersProjects fetches latest projects, users and their associations FetchUsersProjects(currentTime time.Time) ([]models.ClusterUsers, []models.ClusterProjects, error) }
Fetcher is the interface resource manager has to implement.
type Manager ¶
Manager implements the interface to fetch compute units from different resource managers.
func NewManager ¶
NewManager creates a new Manager struct instance
func (Manager) FetchUnits ¶
FetchUnits implements collection jobs between start and end times
func (Manager) FetchUsersProjects ¶
func (b Manager) FetchUsersProjects(currentTime time.Time) ([]models.ClusterUsers, []models.ClusterProjects, error)
FetchUsersProjects fetches latest projects and users for each cluster
Click to show internal directories.
Click to hide internal directories.