-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmessages.py
63 lines (50 loc) · 1.47 KB
/
messages.py
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
class Call(object):
LIST_CONTAINERS = 0
LAUNCH_NESTED_CONTAINER_SESSION = 1
ATTACH_CONTAINER_INPUT_STREAM = 2
ATTACH_CONTAINER_OUTPUT_STREAM = 3
def __init__(self, type, msg):
self.type = type
self.msg = msg
class ListContainersRequest(object):
def __init__(self):
pass
class ListContainersResponse(object):
def __init__(self, container_ids):
self.container_ids = container_ids
class LaunchNestedContainerSession(object):
def __init__(self, container_id, cmd, args):
self.container_id = container_id
self.cmd = cmd
self.args = args
class AttachContainerMessage(object):
CONTROL_MSG = 0;
IO_MSG = 1;
def __init__(self, type, msg):
self.type = type
self.msg = msg
class ControlMsg(object):
INITIATE_STREAM = 0
WINDOW_SIZE = 1
def __init__(self, type, msg):
self.type = type
self.msg = msg
class InitiateStream(object):
def __init__(self, container_id, tty, interactive):
self.container_id = container_id
self.tty = tty
self.interactive = interactive
class WindowSize(object):
def __init__(self, rows, columns):
self.rows = rows
self.columns = columns
class TtyInfo(object):
def __init__(self, window_size):
self.window_size = window_size
class IOMsg(object):
STDIN = 0
STDOUT = 1
STDERR = 2
def __init__(self, type, data):
self.type = type
self.data = data