run

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OrderByName      = "Name"
	OrderByStartTime = "StartTime"
)

Field for order.

Variables

This section is empty.

Functions

This section is empty.

Types

type CountRunsResultHandler

type CountRunsResultHandler interface {
	Handle(context.Context, *CountRunsResultQuery) (*Status, error)
}

func NewCountRunsResultHandler

func NewCountRunsResultHandler(readModel ReadModel) CountRunsResultHandler

type CountRunsResultQuery

type CountRunsResultQuery struct {
	SubmissionID string
}

type ListRunsFilter

type ListRunsFilter struct {
	SearchWord string
	Exact      bool
	Status     []string
	IDs        []string
}

type ListRunsHandler

type ListRunsHandler interface {
	Handle(context.Context, *ListRunsQuery) ([]*RunItem, int, error)
}

func NewListRunsHandler

func NewListRunsHandler(grpcFactory grpc.Factory, runReadModel ReadModel, submissionReadModel submission.ReadModel) ListRunsHandler

type ListRunsQuery

type ListRunsQuery struct {
	WorkspaceID  string
	SubmissionID string
	Pg           *utils.Pagination
	Filter       *ListRunsFilter
}

type ListTasksHandler

type ListTasksHandler interface {
	Handle(context.Context, *ListTasksQuery) ([]*TaskItem, int, error)
}

func NewListTasksHandler

func NewListTasksHandler(grpcFactory grpc.Factory, runReadModel ReadModel, submissionReadModel submission.ReadModel) ListTasksHandler

type ListTasksQuery

type ListTasksQuery struct {
	WorkspaceID  string
	SubmissionID string
	RunID        string
	Pg           *utils.Pagination
}

type Queries

type Queries struct {
	ListRuns        ListRunsHandler
	ListTasks       ListTasksHandler
	CountRunsResult CountRunsResultHandler
}

func NewQueries

func NewQueries(grpcFactory grpc.Factory, runReadModel ReadModel, submissionReadModel submission.ReadModel) *Queries

type ReadModel

type ReadModel interface {
	ListAllRunIDs(ctx context.Context, submissionID string) ([]string, error)
	ListRuns(ctx context.Context, submissionID string, pg *utils.Pagination, filter *ListRunsFilter) ([]*RunItem, error)
	CountRuns(ctx context.Context, submissionID string, filter *ListRunsFilter) (int, error)

	ListTasks(ctx context.Context, runID string, pg *utils.Pagination) ([]*TaskItem, error)
	CountTasks(ctx context.Context, runID string) (int, error)
	CountRunsResult(ctx context.Context, submissionID string) ([]*StatusCount, error)
	CountTasksResult(ctx context.Context, runID string) ([]*StatusCount, error)
}

type RunItem

type RunItem struct {
	ID          string
	Name        string
	Status      string
	StartTime   int64
	FinishTime  *int64
	Duration    int64
	EngineRunID string
	Inputs      string
	Outputs     string
	TaskStatus  Status
	Log         *string
	Message     *string
}

type Status

type Status struct {
	Count        int64
	Succeeded    int64
	Failed       int64
	Running      int64
	Cancelling   int64
	Cancelled    int64
	Queued       int64
	Initializing int64
	Pending      int64
}

type StatusCount

type StatusCount struct {
	Count  int64
	Status string
}

StatusCount ...

type TaskItem

type TaskItem struct {
	Name       string
	RunID      string
	Status     string
	StartTime  int64
	FinishTime *int64
	Duration   int64
	Stdout     string
	Stderr     string
}

Jump to

Keyboard shortcuts

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