glue

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2024 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Glue added in v0.4.0

type Glue struct {
	Judge judge.Judger

	Logger *slog.Logger

	Users            njudge.Users
	Submissions      njudge.Submissions
	Problems         njudge.Problems
	SubmissionsQuery njudge.SubmissionsQuery
}

func New added in v0.4.0

func New(judge judge.Judger, opts ...Option) (*Glue, error)

func (*Glue) ProcessSubmission added in v0.4.0

func (g *Glue) ProcessSubmission(ctx context.Context, sub njudge.Submission) error

func (*Glue) Start added in v0.4.0

func (g *Glue) Start(ctx context.Context)

type Judges added in v0.4.0

type Judges struct {
	Conn   *sql.DB
	Logger *slog.Logger

	JudgeClients map[int]*judge.Client
	JudgeModels  models.JudgeSlice
	// contains filtered or unexported fields
}

func NewJudges added in v0.4.0

func NewJudges(conn *sql.DB, logger *slog.Logger) *Judges

func (*Judges) Judge added in v0.4.0

func (j *Judges) Judge(ctx context.Context, sub judge.Submission, callback judge.ResultCallback) (*problems.Status, error)

func (*Judges) Update added in v0.4.0

func (j *Judges) Update(ctx context.Context)

type Option added in v0.4.0

type Option func(*Glue) error

func WithDatabaseOption added in v0.4.0

func WithDatabaseOption(conn *sql.DB) Option

func WithLogger added in v0.4.0

func WithLogger(logger *slog.Logger) Option

Jump to

Keyboard shortcuts

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