runner

package
v0.15.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2023 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAppBasicRes added in v0.15.0

func CreateAppBasicRes() core.BasicRes

CreateAppBasicRes returns a application level BasicRes instance based on .env/environment variables it is useful because multiple places need BasicRes including `main.go` `directrun` and `worker` keep in mind this function can be called only once

func CreateBasicRes added in v0.15.0

func CreateBasicRes(cfg core.ConfigReader, log core.Logger, db *gorm.DB) core.BasicRes

CreateBasicRes returns a BasicRes based on what was given

func DirectRun

func DirectRun(cmd *cobra.Command, args []string, pluginTask core.PluginTask, options map[string]interface{})

DirectRun direct run plugin from command line. cmd: type is cobra.Command args: command line arguments pluginTask: specific built-in plugin, for example: feishu, jira... options: plugin config

func GetMigrator added in v0.15.0

func GetMigrator() core.Migrator

GetMigrator returns the shared Migrator singleton

func InitMigrator added in v0.15.0

func InitMigrator(basicRes core.BasicRes) (core.Migrator, errors.Error)

InitMigrator a Migrator singleton

func LoadPlugins

func LoadPlugins(basicRes core.BasicRes) errors.Error

LoadPlugins load plugins from local directory

func NewGormDb

func NewGormDb(config core.ConfigReader, logger core.Logger) (*gorm.DB, errors.Error)

NewGormDb creates a new *gorm.DB and set it up properly

func NewGormDbEx added in v0.15.0

func NewGormDbEx(config core.ConfigReader, logger core.Logger, sessionConfig *dal.SessionConfig) (*gorm.DB, errors.Error)

NewGormDbEx acts like NewGormDb but accept extra sessionConfig

func RunCmd

func RunCmd(cmd *cobra.Command)

RunCmd FIXME ...

func RunPipeline

func RunPipeline(
	basicRes core.BasicRes,
	pipelineId uint64,
	runTasks func([]uint64) errors.Error,
) errors.Error

RunPipeline FIXME ...

func RunPluginSubTasks

func RunPluginSubTasks(
	ctx context.Context,
	basicRes core.BasicRes,
	task *models.Task,
	pluginTask core.PluginTask,
	progress chan core.RunningProgress,
) errors.Error

RunPluginSubTasks FIXME ...

func RunPluginTask

func RunPluginTask(
	ctx context.Context,
	basicRes core.BasicRes,
	task *models.Task,
	progress chan core.RunningProgress,
) errors.Error

RunPluginTask FIXME ...

func RunTask

func RunTask(
	ctx context.Context,
	basicRes core.BasicRes,
	progress chan core.RunningProgress,
	taskId uint64,
) (err errors.Error)

RunTask FIXME ...

func UpdateProgressDetail

func UpdateProgressDetail(basicRes core.BasicRes, taskId uint64, progressDetail *models.TaskProgressDetail, p *core.RunningProgress)

UpdateProgressDetail FIXME ...

Types

This section is empty.

Jump to

Keyboard shortcuts

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