Refactor EntityStore interface to multiple interfaces of specific type

This commit is contained in:
Jan-Eric Hellenberg
2021-05-20 09:26:17 +02:00
committed by Jan-Eric Hellenberg
parent 52636b04cf
commit 619cd40fb6
16 changed files with 393 additions and 458 deletions

View File

@@ -5,7 +5,6 @@ import (
"encoding/json"
"github.com/google/uuid"
"gitlab.hpi.de/codeocean/codemoon/poseidon/api/dto"
"gitlab.hpi.de/codeocean/codemoon/poseidon/store"
"sync"
)
@@ -21,7 +20,8 @@ const (
)
type Runner interface {
store.Entity
// Id returns the id of the runner.
Id() string
// AddExecution saves the supplied ExecutionRequest for the runner and returns an ExecutionId to retrieve it again.
AddExecution(dto.ExecutionRequest) (ExecutionId, error)