-
Notifications
You must be signed in to change notification settings - Fork 0
/
options.go
75 lines (65 loc) · 1.54 KB
/
options.go
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
package kubernetes
import (
"io"
appsv1 "k8s.io/api/apps/v1"
batchv1 "k8s.io/api/batch/v1"
)
type ResourcesOpts struct {
Namespace string
Name string
Annotations map[string]string
Labels map[string]string
Ports []KubePort
PodInfo *PodInfo
}
type DeploymentCreateOpts struct {
Namespace string
Spec *appsv1.Deployment
OnStatusEventCallback func(event string)
}
type PodPortForwardOpts struct {
Namespace string
PodName string
Ports []string // format "LOCAL:REMOTE"
IsWait bool
OnTunnelStartCallback func()
OnTunnelErrorCallback func(error)
}
type PodExecOpts struct {
Namespace string
PodName string
ContainerName string
Commands []string
InStream io.ReadCloser
OutStream io.Writer
ErrStream io.Writer
IsTty bool
OnExecCallback func()
}
type PodLogsOpts struct {
Namespace string
PodName string
ContainerName string
OutStream io.Writer
}
type JobOpts struct {
Namespace string
Name string
Annotations map[string]string
Labels map[string]string
PodInfo *PodInfo
}
type JobCreateOpts struct {
Namespace string
Spec *batchv1.Job
CaptureInterrupt bool
OnContainerInterruptCallback func(name string)
OnStatusEventCallback func(event string)
}
type CopyPodOpts struct {
Namespace string
PodName string
ContainerName string
LocalPath string
RemotePath string
}