Documentation ¶
Index ¶
- type SHostMemoryPendingUsageStore
- func (self *SHostMemoryPendingUsageStore) DeleteSessionUsage(usage *SessionPendingUsage)
- func (self *SHostMemoryPendingUsageStore) GetPendingUsage(hostId string) (*SPendingUsage, error)
- func (self *SHostMemoryPendingUsageStore) GetSessionUsage(sessionId string, hostId string) (*SessionPendingUsage, error)
- func (self *SHostMemoryPendingUsageStore) SetPendingUsage(hostId string, usage *SPendingUsage)
- func (self *SHostMemoryPendingUsageStore) SetSessionUsage(sessionId, hostId string, usage *SessionPendingUsage)
- type SHostPendingUsageManager
- func (m *SHostPendingUsageManager) AddPendingUsage(req *api.SchedInfo, candidate *schedapi.CandidateResource)
- func (m *SHostPendingUsageManager) CancelPendingUsage(hostId string, su *SessionPendingUsage) error
- func (m *SHostPendingUsageManager) DeleteSessionUsage(usage *SessionPendingUsage)
- func (m *SHostPendingUsageManager) GetPendingUsage(hostId string) (*SPendingUsage, error)
- func (m *SHostPendingUsageManager) GetSessionUsage(sessionId, hostId string) (*SessionPendingUsage, error)
- func (m *SHostPendingUsageManager) Keyword() string
- type SPendingUsage
- type SResourcePendingUsage
- func (u *SResourcePendingUsage) Add(su *SResourcePendingUsage)
- func (u *SResourcePendingUsage) Get(key string) int
- func (u *SResourcePendingUsage) IsEmpty() bool
- func (u *SResourcePendingUsage) Range(f func(key string, size int) bool)
- func (u *SResourcePendingUsage) Set(key string, size int)
- func (u *SResourcePendingUsage) Sub(su *SResourcePendingUsage)
- func (u *SResourcePendingUsage) ToMap() map[string]int
- type SessionPendingUsage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SHostMemoryPendingUsageStore ¶
type SHostMemoryPendingUsageStore struct {
// contains filtered or unexported fields
}
func NewHostMemoryPendingUsageStore ¶
func NewHostMemoryPendingUsageStore() *SHostMemoryPendingUsageStore
func (*SHostMemoryPendingUsageStore) DeleteSessionUsage ¶
func (self *SHostMemoryPendingUsageStore) DeleteSessionUsage(usage *SessionPendingUsage)
func (*SHostMemoryPendingUsageStore) GetPendingUsage ¶
func (self *SHostMemoryPendingUsageStore) GetPendingUsage(hostId string) (*SPendingUsage, error)
func (*SHostMemoryPendingUsageStore) GetSessionUsage ¶
func (self *SHostMemoryPendingUsageStore) GetSessionUsage(sessionId string, hostId string) (*SessionPendingUsage, error)
func (*SHostMemoryPendingUsageStore) SetPendingUsage ¶
func (self *SHostMemoryPendingUsageStore) SetPendingUsage(hostId string, usage *SPendingUsage)
func (*SHostMemoryPendingUsageStore) SetSessionUsage ¶
func (self *SHostMemoryPendingUsageStore) SetSessionUsage(sessionId, hostId string, usage *SessionPendingUsage)
type SHostPendingUsageManager ¶
type SHostPendingUsageManager struct {
// contains filtered or unexported fields
}
var HostPendingUsageManager *SHostPendingUsageManager
func (*SHostPendingUsageManager) AddPendingUsage ¶
func (m *SHostPendingUsageManager) AddPendingUsage(req *api.SchedInfo, candidate *schedapi.CandidateResource)
func (*SHostPendingUsageManager) CancelPendingUsage ¶
func (m *SHostPendingUsageManager) CancelPendingUsage(hostId string, su *SessionPendingUsage) error
func (*SHostPendingUsageManager) DeleteSessionUsage ¶
func (m *SHostPendingUsageManager) DeleteSessionUsage(usage *SessionPendingUsage)
func (*SHostPendingUsageManager) GetPendingUsage ¶
func (m *SHostPendingUsageManager) GetPendingUsage(hostId string) (*SPendingUsage, error)
func (*SHostPendingUsageManager) GetSessionUsage ¶
func (m *SHostPendingUsageManager) GetSessionUsage(sessionId, hostId string) (*SessionPendingUsage, error)
func (*SHostPendingUsageManager) Keyword ¶
func (m *SHostPendingUsageManager) Keyword() string
type SPendingUsage ¶
type SPendingUsage struct { HostId string Cpu int CpuPin map[int]int Memory int // nodeId: memSizeMB NumaMemPin map[int]int IsolatedDevice int DiskUsage *SResourcePendingUsage NetUsage *SResourcePendingUsage // Lock is not need here InstanceGroupUsage map[string]*api.CandidateGroup }
func NewPendingUsageBySchedInfo ¶
func NewPendingUsageBySchedInfo(hostId string, req *api.SchedInfo, candidate *schedapi.CandidateResource) *SPendingUsage
func (*SPendingUsage) Add ¶
func (self *SPendingUsage) Add(sUsage *SPendingUsage)
func (*SPendingUsage) IsEmpty ¶
func (self *SPendingUsage) IsEmpty() bool
func (*SPendingUsage) Sub ¶
func (self *SPendingUsage) Sub(sUsage *SPendingUsage)
func (*SPendingUsage) ToMap ¶
func (self *SPendingUsage) ToMap() map[string]interface{}
type SResourcePendingUsage ¶
type SResourcePendingUsage struct {
// contains filtered or unexported fields
}
func NewResourcePendingUsage ¶
func NewResourcePendingUsage(vals map[string]int) *SResourcePendingUsage
func (*SResourcePendingUsage) Add ¶
func (u *SResourcePendingUsage) Add(su *SResourcePendingUsage)
func (*SResourcePendingUsage) Get ¶
func (u *SResourcePendingUsage) Get(key string) int
func (*SResourcePendingUsage) IsEmpty ¶
func (u *SResourcePendingUsage) IsEmpty() bool
func (*SResourcePendingUsage) Range ¶
func (u *SResourcePendingUsage) Range(f func(key string, size int) bool)
func (*SResourcePendingUsage) Set ¶
func (u *SResourcePendingUsage) Set(key string, size int)
func (*SResourcePendingUsage) Sub ¶
func (u *SResourcePendingUsage) Sub(su *SResourcePendingUsage)
func (*SResourcePendingUsage) ToMap ¶
func (u *SResourcePendingUsage) ToMap() map[string]int
type SessionPendingUsage ¶
type SessionPendingUsage struct { HostId string SessionId string Usage *SPendingUsage // contains filtered or unexported fields }
func NewSessionUsage ¶
func NewSessionUsage(sid, hostId string) *SessionPendingUsage
func (*SessionPendingUsage) AddCount ¶
func (su *SessionPendingUsage) AddCount()
func (*SessionPendingUsage) GetHostId ¶
func (su *SessionPendingUsage) GetHostId() string
func (*SessionPendingUsage) StartTimer ¶
func (self *SessionPendingUsage) StartTimer()
func (*SessionPendingUsage) StopTimer ¶
func (self *SessionPendingUsage) StopTimer()
func (*SessionPendingUsage) SubCount ¶
func (su *SessionPendingUsage) SubCount()
Click to show internal directories.
Click to hide internal directories.