task

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateRequest

type CreateRequest struct {
	JobID        string            `json:"job_id"`
	AtomID       string            `json:"atom_id"`
	NodeSelector map[string]string `json:"node_selector,omitempty"`
}

type ListRequest

type ListRequest struct {
	Limit   uint64
	Offset  uint64
	OrderBy []string
	JobID   string
	AtomID  string
}

type Task

type Task interface {
	WithDatabase(*gorm.DB) Task
	List(*ListRequest) (models.Tasks, error)
	Get(uuid.UUID) (*models.Task, error)
	Create(*CreateRequest) (*models.Task, error)
	Delete(uuid.UUID) error
}

func Service

func Service(ctx context.Context) Task

func ServiceWithDB

func ServiceWithDB(ctx context.Context, conn *gorm.DB) Task

ServiceWithDB creates a Task service backed by the supplied database connection, bypassing the global db.Connection() singleton. This is used by the local runner to avoid initialising the production database.

Jump to

Keyboard shortcuts

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