Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
gitpod-io
GitHub Repository: gitpod-io/gitpod
Path: blob/main/test/pkg/agent/workspace/api/api.go
2500 views
1
// Copyright (c) 2020 Gitpod GmbH. All rights reserved.
2
// Licensed under the GNU Affero General Public License (AGPL).
3
// See License.AGPL.txt in the project root for license information.
4
5
package api
6
7
import (
8
"os"
9
"time"
10
)
11
12
// ListDirRequest is the argument for ListDir
13
type ListDirRequest struct {
14
Dir string
15
}
16
17
// ListDirResponse is the response for ListDir
18
type ListDirResponse struct {
19
Files []string
20
}
21
22
// WriteFileRequest is the argument for WriteFile
23
type WriteFileRequest struct {
24
Path string
25
Content []byte
26
Mode os.FileMode
27
}
28
29
// WriteFileResponse is the response for WriteFile
30
type WriteFileResponse struct {
31
}
32
33
type ExecRequest struct {
34
Dir string
35
Command string
36
Args []string
37
Env []string
38
}
39
40
type ExecResponse struct {
41
ExitCode int
42
Stdout string
43
Stderr string
44
}
45
46
type BurnCpuRequest struct {
47
Procs uint
48
Timeout time.Duration
49
}
50
type BurnCpuResponse struct{}
51
52