job_run

package
v0.0.0-...-1ae172a Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const SpaceletJobStatusInterval = time.Second * 5

Variables

This section is empty.

Functions

This section is empty.

Types

type JobRun

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

JobRun pipeline controller流水线任务执行处理

func NewJobRun

func NewJobRun(models *model.Models, kubeClient *cluster.KubeClient, informerFactory informer.Factory) *JobRun

func (*JobRun) Cancel

func (b *JobRun) Cancel(jobId uint) error

func (*JobRun) Execute

func (b *JobRun) Execute(jobId uint, pluginKey string, params map[string]interface{}) (resp *utils.Response)

type PluginLogger

type PluginLogger struct {
	*bytes.Buffer
	// contains filtered or unexported fields
}

PluginLogger 记录日志到数据库

func NewPluginLogger

func NewPluginLogger(models *model.Models, jobId uint) *PluginLogger

func (*PluginLogger) Close

func (l *PluginLogger) Close() error

func (*PluginLogger) FlushLogToDB

func (l *PluginLogger) FlushLogToDB()

FlushLogToDB 定时刷新日志到数据库

func (*PluginLogger) Log

func (l *PluginLogger) Log(format string, a ...interface{})

func (*PluginLogger) Reset

func (l *PluginLogger) Reset(format string, a ...interface{})

type SpaceletJob

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

SpaceletJob spacelet节点执行pipeline job

func (SpaceletJob) Executor

func (s SpaceletJob) Executor(params *plugins.ExecutorParams) (plugins.Executor, error)

Executor 创建一个spaceletJob执行器,通过调用spacelet执行pipeline接口执行任务

Jump to

Keyboard shortcuts

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