models

package
v0.3.11-8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2024 License: Apache-2.0 Imports: 12 Imported by: 5

Documentation

Index

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 (*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 (*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()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL