runner

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DependencyResolver

type DependencyResolver interface {
	Result(ctx context.Context, workflowID model.WorkflowID, opID model.OpID) (*model.OpResult, error)
}

type HTTPRunner

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

func NewHTTPRunner

func NewHTTPRunner(cfg config.HTTP, client *http.Client) (*HTTPRunner, error)

func (*HTTPRunner) Kind

func (r *HTTPRunner) Kind() string

func (*HTTPRunner) Run

func (r *HTTPRunner) Run(ctx context.Context, runCtx RunContext) (*model.OpResult, error)

type JSRunner

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

func NewJSRunner

func NewJSRunner(registry *siteregistry.Registry) *JSRunner

func (*JSRunner) Kind

func (r *JSRunner) Kind() string

func (*JSRunner) Run

func (r *JSRunner) Run(ctx context.Context, runCtx RunContext) (*model.OpResult, error)

type Registry

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

func NewRegistry

func NewRegistry() *Registry

func (*Registry) Get

func (r *Registry) Get(kind string) (Runner, bool)

func (*Registry) Kinds

func (r *Registry) Kinds() []string

func (*Registry) Register

func (r *Registry) Register(runner Runner) error

type RunContext

type RunContext struct {
	Workflow     model.WorkflowRun
	Op           model.OpSpec
	Lease        model.Lease
	Now          time.Time
	Dependencies DependencyResolver
	ScraperDB    databasemod.QueryExecer
	SiteDB       databasemod.QueryExecer
}

type Runner

type Runner interface {
	Kind() string
	Run(ctx context.Context, runCtx RunContext) (*model.OpResult, error)
}

Jump to

Keyboard shortcuts

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