Documentation ¶
Index ¶
- type NodeReservationInfo
- func (n *NodeReservationInfo) DeleteReservationInfoGroup(placeholder string)
- func (n *NodeReservationInfo) GetGeneration() int64
- func (n *NodeReservationInfo) GetStore() generationstore.Store
- func (n *NodeReservationInfo) Keys() []string
- func (n *NodeReservationInfo) SetGeneration(generation int64)
- func (n *NodeReservationInfo) SetReservationInfoGroup(placeholder string, group *ReservationInfoGroup)
- func (n *NodeReservationInfo) UpdateSnapshot(snapshot *NodeReservationInfo, cloneFunc generationstore.CloneFunc, ...)
- type NodeReservationStore
- func (r *NodeReservationStore) AddReservationInfo(info *ReservationInfo)
- func (r *NodeReservationStore) ConditionRange(f func(key string, nodeInfo *NodeReservationInfo) bool) bool
- func (r *NodeReservationStore) DeleteNodeReservationInfo(nodeName string)
- func (r *NodeReservationStore) DeleteReservationInfo(id *ReservationIdentifier)
- func (r *NodeReservationStore) GetAvailablePlaceholderPods(placeholder string) (api.ReservationPlaceholdersOfNodes, error)
- func (r *NodeReservationStore) GetAvailablePlaceholderPodsOnNode(nodeName, placeholder string) (api.ReservationPlaceholderMap, error)
- func (r *NodeReservationStore) GetNodeReservationInfo(nodeName string) *NodeReservationInfo
- func (r *NodeReservationStore) GetReservationInfo(id *ReservationIdentifier) *ReservationInfo
- func (r *NodeReservationStore) Len() int
- func (r *NodeReservationStore) SetMatchedPodForReservation(id *ReservationIdentifier, matchedPod *v1.Pod) error
- func (r *NodeReservationStore) SetNodeReservationInfo(nodeName string, nodeInfo *NodeReservationInfo)
- func (r *NodeReservationStore) UpdateSnapshot(s *NodeReservationStore, clone generationstore.CloneFunc, ...)
- type ReservationIdentifier
- type ReservationInfo
- type ReservationInfoGroup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NodeReservationInfo ¶
type NodeReservationInfo struct {
// contains filtered or unexported fields
}
NodeReservationInfo is a collection of reservationInfo belong to the same node
func NewCacheNodeReservationInfo ¶
func NewCacheNodeReservationInfo() *NodeReservationInfo
func NewSnapshotNodeReservationInfo ¶
func NewSnapshotNodeReservationInfo() *NodeReservationInfo
func (*NodeReservationInfo) DeleteReservationInfoGroup ¶
func (n *NodeReservationInfo) DeleteReservationInfoGroup(placeholder string)
func (*NodeReservationInfo) GetGeneration ¶
func (n *NodeReservationInfo) GetGeneration() int64
func (*NodeReservationInfo) GetStore ¶
func (n *NodeReservationInfo) GetStore() generationstore.Store
func (*NodeReservationInfo) Keys ¶
func (n *NodeReservationInfo) Keys() []string
func (*NodeReservationInfo) SetGeneration ¶
func (n *NodeReservationInfo) SetGeneration(generation int64)
func (*NodeReservationInfo) SetReservationInfoGroup ¶
func (n *NodeReservationInfo) SetReservationInfoGroup(placeholder string, group *ReservationInfoGroup)
func (*NodeReservationInfo) UpdateSnapshot ¶
func (n *NodeReservationInfo) UpdateSnapshot(snapshot *NodeReservationInfo, cloneFunc generationstore.CloneFunc, cleanFunc generationstore.CleanFunc)
type NodeReservationStore ¶
type NodeReservationStore struct {
// contains filtered or unexported fields
}
func NewCacheNodeReservationStore ¶
func NewCacheNodeReservationStore() *NodeReservationStore
func NewSnapshotNodeReservationStore ¶
func NewSnapshotNodeReservationStore() *NodeReservationStore
func (*NodeReservationStore) AddReservationInfo ¶
func (r *NodeReservationStore) AddReservationInfo(info *ReservationInfo)
func (*NodeReservationStore) ConditionRange ¶
func (r *NodeReservationStore) ConditionRange(f func(key string, nodeInfo *NodeReservationInfo) bool) bool
func (*NodeReservationStore) DeleteNodeReservationInfo ¶
func (r *NodeReservationStore) DeleteNodeReservationInfo(nodeName string)
func (*NodeReservationStore) DeleteReservationInfo ¶
func (r *NodeReservationStore) DeleteReservationInfo(id *ReservationIdentifier)
func (*NodeReservationStore) GetAvailablePlaceholderPods ¶
func (r *NodeReservationStore) GetAvailablePlaceholderPods(placeholder string) (api.ReservationPlaceholdersOfNodes, error)
func (*NodeReservationStore) GetAvailablePlaceholderPodsOnNode ¶
func (r *NodeReservationStore) GetAvailablePlaceholderPodsOnNode(nodeName, placeholder string) (api.ReservationPlaceholderMap, error)
func (*NodeReservationStore) GetNodeReservationInfo ¶
func (r *NodeReservationStore) GetNodeReservationInfo(nodeName string) *NodeReservationInfo
func (*NodeReservationStore) GetReservationInfo ¶
func (r *NodeReservationStore) GetReservationInfo(id *ReservationIdentifier) *ReservationInfo
func (*NodeReservationStore) Len ¶
func (r *NodeReservationStore) Len() int
func (*NodeReservationStore) SetMatchedPodForReservation ¶
func (r *NodeReservationStore) SetMatchedPodForReservation(id *ReservationIdentifier, matchedPod *v1.Pod) error
func (*NodeReservationStore) SetNodeReservationInfo ¶
func (r *NodeReservationStore) SetNodeReservationInfo(nodeName string, nodeInfo *NodeReservationInfo)
func (*NodeReservationStore) UpdateSnapshot ¶
func (r *NodeReservationStore) UpdateSnapshot(s *NodeReservationStore, clone generationstore.CloneFunc, clean generationstore.CleanFunc)
type ReservationIdentifier ¶
type ReservationIdentifier struct {
// contains filtered or unexported fields
}
func GetReservationIdentifier ¶
func GetReservationIdentifier(p *v1.Pod) (*ReservationIdentifier, error)
func (*ReservationIdentifier) Clone ¶
func (id *ReservationIdentifier) Clone() *ReservationIdentifier
func (*ReservationIdentifier) String ¶
func (id *ReservationIdentifier) String() string
type ReservationInfo ¶
type ReservationInfo struct { *ReservationIdentifier // original podKey. PlaceholderPod *v1.Pod // mark the timestamp, if timeout, reservation will be stopped // and pod resources will be released. CreateTime time.Time // TODO: revisit this filed, can we remove this field and use Status instead MatchedPod *v1.Pod }
ReservationInfo holds the information of reservation
func NewReservationInfo ¶
func NewReservationInfo(placeholderPod, matchedPod *v1.Pod) (*ReservationInfo, error)
func (*ReservationInfo) IsAvailable ¶
func (ri *ReservationInfo) IsAvailable() bool
type ReservationInfoGroup ¶
type ReservationInfoGroup struct {
// contains filtered or unexported fields
}
ReservationInfoGroup is a collection of ReservationInfo belong to the same placeholder
func NewReservationInfoGroup ¶
func NewReservationInfoGroup() *ReservationInfoGroup
func (*ReservationInfoGroup) Clone ¶
func (r *ReservationInfoGroup) Clone() *ReservationInfoGroup
func (*ReservationInfoGroup) GetGeneration ¶
func (r *ReservationInfoGroup) GetGeneration() int64
func (*ReservationInfoGroup) SetGeneration ¶
func (r *ReservationInfoGroup) SetGeneration(generation int64)
Click to show internal directories.
Click to hide internal directories.