kubernetes/pkg/proxy/ipvs/graceful_termination.go

const rsCheckDeleteInterval

type listItem

// String return the unique real server name(with virtual server information)
func (g *listItem) String() string {}

// GetUniqueRSName return a string type unique rs name with vs information
func GetUniqueRSName(vs *utilipvs.VirtualServer, rs *utilipvs.RealServer) string {}

type graceTerminateRSList

// add push an new element to the rsList
func (q *graceTerminateRSList) add(rs *listItem) bool {}

// remove remove an element from the rsList
func (q *graceTerminateRSList) remove(rs *listItem) bool {}

// return the size of the list
func (q *graceTerminateRSList) len() int {}

func (q *graceTerminateRSList) flushList(handler func(rsToDelete *listItem) (bool, error)) bool {}

// exist check whether the specified unique RS is in the rsList
func (q *graceTerminateRSList) exist(uniqueRS string) (*listItem, bool) {}

type GracefulTerminationManager

// NewGracefulTerminationManager create a gracefulTerminationManager to manage ipvs rs graceful termination work
func NewGracefulTerminationManager(ipvs utilipvs.Interface) *GracefulTerminationManager {}

// InTerminationList to check whether specified unique rs name is in graceful termination list
func (m *GracefulTerminationManager) InTerminationList(uniqueRS string) bool {}

// GracefulDeleteRS to update rs weight to 0, and add rs to graceful terminate list
func (m *GracefulTerminationManager) GracefulDeleteRS(vs *utilipvs.VirtualServer, rs *utilipvs.RealServer) error {}

func (m *GracefulTerminationManager) deleteRsFunc(rsToDelete *listItem) (bool, error) {}

func (m *GracefulTerminationManager) tryDeleteRs() {}

// MoveRSOutofGracefulDeleteList to delete an rs and remove it from the rsList immediately
func (m *GracefulTerminationManager) MoveRSOutofGracefulDeleteList(uniqueRS string) error {}

// Run start a goroutine to try to delete rs in the graceful delete rsList with an interval 1 minute
func (m *GracefulTerminationManager) Run() {}