-
-
Notifications
You must be signed in to change notification settings - Fork 223
Expand file tree
/
Copy pathbase.go
More file actions
32 lines (29 loc) · 814 Bytes
/
base.go
File metadata and controls
32 lines (29 loc) · 814 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package executor
import (
"context"
"io"
"github.com/dstackai/dstack/runner/internal/schemas"
"github.com/dstackai/dstack/runner/internal/types"
)
type Executor interface {
GetHistory(timestamp int64) *schemas.PullResponse
GetJobWsLogsHistory() []schemas.LogEvent
GetRunnerState() string
GetJobInfo(ctx context.Context) (username string, workingDir string, err error)
Run(ctx context.Context) error
SetJob(job schemas.SubmitBody)
SetJobState(ctx context.Context, state types.JobState)
SetJobStateWithTerminationReason(
ctx context.Context,
state types.JobState,
terminationReason types.TerminationReason,
terminationMessage string,
)
SetRunnerState(state string)
WriteFileArchive(id string, src io.Reader) error
WriteRepoBlob(src io.Reader) error
Lock()
RLock()
RUnlock()
Unlock()
}