Version: v1.15.0 Latest Latest

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

Go to latest
Published: Sep 30, 2022 License: Apache-2.0 Imports: 31 Imported by: 0




View Source
const (
	InitializeThreshold = 5 * time.Minute
	PullInterval        = 3 * time.Second
View Source
const (
	// Success Result
	Success string = "success"
	// Failure Result
	Failure string = "failure"
	// maxProbeRetries
	MaxProbeRetries = 3
View Source
const (
	CleanJobScheduler = "CleanJobScheduler"

	UpsertWorkflowScheduler = "UpsertWorkflowScheduler"

	UpsertTestScheduler = "UpsertTestScheduler"

	UpsertColliePipelineScheduler = "UpsertColliePipelineScheduler"

	CleanProductScheduler = "CleanProductScheduler"

	CleanCIResourcesScheduler = "CleanCIResourcesScheduler"

	InitStatScheduler = "InitStatScheduler"

	InitOperationStatScheduler = "InitOperationStatScheduler"

	InitPullSonarStatScheduler = "InitPullSonarStatScheduler"

	// SystemCapacityGC periodically triggers  garbage collection for system data based on its retention policy.
	SystemCapacityGC = "SystemCapacityGC"

	InitHealthCheckScheduler = "InitHealthCheckScheduler"

	InitHealthCheckPmHostScheduler = "InitHealthCheckPmHostScheduler"

	InitHelmEnvSyncValuesScheduler = "InitHelmEnvSyncValuesScheduler"

	EnvResourceSyncScheduler = "EnvResourceSyncScheduler"
View Source
const EnvUpdateInterval = 30

EnvUpdateInterval TODO interval will be set on product in future


This section is empty.


func BuildScheduledEnvJob added in v1.2.0

func BuildScheduledEnvJob(scheduler *gocron.Scheduler, healthCheck *service.PmHealthCheck) *gocron.Job

BuildScheduledEnvJob ...

func BuildScheduledJob

func BuildScheduledJob(scheduler *gocron.Scheduler, schedule *service.Schedule) *gocron.Job

BuildScheduledJob ...

func BuildScheduledPipelineJob

func BuildScheduledPipelineJob(scheduler *gocron.Scheduler, schedule *service.Schedule) *gocron.Job

BuildScheduledPipelineJob ...

func InitExistedCronjob

func InitExistedCronjob(client *client.Client, scheduler *cronlib.CronSchduler)


type CronClient

type CronClient struct {
	AslanCli            *client.Client
	Schedulers          map[string]*gocron.Scheduler
	SchedulerController map[string]chan bool
	// contains filtered or unexported fields

CronClient ...

func NewCronClient

func NewCronClient() *CronClient

NewCronClient ... 服务初始化

func (*CronClient) Init

func (c *CronClient) Init()


func (*CronClient) InitBuildStatScheduler

func (c *CronClient) InitBuildStatScheduler()

func (*CronClient) InitCleanCIResourcesScheduler added in v1.10.0

func (c *CronClient) InitCleanCIResourcesScheduler()

func (*CronClient) InitCleanJobScheduler

func (c *CronClient) InitCleanJobScheduler()

func (*CronClient) InitCleanProductScheduler added in v1.2.0

func (c *CronClient) InitCleanProductScheduler()

func (*CronClient) InitEnvResourceSyncScheduler added in v1.13.0

func (c *CronClient) InitEnvResourceSyncScheduler()

func (*CronClient) InitHealthCheckPmHostScheduler added in v1.11.0

func (c *CronClient) InitHealthCheckPmHostScheduler()

func (*CronClient) InitHealthCheckScheduler added in v1.2.0

func (c *CronClient) InitHealthCheckScheduler()

func (*CronClient) InitHelmEnvSyncValuesScheduler added in v1.11.0

func (c *CronClient) InitHelmEnvSyncValuesScheduler()

func (*CronClient) InitJobScheduler

func (c *CronClient) InitJobScheduler()

func (*CronClient) InitOperationStatScheduler

func (c *CronClient) InitOperationStatScheduler()

func (*CronClient) InitPullSonarStatScheduler

func (c *CronClient) InitPullSonarStatScheduler()

func (*CronClient) InitSystemCapacityGCScheduler

func (c *CronClient) InitSystemCapacityGCScheduler()

func (*CronClient) InitTestScheduler

func (c *CronClient) InitTestScheduler()

func (*CronClient) RunScheduledEnvResourceUpdate added in v1.13.0

func (c *CronClient) RunScheduledEnvResourceUpdate(productName, envName, resType, resName string, log *zap.SugaredLogger)

func (*CronClient) RunScheduledEnvUpdate added in v1.11.0

func (c *CronClient) RunScheduledEnvUpdate(productName, envName string, log *zap.SugaredLogger)

func (*CronClient) RunScheduledPipelineTask

func (c *CronClient) RunScheduledPipelineTask(pipeline *service.Pipeline, params *service.TaskArgs, log *zap.SugaredLogger)

func (*CronClient) RunScheduledService added in v1.2.0

func (c *CronClient) RunScheduledService(svc *service.Service, healthCheck *service.PmHealthCheck, address, envName, hostID string, log *zap.SugaredLogger)

func (*CronClient) RunScheduledTask

func (c *CronClient) RunScheduledTask(workflow *service.Workflow, params *service.WorkflowTaskArgs, log *zap.SugaredLogger)

RunScheduledTask ...

func (*CronClient) RunTestScheduledTask

func (c *CronClient) RunTestScheduledTask(test *service.TestingOpt, log *zap.SugaredLogger)

RunTestScheduledTask ...

func (*CronClient) StopTestScheduler

func (c *CronClient) StopTestScheduler(key string, log *zap.SugaredLogger)

func (*CronClient) UpdatePmHostStatusScheduler added in v1.11.0

func (c *CronClient) UpdatePmHostStatusScheduler(log *zap.SugaredLogger)

func (*CronClient) UpsertEnvResourceSyncScheduler added in v1.13.0

func (c *CronClient) UpsertEnvResourceSyncScheduler(log *zap.SugaredLogger)

func (*CronClient) UpsertEnvServiceScheduler added in v1.2.0

func (c *CronClient) UpsertEnvServiceScheduler(log *zap.SugaredLogger)

UpsertEnvServiceScheduler ...

func (*CronClient) UpsertEnvValueSyncScheduler added in v1.11.0

func (c *CronClient) UpsertEnvValueSyncScheduler(log *zap.SugaredLogger)

func (*CronClient) UpsertTestScheduler

func (c *CronClient) UpsertTestScheduler(log *zap.SugaredLogger)

UpsertTestScheduler ...

func (*CronClient) UpsertWorkflowScheduler

func (c *CronClient) UpsertWorkflowScheduler(log *zap.SugaredLogger)

type CronV3Client added in v1.11.0

type CronV3Client struct {
	Scheduler *newgoCron.Scheduler
	AslanCli  *aslan.Client

func NewCronV3 added in v1.11.0

func NewCronV3() *CronV3Client

func (*CronV3Client) Start added in v1.11.0

func (c *CronV3Client) Start()

type CronjobHandler

type CronjobHandler struct {
	Scheduler *cronlib.CronSchduler
	// contains filtered or unexported fields

func NewCronjobHandler

func NewCronjobHandler(client *client.Client, scheduler *cronlib.CronSchduler) *CronjobHandler

func (*CronjobHandler) HandleMessage

func (h *CronjobHandler) HandleMessage(message *nsq.Message) error

HandleMessage ...

Jump to

Keyboard shortcuts

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