Documentation ¶
Index ¶
- Constants
- Variables
- func ClearPodInDb(tenantID, ns, name string) error
- func ClearPortInDb(ns, name string, port iaasaccessor.Interface) error
- func ClearPortsOfNoUsedPod(ns, name string) error
- func CollectAndClear()
- func GetKeysOfAllPortsInPodDir(ns, name string) ([]*client.Node, error)
- func GetMaxCheckTimes() int
- func GetPortInfo(ports []*client.Node) ([]iaasaccessor.Interface, error)
- func GetPortsOfPod(ns, name string) ([]iaasaccessor.Interface, error)
- func GetRegularCheckInterval() time.Duration
- func RecyclePortSource(port iaasaccessor.Interface) error
- func RecycleResourseByTimer()
- func RegularCollectAndClear()
- type Pod
- type PodList
- type RecyclePodRepo
- type RecyclePodTableRole
- func (this *RecyclePodTableRole) Dec(key, refer string) error
- func (this *RecyclePodTableRole) Delete(key string) error
- func (this *RecyclePodTableRole) Get(key string) (interface{}, error)
- func (this *RecyclePodTableRole) GetAll() (map[string]interface{}, error)
- func (this *RecyclePodTableRole) Inc(key, mock string) error
- func (this *RecyclePodTableRole) Insert(key string, value interface{}) error
- func (this *RecyclePodTableRole) IsEmpty(key string) bool
- func (this *RecyclePodTableRole) Load() error
- type RecyclePodValue
Constants ¶
View Source
const DefaultMaxCheckTime = 3
View Source
const DefaultRegularCheckInterval = 15 * time.Minute
View Source
const MinutesInADay = (24 * 60)
Variables ¶
View Source
var MaxCheckTimes int
Functions ¶
func ClearPodInDb ¶
func ClearPortInDb ¶
func ClearPortsOfNoUsedPod ¶
func CollectAndClear ¶
func CollectAndClear()
func GetMaxCheckTimes ¶
func GetMaxCheckTimes() int
func GetPortInfo ¶
func GetPortsOfPod ¶
func GetRegularCheckInterval ¶
func RecyclePortSource ¶
func RecyclePortSource(port iaasaccessor.Interface) error
func RecycleResourseByTimer ¶
func RecycleResourseByTimer()
func RegularCollectAndClear ¶
func RegularCollectAndClear()
Types ¶
type Pod ¶
func AnalyzePods ¶
func CollectNoUsedPod ¶
func CountAndCollectNoUsedPod ¶
func CountAndCollectNoUsedPod() []Pod
func GetPodsFromDb ¶
func GetPodsFromK8s ¶
func RemoveSliceCopy ¶
type RecyclePodRepo ¶
type RecyclePodRepo interface { Load() error memtbl.MemTblOp refcnt.RefCounter }
func GetRecyclePodTableTableSingleton ¶
func GetRecyclePodTableTableSingleton() RecyclePodRepo
type RecyclePodTableRole ¶
type RecyclePodTableRole struct { PodMap map[string]interface{} // contains filtered or unexported fields }
func (*RecyclePodTableRole) Dec ¶
func (this *RecyclePodTableRole) Dec(key, refer string) error
func (*RecyclePodTableRole) Delete ¶
func (this *RecyclePodTableRole) Delete(key string) error
func (*RecyclePodTableRole) Get ¶
func (this *RecyclePodTableRole) Get(key string) (interface{}, error)
func (*RecyclePodTableRole) GetAll ¶
func (this *RecyclePodTableRole) GetAll() (map[string]interface{}, error)
func (*RecyclePodTableRole) Inc ¶
func (this *RecyclePodTableRole) Inc(key, mock string) error
func (*RecyclePodTableRole) Insert ¶
func (this *RecyclePodTableRole) Insert(key string, value interface{}) error
func (*RecyclePodTableRole) IsEmpty ¶
func (this *RecyclePodTableRole) IsEmpty(key string) bool
func (*RecyclePodTableRole) Load ¶
func (this *RecyclePodTableRole) Load() error
type RecyclePodValue ¶
Click to show internal directories.
Click to hide internal directories.