Documentation ¶
Index ¶
Constants ¶
const ExecutionTaskQueue = "EXECUTION_TASK_QUEUE"
ExecutionTaskQueue is the name of the task queue for the execution worker
const ExecutionWorkflowName = "execution-workflow"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Activity ¶
type Activity struct {
// contains filtered or unexported fields
}
Activity is the struct that contains the Temporal activity information
func NewActivity ¶
func NewActivity(management *management.ManagementService) *Activity
NewActivity creates a new temporal activity
func (Activity) ExecutionActivity ¶
func (a Activity) ExecutionActivity(ctx context.Context, execution model.NewExecution) (*ExecutionResult, error)
ExecutionActivity is the activity function that will compile and execute the code
type ExecutionResult ¶
type ExecutionResult struct { Stdout string Stderr string RawTestsResults string TestsResults []TestResult }
ExecutionResult is the struct that contains the result of the execution
type TestResult ¶
TestResult is the struct that contains the result of an assignment test
type Worker ¶
type Worker struct{}
Worker is the struct that contains the Temporal worker
func (Worker) InitWorker ¶
InitWorker initializes the Temporal worker and registers the workflows and activities
type Workflow ¶
type Workflow struct {
// contains filtered or unexported fields
}
Workflow is the struct that contains the Temporal workflow and the activity
func NewWorkflow ¶
NewWorkflow creates a new Workflow struct
func (Workflow) ExecutionWorkflow ¶
func (w Workflow) ExecutionWorkflow(ctx workflow.Context, execution model.NewExecution) (*ExecutionResult, error)
ExecutionWorkflow is the Workflow function that will be executed by Temporal when a new execution is received