reconciler

package
v1.0.0-rc Latest Latest
Warning

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

Go to latest
Published: May 24, 2021 License: AGPL-3.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EtcdNeedCompensatePrefix = "/devops/pipeline/compensate/"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PipelineSvcFunc

type PipelineSvcFunc struct {
	CronNotExecuteCompensate func(id uint64) error
}

该结构体为了解决假如 Reconciler 引入 pipelinesvc 导致循环依赖问题,所以将 svc 方法挂载进来

type Reconciler

type Reconciler struct {
	QueueManager  types.QueueManager
	TaskThrottler throttler.Throttler
	// contains filtered or unexported fields
}

func New

func New(js jsonstore.JsonStore, etcd *etcd.Store, bdl *bundle.Bundle, dbClient *dbclient.Client,
	actionAgentSvc *actionagentsvc.ActionAgentSvc,
	extMarketSvc *extmarketsvc.ExtMarketSvc,
	pipelineSvcFunc *PipelineSvcFunc,
) (*Reconciler, error)

New generate a new reconciler.

func (*Reconciler) Add

func (r *Reconciler) Add(pipelineID uint64)

Add add pipelineID to reconciler, until add success

func (*Reconciler) ContinueBackupThrottler

func (r *Reconciler) ContinueBackupThrottler()

ContinueBackupThrottler 持续备份 throttler

func (*Reconciler) EnsureDatabaseGC

func (r *Reconciler) EnsureDatabaseGC()

EnsureDatabaseGC etcd lease ttl reset 存在问题,因此要定期巡检,主动 delete 那些已经到了 gcAt 时间仍然存在的 etcd key 来触发 dbgc github issue: https://github.com/etcd-io/etcd/issues/9395

func (*Reconciler) Listen

func (r *Reconciler) Listen()

Listen watch incoming pipelines which need to be scheduled from etcd.

func (*Reconciler) ListenDatabaseGC

func (r *Reconciler) ListenDatabaseGC()

ListenDatabaseGC 监听需要 GC 的 pipeline database record.

func (*Reconciler) ListenGC

func (r *Reconciler) ListenGC()

ListenGC 监听需要 GC 的 pipeline.

func (*Reconciler) WaitDBGC

func (r *Reconciler) WaitDBGC(pipelineID uint64, ttl uint64, needArchive bool)

Directories

Path Synopsis
queuemanage

Jump to

Keyboard shortcuts

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