invoker

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Overview

Package invoker represents solve implementation for running asynchronious tasks like compiling and judging solutions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompileContext

type CompileContext interface {
	problems.CompileContext
	GetCompilerByID(context.Context, int64) (compilers.Compiler, error)
	Release()
}

type Invoker

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

Invoker represents manager for asynchronous actions (invocations).

func New

func New(core *core.Core) *Invoker

New creates a new instance of Invoker.

func (*Invoker) Start

func (s *Invoker) Start() error

Start starts invoker daemons.

This function will spawn config.Invoker.Workers amount of goroutines.

type TaskContext

type TaskContext interface {
	context.Context
	Kind() models.TaskKind
	Status() models.TaskStatus
	ScanConfig(models.TaskConfig) error
	ScanState(any) error
	SetStatus(context.Context, models.TaskStatus) error
	SetState(context.Context, any) error
	SetDeferredState(any) error
	Ping(context.Context, time.Duration) error
	Logger() *logs.Logger
}

Jump to

Keyboard shortcuts

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