reconciler

package
v1.27.0-alpha.18 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SENDER_NUMBER default sender number for one reconciler
	SENDER_NUMBER = 10
	// QUEUE_LENGTH queue length for storage watch event queue
	QUEUE_LENGTH = 10000
	// FETCH_MODULES_INTERVAL interval for fetch biz modules from paas-cc
	FETCH_MODULES_INTERVAL = 100
)
View Source
const (
	// EventAdd add event
	EventAdd = iota
	// EventManyAdd add many event
	EventManyAdd
	// EventUpdate update event
	EventUpdate
	// EventDel delete event
	EventDel
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EventType

type EventType int

EventType type for reconciler event

type PodEvent

type PodEvent struct {
	Type EventType
	Pod  *common.Pod
}

PodEvent struct for pod event

type Reconciler

type Reconciler struct {
	// contains filtered or unexported fields
}

Reconciler sync container data of one cluster to cmdb

func NewReconciler

func NewReconciler(clusterInfo common.Cluster, storageClient storage.Interface,
	cmdbClient cmdb.ClientInterface, fullSyncInterval int64) (*Reconciler, error)

NewReconciler create new reconciler

func (*Reconciler) Run

func (r *Reconciler) Run(ctx context.Context)

Run run reconciler

type Sender

type Sender struct {
	// contains filtered or unexported fields
}

Sender sender for pod event

func NewSender

func NewSender(clusterInfo common.Cluster, index int64, queueLength int64, cmdbClient cmdb.ClientInterface) *Sender

NewSender create new sender with event queue

func (*Sender) Push

func (s *Sender) Push(pod PodEvent)

Push push into queue

func (*Sender) Run

func (s *Sender) Run(ctx context.Context)

Run run the sender

Jump to

Keyboard shortcuts

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