base_node

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseNode

type BaseNode struct {
	BaseHealthInfoChan chan ark.HealthData
	BaseBizInfoChan    chan []ark.ArkBizInfo
	// contains filtered or unexported fields
}

func NewBaseNode

func NewBaseNode(config *BuildBaseNodeConfig) (kn *BaseNode, err error)

func (*BaseNode) CheckAndUpdatePod

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

func (*BaseNode) DeletePod

func (n *BaseNode) DeletePod(key string)

func (*BaseNode) DeletePodsFromKubernetesForget

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

func (*BaseNode) Done

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

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

func (*BaseNode) Err

func (n *BaseNode) Err() error

Err returns err which causes koupleless node exit

func (*BaseNode) Exit

func (n *BaseNode) Exit()

func (*BaseNode) LoadPodFromController

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

func (*BaseNode) PodStore

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

func (*BaseNode) Run

func (n *BaseNode) Run(ctx context.Context)

func (*BaseNode) SyncPodsFromKubernetesEnqueue

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

func (*BaseNode) WaitReady

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

type BuildBaseNodeConfig

type BuildBaseNodeConfig struct {
	// KubeClient is the kube client instance
	KubeClient kubernetes.Interface

	// PodLister is the pod lister
	PodLister lister.PodLister

	// PodInformer is the pod informer
	PodInformer informer.PodInformer

	// Tunnel is the tunnel of pod management
	Tunnel tunnel.Tunnel

	// NodeID is the base id of base
	NodeID string

	// NodeIP is the base ip of base
	NodeIP string

	// TechStack is the base tech stack, default java
	TechStack string

	// BizName is the base master biz name
	BizName string

	// BizVersion is the base master biz version
	BizVersion string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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