Documentation ¶
Index ¶
- type VNode
- func (n *VNode) CheckAndUpdatePod(ctx context.Context, key string, obj interface{}, pod *corev1.Pod)
- func (n *VNode) CreateNodeLease(ctx context.Context, controllerID string) bool
- func (n *VNode) DeletePod(key string)
- func (n *VNode) DeletePodsFromKubernetesForget(ctx context.Context, key string)
- func (n *VNode) Done() <-chan struct{}
- func (n *VNode) Err() error
- func (n *VNode) ExitWhenLeaderChanged() <-chan struct{}
- func (n *VNode) IsLeader() bool
- func (n *VNode) ListPodFromController() ([]*corev1.Pod, bool)
- func (n *VNode) LoadPodFromController(key string) (any, bool)
- func (n *VNode) LockRetryLease()
- func (n *VNode) PodStore(key string, pod *corev1.Pod)
- func (n *VNode) RenewLease(ctx context.Context, clientID string)
- func (n *VNode) RetryLease()
- func (n *VNode) Run(ctx context.Context, initData model.NodeInfo)
- func (n *VNode) ShouldRetryLease() <-chan struct{}
- func (n *VNode) Shutdown()
- func (n *VNode) SyncAllContainerInfo(ctx context.Context, infos []model.BizStatusData)
- func (n *VNode) SyncNodeStatus(data model.NodeStatusData)
- func (n *VNode) SyncOneContainerInfo(ctx context.Context, bizStatusData model.BizStatusData)
- func (n *VNode) SyncPodsFromKubernetesEnqueue(ctx context.Context, key string)
- func (n *VNode) WaitReady(ctx context.Context, timeout time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type VNode ¶
type VNode struct { tunnel.Tunnel // Tunnel for communication with the virtual kubelet // contains filtered or unexported fields }
VNode is the main struct for a virtual node
func (*VNode) CheckAndUpdatePod ¶
func (n *VNode) CheckAndUpdatePod(ctx context.Context, key string, obj interface{}, pod *corev1.Pod)
CheckAndUpdatePod checks and updates a pod in the node
func (*VNode) CreateNodeLease ¶ added in v0.3.0
CreateNodeLease creates a new lease for the node
func (*VNode) DeletePodsFromKubernetesForget ¶
DeletePodsFromKubernetesForget deletes pods from Kubernetes in the node
func (*VNode) Done ¶
func (n *VNode) Done() <-chan struct{}
Done returns a channel that will be closed when the vnode has exited.
func (*VNode) ExitWhenLeaderChanged ¶ added in v0.3.0
func (n *VNode) ExitWhenLeaderChanged() <-chan struct{}
ExitWhenLeaderChanged returns a channel that will be closed when the vnode leader changed
func (*VNode) IsLeader ¶ added in v0.3.0
IsLeader returns a bool marked current vnode is leader or not
func (*VNode) ListPodFromController ¶ added in v0.3.4
ListPodFromController list all pods for this node from the kubernetes
func (*VNode) LoadPodFromController ¶
LoadPodFromController loads a pod from the node's pod controller
func (*VNode) LockRetryLease ¶ added in v0.3.0
func (n *VNode) LockRetryLease()
LockRetryLease locks the vnode to retry the lease
func (*VNode) RenewLease ¶ added in v0.3.0
RenewLease renews the lease of the node
func (*VNode) RetryLease ¶ added in v0.3.0
func (n *VNode) RetryLease()
RetryLease signals the vnode to retry the lease
func (*VNode) ShouldRetryLease ¶ added in v0.3.0
func (n *VNode) ShouldRetryLease() <-chan struct{}
ShouldRetryLease returns a channel that will be closed when the vnode should retry lease
func (*VNode) Shutdown ¶
func (n *VNode) Shutdown()
Shutdown is the func of shutting down a vnode when base exit
func (*VNode) SyncAllContainerInfo ¶
func (n *VNode) SyncAllContainerInfo(ctx context.Context, infos []model.BizStatusData)
SyncAllContainerInfo syncs the status of all containers
func (*VNode) SyncNodeStatus ¶
func (n *VNode) SyncNodeStatus(data model.NodeStatusData)
SyncNodeStatus syncs the status of the node
func (*VNode) SyncOneContainerInfo ¶ added in v0.3.1
func (n *VNode) SyncOneContainerInfo(ctx context.Context, bizStatusData model.BizStatusData)
SyncOneContainerInfo syncs the status of a single container
func (*VNode) SyncPodsFromKubernetesEnqueue ¶
SyncPodsFromKubernetesEnqueue syncs pods from Kubernetes to the node