-
Notifications
You must be signed in to change notification settings - Fork 907
/
interfaces_legacy.go
126 lines (93 loc) · 3.03 KB
/
interfaces_legacy.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
package lxd
import (
"io"
"github.com/gorilla/websocket"
)
// The ContainerServer type is the legacy name for InstanceServer.
type ContainerServer InstanceServer
// The ContainerBackupArgs struct is used when creating a container from a backup.
type ContainerBackupArgs struct {
// The backup file
BackupFile io.Reader
// Storage pool to use
PoolName string
}
// The ContainerCopyArgs struct is used to pass additional options during container copy.
type ContainerCopyArgs struct {
// If set, the container will be renamed on copy
Name string
// If set, the container running state will be transferred (live migration)
Live bool
// If set, only the container will copied, its snapshots won't
ContainerOnly bool
// The transfer mode, can be "pull" (default), "push" or "relay"
Mode string
// API extension: container_incremental_copy
// Perform an incremental copy
Refresh bool
}
// The ContainerSnapshotCopyArgs struct is used to pass additional options during container copy.
type ContainerSnapshotCopyArgs struct {
// If set, the container will be renamed on copy
Name string
// The transfer mode, can be "pull" (default), "push" or "relay"
Mode string
// API extension: container_snapshot_stateful_migration
// If set, the container running state will be transferred (live migration)
Live bool
}
// The ContainerConsoleArgs struct is used to pass additional options during a
// container console session.
type ContainerConsoleArgs struct {
// Bidirectional fd to pass to the container
Terminal io.ReadWriteCloser
// Control message handler (window resize)
Control func(conn *websocket.Conn)
// Closing this Channel causes a disconnect from the container's console
ConsoleDisconnect chan bool
}
// The ContainerConsoleLogArgs struct is used to pass additional options during a
// container console log request.
type ContainerConsoleLogArgs struct {
}
// The ContainerExecArgs struct is used to pass additional options during container exec.
type ContainerExecArgs struct {
// Standard input
Stdin io.ReadCloser
// Standard output
Stdout io.WriteCloser
// Standard error
Stderr io.WriteCloser
// Control message handler (window resize, signals, ...)
Control func(conn *websocket.Conn)
// Channel that will be closed when all data operations are done
DataDone chan bool
}
// The ContainerFileArgs struct is used to pass the various options for a container file upload.
type ContainerFileArgs struct {
// File content
Content io.ReadSeeker
// User id that owns the file
UID int64
// Group id that owns the file
GID int64
// File permissions
Mode int
// File type (file or directory)
Type string
// File write mode (overwrite or append)
WriteMode string
}
// The ContainerFileResponse struct is used as part of the response for a container file download.
type ContainerFileResponse struct {
// User id that owns the file
UID int64
// Group id that owns the file
GID int64
// File permissions
Mode int
// File type (file or directory)
Type string
// If a directory, the list of files inside it
Entries []string
}