vnode

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type VNode

type VNode struct {
	tunnel.Tunnel
	// contains filtered or unexported fields
}

func NewVNode

func NewVNode(config *model.BuildVNodeConfig, t tunnel.Tunnel) (kn *VNode, err error)

func (*VNode) CheckAndUpdatePod

func (n *VNode) CheckAndUpdatePod(ctx context.Context, key string, obj interface{}, pod *corev1.Pod)

func (*VNode) CreateNodeLease added in v0.3.0

func (n *VNode) CreateNodeLease(ctx context.Context, controllerID string) bool

func (*VNode) DeletePod

func (n *VNode) DeletePod(key string)

func (*VNode) DeletePodsFromKubernetesForget

func (n *VNode) DeletePodsFromKubernetesForget(ctx context.Context, key string)

func (*VNode) Done

func (n *VNode) Done() <-chan struct{}

Done returns a channel that will be closed when the vnode has exited.

func (*VNode) Err

func (n *VNode) Err() error

Err returns err which causes vnode exit

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) InitContainerInfo added in v0.2.2

func (n *VNode) InitContainerInfo(info model.ContainerStatusData)

func (*VNode) IsLeader added in v0.3.0

func (n *VNode) IsLeader() bool

IsLeader returns a bool marked current vnode is leader or not

func (*VNode) LoadPodFromController

func (n *VNode) LoadPodFromController(key string) (any, bool)

func (*VNode) LockRetryLease added in v0.3.0

func (n *VNode) LockRetryLease()

func (*VNode) PodStore

func (n *VNode) PodStore(key string, pod *corev1.Pod)

func (*VNode) RenewLease added in v0.3.0

func (n *VNode) RenewLease(ctx context.Context, clientID string)

func (*VNode) RetryLease added in v0.3.0

func (n *VNode) RetryLease()

func (*VNode) Run

func (n *VNode) Run(ctx context.Context, initData model.NodeInfo)

func (*VNode) ShouldRetryLease added in v0.3.0

func (n *VNode) ShouldRetryLease() <-chan struct{}

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.ContainerStatusData)

func (*VNode) SyncNodeStatus

func (n *VNode) SyncNodeStatus(data model.NodeStatusData)

func (*VNode) SyncOneContainerInfo added in v0.3.1

func (n *VNode) SyncOneContainerInfo(ctx context.Context, info model.ContainerStatusData)

func (*VNode) SyncPodsFromKubernetesEnqueue

func (n *VNode) SyncPodsFromKubernetesEnqueue(ctx context.Context, key string)

func (*VNode) WaitReady

func (n *VNode) WaitReady(ctx context.Context, timeout time.Duration) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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