Browse code

Use containerd Status variable when checking container state

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>

Kenfe-Mickael Laventure authored on 2017/05/09 23:39:23
Showing 44 changed files
... ...
@@ -18,7 +18,7 @@ import (
18 18
 	"time"
19 19
 
20 20
 	"github.com/Sirupsen/logrus"
21
-	containerd "github.com/docker/containerd/api/grpc/types"
21
+	containerd "github.com/containerd/containerd/api/grpc/types"
22 22
 	"github.com/docker/docker/api"
23 23
 	"github.com/docker/docker/api/types"
24 24
 	containertypes "github.com/docker/docker/api/types/container"
... ...
@@ -4,7 +4,7 @@ TOMLV_COMMIT=9baf8a8a9f2ed20a8e54160840c492f937eeaf9a
4 4
 
5 5
 # When updating RUNC_COMMIT, also update runc in vendor.conf accordingly
6 6
 RUNC_COMMIT=992a5be178a62e026f4069f443c6164912adbf09
7
-CONTAINERD_COMMIT=8ef7df579710405c4bb6e0812495671002ce08e0
7
+CONTAINERD_COMMIT=3addd840653146c90a254301d6c3a663c7fd6429
8 8
 TINI_COMMIT=949e6facb77383876aeff8a6944dde66b3089574
9 9
 LIBNETWORK_COMMIT=7b2b1feb1de4817d522cc372af149ff48d25028e
10 10
 VNDR_COMMIT=c56e082291115e369f77601f9c071dd0b87c7120
... ...
@@ -9,7 +9,8 @@ import (
9 9
 	"time"
10 10
 
11 11
 	"github.com/Sirupsen/logrus"
12
-	containerd "github.com/docker/containerd/api/grpc/types"
12
+	containerd "github.com/containerd/containerd/api/grpc/types"
13
+	containerd_runtime_types "github.com/containerd/containerd/runtime"
13 14
 	"github.com/docker/docker/pkg/ioutils"
14 15
 	"github.com/docker/docker/pkg/mount"
15 16
 	"github.com/golang/protobuf/ptypes"
... ...
@@ -467,7 +468,7 @@ func (clnt *client) Restore(containerID string, attachStdio StdioCallback, optio
467 467
 	cont, err := clnt.getContainerdContainer(containerID)
468 468
 	// Get its last event
469 469
 	ev, eerr := clnt.getContainerLastEvent(containerID)
470
-	if err != nil || cont.Status == "stopped" {
470
+	if err != nil || containerd_runtime_types.State(cont.Status) == containerd_runtime_types.Stopped {
471 471
 		if err != nil {
472 472
 			logrus.Warnf("libcontainerd: failed to retrieve container %s state: %v", containerID, err)
473 473
 		}
... ...
@@ -11,7 +11,7 @@ import (
11 11
 	"sync"
12 12
 
13 13
 	"github.com/Sirupsen/logrus"
14
-	containerd "github.com/docker/containerd/api/grpc/types"
14
+	containerd "github.com/containerd/containerd/api/grpc/types"
15 15
 	"github.com/docker/docker/pkg/idtools"
16 16
 	specs "github.com/opencontainers/runtime-spec/specs-go"
17 17
 	"golang.org/x/net/context"
... ...
@@ -13,7 +13,7 @@ import (
13 13
 	"time"
14 14
 
15 15
 	"github.com/Sirupsen/logrus"
16
-	containerd "github.com/docker/containerd/api/grpc/types"
16
+	containerd "github.com/containerd/containerd/api/grpc/types"
17 17
 	"github.com/docker/docker/pkg/ioutils"
18 18
 	specs "github.com/opencontainers/runtime-spec/specs-go"
19 19
 	"github.com/tonistiigi/fifo"
... ...
@@ -10,7 +10,7 @@ import (
10 10
 	goruntime "runtime"
11 11
 	"strings"
12 12
 
13
-	containerd "github.com/docker/containerd/api/grpc/types"
13
+	containerd "github.com/containerd/containerd/api/grpc/types"
14 14
 	"github.com/tonistiigi/fifo"
15 15
 	"golang.org/x/net/context"
16 16
 	"golang.org/x/sys/unix"
... ...
@@ -19,7 +19,7 @@ import (
19 19
 	"time"
20 20
 
21 21
 	"github.com/Sirupsen/logrus"
22
-	containerd "github.com/docker/containerd/api/grpc/types"
22
+	containerd "github.com/containerd/containerd/api/grpc/types"
23 23
 	"github.com/docker/docker/pkg/locker"
24 24
 	"github.com/docker/docker/pkg/system"
25 25
 	"github.com/golang/protobuf/ptypes"
... ...
@@ -3,7 +3,7 @@ package libcontainerd
3 3
 import (
4 4
 	"io"
5 5
 
6
-	containerd "github.com/docker/containerd/api/grpc/types"
6
+	containerd "github.com/containerd/containerd/api/grpc/types"
7 7
 	"github.com/opencontainers/runtime-spec/specs-go"
8 8
 	"golang.org/x/net/context"
9 9
 )
... ...
@@ -1,7 +1,7 @@
1 1
 package libcontainerd
2 2
 
3 3
 import (
4
-	containerd "github.com/docker/containerd/api/grpc/types"
4
+	containerd "github.com/containerd/containerd/api/grpc/types"
5 5
 	"github.com/opencontainers/runtime-spec/specs-go"
6 6
 )
7 7
 
... ...
@@ -1,7 +1,7 @@
1 1
 package libcontainerd
2 2
 
3 3
 import (
4
-	containerd "github.com/docker/containerd/api/grpc/types"
4
+	containerd "github.com/containerd/containerd/api/grpc/types"
5 5
 	"github.com/opencontainers/runtime-spec/specs-go"
6 6
 )
7 7
 
... ...
@@ -3,7 +3,7 @@ package libcontainerd
3 3
 import (
4 4
 	"syscall"
5 5
 
6
-	containerd "github.com/docker/containerd/api/grpc/types"
6
+	containerd "github.com/containerd/containerd/api/grpc/types"
7 7
 	"github.com/opencontainers/runtime-spec/specs-go"
8 8
 )
9 9
 
... ...
@@ -3,7 +3,7 @@ package libcontainerd
3 3
 import (
4 4
 	"syscall"
5 5
 
6
-	containerd "github.com/docker/containerd/api/grpc/types"
6
+	containerd "github.com/containerd/containerd/api/grpc/types"
7 7
 	"github.com/opencontainers/runtime-spec/specs-go"
8 8
 )
9 9
 
... ...
@@ -60,7 +60,7 @@ google.golang.org/grpc v1.0.4
60 60
 github.com/miekg/pkcs11 df8ae6ca730422dba20c768ff38ef7d79077a59f
61 61
 
62 62
 # When updating, also update RUNC_COMMIT in hack/dockerfile/binaries-commits accordingly
63
-github.com/opencontainers/runc b6b70e53451794e8333e9b602cc096b47a20bd0f
63
+github.com/opencontainers/runc 992a5be178a62e026f4069f443c6164912adbf09
64 64
 github.com/opencontainers/runtime-spec v1.0.0-rc5 # specs
65 65
 
66 66
 github.com/seccomp/libseccomp-golang 32f571b70023028bd57d9288c20efbcb237f3ce0
... ...
@@ -101,7 +101,7 @@ google.golang.org/genproto b3e7c2fb04031add52c4817f53f43757ccbf9c18
101 101
 github.com/docker/docker-credential-helpers v0.5.0
102 102
 
103 103
 # containerd
104
-github.com/docker/containerd 8ef7df579710405c4bb6e0812495671002ce08e0
104
+github.com/containerd/containerd 3addd840653146c90a254301d6c3a663c7fd6429
105 105
 github.com/tonistiigi/fifo 1405643975692217d6720f8b54aeee1bf2cd5cf4
106 106
 
107 107
 # cluster
108 108
new file mode 100644
... ...
@@ -0,0 +1,191 @@
0
+
1
+                                 Apache License
2
+                           Version 2.0, January 2004
3
+                        https://www.apache.org/licenses/
4
+
5
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+   1. Definitions.
8
+
9
+      "License" shall mean the terms and conditions for use, reproduction,
10
+      and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+      "Licensor" shall mean the copyright owner or entity authorized by
13
+      the copyright owner that is granting the License.
14
+
15
+      "Legal Entity" shall mean the union of the acting entity and all
16
+      other entities that control, are controlled by, or are under common
17
+      control with that entity. For the purposes of this definition,
18
+      "control" means (i) the power, direct or indirect, to cause the
19
+      direction or management of such entity, whether by contract or
20
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+      outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+      "You" (or "Your") shall mean an individual or Legal Entity
24
+      exercising permissions granted by this License.
25
+
26
+      "Source" form shall mean the preferred form for making modifications,
27
+      including but not limited to software source code, documentation
28
+      source, and configuration files.
29
+
30
+      "Object" form shall mean any form resulting from mechanical
31
+      transformation or translation of a Source form, including but
32
+      not limited to compiled object code, generated documentation,
33
+      and conversions to other media types.
34
+
35
+      "Work" shall mean the work of authorship, whether in Source or
36
+      Object form, made available under the License, as indicated by a
37
+      copyright notice that is included in or attached to the work
38
+      (an example is provided in the Appendix below).
39
+
40
+      "Derivative Works" shall mean any work, whether in Source or Object
41
+      form, that is based on (or derived from) the Work and for which the
42
+      editorial revisions, annotations, elaborations, or other modifications
43
+      represent, as a whole, an original work of authorship. For the purposes
44
+      of this License, Derivative Works shall not include works that remain
45
+      separable from, or merely link (or bind by name) to the interfaces of,
46
+      the Work and Derivative Works thereof.
47
+
48
+      "Contribution" shall mean any work of authorship, including
49
+      the original version of the Work and any modifications or additions
50
+      to that Work or Derivative Works thereof, that is intentionally
51
+      submitted to Licensor for inclusion in the Work by the copyright owner
52
+      or by an individual or Legal Entity authorized to submit on behalf of
53
+      the copyright owner. For the purposes of this definition, "submitted"
54
+      means any form of electronic, verbal, or written communication sent
55
+      to the Licensor or its representatives, including but not limited to
56
+      communication on electronic mailing lists, source code control systems,
57
+      and issue tracking systems that are managed by, or on behalf of, the
58
+      Licensor for the purpose of discussing and improving the Work, but
59
+      excluding communication that is conspicuously marked or otherwise
60
+      designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+      "Contributor" shall mean Licensor and any individual or Legal Entity
63
+      on behalf of whom a Contribution has been received by Licensor and
64
+      subsequently incorporated within the Work.
65
+
66
+   2. Grant of Copyright License. Subject to the terms and conditions of
67
+      this License, each Contributor hereby grants to You a perpetual,
68
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+      copyright license to reproduce, prepare Derivative Works of,
70
+      publicly display, publicly perform, sublicense, and distribute the
71
+      Work and such Derivative Works in Source or Object form.
72
+
73
+   3. Grant of Patent License. Subject to the terms and conditions of
74
+      this License, each Contributor hereby grants to You a perpetual,
75
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+      (except as stated in this section) patent license to make, have made,
77
+      use, offer to sell, sell, import, and otherwise transfer the Work,
78
+      where such license applies only to those patent claims licensable
79
+      by such Contributor that are necessarily infringed by their
80
+      Contribution(s) alone or by combination of their Contribution(s)
81
+      with the Work to which such Contribution(s) was submitted. If You
82
+      institute patent litigation against any entity (including a
83
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+      or a Contribution incorporated within the Work constitutes direct
85
+      or contributory patent infringement, then any patent licenses
86
+      granted to You under this License for that Work shall terminate
87
+      as of the date such litigation is filed.
88
+
89
+   4. Redistribution. You may reproduce and distribute copies of the
90
+      Work or Derivative Works thereof in any medium, with or without
91
+      modifications, and in Source or Object form, provided that You
92
+      meet the following conditions:
93
+
94
+      (a) You must give any other recipients of the Work or
95
+          Derivative Works a copy of this License; and
96
+
97
+      (b) You must cause any modified files to carry prominent notices
98
+          stating that You changed the files; and
99
+
100
+      (c) You must retain, in the Source form of any Derivative Works
101
+          that You distribute, all copyright, patent, trademark, and
102
+          attribution notices from the Source form of the Work,
103
+          excluding those notices that do not pertain to any part of
104
+          the Derivative Works; and
105
+
106
+      (d) If the Work includes a "NOTICE" text file as part of its
107
+          distribution, then any Derivative Works that You distribute must
108
+          include a readable copy of the attribution notices contained
109
+          within such NOTICE file, excluding those notices that do not
110
+          pertain to any part of the Derivative Works, in at least one
111
+          of the following places: within a NOTICE text file distributed
112
+          as part of the Derivative Works; within the Source form or
113
+          documentation, if provided along with the Derivative Works; or,
114
+          within a display generated by the Derivative Works, if and
115
+          wherever such third-party notices normally appear. The contents
116
+          of the NOTICE file are for informational purposes only and
117
+          do not modify the License. You may add Your own attribution
118
+          notices within Derivative Works that You distribute, alongside
119
+          or as an addendum to the NOTICE text from the Work, provided
120
+          that such additional attribution notices cannot be construed
121
+          as modifying the License.
122
+
123
+      You may add Your own copyright statement to Your modifications and
124
+      may provide additional or different license terms and conditions
125
+      for use, reproduction, or distribution of Your modifications, or
126
+      for any such Derivative Works as a whole, provided Your use,
127
+      reproduction, and distribution of the Work otherwise complies with
128
+      the conditions stated in this License.
129
+
130
+   5. Submission of Contributions. Unless You explicitly state otherwise,
131
+      any Contribution intentionally submitted for inclusion in the Work
132
+      by You to the Licensor shall be under the terms and conditions of
133
+      this License, without any additional terms or conditions.
134
+      Notwithstanding the above, nothing herein shall supersede or modify
135
+      the terms of any separate license agreement you may have executed
136
+      with Licensor regarding such Contributions.
137
+
138
+   6. Trademarks. This License does not grant permission to use the trade
139
+      names, trademarks, service marks, or product names of the Licensor,
140
+      except as required for reasonable and customary use in describing the
141
+      origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+   7. Disclaimer of Warranty. Unless required by applicable law or
144
+      agreed to in writing, Licensor provides the Work (and each
145
+      Contributor provides its Contributions) on an "AS IS" BASIS,
146
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+      implied, including, without limitation, any warranties or conditions
148
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+      PARTICULAR PURPOSE. You are solely responsible for determining the
150
+      appropriateness of using or redistributing the Work and assume any
151
+      risks associated with Your exercise of permissions under this License.
152
+
153
+   8. Limitation of Liability. In no event and under no legal theory,
154
+      whether in tort (including negligence), contract, or otherwise,
155
+      unless required by applicable law (such as deliberate and grossly
156
+      negligent acts) or agreed to in writing, shall any Contributor be
157
+      liable to You for damages, including any direct, indirect, special,
158
+      incidental, or consequential damages of any character arising as a
159
+      result of this License or out of the use or inability to use the
160
+      Work (including but not limited to damages for loss of goodwill,
161
+      work stoppage, computer failure or malfunction, or any and all
162
+      other commercial damages or losses), even if such Contributor
163
+      has been advised of the possibility of such damages.
164
+
165
+   9. Accepting Warranty or Additional Liability. While redistributing
166
+      the Work or Derivative Works thereof, You may choose to offer,
167
+      and charge a fee for, acceptance of support, warranty, indemnity,
168
+      or other liability obligations and/or rights consistent with this
169
+      License. However, in accepting such obligations, You may act only
170
+      on Your own behalf and on Your sole responsibility, not on behalf
171
+      of any other Contributor, and only if You agree to indemnify,
172
+      defend, and hold each Contributor harmless for any liability
173
+      incurred by, or claims asserted against, such Contributor by reason
174
+      of your accepting any such warranty or additional liability.
175
+
176
+   END OF TERMS AND CONDITIONS
177
+
178
+   Copyright 2013-2016 Docker, Inc.
179
+
180
+   Licensed under the Apache License, Version 2.0 (the "License");
181
+   you may not use this file except in compliance with the License.
182
+   You may obtain a copy of the License at
183
+
184
+       https://www.apache.org/licenses/LICENSE-2.0
185
+
186
+   Unless required by applicable law or agreed to in writing, software
187
+   distributed under the License is distributed on an "AS IS" BASIS,
188
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189
+   See the License for the specific language governing permissions and
190
+   limitations under the License.
0 191
new file mode 100644
... ...
@@ -0,0 +1,425 @@
0
+Attribution-ShareAlike 4.0 International
1
+
2
+=======================================================================
3
+
4
+Creative Commons Corporation ("Creative Commons") is not a law firm and
5
+does not provide legal services or legal advice. Distribution of
6
+Creative Commons public licenses does not create a lawyer-client or
7
+other relationship. Creative Commons makes its licenses and related
8
+information available on an "as-is" basis. Creative Commons gives no
9
+warranties regarding its licenses, any material licensed under their
10
+terms and conditions, or any related information. Creative Commons
11
+disclaims all liability for damages resulting from their use to the
12
+fullest extent possible.
13
+
14
+Using Creative Commons Public Licenses
15
+
16
+Creative Commons public licenses provide a standard set of terms and
17
+conditions that creators and other rights holders may use to share
18
+original works of authorship and other material subject to copyright
19
+and certain other rights specified in the public license below. The
20
+following considerations are for informational purposes only, are not
21
+exhaustive, and do not form part of our licenses.
22
+
23
+     Considerations for licensors: Our public licenses are
24
+     intended for use by those authorized to give the public
25
+     permission to use material in ways otherwise restricted by
26
+     copyright and certain other rights. Our licenses are
27
+     irrevocable. Licensors should read and understand the terms
28
+     and conditions of the license they choose before applying it.
29
+     Licensors should also secure all rights necessary before
30
+     applying our licenses so that the public can reuse the
31
+     material as expected. Licensors should clearly mark any
32
+     material not subject to the license. This includes other CC-
33
+     licensed material, or material used under an exception or
34
+     limitation to copyright. More considerations for licensors:
35
+	wiki.creativecommons.org/Considerations_for_licensors
36
+
37
+     Considerations for the public: By using one of our public
38
+     licenses, a licensor grants the public permission to use the
39
+     licensed material under specified terms and conditions. If
40
+     the licensor's permission is not necessary for any reason--for
41
+     example, because of any applicable exception or limitation to
42
+     copyright--then that use is not regulated by the license. Our
43
+     licenses grant only permissions under copyright and certain
44
+     other rights that a licensor has authority to grant. Use of
45
+     the licensed material may still be restricted for other
46
+     reasons, including because others have copyright or other
47
+     rights in the material. A licensor may make special requests,
48
+     such as asking that all changes be marked or described.
49
+     Although not required by our licenses, you are encouraged to
50
+     respect those requests where reasonable. More_considerations
51
+     for the public:
52
+	wiki.creativecommons.org/Considerations_for_licensees
53
+
54
+=======================================================================
55
+
56
+Creative Commons Attribution-ShareAlike 4.0 International Public
57
+License
58
+
59
+By exercising the Licensed Rights (defined below), You accept and agree
60
+to be bound by the terms and conditions of this Creative Commons
61
+Attribution-ShareAlike 4.0 International Public License ("Public
62
+License"). To the extent this Public License may be interpreted as a
63
+contract, You are granted the Licensed Rights in consideration of Your
64
+acceptance of these terms and conditions, and the Licensor grants You
65
+such rights in consideration of benefits the Licensor receives from
66
+making the Licensed Material available under these terms and
67
+conditions.
68
+
69
+
70
+Section 1 -- Definitions.
71
+
72
+  a. Adapted Material means material subject to Copyright and Similar
73
+     Rights that is derived from or based upon the Licensed Material
74
+     and in which the Licensed Material is translated, altered,
75
+     arranged, transformed, or otherwise modified in a manner requiring
76
+     permission under the Copyright and Similar Rights held by the
77
+     Licensor. For purposes of this Public License, where the Licensed
78
+     Material is a musical work, performance, or sound recording,
79
+     Adapted Material is always produced where the Licensed Material is
80
+     synched in timed relation with a moving image.
81
+
82
+  b. Adapter's License means the license You apply to Your Copyright
83
+     and Similar Rights in Your contributions to Adapted Material in
84
+     accordance with the terms and conditions of this Public License.
85
+
86
+  c. BY-SA Compatible License means a license listed at
87
+     creativecommons.org/compatiblelicenses, approved by Creative
88
+     Commons as essentially the equivalent of this Public License.
89
+
90
+  d. Copyright and Similar Rights means copyright and/or similar rights
91
+     closely related to copyright including, without limitation,
92
+     performance, broadcast, sound recording, and Sui Generis Database
93
+     Rights, without regard to how the rights are labeled or
94
+     categorized. For purposes of this Public License, the rights
95
+     specified in Section 2(b)(1)-(2) are not Copyright and Similar
96
+     Rights.
97
+
98
+  e. Effective Technological Measures means those measures that, in the
99
+     absence of proper authority, may not be circumvented under laws
100
+     fulfilling obligations under Article 11 of the WIPO Copyright
101
+     Treaty adopted on December 20, 1996, and/or similar international
102
+     agreements.
103
+
104
+  f. Exceptions and Limitations means fair use, fair dealing, and/or
105
+     any other exception or limitation to Copyright and Similar Rights
106
+     that applies to Your use of the Licensed Material.
107
+
108
+  g. License Elements means the license attributes listed in the name
109
+     of a Creative Commons Public License. The License Elements of this
110
+     Public License are Attribution and ShareAlike.
111
+
112
+  h. Licensed Material means the artistic or literary work, database,
113
+     or other material to which the Licensor applied this Public
114
+     License.
115
+
116
+  i. Licensed Rights means the rights granted to You subject to the
117
+     terms and conditions of this Public License, which are limited to
118
+     all Copyright and Similar Rights that apply to Your use of the
119
+     Licensed Material and that the Licensor has authority to license.
120
+
121
+  j. Licensor means the individual(s) or entity(ies) granting rights
122
+     under this Public License.
123
+
124
+  k. Share means to provide material to the public by any means or
125
+     process that requires permission under the Licensed Rights, such
126
+     as reproduction, public display, public performance, distribution,
127
+     dissemination, communication, or importation, and to make material
128
+     available to the public including in ways that members of the
129
+     public may access the material from a place and at a time
130
+     individually chosen by them.
131
+
132
+  l. Sui Generis Database Rights means rights other than copyright
133
+     resulting from Directive 96/9/EC of the European Parliament and of
134
+     the Council of 11 March 1996 on the legal protection of databases,
135
+     as amended and/or succeeded, as well as other essentially
136
+     equivalent rights anywhere in the world.
137
+
138
+  m. You means the individual or entity exercising the Licensed Rights
139
+     under this Public License. Your has a corresponding meaning.
140
+
141
+
142
+Section 2 -- Scope.
143
+
144
+  a. License grant.
145
+
146
+       1. Subject to the terms and conditions of this Public License,
147
+          the Licensor hereby grants You a worldwide, royalty-free,
148
+          non-sublicensable, non-exclusive, irrevocable license to
149
+          exercise the Licensed Rights in the Licensed Material to:
150
+
151
+            a. reproduce and Share the Licensed Material, in whole or
152
+               in part; and
153
+
154
+            b. produce, reproduce, and Share Adapted Material.
155
+
156
+       2. Exceptions and Limitations. For the avoidance of doubt, where
157
+          Exceptions and Limitations apply to Your use, this Public
158
+          License does not apply, and You do not need to comply with
159
+          its terms and conditions.
160
+
161
+       3. Term. The term of this Public License is specified in Section
162
+          6(a).
163
+
164
+       4. Media and formats; technical modifications allowed. The
165
+          Licensor authorizes You to exercise the Licensed Rights in
166
+          all media and formats whether now known or hereafter created,
167
+          and to make technical modifications necessary to do so. The
168
+          Licensor waives and/or agrees not to assert any right or
169
+          authority to forbid You from making technical modifications
170
+          necessary to exercise the Licensed Rights, including
171
+          technical modifications necessary to circumvent Effective
172
+          Technological Measures. For purposes of this Public License,
173
+          simply making modifications authorized by this Section 2(a)
174
+          (4) never produces Adapted Material.
175
+
176
+       5. Downstream recipients.
177
+
178
+            a. Offer from the Licensor -- Licensed Material. Every
179
+               recipient of the Licensed Material automatically
180
+               receives an offer from the Licensor to exercise the
181
+               Licensed Rights under the terms and conditions of this
182
+               Public License.
183
+
184
+            b. Additional offer from the Licensor -- Adapted Material.
185
+               Every recipient of Adapted Material from You
186
+               automatically receives an offer from the Licensor to
187
+               exercise the Licensed Rights in the Adapted Material
188
+               under the conditions of the Adapter's License You apply.
189
+
190
+            c. No downstream restrictions. You may not offer or impose
191
+               any additional or different terms or conditions on, or
192
+               apply any Effective Technological Measures to, the
193
+               Licensed Material if doing so restricts exercise of the
194
+               Licensed Rights by any recipient of the Licensed
195
+               Material.
196
+
197
+       6. No endorsement. Nothing in this Public License constitutes or
198
+          may be construed as permission to assert or imply that You
199
+          are, or that Your use of the Licensed Material is, connected
200
+          with, or sponsored, endorsed, or granted official status by,
201
+          the Licensor or others designated to receive attribution as
202
+          provided in Section 3(a)(1)(A)(i).
203
+
204
+  b. Other rights.
205
+
206
+       1. Moral rights, such as the right of integrity, are not
207
+          licensed under this Public License, nor are publicity,
208
+          privacy, and/or other similar personality rights; however, to
209
+          the extent possible, the Licensor waives and/or agrees not to
210
+          assert any such rights held by the Licensor to the limited
211
+          extent necessary to allow You to exercise the Licensed
212
+          Rights, but not otherwise.
213
+
214
+       2. Patent and trademark rights are not licensed under this
215
+          Public License.
216
+
217
+       3. To the extent possible, the Licensor waives any right to
218
+          collect royalties from You for the exercise of the Licensed
219
+          Rights, whether directly or through a collecting society
220
+          under any voluntary or waivable statutory or compulsory
221
+          licensing scheme. In all other cases the Licensor expressly
222
+          reserves any right to collect such royalties.
223
+
224
+
225
+Section 3 -- License Conditions.
226
+
227
+Your exercise of the Licensed Rights is expressly made subject to the
228
+following conditions.
229
+
230
+  a. Attribution.
231
+
232
+       1. If You Share the Licensed Material (including in modified
233
+          form), You must:
234
+
235
+            a. retain the following if it is supplied by the Licensor
236
+               with the Licensed Material:
237
+
238
+                 i. identification of the creator(s) of the Licensed
239
+                    Material and any others designated to receive
240
+                    attribution, in any reasonable manner requested by
241
+                    the Licensor (including by pseudonym if
242
+                    designated);
243
+
244
+                ii. a copyright notice;
245
+
246
+               iii. a notice that refers to this Public License;
247
+
248
+                iv. a notice that refers to the disclaimer of
249
+                    warranties;
250
+
251
+                 v. a URI or hyperlink to the Licensed Material to the
252
+                    extent reasonably practicable;
253
+
254
+            b. indicate if You modified the Licensed Material and
255
+               retain an indication of any previous modifications; and
256
+
257
+            c. indicate the Licensed Material is licensed under this
258
+               Public License, and include the text of, or the URI or
259
+               hyperlink to, this Public License.
260
+
261
+       2. You may satisfy the conditions in Section 3(a)(1) in any
262
+          reasonable manner based on the medium, means, and context in
263
+          which You Share the Licensed Material. For example, it may be
264
+          reasonable to satisfy the conditions by providing a URI or
265
+          hyperlink to a resource that includes the required
266
+          information.
267
+
268
+       3. If requested by the Licensor, You must remove any of the
269
+          information required by Section 3(a)(1)(A) to the extent
270
+          reasonably practicable.
271
+
272
+  b. ShareAlike.
273
+
274
+     In addition to the conditions in Section 3(a), if You Share
275
+     Adapted Material You produce, the following conditions also apply.
276
+
277
+       1. The Adapter's License You apply must be a Creative Commons
278
+          license with the same License Elements, this version or
279
+          later, or a BY-SA Compatible License.
280
+
281
+       2. You must include the text of, or the URI or hyperlink to, the
282
+          Adapter's License You apply. You may satisfy this condition
283
+          in any reasonable manner based on the medium, means, and
284
+          context in which You Share Adapted Material.
285
+
286
+       3. You may not offer or impose any additional or different terms
287
+          or conditions on, or apply any Effective Technological
288
+          Measures to, Adapted Material that restrict exercise of the
289
+          rights granted under the Adapter's License You apply.
290
+
291
+
292
+Section 4 -- Sui Generis Database Rights.
293
+
294
+Where the Licensed Rights include Sui Generis Database Rights that
295
+apply to Your use of the Licensed Material:
296
+
297
+  a. for the avoidance of doubt, Section 2(a)(1) grants You the right
298
+     to extract, reuse, reproduce, and Share all or a substantial
299
+     portion of the contents of the database;
300
+
301
+  b. if You include all or a substantial portion of the database
302
+     contents in a database in which You have Sui Generis Database
303
+     Rights, then the database in which You have Sui Generis Database
304
+     Rights (but not its individual contents) is Adapted Material,
305
+
306
+     including for purposes of Section 3(b); and
307
+  c. You must comply with the conditions in Section 3(a) if You Share
308
+     all or a substantial portion of the contents of the database.
309
+
310
+For the avoidance of doubt, this Section 4 supplements and does not
311
+replace Your obligations under this Public License where the Licensed
312
+Rights include other Copyright and Similar Rights.
313
+
314
+
315
+Section 5 -- Disclaimer of Warranties and Limitation of Liability.
316
+
317
+  a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
318
+     EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
319
+     AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
320
+     ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
321
+     IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
322
+     WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
323
+     PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
324
+     ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
325
+     KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
326
+     ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
327
+
328
+  b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
329
+     TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
330
+     NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
331
+     INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
332
+     COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
333
+     USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
334
+     ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
335
+     DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
336
+     IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
337
+
338
+  c. The disclaimer of warranties and limitation of liability provided
339
+     above shall be interpreted in a manner that, to the extent
340
+     possible, most closely approximates an absolute disclaimer and
341
+     waiver of all liability.
342
+
343
+
344
+Section 6 -- Term and Termination.
345
+
346
+  a. This Public License applies for the term of the Copyright and
347
+     Similar Rights licensed here. However, if You fail to comply with
348
+     this Public License, then Your rights under this Public License
349
+     terminate automatically.
350
+
351
+  b. Where Your right to use the Licensed Material has terminated under
352
+     Section 6(a), it reinstates:
353
+
354
+       1. automatically as of the date the violation is cured, provided
355
+          it is cured within 30 days of Your discovery of the
356
+          violation; or
357
+
358
+       2. upon express reinstatement by the Licensor.
359
+
360
+     For the avoidance of doubt, this Section 6(b) does not affect any
361
+     right the Licensor may have to seek remedies for Your violations
362
+     of this Public License.
363
+
364
+  c. For the avoidance of doubt, the Licensor may also offer the
365
+     Licensed Material under separate terms or conditions or stop
366
+     distributing the Licensed Material at any time; however, doing so
367
+     will not terminate this Public License.
368
+
369
+  d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
370
+     License.
371
+
372
+
373
+Section 7 -- Other Terms and Conditions.
374
+
375
+  a. The Licensor shall not be bound by any additional or different
376
+     terms or conditions communicated by You unless expressly agreed.
377
+
378
+  b. Any arrangements, understandings, or agreements regarding the
379
+     Licensed Material not stated herein are separate from and
380
+     independent of the terms and conditions of this Public License.
381
+
382
+
383
+Section 8 -- Interpretation.
384
+
385
+  a. For the avoidance of doubt, this Public License does not, and
386
+     shall not be interpreted to, reduce, limit, restrict, or impose
387
+     conditions on any use of the Licensed Material that could lawfully
388
+     be made without permission under this Public License.
389
+
390
+  b. To the extent possible, if any provision of this Public License is
391
+     deemed unenforceable, it shall be automatically reformed to the
392
+     minimum extent necessary to make it enforceable. If the provision
393
+     cannot be reformed, it shall be severed from this Public License
394
+     without affecting the enforceability of the remaining terms and
395
+     conditions.
396
+
397
+  c. No term or condition of this Public License will be waived and no
398
+     failure to comply consented to unless expressly agreed to by the
399
+     Licensor.
400
+
401
+  d. Nothing in this Public License constitutes or may be interpreted
402
+     as a limitation upon, or waiver of, any privileges and immunities
403
+     that apply to the Licensor or You, including from the legal
404
+     processes of any jurisdiction or authority.
405
+
406
+
407
+=======================================================================
408
+
409
+Creative Commons is not a party to its public licenses.
410
+Notwithstanding, Creative Commons may elect to apply one of its public
411
+licenses to material it publishes and in those instances will be
412
+considered the "Licensor." Except for the limited purpose of indicating
413
+that material is shared under a Creative Commons public license or as
414
+otherwise permitted by the Creative Commons policies published at
415
+creativecommons.org/policies, Creative Commons does not authorize the
416
+use of the trademark "Creative Commons" or any other trademark or logo
417
+of Creative Commons without its prior written consent including,
418
+without limitation, in connection with any unauthorized modifications
419
+to any of its public licenses or any other arrangements,
420
+understandings, or agreements concerning use of licensed material. For
421
+the avoidance of doubt, this paragraph does not form part of the public
422
+licenses.
423
+
424
+Creative Commons may be contacted at creativecommons.org.
0 425
new file mode 100644
... ...
@@ -0,0 +1,16 @@
0
+Docker
1
+Copyright 2012-2015 Docker, Inc.
2
+
3
+This product includes software developed at Docker, Inc. (https://www.docker.com).
4
+
5
+The following is courtesy of our legal counsel:
6
+
7
+
8
+Use and transfer of Docker may be subject to certain restrictions by the
9
+United States and other governments.
10
+It is your responsibility to ensure that your use and/or transfer does not
11
+violate applicable laws.
12
+
13
+For more information, please see https://www.bis.doc.gov
14
+
15
+See also https://www.apache.org/dev/crypto.html and/or seek legal counsel.
0 16
new file mode 100644
... ...
@@ -0,0 +1,72 @@
0
+# containerd
1
+
2
+containerd is a daemon to control runC, built for performance and density. 
3
+containerd leverages runC's advanced features such as seccomp and user namespace support as well
4
+as checkpoint and restore for cloning and live migration of containers.
5
+
6
+## Getting started
7
+
8
+The easiest way to start using containerd is to download binaries from the [releases page](https://github.com/containerd/containerd/releases).
9
+
10
+The included `ctr` command-line tool allows you interact with the containerd daemon:
11
+
12
+```
13
+$ sudo ctr containers start redis /containers/redis
14
+$ sudo ctr containers list
15
+ID                  PATH                STATUS              PROCESSES
16
+redis               /containers/redis   running             14063
17
+```
18
+
19
+`/containers/redis` is the path to an OCI bundle. [See the docs for more information.](docs/bundle.md)
20
+
21
+## Docs
22
+
23
+ * [Client CLI reference (`ctr`)](docs/cli.md)
24
+ * [Daemon CLI reference (`containerd`)](docs/daemon.md)
25
+ * [Creating OCI bundles](docs/bundle.md)
26
+ * [containerd changes to the bundle](docs/bundle-changes.md)
27
+ * [Attaching to STDIO or TTY](docs/attach.md)
28
+ * [Telemetry and metrics](docs/telemetry.md)
29
+
30
+All documentation is contained in the `/docs` directory in this repository.
31
+
32
+## Building
33
+
34
+You will need to make sure that you have Go installed on your system and the containerd repository is cloned
35
+in your `$GOPATH`.  You will also need to make sure that you have all the dependencies cloned as well.
36
+Currently, contributing to containerd is not for the first time devs as many dependencies are not vendored and 
37
+work is being completed at a high rate.  
38
+
39
+After that just run `make` and the binaries for the daemon and client will be localed in the `bin/` directory.
40
+
41
+## Performance
42
+
43
+Starting 1000 containers concurrently runs at 126-140 containers per second.
44
+
45
+Overall start times:
46
+
47
+```
48
+[containerd] 2015/12/04 15:00:54   count:        1000
49
+[containerd] 2015/12/04 14:59:54   min:          23ms
50
+[containerd] 2015/12/04 14:59:54   max:         355ms
51
+[containerd] 2015/12/04 14:59:54   mean:         78ms
52
+[containerd] 2015/12/04 14:59:54   stddev:       34ms
53
+[containerd] 2015/12/04 14:59:54   median:       73ms
54
+[containerd] 2015/12/04 14:59:54   75%:          91ms
55
+[containerd] 2015/12/04 14:59:54   95%:         123ms
56
+[containerd] 2015/12/04 14:59:54   99%:         287ms
57
+[containerd] 2015/12/04 14:59:54   99.9%:       355ms
58
+```
59
+
60
+## Roadmap
61
+
62
+The current roadmap and milestones for alpha and beta completion are in the github issues on this repository.  Please refer to these issues for what is being worked on and completed for the various stages of development.
63
+
64
+## Copyright and license
65
+
66
+Copyright © 2016 Docker, Inc. All rights reserved, except as follows. Code
67
+is released under the Apache 2.0 license. The README.md file, and files in the
68
+"docs" folder are licensed under the Creative Commons Attribution 4.0
69
+International License under the terms and conditions set forth in the file
70
+"LICENSE.docs". You may obtain a duplicate copy of the same license, titled
71
+CC-BY-SA-4.0, at http://creativecommons.org/licenses/by/4.0/.
0 72
new file mode 100644
... ...
@@ -0,0 +1,2584 @@
0
+// Code generated by protoc-gen-go.
1
+// source: api.proto
2
+// DO NOT EDIT!
3
+
4
+/*
5
+Package types is a generated protocol buffer package.
6
+
7
+It is generated from these files:
8
+	api.proto
9
+
10
+It has these top-level messages:
11
+	GetServerVersionRequest
12
+	GetServerVersionResponse
13
+	UpdateProcessRequest
14
+	UpdateProcessResponse
15
+	CreateContainerRequest
16
+	CreateContainerResponse
17
+	SignalRequest
18
+	SignalResponse
19
+	AddProcessRequest
20
+	Rlimit
21
+	User
22
+	AddProcessResponse
23
+	CreateCheckpointRequest
24
+	CreateCheckpointResponse
25
+	DeleteCheckpointRequest
26
+	DeleteCheckpointResponse
27
+	ListCheckpointRequest
28
+	Checkpoint
29
+	ListCheckpointResponse
30
+	StateRequest
31
+	ContainerState
32
+	Process
33
+	Container
34
+	Machine
35
+	StateResponse
36
+	UpdateContainerRequest
37
+	UpdateResource
38
+	BlockIODevice
39
+	WeightDevice
40
+	ThrottleDevice
41
+	UpdateContainerResponse
42
+	EventsRequest
43
+	Event
44
+	NetworkStats
45
+	CpuUsage
46
+	ThrottlingData
47
+	CpuStats
48
+	PidsStats
49
+	MemoryData
50
+	MemoryStats
51
+	BlkioStatsEntry
52
+	BlkioStats
53
+	HugetlbStats
54
+	CgroupStats
55
+	StatsResponse
56
+	StatsRequest
57
+*/
58
+package types
59
+
60
+import proto "github.com/golang/protobuf/proto"
61
+import fmt "fmt"
62
+import math "math"
63
+import google_protobuf "github.com/golang/protobuf/ptypes/timestamp"
64
+
65
+import (
66
+	context "golang.org/x/net/context"
67
+	grpc "google.golang.org/grpc"
68
+)
69
+
70
+// Reference imports to suppress errors if they are not otherwise used.
71
+var _ = proto.Marshal
72
+var _ = fmt.Errorf
73
+var _ = math.Inf
74
+
75
+// This is a compile-time assertion to ensure that this generated file
76
+// is compatible with the proto package it is being compiled against.
77
+// A compilation error at this line likely means your copy of the
78
+// proto package needs to be updated.
79
+const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
80
+
81
+type GetServerVersionRequest struct {
82
+}
83
+
84
+func (m *GetServerVersionRequest) Reset()                    { *m = GetServerVersionRequest{} }
85
+func (m *GetServerVersionRequest) String() string            { return proto.CompactTextString(m) }
86
+func (*GetServerVersionRequest) ProtoMessage()               {}
87
+func (*GetServerVersionRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
88
+
89
+type GetServerVersionResponse struct {
90
+	Major    uint32 `protobuf:"varint,1,opt,name=major" json:"major,omitempty"`
91
+	Minor    uint32 `protobuf:"varint,2,opt,name=minor" json:"minor,omitempty"`
92
+	Patch    uint32 `protobuf:"varint,3,opt,name=patch" json:"patch,omitempty"`
93
+	Revision string `protobuf:"bytes,4,opt,name=revision" json:"revision,omitempty"`
94
+}
95
+
96
+func (m *GetServerVersionResponse) Reset()                    { *m = GetServerVersionResponse{} }
97
+func (m *GetServerVersionResponse) String() string            { return proto.CompactTextString(m) }
98
+func (*GetServerVersionResponse) ProtoMessage()               {}
99
+func (*GetServerVersionResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
100
+
101
+func (m *GetServerVersionResponse) GetMajor() uint32 {
102
+	if m != nil {
103
+		return m.Major
104
+	}
105
+	return 0
106
+}
107
+
108
+func (m *GetServerVersionResponse) GetMinor() uint32 {
109
+	if m != nil {
110
+		return m.Minor
111
+	}
112
+	return 0
113
+}
114
+
115
+func (m *GetServerVersionResponse) GetPatch() uint32 {
116
+	if m != nil {
117
+		return m.Patch
118
+	}
119
+	return 0
120
+}
121
+
122
+func (m *GetServerVersionResponse) GetRevision() string {
123
+	if m != nil {
124
+		return m.Revision
125
+	}
126
+	return ""
127
+}
128
+
129
+type UpdateProcessRequest struct {
130
+	Id         string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
131
+	Pid        string `protobuf:"bytes,2,opt,name=pid" json:"pid,omitempty"`
132
+	CloseStdin bool   `protobuf:"varint,3,opt,name=closeStdin" json:"closeStdin,omitempty"`
133
+	Width      uint32 `protobuf:"varint,4,opt,name=width" json:"width,omitempty"`
134
+	Height     uint32 `protobuf:"varint,5,opt,name=height" json:"height,omitempty"`
135
+}
136
+
137
+func (m *UpdateProcessRequest) Reset()                    { *m = UpdateProcessRequest{} }
138
+func (m *UpdateProcessRequest) String() string            { return proto.CompactTextString(m) }
139
+func (*UpdateProcessRequest) ProtoMessage()               {}
140
+func (*UpdateProcessRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
141
+
142
+func (m *UpdateProcessRequest) GetId() string {
143
+	if m != nil {
144
+		return m.Id
145
+	}
146
+	return ""
147
+}
148
+
149
+func (m *UpdateProcessRequest) GetPid() string {
150
+	if m != nil {
151
+		return m.Pid
152
+	}
153
+	return ""
154
+}
155
+
156
+func (m *UpdateProcessRequest) GetCloseStdin() bool {
157
+	if m != nil {
158
+		return m.CloseStdin
159
+	}
160
+	return false
161
+}
162
+
163
+func (m *UpdateProcessRequest) GetWidth() uint32 {
164
+	if m != nil {
165
+		return m.Width
166
+	}
167
+	return 0
168
+}
169
+
170
+func (m *UpdateProcessRequest) GetHeight() uint32 {
171
+	if m != nil {
172
+		return m.Height
173
+	}
174
+	return 0
175
+}
176
+
177
+type UpdateProcessResponse struct {
178
+}
179
+
180
+func (m *UpdateProcessResponse) Reset()                    { *m = UpdateProcessResponse{} }
181
+func (m *UpdateProcessResponse) String() string            { return proto.CompactTextString(m) }
182
+func (*UpdateProcessResponse) ProtoMessage()               {}
183
+func (*UpdateProcessResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
184
+
185
+type CreateContainerRequest struct {
186
+	Id            string   `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
187
+	BundlePath    string   `protobuf:"bytes,2,opt,name=bundlePath" json:"bundlePath,omitempty"`
188
+	Checkpoint    string   `protobuf:"bytes,3,opt,name=checkpoint" json:"checkpoint,omitempty"`
189
+	Stdin         string   `protobuf:"bytes,4,opt,name=stdin" json:"stdin,omitempty"`
190
+	Stdout        string   `protobuf:"bytes,5,opt,name=stdout" json:"stdout,omitempty"`
191
+	Stderr        string   `protobuf:"bytes,6,opt,name=stderr" json:"stderr,omitempty"`
192
+	Labels        []string `protobuf:"bytes,7,rep,name=labels" json:"labels,omitempty"`
193
+	NoPivotRoot   bool     `protobuf:"varint,8,opt,name=noPivotRoot" json:"noPivotRoot,omitempty"`
194
+	Runtime       string   `protobuf:"bytes,9,opt,name=runtime" json:"runtime,omitempty"`
195
+	RuntimeArgs   []string `protobuf:"bytes,10,rep,name=runtimeArgs" json:"runtimeArgs,omitempty"`
196
+	CheckpointDir string   `protobuf:"bytes,11,opt,name=checkpointDir" json:"checkpointDir,omitempty"`
197
+}
198
+
199
+func (m *CreateContainerRequest) Reset()                    { *m = CreateContainerRequest{} }
200
+func (m *CreateContainerRequest) String() string            { return proto.CompactTextString(m) }
201
+func (*CreateContainerRequest) ProtoMessage()               {}
202
+func (*CreateContainerRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
203
+
204
+func (m *CreateContainerRequest) GetId() string {
205
+	if m != nil {
206
+		return m.Id
207
+	}
208
+	return ""
209
+}
210
+
211
+func (m *CreateContainerRequest) GetBundlePath() string {
212
+	if m != nil {
213
+		return m.BundlePath
214
+	}
215
+	return ""
216
+}
217
+
218
+func (m *CreateContainerRequest) GetCheckpoint() string {
219
+	if m != nil {
220
+		return m.Checkpoint
221
+	}
222
+	return ""
223
+}
224
+
225
+func (m *CreateContainerRequest) GetStdin() string {
226
+	if m != nil {
227
+		return m.Stdin
228
+	}
229
+	return ""
230
+}
231
+
232
+func (m *CreateContainerRequest) GetStdout() string {
233
+	if m != nil {
234
+		return m.Stdout
235
+	}
236
+	return ""
237
+}
238
+
239
+func (m *CreateContainerRequest) GetStderr() string {
240
+	if m != nil {
241
+		return m.Stderr
242
+	}
243
+	return ""
244
+}
245
+
246
+func (m *CreateContainerRequest) GetLabels() []string {
247
+	if m != nil {
248
+		return m.Labels
249
+	}
250
+	return nil
251
+}
252
+
253
+func (m *CreateContainerRequest) GetNoPivotRoot() bool {
254
+	if m != nil {
255
+		return m.NoPivotRoot
256
+	}
257
+	return false
258
+}
259
+
260
+func (m *CreateContainerRequest) GetRuntime() string {
261
+	if m != nil {
262
+		return m.Runtime
263
+	}
264
+	return ""
265
+}
266
+
267
+func (m *CreateContainerRequest) GetRuntimeArgs() []string {
268
+	if m != nil {
269
+		return m.RuntimeArgs
270
+	}
271
+	return nil
272
+}
273
+
274
+func (m *CreateContainerRequest) GetCheckpointDir() string {
275
+	if m != nil {
276
+		return m.CheckpointDir
277
+	}
278
+	return ""
279
+}
280
+
281
+type CreateContainerResponse struct {
282
+	Container *Container `protobuf:"bytes,1,opt,name=container" json:"container,omitempty"`
283
+}
284
+
285
+func (m *CreateContainerResponse) Reset()                    { *m = CreateContainerResponse{} }
286
+func (m *CreateContainerResponse) String() string            { return proto.CompactTextString(m) }
287
+func (*CreateContainerResponse) ProtoMessage()               {}
288
+func (*CreateContainerResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
289
+
290
+func (m *CreateContainerResponse) GetContainer() *Container {
291
+	if m != nil {
292
+		return m.Container
293
+	}
294
+	return nil
295
+}
296
+
297
+type SignalRequest struct {
298
+	Id     string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
299
+	Pid    string `protobuf:"bytes,2,opt,name=pid" json:"pid,omitempty"`
300
+	Signal uint32 `protobuf:"varint,3,opt,name=signal" json:"signal,omitempty"`
301
+}
302
+
303
+func (m *SignalRequest) Reset()                    { *m = SignalRequest{} }
304
+func (m *SignalRequest) String() string            { return proto.CompactTextString(m) }
305
+func (*SignalRequest) ProtoMessage()               {}
306
+func (*SignalRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
307
+
308
+func (m *SignalRequest) GetId() string {
309
+	if m != nil {
310
+		return m.Id
311
+	}
312
+	return ""
313
+}
314
+
315
+func (m *SignalRequest) GetPid() string {
316
+	if m != nil {
317
+		return m.Pid
318
+	}
319
+	return ""
320
+}
321
+
322
+func (m *SignalRequest) GetSignal() uint32 {
323
+	if m != nil {
324
+		return m.Signal
325
+	}
326
+	return 0
327
+}
328
+
329
+type SignalResponse struct {
330
+}
331
+
332
+func (m *SignalResponse) Reset()                    { *m = SignalResponse{} }
333
+func (m *SignalResponse) String() string            { return proto.CompactTextString(m) }
334
+func (*SignalResponse) ProtoMessage()               {}
335
+func (*SignalResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
336
+
337
+type AddProcessRequest struct {
338
+	Id              string    `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
339
+	Terminal        bool      `protobuf:"varint,2,opt,name=terminal" json:"terminal,omitempty"`
340
+	User            *User     `protobuf:"bytes,3,opt,name=user" json:"user,omitempty"`
341
+	Args            []string  `protobuf:"bytes,4,rep,name=args" json:"args,omitempty"`
342
+	Env             []string  `protobuf:"bytes,5,rep,name=env" json:"env,omitempty"`
343
+	Cwd             string    `protobuf:"bytes,6,opt,name=cwd" json:"cwd,omitempty"`
344
+	Pid             string    `protobuf:"bytes,7,opt,name=pid" json:"pid,omitempty"`
345
+	Stdin           string    `protobuf:"bytes,8,opt,name=stdin" json:"stdin,omitempty"`
346
+	Stdout          string    `protobuf:"bytes,9,opt,name=stdout" json:"stdout,omitempty"`
347
+	Stderr          string    `protobuf:"bytes,10,opt,name=stderr" json:"stderr,omitempty"`
348
+	Capabilities    []string  `protobuf:"bytes,11,rep,name=capabilities" json:"capabilities,omitempty"`
349
+	ApparmorProfile string    `protobuf:"bytes,12,opt,name=apparmorProfile" json:"apparmorProfile,omitempty"`
350
+	SelinuxLabel    string    `protobuf:"bytes,13,opt,name=selinuxLabel" json:"selinuxLabel,omitempty"`
351
+	NoNewPrivileges bool      `protobuf:"varint,14,opt,name=noNewPrivileges" json:"noNewPrivileges,omitempty"`
352
+	Rlimits         []*Rlimit `protobuf:"bytes,15,rep,name=rlimits" json:"rlimits,omitempty"`
353
+}
354
+
355
+func (m *AddProcessRequest) Reset()                    { *m = AddProcessRequest{} }
356
+func (m *AddProcessRequest) String() string            { return proto.CompactTextString(m) }
357
+func (*AddProcessRequest) ProtoMessage()               {}
358
+func (*AddProcessRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
359
+
360
+func (m *AddProcessRequest) GetId() string {
361
+	if m != nil {
362
+		return m.Id
363
+	}
364
+	return ""
365
+}
366
+
367
+func (m *AddProcessRequest) GetTerminal() bool {
368
+	if m != nil {
369
+		return m.Terminal
370
+	}
371
+	return false
372
+}
373
+
374
+func (m *AddProcessRequest) GetUser() *User {
375
+	if m != nil {
376
+		return m.User
377
+	}
378
+	return nil
379
+}
380
+
381
+func (m *AddProcessRequest) GetArgs() []string {
382
+	if m != nil {
383
+		return m.Args
384
+	}
385
+	return nil
386
+}
387
+
388
+func (m *AddProcessRequest) GetEnv() []string {
389
+	if m != nil {
390
+		return m.Env
391
+	}
392
+	return nil
393
+}
394
+
395
+func (m *AddProcessRequest) GetCwd() string {
396
+	if m != nil {
397
+		return m.Cwd
398
+	}
399
+	return ""
400
+}
401
+
402
+func (m *AddProcessRequest) GetPid() string {
403
+	if m != nil {
404
+		return m.Pid
405
+	}
406
+	return ""
407
+}
408
+
409
+func (m *AddProcessRequest) GetStdin() string {
410
+	if m != nil {
411
+		return m.Stdin
412
+	}
413
+	return ""
414
+}
415
+
416
+func (m *AddProcessRequest) GetStdout() string {
417
+	if m != nil {
418
+		return m.Stdout
419
+	}
420
+	return ""
421
+}
422
+
423
+func (m *AddProcessRequest) GetStderr() string {
424
+	if m != nil {
425
+		return m.Stderr
426
+	}
427
+	return ""
428
+}
429
+
430
+func (m *AddProcessRequest) GetCapabilities() []string {
431
+	if m != nil {
432
+		return m.Capabilities
433
+	}
434
+	return nil
435
+}
436
+
437
+func (m *AddProcessRequest) GetApparmorProfile() string {
438
+	if m != nil {
439
+		return m.ApparmorProfile
440
+	}
441
+	return ""
442
+}
443
+
444
+func (m *AddProcessRequest) GetSelinuxLabel() string {
445
+	if m != nil {
446
+		return m.SelinuxLabel
447
+	}
448
+	return ""
449
+}
450
+
451
+func (m *AddProcessRequest) GetNoNewPrivileges() bool {
452
+	if m != nil {
453
+		return m.NoNewPrivileges
454
+	}
455
+	return false
456
+}
457
+
458
+func (m *AddProcessRequest) GetRlimits() []*Rlimit {
459
+	if m != nil {
460
+		return m.Rlimits
461
+	}
462
+	return nil
463
+}
464
+
465
+type Rlimit struct {
466
+	Type string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"`
467
+	Soft uint64 `protobuf:"varint,2,opt,name=soft" json:"soft,omitempty"`
468
+	Hard uint64 `protobuf:"varint,3,opt,name=hard" json:"hard,omitempty"`
469
+}
470
+
471
+func (m *Rlimit) Reset()                    { *m = Rlimit{} }
472
+func (m *Rlimit) String() string            { return proto.CompactTextString(m) }
473
+func (*Rlimit) ProtoMessage()               {}
474
+func (*Rlimit) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
475
+
476
+func (m *Rlimit) GetType() string {
477
+	if m != nil {
478
+		return m.Type
479
+	}
480
+	return ""
481
+}
482
+
483
+func (m *Rlimit) GetSoft() uint64 {
484
+	if m != nil {
485
+		return m.Soft
486
+	}
487
+	return 0
488
+}
489
+
490
+func (m *Rlimit) GetHard() uint64 {
491
+	if m != nil {
492
+		return m.Hard
493
+	}
494
+	return 0
495
+}
496
+
497
+type User struct {
498
+	Uid            uint32   `protobuf:"varint,1,opt,name=uid" json:"uid,omitempty"`
499
+	Gid            uint32   `protobuf:"varint,2,opt,name=gid" json:"gid,omitempty"`
500
+	AdditionalGids []uint32 `protobuf:"varint,3,rep,packed,name=additionalGids" json:"additionalGids,omitempty"`
501
+}
502
+
503
+func (m *User) Reset()                    { *m = User{} }
504
+func (m *User) String() string            { return proto.CompactTextString(m) }
505
+func (*User) ProtoMessage()               {}
506
+func (*User) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} }
507
+
508
+func (m *User) GetUid() uint32 {
509
+	if m != nil {
510
+		return m.Uid
511
+	}
512
+	return 0
513
+}
514
+
515
+func (m *User) GetGid() uint32 {
516
+	if m != nil {
517
+		return m.Gid
518
+	}
519
+	return 0
520
+}
521
+
522
+func (m *User) GetAdditionalGids() []uint32 {
523
+	if m != nil {
524
+		return m.AdditionalGids
525
+	}
526
+	return nil
527
+}
528
+
529
+type AddProcessResponse struct {
530
+	SystemPid uint32 `protobuf:"varint,1,opt,name=systemPid" json:"systemPid,omitempty"`
531
+}
532
+
533
+func (m *AddProcessResponse) Reset()                    { *m = AddProcessResponse{} }
534
+func (m *AddProcessResponse) String() string            { return proto.CompactTextString(m) }
535
+func (*AddProcessResponse) ProtoMessage()               {}
536
+func (*AddProcessResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} }
537
+
538
+func (m *AddProcessResponse) GetSystemPid() uint32 {
539
+	if m != nil {
540
+		return m.SystemPid
541
+	}
542
+	return 0
543
+}
544
+
545
+type CreateCheckpointRequest struct {
546
+	Id            string      `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
547
+	Checkpoint    *Checkpoint `protobuf:"bytes,2,opt,name=checkpoint" json:"checkpoint,omitempty"`
548
+	CheckpointDir string      `protobuf:"bytes,3,opt,name=checkpointDir" json:"checkpointDir,omitempty"`
549
+}
550
+
551
+func (m *CreateCheckpointRequest) Reset()                    { *m = CreateCheckpointRequest{} }
552
+func (m *CreateCheckpointRequest) String() string            { return proto.CompactTextString(m) }
553
+func (*CreateCheckpointRequest) ProtoMessage()               {}
554
+func (*CreateCheckpointRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} }
555
+
556
+func (m *CreateCheckpointRequest) GetId() string {
557
+	if m != nil {
558
+		return m.Id
559
+	}
560
+	return ""
561
+}
562
+
563
+func (m *CreateCheckpointRequest) GetCheckpoint() *Checkpoint {
564
+	if m != nil {
565
+		return m.Checkpoint
566
+	}
567
+	return nil
568
+}
569
+
570
+func (m *CreateCheckpointRequest) GetCheckpointDir() string {
571
+	if m != nil {
572
+		return m.CheckpointDir
573
+	}
574
+	return ""
575
+}
576
+
577
+type CreateCheckpointResponse struct {
578
+}
579
+
580
+func (m *CreateCheckpointResponse) Reset()                    { *m = CreateCheckpointResponse{} }
581
+func (m *CreateCheckpointResponse) String() string            { return proto.CompactTextString(m) }
582
+func (*CreateCheckpointResponse) ProtoMessage()               {}
583
+func (*CreateCheckpointResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} }
584
+
585
+type DeleteCheckpointRequest struct {
586
+	Id            string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
587
+	Name          string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
588
+	CheckpointDir string `protobuf:"bytes,3,opt,name=checkpointDir" json:"checkpointDir,omitempty"`
589
+}
590
+
591
+func (m *DeleteCheckpointRequest) Reset()                    { *m = DeleteCheckpointRequest{} }
592
+func (m *DeleteCheckpointRequest) String() string            { return proto.CompactTextString(m) }
593
+func (*DeleteCheckpointRequest) ProtoMessage()               {}
594
+func (*DeleteCheckpointRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} }
595
+
596
+func (m *DeleteCheckpointRequest) GetId() string {
597
+	if m != nil {
598
+		return m.Id
599
+	}
600
+	return ""
601
+}
602
+
603
+func (m *DeleteCheckpointRequest) GetName() string {
604
+	if m != nil {
605
+		return m.Name
606
+	}
607
+	return ""
608
+}
609
+
610
+func (m *DeleteCheckpointRequest) GetCheckpointDir() string {
611
+	if m != nil {
612
+		return m.CheckpointDir
613
+	}
614
+	return ""
615
+}
616
+
617
+type DeleteCheckpointResponse struct {
618
+}
619
+
620
+func (m *DeleteCheckpointResponse) Reset()                    { *m = DeleteCheckpointResponse{} }
621
+func (m *DeleteCheckpointResponse) String() string            { return proto.CompactTextString(m) }
622
+func (*DeleteCheckpointResponse) ProtoMessage()               {}
623
+func (*DeleteCheckpointResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} }
624
+
625
+type ListCheckpointRequest struct {
626
+	Id            string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
627
+	CheckpointDir string `protobuf:"bytes,2,opt,name=checkpointDir" json:"checkpointDir,omitempty"`
628
+}
629
+
630
+func (m *ListCheckpointRequest) Reset()                    { *m = ListCheckpointRequest{} }
631
+func (m *ListCheckpointRequest) String() string            { return proto.CompactTextString(m) }
632
+func (*ListCheckpointRequest) ProtoMessage()               {}
633
+func (*ListCheckpointRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} }
634
+
635
+func (m *ListCheckpointRequest) GetId() string {
636
+	if m != nil {
637
+		return m.Id
638
+	}
639
+	return ""
640
+}
641
+
642
+func (m *ListCheckpointRequest) GetCheckpointDir() string {
643
+	if m != nil {
644
+		return m.CheckpointDir
645
+	}
646
+	return ""
647
+}
648
+
649
+type Checkpoint struct {
650
+	Name        string   `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
651
+	Exit        bool     `protobuf:"varint,2,opt,name=exit" json:"exit,omitempty"`
652
+	Tcp         bool     `protobuf:"varint,3,opt,name=tcp" json:"tcp,omitempty"`
653
+	UnixSockets bool     `protobuf:"varint,4,opt,name=unixSockets" json:"unixSockets,omitempty"`
654
+	Shell       bool     `protobuf:"varint,5,opt,name=shell" json:"shell,omitempty"`
655
+	EmptyNS     []string `protobuf:"bytes,6,rep,name=emptyNS" json:"emptyNS,omitempty"`
656
+}
657
+
658
+func (m *Checkpoint) Reset()                    { *m = Checkpoint{} }
659
+func (m *Checkpoint) String() string            { return proto.CompactTextString(m) }
660
+func (*Checkpoint) ProtoMessage()               {}
661
+func (*Checkpoint) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} }
662
+
663
+func (m *Checkpoint) GetName() string {
664
+	if m != nil {
665
+		return m.Name
666
+	}
667
+	return ""
668
+}
669
+
670
+func (m *Checkpoint) GetExit() bool {
671
+	if m != nil {
672
+		return m.Exit
673
+	}
674
+	return false
675
+}
676
+
677
+func (m *Checkpoint) GetTcp() bool {
678
+	if m != nil {
679
+		return m.Tcp
680
+	}
681
+	return false
682
+}
683
+
684
+func (m *Checkpoint) GetUnixSockets() bool {
685
+	if m != nil {
686
+		return m.UnixSockets
687
+	}
688
+	return false
689
+}
690
+
691
+func (m *Checkpoint) GetShell() bool {
692
+	if m != nil {
693
+		return m.Shell
694
+	}
695
+	return false
696
+}
697
+
698
+func (m *Checkpoint) GetEmptyNS() []string {
699
+	if m != nil {
700
+		return m.EmptyNS
701
+	}
702
+	return nil
703
+}
704
+
705
+type ListCheckpointResponse struct {
706
+	Checkpoints []*Checkpoint `protobuf:"bytes,1,rep,name=checkpoints" json:"checkpoints,omitempty"`
707
+}
708
+
709
+func (m *ListCheckpointResponse) Reset()                    { *m = ListCheckpointResponse{} }
710
+func (m *ListCheckpointResponse) String() string            { return proto.CompactTextString(m) }
711
+func (*ListCheckpointResponse) ProtoMessage()               {}
712
+func (*ListCheckpointResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} }
713
+
714
+func (m *ListCheckpointResponse) GetCheckpoints() []*Checkpoint {
715
+	if m != nil {
716
+		return m.Checkpoints
717
+	}
718
+	return nil
719
+}
720
+
721
+type StateRequest struct {
722
+	Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
723
+}
724
+
725
+func (m *StateRequest) Reset()                    { *m = StateRequest{} }
726
+func (m *StateRequest) String() string            { return proto.CompactTextString(m) }
727
+func (*StateRequest) ProtoMessage()               {}
728
+func (*StateRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19} }
729
+
730
+func (m *StateRequest) GetId() string {
731
+	if m != nil {
732
+		return m.Id
733
+	}
734
+	return ""
735
+}
736
+
737
+type ContainerState struct {
738
+	Status string `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
739
+}
740
+
741
+func (m *ContainerState) Reset()                    { *m = ContainerState{} }
742
+func (m *ContainerState) String() string            { return proto.CompactTextString(m) }
743
+func (*ContainerState) ProtoMessage()               {}
744
+func (*ContainerState) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{20} }
745
+
746
+func (m *ContainerState) GetStatus() string {
747
+	if m != nil {
748
+		return m.Status
749
+	}
750
+	return ""
751
+}
752
+
753
+type Process struct {
754
+	Pid             string    `protobuf:"bytes,1,opt,name=pid" json:"pid,omitempty"`
755
+	Terminal        bool      `protobuf:"varint,2,opt,name=terminal" json:"terminal,omitempty"`
756
+	User            *User     `protobuf:"bytes,3,opt,name=user" json:"user,omitempty"`
757
+	Args            []string  `protobuf:"bytes,4,rep,name=args" json:"args,omitempty"`
758
+	Env             []string  `protobuf:"bytes,5,rep,name=env" json:"env,omitempty"`
759
+	Cwd             string    `protobuf:"bytes,6,opt,name=cwd" json:"cwd,omitempty"`
760
+	SystemPid       uint32    `protobuf:"varint,7,opt,name=systemPid" json:"systemPid,omitempty"`
761
+	Stdin           string    `protobuf:"bytes,8,opt,name=stdin" json:"stdin,omitempty"`
762
+	Stdout          string    `protobuf:"bytes,9,opt,name=stdout" json:"stdout,omitempty"`
763
+	Stderr          string    `protobuf:"bytes,10,opt,name=stderr" json:"stderr,omitempty"`
764
+	Capabilities    []string  `protobuf:"bytes,11,rep,name=capabilities" json:"capabilities,omitempty"`
765
+	ApparmorProfile string    `protobuf:"bytes,12,opt,name=apparmorProfile" json:"apparmorProfile,omitempty"`
766
+	SelinuxLabel    string    `protobuf:"bytes,13,opt,name=selinuxLabel" json:"selinuxLabel,omitempty"`
767
+	NoNewPrivileges bool      `protobuf:"varint,14,opt,name=noNewPrivileges" json:"noNewPrivileges,omitempty"`
768
+	Rlimits         []*Rlimit `protobuf:"bytes,15,rep,name=rlimits" json:"rlimits,omitempty"`
769
+}
770
+
771
+func (m *Process) Reset()                    { *m = Process{} }
772
+func (m *Process) String() string            { return proto.CompactTextString(m) }
773
+func (*Process) ProtoMessage()               {}
774
+func (*Process) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{21} }
775
+
776
+func (m *Process) GetPid() string {
777
+	if m != nil {
778
+		return m.Pid
779
+	}
780
+	return ""
781
+}
782
+
783
+func (m *Process) GetTerminal() bool {
784
+	if m != nil {
785
+		return m.Terminal
786
+	}
787
+	return false
788
+}
789
+
790
+func (m *Process) GetUser() *User {
791
+	if m != nil {
792
+		return m.User
793
+	}
794
+	return nil
795
+}
796
+
797
+func (m *Process) GetArgs() []string {
798
+	if m != nil {
799
+		return m.Args
800
+	}
801
+	return nil
802
+}
803
+
804
+func (m *Process) GetEnv() []string {
805
+	if m != nil {
806
+		return m.Env
807
+	}
808
+	return nil
809
+}
810
+
811
+func (m *Process) GetCwd() string {
812
+	if m != nil {
813
+		return m.Cwd
814
+	}
815
+	return ""
816
+}
817
+
818
+func (m *Process) GetSystemPid() uint32 {
819
+	if m != nil {
820
+		return m.SystemPid
821
+	}
822
+	return 0
823
+}
824
+
825
+func (m *Process) GetStdin() string {
826
+	if m != nil {
827
+		return m.Stdin
828
+	}
829
+	return ""
830
+}
831
+
832
+func (m *Process) GetStdout() string {
833
+	if m != nil {
834
+		return m.Stdout
835
+	}
836
+	return ""
837
+}
838
+
839
+func (m *Process) GetStderr() string {
840
+	if m != nil {
841
+		return m.Stderr
842
+	}
843
+	return ""
844
+}
845
+
846
+func (m *Process) GetCapabilities() []string {
847
+	if m != nil {
848
+		return m.Capabilities
849
+	}
850
+	return nil
851
+}
852
+
853
+func (m *Process) GetApparmorProfile() string {
854
+	if m != nil {
855
+		return m.ApparmorProfile
856
+	}
857
+	return ""
858
+}
859
+
860
+func (m *Process) GetSelinuxLabel() string {
861
+	if m != nil {
862
+		return m.SelinuxLabel
863
+	}
864
+	return ""
865
+}
866
+
867
+func (m *Process) GetNoNewPrivileges() bool {
868
+	if m != nil {
869
+		return m.NoNewPrivileges
870
+	}
871
+	return false
872
+}
873
+
874
+func (m *Process) GetRlimits() []*Rlimit {
875
+	if m != nil {
876
+		return m.Rlimits
877
+	}
878
+	return nil
879
+}
880
+
881
+type Container struct {
882
+	Id         string     `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
883
+	BundlePath string     `protobuf:"bytes,2,opt,name=bundlePath" json:"bundlePath,omitempty"`
884
+	Processes  []*Process `protobuf:"bytes,3,rep,name=processes" json:"processes,omitempty"`
885
+	Status     string     `protobuf:"bytes,4,opt,name=status" json:"status,omitempty"`
886
+	Labels     []string   `protobuf:"bytes,5,rep,name=labels" json:"labels,omitempty"`
887
+	Pids       []uint32   `protobuf:"varint,6,rep,packed,name=pids" json:"pids,omitempty"`
888
+	Runtime    string     `protobuf:"bytes,7,opt,name=runtime" json:"runtime,omitempty"`
889
+}
890
+
891
+func (m *Container) Reset()                    { *m = Container{} }
892
+func (m *Container) String() string            { return proto.CompactTextString(m) }
893
+func (*Container) ProtoMessage()               {}
894
+func (*Container) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{22} }
895
+
896
+func (m *Container) GetId() string {
897
+	if m != nil {
898
+		return m.Id
899
+	}
900
+	return ""
901
+}
902
+
903
+func (m *Container) GetBundlePath() string {
904
+	if m != nil {
905
+		return m.BundlePath
906
+	}
907
+	return ""
908
+}
909
+
910
+func (m *Container) GetProcesses() []*Process {
911
+	if m != nil {
912
+		return m.Processes
913
+	}
914
+	return nil
915
+}
916
+
917
+func (m *Container) GetStatus() string {
918
+	if m != nil {
919
+		return m.Status
920
+	}
921
+	return ""
922
+}
923
+
924
+func (m *Container) GetLabels() []string {
925
+	if m != nil {
926
+		return m.Labels
927
+	}
928
+	return nil
929
+}
930
+
931
+func (m *Container) GetPids() []uint32 {
932
+	if m != nil {
933
+		return m.Pids
934
+	}
935
+	return nil
936
+}
937
+
938
+func (m *Container) GetRuntime() string {
939
+	if m != nil {
940
+		return m.Runtime
941
+	}
942
+	return ""
943
+}
944
+
945
+// Machine is information about machine on which containerd is run
946
+type Machine struct {
947
+	Cpus   uint32 `protobuf:"varint,1,opt,name=cpus" json:"cpus,omitempty"`
948
+	Memory uint64 `protobuf:"varint,2,opt,name=memory" json:"memory,omitempty"`
949
+}
950
+
951
+func (m *Machine) Reset()                    { *m = Machine{} }
952
+func (m *Machine) String() string            { return proto.CompactTextString(m) }
953
+func (*Machine) ProtoMessage()               {}
954
+func (*Machine) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{23} }
955
+
956
+func (m *Machine) GetCpus() uint32 {
957
+	if m != nil {
958
+		return m.Cpus
959
+	}
960
+	return 0
961
+}
962
+
963
+func (m *Machine) GetMemory() uint64 {
964
+	if m != nil {
965
+		return m.Memory
966
+	}
967
+	return 0
968
+}
969
+
970
+// StateResponse is information about containerd daemon
971
+type StateResponse struct {
972
+	Containers []*Container `protobuf:"bytes,1,rep,name=containers" json:"containers,omitempty"`
973
+	Machine    *Machine     `protobuf:"bytes,2,opt,name=machine" json:"machine,omitempty"`
974
+}
975
+
976
+func (m *StateResponse) Reset()                    { *m = StateResponse{} }
977
+func (m *StateResponse) String() string            { return proto.CompactTextString(m) }
978
+func (*StateResponse) ProtoMessage()               {}
979
+func (*StateResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{24} }
980
+
981
+func (m *StateResponse) GetContainers() []*Container {
982
+	if m != nil {
983
+		return m.Containers
984
+	}
985
+	return nil
986
+}
987
+
988
+func (m *StateResponse) GetMachine() *Machine {
989
+	if m != nil {
990
+		return m.Machine
991
+	}
992
+	return nil
993
+}
994
+
995
+type UpdateContainerRequest struct {
996
+	Id        string          `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
997
+	Pid       string          `protobuf:"bytes,2,opt,name=pid" json:"pid,omitempty"`
998
+	Status    string          `protobuf:"bytes,3,opt,name=status" json:"status,omitempty"`
999
+	Resources *UpdateResource `protobuf:"bytes,4,opt,name=resources" json:"resources,omitempty"`
1000
+}
1001
+
1002
+func (m *UpdateContainerRequest) Reset()                    { *m = UpdateContainerRequest{} }
1003
+func (m *UpdateContainerRequest) String() string            { return proto.CompactTextString(m) }
1004
+func (*UpdateContainerRequest) ProtoMessage()               {}
1005
+func (*UpdateContainerRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{25} }
1006
+
1007
+func (m *UpdateContainerRequest) GetId() string {
1008
+	if m != nil {
1009
+		return m.Id
1010
+	}
1011
+	return ""
1012
+}
1013
+
1014
+func (m *UpdateContainerRequest) GetPid() string {
1015
+	if m != nil {
1016
+		return m.Pid
1017
+	}
1018
+	return ""
1019
+}
1020
+
1021
+func (m *UpdateContainerRequest) GetStatus() string {
1022
+	if m != nil {
1023
+		return m.Status
1024
+	}
1025
+	return ""
1026
+}
1027
+
1028
+func (m *UpdateContainerRequest) GetResources() *UpdateResource {
1029
+	if m != nil {
1030
+		return m.Resources
1031
+	}
1032
+	return nil
1033
+}
1034
+
1035
+type UpdateResource struct {
1036
+	BlkioWeight                  uint64            `protobuf:"varint,1,opt,name=blkioWeight" json:"blkioWeight,omitempty"`
1037
+	CpuShares                    uint64            `protobuf:"varint,2,opt,name=cpuShares" json:"cpuShares,omitempty"`
1038
+	CpuPeriod                    uint64            `protobuf:"varint,3,opt,name=cpuPeriod" json:"cpuPeriod,omitempty"`
1039
+	CpuQuota                     uint64            `protobuf:"varint,4,opt,name=cpuQuota" json:"cpuQuota,omitempty"`
1040
+	CpusetCpus                   string            `protobuf:"bytes,5,opt,name=cpusetCpus" json:"cpusetCpus,omitempty"`
1041
+	CpusetMems                   string            `protobuf:"bytes,6,opt,name=cpusetMems" json:"cpusetMems,omitempty"`
1042
+	MemoryLimit                  uint64            `protobuf:"varint,7,opt,name=memoryLimit" json:"memoryLimit,omitempty"`
1043
+	MemorySwap                   uint64            `protobuf:"varint,8,opt,name=memorySwap" json:"memorySwap,omitempty"`
1044
+	MemoryReservation            uint64            `protobuf:"varint,9,opt,name=memoryReservation" json:"memoryReservation,omitempty"`
1045
+	KernelMemoryLimit            uint64            `protobuf:"varint,10,opt,name=kernelMemoryLimit" json:"kernelMemoryLimit,omitempty"`
1046
+	KernelTCPMemoryLimit         uint64            `protobuf:"varint,11,opt,name=kernelTCPMemoryLimit" json:"kernelTCPMemoryLimit,omitempty"`
1047
+	BlkioLeafWeight              uint64            `protobuf:"varint,12,opt,name=blkioLeafWeight" json:"blkioLeafWeight,omitempty"`
1048
+	BlkioWeightDevice            []*WeightDevice   `protobuf:"bytes,13,rep,name=blkioWeightDevice" json:"blkioWeightDevice,omitempty"`
1049
+	BlkioThrottleReadBpsDevice   []*ThrottleDevice `protobuf:"bytes,14,rep,name=blkioThrottleReadBpsDevice" json:"blkioThrottleReadBpsDevice,omitempty"`
1050
+	BlkioThrottleWriteBpsDevice  []*ThrottleDevice `protobuf:"bytes,15,rep,name=blkioThrottleWriteBpsDevice" json:"blkioThrottleWriteBpsDevice,omitempty"`
1051
+	BlkioThrottleReadIopsDevice  []*ThrottleDevice `protobuf:"bytes,16,rep,name=blkioThrottleReadIopsDevice" json:"blkioThrottleReadIopsDevice,omitempty"`
1052
+	BlkioThrottleWriteIopsDevice []*ThrottleDevice `protobuf:"bytes,17,rep,name=blkioThrottleWriteIopsDevice" json:"blkioThrottleWriteIopsDevice,omitempty"`
1053
+	PidsLimit                    uint64            `protobuf:"varint,18,opt,name=pidsLimit" json:"pidsLimit,omitempty"`
1054
+}
1055
+
1056
+func (m *UpdateResource) Reset()                    { *m = UpdateResource{} }
1057
+func (m *UpdateResource) String() string            { return proto.CompactTextString(m) }
1058
+func (*UpdateResource) ProtoMessage()               {}
1059
+func (*UpdateResource) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{26} }
1060
+
1061
+func (m *UpdateResource) GetBlkioWeight() uint64 {
1062
+	if m != nil {
1063
+		return m.BlkioWeight
1064
+	}
1065
+	return 0
1066
+}
1067
+
1068
+func (m *UpdateResource) GetCpuShares() uint64 {
1069
+	if m != nil {
1070
+		return m.CpuShares
1071
+	}
1072
+	return 0
1073
+}
1074
+
1075
+func (m *UpdateResource) GetCpuPeriod() uint64 {
1076
+	if m != nil {
1077
+		return m.CpuPeriod
1078
+	}
1079
+	return 0
1080
+}
1081
+
1082
+func (m *UpdateResource) GetCpuQuota() uint64 {
1083
+	if m != nil {
1084
+		return m.CpuQuota
1085
+	}
1086
+	return 0
1087
+}
1088
+
1089
+func (m *UpdateResource) GetCpusetCpus() string {
1090
+	if m != nil {
1091
+		return m.CpusetCpus
1092
+	}
1093
+	return ""
1094
+}
1095
+
1096
+func (m *UpdateResource) GetCpusetMems() string {
1097
+	if m != nil {
1098
+		return m.CpusetMems
1099
+	}
1100
+	return ""
1101
+}
1102
+
1103
+func (m *UpdateResource) GetMemoryLimit() uint64 {
1104
+	if m != nil {
1105
+		return m.MemoryLimit
1106
+	}
1107
+	return 0
1108
+}
1109
+
1110
+func (m *UpdateResource) GetMemorySwap() uint64 {
1111
+	if m != nil {
1112
+		return m.MemorySwap
1113
+	}
1114
+	return 0
1115
+}
1116
+
1117
+func (m *UpdateResource) GetMemoryReservation() uint64 {
1118
+	if m != nil {
1119
+		return m.MemoryReservation
1120
+	}
1121
+	return 0
1122
+}
1123
+
1124
+func (m *UpdateResource) GetKernelMemoryLimit() uint64 {
1125
+	if m != nil {
1126
+		return m.KernelMemoryLimit
1127
+	}
1128
+	return 0
1129
+}
1130
+
1131
+func (m *UpdateResource) GetKernelTCPMemoryLimit() uint64 {
1132
+	if m != nil {
1133
+		return m.KernelTCPMemoryLimit
1134
+	}
1135
+	return 0
1136
+}
1137
+
1138
+func (m *UpdateResource) GetBlkioLeafWeight() uint64 {
1139
+	if m != nil {
1140
+		return m.BlkioLeafWeight
1141
+	}
1142
+	return 0
1143
+}
1144
+
1145
+func (m *UpdateResource) GetBlkioWeightDevice() []*WeightDevice {
1146
+	if m != nil {
1147
+		return m.BlkioWeightDevice
1148
+	}
1149
+	return nil
1150
+}
1151
+
1152
+func (m *UpdateResource) GetBlkioThrottleReadBpsDevice() []*ThrottleDevice {
1153
+	if m != nil {
1154
+		return m.BlkioThrottleReadBpsDevice
1155
+	}
1156
+	return nil
1157
+}
1158
+
1159
+func (m *UpdateResource) GetBlkioThrottleWriteBpsDevice() []*ThrottleDevice {
1160
+	if m != nil {
1161
+		return m.BlkioThrottleWriteBpsDevice
1162
+	}
1163
+	return nil
1164
+}
1165
+
1166
+func (m *UpdateResource) GetBlkioThrottleReadIopsDevice() []*ThrottleDevice {
1167
+	if m != nil {
1168
+		return m.BlkioThrottleReadIopsDevice
1169
+	}
1170
+	return nil
1171
+}
1172
+
1173
+func (m *UpdateResource) GetBlkioThrottleWriteIopsDevice() []*ThrottleDevice {
1174
+	if m != nil {
1175
+		return m.BlkioThrottleWriteIopsDevice
1176
+	}
1177
+	return nil
1178
+}
1179
+
1180
+func (m *UpdateResource) GetPidsLimit() uint64 {
1181
+	if m != nil {
1182
+		return m.PidsLimit
1183
+	}
1184
+	return 0
1185
+}
1186
+
1187
+type BlockIODevice struct {
1188
+	Major int64 `protobuf:"varint,1,opt,name=major" json:"major,omitempty"`
1189
+	Minor int64 `protobuf:"varint,2,opt,name=minor" json:"minor,omitempty"`
1190
+}
1191
+
1192
+func (m *BlockIODevice) Reset()                    { *m = BlockIODevice{} }
1193
+func (m *BlockIODevice) String() string            { return proto.CompactTextString(m) }
1194
+func (*BlockIODevice) ProtoMessage()               {}
1195
+func (*BlockIODevice) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{27} }
1196
+
1197
+func (m *BlockIODevice) GetMajor() int64 {
1198
+	if m != nil {
1199
+		return m.Major
1200
+	}
1201
+	return 0
1202
+}
1203
+
1204
+func (m *BlockIODevice) GetMinor() int64 {
1205
+	if m != nil {
1206
+		return m.Minor
1207
+	}
1208
+	return 0
1209
+}
1210
+
1211
+type WeightDevice struct {
1212
+	BlkIODevice *BlockIODevice `protobuf:"bytes,1,opt,name=blkIODevice" json:"blkIODevice,omitempty"`
1213
+	Weight      uint32         `protobuf:"varint,2,opt,name=weight" json:"weight,omitempty"`
1214
+	LeafWeight  uint32         `protobuf:"varint,3,opt,name=leafWeight" json:"leafWeight,omitempty"`
1215
+}
1216
+
1217
+func (m *WeightDevice) Reset()                    { *m = WeightDevice{} }
1218
+func (m *WeightDevice) String() string            { return proto.CompactTextString(m) }
1219
+func (*WeightDevice) ProtoMessage()               {}
1220
+func (*WeightDevice) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{28} }
1221
+
1222
+func (m *WeightDevice) GetBlkIODevice() *BlockIODevice {
1223
+	if m != nil {
1224
+		return m.BlkIODevice
1225
+	}
1226
+	return nil
1227
+}
1228
+
1229
+func (m *WeightDevice) GetWeight() uint32 {
1230
+	if m != nil {
1231
+		return m.Weight
1232
+	}
1233
+	return 0
1234
+}
1235
+
1236
+func (m *WeightDevice) GetLeafWeight() uint32 {
1237
+	if m != nil {
1238
+		return m.LeafWeight
1239
+	}
1240
+	return 0
1241
+}
1242
+
1243
+type ThrottleDevice struct {
1244
+	BlkIODevice *BlockIODevice `protobuf:"bytes,1,opt,name=blkIODevice" json:"blkIODevice,omitempty"`
1245
+	Rate        uint64         `protobuf:"varint,2,opt,name=rate" json:"rate,omitempty"`
1246
+}
1247
+
1248
+func (m *ThrottleDevice) Reset()                    { *m = ThrottleDevice{} }
1249
+func (m *ThrottleDevice) String() string            { return proto.CompactTextString(m) }
1250
+func (*ThrottleDevice) ProtoMessage()               {}
1251
+func (*ThrottleDevice) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{29} }
1252
+
1253
+func (m *ThrottleDevice) GetBlkIODevice() *BlockIODevice {
1254
+	if m != nil {
1255
+		return m.BlkIODevice
1256
+	}
1257
+	return nil
1258
+}
1259
+
1260
+func (m *ThrottleDevice) GetRate() uint64 {
1261
+	if m != nil {
1262
+		return m.Rate
1263
+	}
1264
+	return 0
1265
+}
1266
+
1267
+type UpdateContainerResponse struct {
1268
+}
1269
+
1270
+func (m *UpdateContainerResponse) Reset()                    { *m = UpdateContainerResponse{} }
1271
+func (m *UpdateContainerResponse) String() string            { return proto.CompactTextString(m) }
1272
+func (*UpdateContainerResponse) ProtoMessage()               {}
1273
+func (*UpdateContainerResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{30} }
1274
+
1275
+type EventsRequest struct {
1276
+	// Tag 1 is deprecated (old uint64 timestamp)
1277
+	Timestamp  *google_protobuf.Timestamp `protobuf:"bytes,2,opt,name=timestamp" json:"timestamp,omitempty"`
1278
+	StoredOnly bool                       `protobuf:"varint,3,opt,name=storedOnly" json:"storedOnly,omitempty"`
1279
+	Id         string                     `protobuf:"bytes,4,opt,name=id" json:"id,omitempty"`
1280
+}
1281
+
1282
+func (m *EventsRequest) Reset()                    { *m = EventsRequest{} }
1283
+func (m *EventsRequest) String() string            { return proto.CompactTextString(m) }
1284
+func (*EventsRequest) ProtoMessage()               {}
1285
+func (*EventsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{31} }
1286
+
1287
+func (m *EventsRequest) GetTimestamp() *google_protobuf.Timestamp {
1288
+	if m != nil {
1289
+		return m.Timestamp
1290
+	}
1291
+	return nil
1292
+}
1293
+
1294
+func (m *EventsRequest) GetStoredOnly() bool {
1295
+	if m != nil {
1296
+		return m.StoredOnly
1297
+	}
1298
+	return false
1299
+}
1300
+
1301
+func (m *EventsRequest) GetId() string {
1302
+	if m != nil {
1303
+		return m.Id
1304
+	}
1305
+	return ""
1306
+}
1307
+
1308
+type Event struct {
1309
+	Type   string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"`
1310
+	Id     string `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"`
1311
+	Status uint32 `protobuf:"varint,3,opt,name=status" json:"status,omitempty"`
1312
+	Pid    string `protobuf:"bytes,4,opt,name=pid" json:"pid,omitempty"`
1313
+	// Tag 5 is deprecated (old uint64 timestamp)
1314
+	Timestamp *google_protobuf.Timestamp `protobuf:"bytes,6,opt,name=timestamp" json:"timestamp,omitempty"`
1315
+}
1316
+
1317
+func (m *Event) Reset()                    { *m = Event{} }
1318
+func (m *Event) String() string            { return proto.CompactTextString(m) }
1319
+func (*Event) ProtoMessage()               {}
1320
+func (*Event) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{32} }
1321
+
1322
+func (m *Event) GetType() string {
1323
+	if m != nil {
1324
+		return m.Type
1325
+	}
1326
+	return ""
1327
+}
1328
+
1329
+func (m *Event) GetId() string {
1330
+	if m != nil {
1331
+		return m.Id
1332
+	}
1333
+	return ""
1334
+}
1335
+
1336
+func (m *Event) GetStatus() uint32 {
1337
+	if m != nil {
1338
+		return m.Status
1339
+	}
1340
+	return 0
1341
+}
1342
+
1343
+func (m *Event) GetPid() string {
1344
+	if m != nil {
1345
+		return m.Pid
1346
+	}
1347
+	return ""
1348
+}
1349
+
1350
+func (m *Event) GetTimestamp() *google_protobuf.Timestamp {
1351
+	if m != nil {
1352
+		return m.Timestamp
1353
+	}
1354
+	return nil
1355
+}
1356
+
1357
+type NetworkStats struct {
1358
+	Name       string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
1359
+	RxBytes    uint64 `protobuf:"varint,2,opt,name=rx_bytes,json=rxBytes" json:"rx_bytes,omitempty"`
1360
+	Rx_Packets uint64 `protobuf:"varint,3,opt,name=rx_Packets,json=rxPackets" json:"rx_Packets,omitempty"`
1361
+	RxErrors   uint64 `protobuf:"varint,4,opt,name=Rx_errors,json=RxErrors" json:"Rx_errors,omitempty"`
1362
+	RxDropped  uint64 `protobuf:"varint,5,opt,name=Rx_dropped,json=RxDropped" json:"Rx_dropped,omitempty"`
1363
+	TxBytes    uint64 `protobuf:"varint,6,opt,name=Tx_bytes,json=TxBytes" json:"Tx_bytes,omitempty"`
1364
+	TxPackets  uint64 `protobuf:"varint,7,opt,name=Tx_packets,json=TxPackets" json:"Tx_packets,omitempty"`
1365
+	TxErrors   uint64 `protobuf:"varint,8,opt,name=Tx_errors,json=TxErrors" json:"Tx_errors,omitempty"`
1366
+	TxDropped  uint64 `protobuf:"varint,9,opt,name=Tx_dropped,json=TxDropped" json:"Tx_dropped,omitempty"`
1367
+}
1368
+
1369
+func (m *NetworkStats) Reset()                    { *m = NetworkStats{} }
1370
+func (m *NetworkStats) String() string            { return proto.CompactTextString(m) }
1371
+func (*NetworkStats) ProtoMessage()               {}
1372
+func (*NetworkStats) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{33} }
1373
+
1374
+func (m *NetworkStats) GetName() string {
1375
+	if m != nil {
1376
+		return m.Name
1377
+	}
1378
+	return ""
1379
+}
1380
+
1381
+func (m *NetworkStats) GetRxBytes() uint64 {
1382
+	if m != nil {
1383
+		return m.RxBytes
1384
+	}
1385
+	return 0
1386
+}
1387
+
1388
+func (m *NetworkStats) GetRx_Packets() uint64 {
1389
+	if m != nil {
1390
+		return m.Rx_Packets
1391
+	}
1392
+	return 0
1393
+}
1394
+
1395
+func (m *NetworkStats) GetRxErrors() uint64 {
1396
+	if m != nil {
1397
+		return m.RxErrors
1398
+	}
1399
+	return 0
1400
+}
1401
+
1402
+func (m *NetworkStats) GetRxDropped() uint64 {
1403
+	if m != nil {
1404
+		return m.RxDropped
1405
+	}
1406
+	return 0
1407
+}
1408
+
1409
+func (m *NetworkStats) GetTxBytes() uint64 {
1410
+	if m != nil {
1411
+		return m.TxBytes
1412
+	}
1413
+	return 0
1414
+}
1415
+
1416
+func (m *NetworkStats) GetTxPackets() uint64 {
1417
+	if m != nil {
1418
+		return m.TxPackets
1419
+	}
1420
+	return 0
1421
+}
1422
+
1423
+func (m *NetworkStats) GetTxErrors() uint64 {
1424
+	if m != nil {
1425
+		return m.TxErrors
1426
+	}
1427
+	return 0
1428
+}
1429
+
1430
+func (m *NetworkStats) GetTxDropped() uint64 {
1431
+	if m != nil {
1432
+		return m.TxDropped
1433
+	}
1434
+	return 0
1435
+}
1436
+
1437
+type CpuUsage struct {
1438
+	TotalUsage        uint64   `protobuf:"varint,1,opt,name=total_usage,json=totalUsage" json:"total_usage,omitempty"`
1439
+	PercpuUsage       []uint64 `protobuf:"varint,2,rep,packed,name=percpu_usage,json=percpuUsage" json:"percpu_usage,omitempty"`
1440
+	UsageInKernelmode uint64   `protobuf:"varint,3,opt,name=usage_in_kernelmode,json=usageInKernelmode" json:"usage_in_kernelmode,omitempty"`
1441
+	UsageInUsermode   uint64   `protobuf:"varint,4,opt,name=usage_in_usermode,json=usageInUsermode" json:"usage_in_usermode,omitempty"`
1442
+}
1443
+
1444
+func (m *CpuUsage) Reset()                    { *m = CpuUsage{} }
1445
+func (m *CpuUsage) String() string            { return proto.CompactTextString(m) }
1446
+func (*CpuUsage) ProtoMessage()               {}
1447
+func (*CpuUsage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{34} }
1448
+
1449
+func (m *CpuUsage) GetTotalUsage() uint64 {
1450
+	if m != nil {
1451
+		return m.TotalUsage
1452
+	}
1453
+	return 0
1454
+}
1455
+
1456
+func (m *CpuUsage) GetPercpuUsage() []uint64 {
1457
+	if m != nil {
1458
+		return m.PercpuUsage
1459
+	}
1460
+	return nil
1461
+}
1462
+
1463
+func (m *CpuUsage) GetUsageInKernelmode() uint64 {
1464
+	if m != nil {
1465
+		return m.UsageInKernelmode
1466
+	}
1467
+	return 0
1468
+}
1469
+
1470
+func (m *CpuUsage) GetUsageInUsermode() uint64 {
1471
+	if m != nil {
1472
+		return m.UsageInUsermode
1473
+	}
1474
+	return 0
1475
+}
1476
+
1477
+type ThrottlingData struct {
1478
+	Periods          uint64 `protobuf:"varint,1,opt,name=periods" json:"periods,omitempty"`
1479
+	ThrottledPeriods uint64 `protobuf:"varint,2,opt,name=throttled_periods,json=throttledPeriods" json:"throttled_periods,omitempty"`
1480
+	ThrottledTime    uint64 `protobuf:"varint,3,opt,name=throttled_time,json=throttledTime" json:"throttled_time,omitempty"`
1481
+}
1482
+
1483
+func (m *ThrottlingData) Reset()                    { *m = ThrottlingData{} }
1484
+func (m *ThrottlingData) String() string            { return proto.CompactTextString(m) }
1485
+func (*ThrottlingData) ProtoMessage()               {}
1486
+func (*ThrottlingData) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{35} }
1487
+
1488
+func (m *ThrottlingData) GetPeriods() uint64 {
1489
+	if m != nil {
1490
+		return m.Periods
1491
+	}
1492
+	return 0
1493
+}
1494
+
1495
+func (m *ThrottlingData) GetThrottledPeriods() uint64 {
1496
+	if m != nil {
1497
+		return m.ThrottledPeriods
1498
+	}
1499
+	return 0
1500
+}
1501
+
1502
+func (m *ThrottlingData) GetThrottledTime() uint64 {
1503
+	if m != nil {
1504
+		return m.ThrottledTime
1505
+	}
1506
+	return 0
1507
+}
1508
+
1509
+type CpuStats struct {
1510
+	CpuUsage       *CpuUsage       `protobuf:"bytes,1,opt,name=cpu_usage,json=cpuUsage" json:"cpu_usage,omitempty"`
1511
+	ThrottlingData *ThrottlingData `protobuf:"bytes,2,opt,name=throttling_data,json=throttlingData" json:"throttling_data,omitempty"`
1512
+	SystemUsage    uint64          `protobuf:"varint,3,opt,name=system_usage,json=systemUsage" json:"system_usage,omitempty"`
1513
+}
1514
+
1515
+func (m *CpuStats) Reset()                    { *m = CpuStats{} }
1516
+func (m *CpuStats) String() string            { return proto.CompactTextString(m) }
1517
+func (*CpuStats) ProtoMessage()               {}
1518
+func (*CpuStats) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{36} }
1519
+
1520
+func (m *CpuStats) GetCpuUsage() *CpuUsage {
1521
+	if m != nil {
1522
+		return m.CpuUsage
1523
+	}
1524
+	return nil
1525
+}
1526
+
1527
+func (m *CpuStats) GetThrottlingData() *ThrottlingData {
1528
+	if m != nil {
1529
+		return m.ThrottlingData
1530
+	}
1531
+	return nil
1532
+}
1533
+
1534
+func (m *CpuStats) GetSystemUsage() uint64 {
1535
+	if m != nil {
1536
+		return m.SystemUsage
1537
+	}
1538
+	return 0
1539
+}
1540
+
1541
+type PidsStats struct {
1542
+	Current uint64 `protobuf:"varint,1,opt,name=current" json:"current,omitempty"`
1543
+	Limit   uint64 `protobuf:"varint,2,opt,name=limit" json:"limit,omitempty"`
1544
+}
1545
+
1546
+func (m *PidsStats) Reset()                    { *m = PidsStats{} }
1547
+func (m *PidsStats) String() string            { return proto.CompactTextString(m) }
1548
+func (*PidsStats) ProtoMessage()               {}
1549
+func (*PidsStats) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{37} }
1550
+
1551
+func (m *PidsStats) GetCurrent() uint64 {
1552
+	if m != nil {
1553
+		return m.Current
1554
+	}
1555
+	return 0
1556
+}
1557
+
1558
+func (m *PidsStats) GetLimit() uint64 {
1559
+	if m != nil {
1560
+		return m.Limit
1561
+	}
1562
+	return 0
1563
+}
1564
+
1565
+type MemoryData struct {
1566
+	Usage    uint64 `protobuf:"varint,1,opt,name=usage" json:"usage,omitempty"`
1567
+	MaxUsage uint64 `protobuf:"varint,2,opt,name=max_usage,json=maxUsage" json:"max_usage,omitempty"`
1568
+	Failcnt  uint64 `protobuf:"varint,3,opt,name=failcnt" json:"failcnt,omitempty"`
1569
+	Limit    uint64 `protobuf:"varint,4,opt,name=limit" json:"limit,omitempty"`
1570
+}
1571
+
1572
+func (m *MemoryData) Reset()                    { *m = MemoryData{} }
1573
+func (m *MemoryData) String() string            { return proto.CompactTextString(m) }
1574
+func (*MemoryData) ProtoMessage()               {}
1575
+func (*MemoryData) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{38} }
1576
+
1577
+func (m *MemoryData) GetUsage() uint64 {
1578
+	if m != nil {
1579
+		return m.Usage
1580
+	}
1581
+	return 0
1582
+}
1583
+
1584
+func (m *MemoryData) GetMaxUsage() uint64 {
1585
+	if m != nil {
1586
+		return m.MaxUsage
1587
+	}
1588
+	return 0
1589
+}
1590
+
1591
+func (m *MemoryData) GetFailcnt() uint64 {
1592
+	if m != nil {
1593
+		return m.Failcnt
1594
+	}
1595
+	return 0
1596
+}
1597
+
1598
+func (m *MemoryData) GetLimit() uint64 {
1599
+	if m != nil {
1600
+		return m.Limit
1601
+	}
1602
+	return 0
1603
+}
1604
+
1605
+type MemoryStats struct {
1606
+	Cache       uint64            `protobuf:"varint,1,opt,name=cache" json:"cache,omitempty"`
1607
+	Usage       *MemoryData       `protobuf:"bytes,2,opt,name=usage" json:"usage,omitempty"`
1608
+	SwapUsage   *MemoryData       `protobuf:"bytes,3,opt,name=swap_usage,json=swapUsage" json:"swap_usage,omitempty"`
1609
+	KernelUsage *MemoryData       `protobuf:"bytes,4,opt,name=kernel_usage,json=kernelUsage" json:"kernel_usage,omitempty"`
1610
+	Stats       map[string]uint64 `protobuf:"bytes,5,rep,name=stats" json:"stats,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
1611
+}
1612
+
1613
+func (m *MemoryStats) Reset()                    { *m = MemoryStats{} }
1614
+func (m *MemoryStats) String() string            { return proto.CompactTextString(m) }
1615
+func (*MemoryStats) ProtoMessage()               {}
1616
+func (*MemoryStats) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{39} }
1617
+
1618
+func (m *MemoryStats) GetCache() uint64 {
1619
+	if m != nil {
1620
+		return m.Cache
1621
+	}
1622
+	return 0
1623
+}
1624
+
1625
+func (m *MemoryStats) GetUsage() *MemoryData {
1626
+	if m != nil {
1627
+		return m.Usage
1628
+	}
1629
+	return nil
1630
+}
1631
+
1632
+func (m *MemoryStats) GetSwapUsage() *MemoryData {
1633
+	if m != nil {
1634
+		return m.SwapUsage
1635
+	}
1636
+	return nil
1637
+}
1638
+
1639
+func (m *MemoryStats) GetKernelUsage() *MemoryData {
1640
+	if m != nil {
1641
+		return m.KernelUsage
1642
+	}
1643
+	return nil
1644
+}
1645
+
1646
+func (m *MemoryStats) GetStats() map[string]uint64 {
1647
+	if m != nil {
1648
+		return m.Stats
1649
+	}
1650
+	return nil
1651
+}
1652
+
1653
+type BlkioStatsEntry struct {
1654
+	Major uint64 `protobuf:"varint,1,opt,name=major" json:"major,omitempty"`
1655
+	Minor uint64 `protobuf:"varint,2,opt,name=minor" json:"minor,omitempty"`
1656
+	Op    string `protobuf:"bytes,3,opt,name=op" json:"op,omitempty"`
1657
+	Value uint64 `protobuf:"varint,4,opt,name=value" json:"value,omitempty"`
1658
+}
1659
+
1660
+func (m *BlkioStatsEntry) Reset()                    { *m = BlkioStatsEntry{} }
1661
+func (m *BlkioStatsEntry) String() string            { return proto.CompactTextString(m) }
1662
+func (*BlkioStatsEntry) ProtoMessage()               {}
1663
+func (*BlkioStatsEntry) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{40} }
1664
+
1665
+func (m *BlkioStatsEntry) GetMajor() uint64 {
1666
+	if m != nil {
1667
+		return m.Major
1668
+	}
1669
+	return 0
1670
+}
1671
+
1672
+func (m *BlkioStatsEntry) GetMinor() uint64 {
1673
+	if m != nil {
1674
+		return m.Minor
1675
+	}
1676
+	return 0
1677
+}
1678
+
1679
+func (m *BlkioStatsEntry) GetOp() string {
1680
+	if m != nil {
1681
+		return m.Op
1682
+	}
1683
+	return ""
1684
+}
1685
+
1686
+func (m *BlkioStatsEntry) GetValue() uint64 {
1687
+	if m != nil {
1688
+		return m.Value
1689
+	}
1690
+	return 0
1691
+}
1692
+
1693
+type BlkioStats struct {
1694
+	IoServiceBytesRecursive []*BlkioStatsEntry `protobuf:"bytes,1,rep,name=io_service_bytes_recursive,json=ioServiceBytesRecursive" json:"io_service_bytes_recursive,omitempty"`
1695
+	IoServicedRecursive     []*BlkioStatsEntry `protobuf:"bytes,2,rep,name=io_serviced_recursive,json=ioServicedRecursive" json:"io_serviced_recursive,omitempty"`
1696
+	IoQueuedRecursive       []*BlkioStatsEntry `protobuf:"bytes,3,rep,name=io_queued_recursive,json=ioQueuedRecursive" json:"io_queued_recursive,omitempty"`
1697
+	IoServiceTimeRecursive  []*BlkioStatsEntry `protobuf:"bytes,4,rep,name=io_service_time_recursive,json=ioServiceTimeRecursive" json:"io_service_time_recursive,omitempty"`
1698
+	IoWaitTimeRecursive     []*BlkioStatsEntry `protobuf:"bytes,5,rep,name=io_wait_time_recursive,json=ioWaitTimeRecursive" json:"io_wait_time_recursive,omitempty"`
1699
+	IoMergedRecursive       []*BlkioStatsEntry `protobuf:"bytes,6,rep,name=io_merged_recursive,json=ioMergedRecursive" json:"io_merged_recursive,omitempty"`
1700
+	IoTimeRecursive         []*BlkioStatsEntry `protobuf:"bytes,7,rep,name=io_time_recursive,json=ioTimeRecursive" json:"io_time_recursive,omitempty"`
1701
+	SectorsRecursive        []*BlkioStatsEntry `protobuf:"bytes,8,rep,name=sectors_recursive,json=sectorsRecursive" json:"sectors_recursive,omitempty"`
1702
+}
1703
+
1704
+func (m *BlkioStats) Reset()                    { *m = BlkioStats{} }
1705
+func (m *BlkioStats) String() string            { return proto.CompactTextString(m) }
1706
+func (*BlkioStats) ProtoMessage()               {}
1707
+func (*BlkioStats) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{41} }
1708
+
1709
+func (m *BlkioStats) GetIoServiceBytesRecursive() []*BlkioStatsEntry {
1710
+	if m != nil {
1711
+		return m.IoServiceBytesRecursive
1712
+	}
1713
+	return nil
1714
+}
1715
+
1716
+func (m *BlkioStats) GetIoServicedRecursive() []*BlkioStatsEntry {
1717
+	if m != nil {
1718
+		return m.IoServicedRecursive
1719
+	}
1720
+	return nil
1721
+}
1722
+
1723
+func (m *BlkioStats) GetIoQueuedRecursive() []*BlkioStatsEntry {
1724
+	if m != nil {
1725
+		return m.IoQueuedRecursive
1726
+	}
1727
+	return nil
1728
+}
1729
+
1730
+func (m *BlkioStats) GetIoServiceTimeRecursive() []*BlkioStatsEntry {
1731
+	if m != nil {
1732
+		return m.IoServiceTimeRecursive
1733
+	}
1734
+	return nil
1735
+}
1736
+
1737
+func (m *BlkioStats) GetIoWaitTimeRecursive() []*BlkioStatsEntry {
1738
+	if m != nil {
1739
+		return m.IoWaitTimeRecursive
1740
+	}
1741
+	return nil
1742
+}
1743
+
1744
+func (m *BlkioStats) GetIoMergedRecursive() []*BlkioStatsEntry {
1745
+	if m != nil {
1746
+		return m.IoMergedRecursive
1747
+	}
1748
+	return nil
1749
+}
1750
+
1751
+func (m *BlkioStats) GetIoTimeRecursive() []*BlkioStatsEntry {
1752
+	if m != nil {
1753
+		return m.IoTimeRecursive
1754
+	}
1755
+	return nil
1756
+}
1757
+
1758
+func (m *BlkioStats) GetSectorsRecursive() []*BlkioStatsEntry {
1759
+	if m != nil {
1760
+		return m.SectorsRecursive
1761
+	}
1762
+	return nil
1763
+}
1764
+
1765
+type HugetlbStats struct {
1766
+	Usage    uint64 `protobuf:"varint,1,opt,name=usage" json:"usage,omitempty"`
1767
+	MaxUsage uint64 `protobuf:"varint,2,opt,name=max_usage,json=maxUsage" json:"max_usage,omitempty"`
1768
+	Failcnt  uint64 `protobuf:"varint,3,opt,name=failcnt" json:"failcnt,omitempty"`
1769
+	Limit    uint64 `protobuf:"varint,4,opt,name=limit" json:"limit,omitempty"`
1770
+}
1771
+
1772
+func (m *HugetlbStats) Reset()                    { *m = HugetlbStats{} }
1773
+func (m *HugetlbStats) String() string            { return proto.CompactTextString(m) }
1774
+func (*HugetlbStats) ProtoMessage()               {}
1775
+func (*HugetlbStats) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{42} }
1776
+
1777
+func (m *HugetlbStats) GetUsage() uint64 {
1778
+	if m != nil {
1779
+		return m.Usage
1780
+	}
1781
+	return 0
1782
+}
1783
+
1784
+func (m *HugetlbStats) GetMaxUsage() uint64 {
1785
+	if m != nil {
1786
+		return m.MaxUsage
1787
+	}
1788
+	return 0
1789
+}
1790
+
1791
+func (m *HugetlbStats) GetFailcnt() uint64 {
1792
+	if m != nil {
1793
+		return m.Failcnt
1794
+	}
1795
+	return 0
1796
+}
1797
+
1798
+func (m *HugetlbStats) GetLimit() uint64 {
1799
+	if m != nil {
1800
+		return m.Limit
1801
+	}
1802
+	return 0
1803
+}
1804
+
1805
+type CgroupStats struct {
1806
+	CpuStats     *CpuStats                `protobuf:"bytes,1,opt,name=cpu_stats,json=cpuStats" json:"cpu_stats,omitempty"`
1807
+	MemoryStats  *MemoryStats             `protobuf:"bytes,2,opt,name=memory_stats,json=memoryStats" json:"memory_stats,omitempty"`
1808
+	BlkioStats   *BlkioStats              `protobuf:"bytes,3,opt,name=blkio_stats,json=blkioStats" json:"blkio_stats,omitempty"`
1809
+	HugetlbStats map[string]*HugetlbStats `protobuf:"bytes,4,rep,name=hugetlb_stats,json=hugetlbStats" json:"hugetlb_stats,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
1810
+	PidsStats    *PidsStats               `protobuf:"bytes,5,opt,name=pids_stats,json=pidsStats" json:"pids_stats,omitempty"`
1811
+}
1812
+
1813
+func (m *CgroupStats) Reset()                    { *m = CgroupStats{} }
1814
+func (m *CgroupStats) String() string            { return proto.CompactTextString(m) }
1815
+func (*CgroupStats) ProtoMessage()               {}
1816
+func (*CgroupStats) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{43} }
1817
+
1818
+func (m *CgroupStats) GetCpuStats() *CpuStats {
1819
+	if m != nil {
1820
+		return m.CpuStats
1821
+	}
1822
+	return nil
1823
+}
1824
+
1825
+func (m *CgroupStats) GetMemoryStats() *MemoryStats {
1826
+	if m != nil {
1827
+		return m.MemoryStats
1828
+	}
1829
+	return nil
1830
+}
1831
+
1832
+func (m *CgroupStats) GetBlkioStats() *BlkioStats {
1833
+	if m != nil {
1834
+		return m.BlkioStats
1835
+	}
1836
+	return nil
1837
+}
1838
+
1839
+func (m *CgroupStats) GetHugetlbStats() map[string]*HugetlbStats {
1840
+	if m != nil {
1841
+		return m.HugetlbStats
1842
+	}
1843
+	return nil
1844
+}
1845
+
1846
+func (m *CgroupStats) GetPidsStats() *PidsStats {
1847
+	if m != nil {
1848
+		return m.PidsStats
1849
+	}
1850
+	return nil
1851
+}
1852
+
1853
+type StatsResponse struct {
1854
+	NetworkStats []*NetworkStats `protobuf:"bytes,1,rep,name=network_stats,json=networkStats" json:"network_stats,omitempty"`
1855
+	CgroupStats  *CgroupStats    `protobuf:"bytes,2,opt,name=cgroup_stats,json=cgroupStats" json:"cgroup_stats,omitempty"`
1856
+	// Tag 3 is deprecated (old uint64 timestamp)
1857
+	Timestamp *google_protobuf.Timestamp `protobuf:"bytes,4,opt,name=timestamp" json:"timestamp,omitempty"`
1858
+}
1859
+
1860
+func (m *StatsResponse) Reset()                    { *m = StatsResponse{} }
1861
+func (m *StatsResponse) String() string            { return proto.CompactTextString(m) }
1862
+func (*StatsResponse) ProtoMessage()               {}
1863
+func (*StatsResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{44} }
1864
+
1865
+func (m *StatsResponse) GetNetworkStats() []*NetworkStats {
1866
+	if m != nil {
1867
+		return m.NetworkStats
1868
+	}
1869
+	return nil
1870
+}
1871
+
1872
+func (m *StatsResponse) GetCgroupStats() *CgroupStats {
1873
+	if m != nil {
1874
+		return m.CgroupStats
1875
+	}
1876
+	return nil
1877
+}
1878
+
1879
+func (m *StatsResponse) GetTimestamp() *google_protobuf.Timestamp {
1880
+	if m != nil {
1881
+		return m.Timestamp
1882
+	}
1883
+	return nil
1884
+}
1885
+
1886
+type StatsRequest struct {
1887
+	Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
1888
+}
1889
+
1890
+func (m *StatsRequest) Reset()                    { *m = StatsRequest{} }
1891
+func (m *StatsRequest) String() string            { return proto.CompactTextString(m) }
1892
+func (*StatsRequest) ProtoMessage()               {}
1893
+func (*StatsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{45} }
1894
+
1895
+func (m *StatsRequest) GetId() string {
1896
+	if m != nil {
1897
+		return m.Id
1898
+	}
1899
+	return ""
1900
+}
1901
+
1902
+func init() {
1903
+	proto.RegisterType((*GetServerVersionRequest)(nil), "types.GetServerVersionRequest")
1904
+	proto.RegisterType((*GetServerVersionResponse)(nil), "types.GetServerVersionResponse")
1905
+	proto.RegisterType((*UpdateProcessRequest)(nil), "types.UpdateProcessRequest")
1906
+	proto.RegisterType((*UpdateProcessResponse)(nil), "types.UpdateProcessResponse")
1907
+	proto.RegisterType((*CreateContainerRequest)(nil), "types.CreateContainerRequest")
1908
+	proto.RegisterType((*CreateContainerResponse)(nil), "types.CreateContainerResponse")
1909
+	proto.RegisterType((*SignalRequest)(nil), "types.SignalRequest")
1910
+	proto.RegisterType((*SignalResponse)(nil), "types.SignalResponse")
1911
+	proto.RegisterType((*AddProcessRequest)(nil), "types.AddProcessRequest")
1912
+	proto.RegisterType((*Rlimit)(nil), "types.Rlimit")
1913
+	proto.RegisterType((*User)(nil), "types.User")
1914
+	proto.RegisterType((*AddProcessResponse)(nil), "types.AddProcessResponse")
1915
+	proto.RegisterType((*CreateCheckpointRequest)(nil), "types.CreateCheckpointRequest")
1916
+	proto.RegisterType((*CreateCheckpointResponse)(nil), "types.CreateCheckpointResponse")
1917
+	proto.RegisterType((*DeleteCheckpointRequest)(nil), "types.DeleteCheckpointRequest")
1918
+	proto.RegisterType((*DeleteCheckpointResponse)(nil), "types.DeleteCheckpointResponse")
1919
+	proto.RegisterType((*ListCheckpointRequest)(nil), "types.ListCheckpointRequest")
1920
+	proto.RegisterType((*Checkpoint)(nil), "types.Checkpoint")
1921
+	proto.RegisterType((*ListCheckpointResponse)(nil), "types.ListCheckpointResponse")
1922
+	proto.RegisterType((*StateRequest)(nil), "types.StateRequest")
1923
+	proto.RegisterType((*ContainerState)(nil), "types.ContainerState")
1924
+	proto.RegisterType((*Process)(nil), "types.Process")
1925
+	proto.RegisterType((*Container)(nil), "types.Container")
1926
+	proto.RegisterType((*Machine)(nil), "types.Machine")
1927
+	proto.RegisterType((*StateResponse)(nil), "types.StateResponse")
1928
+	proto.RegisterType((*UpdateContainerRequest)(nil), "types.UpdateContainerRequest")
1929
+	proto.RegisterType((*UpdateResource)(nil), "types.UpdateResource")
1930
+	proto.RegisterType((*BlockIODevice)(nil), "types.BlockIODevice")
1931
+	proto.RegisterType((*WeightDevice)(nil), "types.WeightDevice")
1932
+	proto.RegisterType((*ThrottleDevice)(nil), "types.ThrottleDevice")
1933
+	proto.RegisterType((*UpdateContainerResponse)(nil), "types.UpdateContainerResponse")
1934
+	proto.RegisterType((*EventsRequest)(nil), "types.EventsRequest")
1935
+	proto.RegisterType((*Event)(nil), "types.Event")
1936
+	proto.RegisterType((*NetworkStats)(nil), "types.NetworkStats")
1937
+	proto.RegisterType((*CpuUsage)(nil), "types.CpuUsage")
1938
+	proto.RegisterType((*ThrottlingData)(nil), "types.ThrottlingData")
1939
+	proto.RegisterType((*CpuStats)(nil), "types.CpuStats")
1940
+	proto.RegisterType((*PidsStats)(nil), "types.PidsStats")
1941
+	proto.RegisterType((*MemoryData)(nil), "types.MemoryData")
1942
+	proto.RegisterType((*MemoryStats)(nil), "types.MemoryStats")
1943
+	proto.RegisterType((*BlkioStatsEntry)(nil), "types.BlkioStatsEntry")
1944
+	proto.RegisterType((*BlkioStats)(nil), "types.BlkioStats")
1945
+	proto.RegisterType((*HugetlbStats)(nil), "types.HugetlbStats")
1946
+	proto.RegisterType((*CgroupStats)(nil), "types.CgroupStats")
1947
+	proto.RegisterType((*StatsResponse)(nil), "types.StatsResponse")
1948
+	proto.RegisterType((*StatsRequest)(nil), "types.StatsRequest")
1949
+}
1950
+
1951
+// Reference imports to suppress errors if they are not otherwise used.
1952
+var _ context.Context
1953
+var _ grpc.ClientConn
1954
+
1955
+// This is a compile-time assertion to ensure that this generated file
1956
+// is compatible with the grpc package it is being compiled against.
1957
+const _ = grpc.SupportPackageIsVersion4
1958
+
1959
+// Client API for API service
1960
+
1961
+type APIClient interface {
1962
+	GetServerVersion(ctx context.Context, in *GetServerVersionRequest, opts ...grpc.CallOption) (*GetServerVersionResponse, error)
1963
+	CreateContainer(ctx context.Context, in *CreateContainerRequest, opts ...grpc.CallOption) (*CreateContainerResponse, error)
1964
+	UpdateContainer(ctx context.Context, in *UpdateContainerRequest, opts ...grpc.CallOption) (*UpdateContainerResponse, error)
1965
+	Signal(ctx context.Context, in *SignalRequest, opts ...grpc.CallOption) (*SignalResponse, error)
1966
+	UpdateProcess(ctx context.Context, in *UpdateProcessRequest, opts ...grpc.CallOption) (*UpdateProcessResponse, error)
1967
+	AddProcess(ctx context.Context, in *AddProcessRequest, opts ...grpc.CallOption) (*AddProcessResponse, error)
1968
+	CreateCheckpoint(ctx context.Context, in *CreateCheckpointRequest, opts ...grpc.CallOption) (*CreateCheckpointResponse, error)
1969
+	DeleteCheckpoint(ctx context.Context, in *DeleteCheckpointRequest, opts ...grpc.CallOption) (*DeleteCheckpointResponse, error)
1970
+	ListCheckpoint(ctx context.Context, in *ListCheckpointRequest, opts ...grpc.CallOption) (*ListCheckpointResponse, error)
1971
+	State(ctx context.Context, in *StateRequest, opts ...grpc.CallOption) (*StateResponse, error)
1972
+	Events(ctx context.Context, in *EventsRequest, opts ...grpc.CallOption) (API_EventsClient, error)
1973
+	Stats(ctx context.Context, in *StatsRequest, opts ...grpc.CallOption) (*StatsResponse, error)
1974
+}
1975
+
1976
+type aPIClient struct {
1977
+	cc *grpc.ClientConn
1978
+}
1979
+
1980
+func NewAPIClient(cc *grpc.ClientConn) APIClient {
1981
+	return &aPIClient{cc}
1982
+}
1983
+
1984
+func (c *aPIClient) GetServerVersion(ctx context.Context, in *GetServerVersionRequest, opts ...grpc.CallOption) (*GetServerVersionResponse, error) {
1985
+	out := new(GetServerVersionResponse)
1986
+	err := grpc.Invoke(ctx, "/types.API/GetServerVersion", in, out, c.cc, opts...)
1987
+	if err != nil {
1988
+		return nil, err
1989
+	}
1990
+	return out, nil
1991
+}
1992
+
1993
+func (c *aPIClient) CreateContainer(ctx context.Context, in *CreateContainerRequest, opts ...grpc.CallOption) (*CreateContainerResponse, error) {
1994
+	out := new(CreateContainerResponse)
1995
+	err := grpc.Invoke(ctx, "/types.API/CreateContainer", in, out, c.cc, opts...)
1996
+	if err != nil {
1997
+		return nil, err
1998
+	}
1999
+	return out, nil
2000
+}
2001
+
2002
+func (c *aPIClient) UpdateContainer(ctx context.Context, in *UpdateContainerRequest, opts ...grpc.CallOption) (*UpdateContainerResponse, error) {
2003
+	out := new(UpdateContainerResponse)
2004
+	err := grpc.Invoke(ctx, "/types.API/UpdateContainer", in, out, c.cc, opts...)
2005
+	if err != nil {
2006
+		return nil, err
2007
+	}
2008
+	return out, nil
2009
+}
2010
+
2011
+func (c *aPIClient) Signal(ctx context.Context, in *SignalRequest, opts ...grpc.CallOption) (*SignalResponse, error) {
2012
+	out := new(SignalResponse)
2013
+	err := grpc.Invoke(ctx, "/types.API/Signal", in, out, c.cc, opts...)
2014
+	if err != nil {
2015
+		return nil, err
2016
+	}
2017
+	return out, nil
2018
+}
2019
+
2020
+func (c *aPIClient) UpdateProcess(ctx context.Context, in *UpdateProcessRequest, opts ...grpc.CallOption) (*UpdateProcessResponse, error) {
2021
+	out := new(UpdateProcessResponse)
2022
+	err := grpc.Invoke(ctx, "/types.API/UpdateProcess", in, out, c.cc, opts...)
2023
+	if err != nil {
2024
+		return nil, err
2025
+	}
2026
+	return out, nil
2027
+}
2028
+
2029
+func (c *aPIClient) AddProcess(ctx context.Context, in *AddProcessRequest, opts ...grpc.CallOption) (*AddProcessResponse, error) {
2030
+	out := new(AddProcessResponse)
2031
+	err := grpc.Invoke(ctx, "/types.API/AddProcess", in, out, c.cc, opts...)
2032
+	if err != nil {
2033
+		return nil, err
2034
+	}
2035
+	return out, nil
2036
+}
2037
+
2038
+func (c *aPIClient) CreateCheckpoint(ctx context.Context, in *CreateCheckpointRequest, opts ...grpc.CallOption) (*CreateCheckpointResponse, error) {
2039
+	out := new(CreateCheckpointResponse)
2040
+	err := grpc.Invoke(ctx, "/types.API/CreateCheckpoint", in, out, c.cc, opts...)
2041
+	if err != nil {
2042
+		return nil, err
2043
+	}
2044
+	return out, nil
2045
+}
2046
+
2047
+func (c *aPIClient) DeleteCheckpoint(ctx context.Context, in *DeleteCheckpointRequest, opts ...grpc.CallOption) (*DeleteCheckpointResponse, error) {
2048
+	out := new(DeleteCheckpointResponse)
2049
+	err := grpc.Invoke(ctx, "/types.API/DeleteCheckpoint", in, out, c.cc, opts...)
2050
+	if err != nil {
2051
+		return nil, err
2052
+	}
2053
+	return out, nil
2054
+}
2055
+
2056
+func (c *aPIClient) ListCheckpoint(ctx context.Context, in *ListCheckpointRequest, opts ...grpc.CallOption) (*ListCheckpointResponse, error) {
2057
+	out := new(ListCheckpointResponse)
2058
+	err := grpc.Invoke(ctx, "/types.API/ListCheckpoint", in, out, c.cc, opts...)
2059
+	if err != nil {
2060
+		return nil, err
2061
+	}
2062
+	return out, nil
2063
+}
2064
+
2065
+func (c *aPIClient) State(ctx context.Context, in *StateRequest, opts ...grpc.CallOption) (*StateResponse, error) {
2066
+	out := new(StateResponse)
2067
+	err := grpc.Invoke(ctx, "/types.API/State", in, out, c.cc, opts...)
2068
+	if err != nil {
2069
+		return nil, err
2070
+	}
2071
+	return out, nil
2072
+}
2073
+
2074
+func (c *aPIClient) Events(ctx context.Context, in *EventsRequest, opts ...grpc.CallOption) (API_EventsClient, error) {
2075
+	stream, err := grpc.NewClientStream(ctx, &_API_serviceDesc.Streams[0], c.cc, "/types.API/Events", opts...)
2076
+	if err != nil {
2077
+		return nil, err
2078
+	}
2079
+	x := &aPIEventsClient{stream}
2080
+	if err := x.ClientStream.SendMsg(in); err != nil {
2081
+		return nil, err
2082
+	}
2083
+	if err := x.ClientStream.CloseSend(); err != nil {
2084
+		return nil, err
2085
+	}
2086
+	return x, nil
2087
+}
2088
+
2089
+type API_EventsClient interface {
2090
+	Recv() (*Event, error)
2091
+	grpc.ClientStream
2092
+}
2093
+
2094
+type aPIEventsClient struct {
2095
+	grpc.ClientStream
2096
+}
2097
+
2098
+func (x *aPIEventsClient) Recv() (*Event, error) {
2099
+	m := new(Event)
2100
+	if err := x.ClientStream.RecvMsg(m); err != nil {
2101
+		return nil, err
2102
+	}
2103
+	return m, nil
2104
+}
2105
+
2106
+func (c *aPIClient) Stats(ctx context.Context, in *StatsRequest, opts ...grpc.CallOption) (*StatsResponse, error) {
2107
+	out := new(StatsResponse)
2108
+	err := grpc.Invoke(ctx, "/types.API/Stats", in, out, c.cc, opts...)
2109
+	if err != nil {
2110
+		return nil, err
2111
+	}
2112
+	return out, nil
2113
+}
2114
+
2115
+// Server API for API service
2116
+
2117
+type APIServer interface {
2118
+	GetServerVersion(context.Context, *GetServerVersionRequest) (*GetServerVersionResponse, error)
2119
+	CreateContainer(context.Context, *CreateContainerRequest) (*CreateContainerResponse, error)
2120
+	UpdateContainer(context.Context, *UpdateContainerRequest) (*UpdateContainerResponse, error)
2121
+	Signal(context.Context, *SignalRequest) (*SignalResponse, error)
2122
+	UpdateProcess(context.Context, *UpdateProcessRequest) (*UpdateProcessResponse, error)
2123
+	AddProcess(context.Context, *AddProcessRequest) (*AddProcessResponse, error)
2124
+	CreateCheckpoint(context.Context, *CreateCheckpointRequest) (*CreateCheckpointResponse, error)
2125
+	DeleteCheckpoint(context.Context, *DeleteCheckpointRequest) (*DeleteCheckpointResponse, error)
2126
+	ListCheckpoint(context.Context, *ListCheckpointRequest) (*ListCheckpointResponse, error)
2127
+	State(context.Context, *StateRequest) (*StateResponse, error)
2128
+	Events(*EventsRequest, API_EventsServer) error
2129
+	Stats(context.Context, *StatsRequest) (*StatsResponse, error)
2130
+}
2131
+
2132
+func RegisterAPIServer(s *grpc.Server, srv APIServer) {
2133
+	s.RegisterService(&_API_serviceDesc, srv)
2134
+}
2135
+
2136
+func _API_GetServerVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
2137
+	in := new(GetServerVersionRequest)
2138
+	if err := dec(in); err != nil {
2139
+		return nil, err
2140
+	}
2141
+	if interceptor == nil {
2142
+		return srv.(APIServer).GetServerVersion(ctx, in)
2143
+	}
2144
+	info := &grpc.UnaryServerInfo{
2145
+		Server:     srv,
2146
+		FullMethod: "/types.API/GetServerVersion",
2147
+	}
2148
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
2149
+		return srv.(APIServer).GetServerVersion(ctx, req.(*GetServerVersionRequest))
2150
+	}
2151
+	return interceptor(ctx, in, info, handler)
2152
+}
2153
+
2154
+func _API_CreateContainer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
2155
+	in := new(CreateContainerRequest)
2156
+	if err := dec(in); err != nil {
2157
+		return nil, err
2158
+	}
2159
+	if interceptor == nil {
2160
+		return srv.(APIServer).CreateContainer(ctx, in)
2161
+	}
2162
+	info := &grpc.UnaryServerInfo{
2163
+		Server:     srv,
2164
+		FullMethod: "/types.API/CreateContainer",
2165
+	}
2166
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
2167
+		return srv.(APIServer).CreateContainer(ctx, req.(*CreateContainerRequest))
2168
+	}
2169
+	return interceptor(ctx, in, info, handler)
2170
+}
2171
+
2172
+func _API_UpdateContainer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
2173
+	in := new(UpdateContainerRequest)
2174
+	if err := dec(in); err != nil {
2175
+		return nil, err
2176
+	}
2177
+	if interceptor == nil {
2178
+		return srv.(APIServer).UpdateContainer(ctx, in)
2179
+	}
2180
+	info := &grpc.UnaryServerInfo{
2181
+		Server:     srv,
2182
+		FullMethod: "/types.API/UpdateContainer",
2183
+	}
2184
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
2185
+		return srv.(APIServer).UpdateContainer(ctx, req.(*UpdateContainerRequest))
2186
+	}
2187
+	return interceptor(ctx, in, info, handler)
2188
+}
2189
+
2190
+func _API_Signal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
2191
+	in := new(SignalRequest)
2192
+	if err := dec(in); err != nil {
2193
+		return nil, err
2194
+	}
2195
+	if interceptor == nil {
2196
+		return srv.(APIServer).Signal(ctx, in)
2197
+	}
2198
+	info := &grpc.UnaryServerInfo{
2199
+		Server:     srv,
2200
+		FullMethod: "/types.API/Signal",
2201
+	}
2202
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
2203
+		return srv.(APIServer).Signal(ctx, req.(*SignalRequest))
2204
+	}
2205
+	return interceptor(ctx, in, info, handler)
2206
+}
2207
+
2208
+func _API_UpdateProcess_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
2209
+	in := new(UpdateProcessRequest)
2210
+	if err := dec(in); err != nil {
2211
+		return nil, err
2212
+	}
2213
+	if interceptor == nil {
2214
+		return srv.(APIServer).UpdateProcess(ctx, in)
2215
+	}
2216
+	info := &grpc.UnaryServerInfo{
2217
+		Server:     srv,
2218
+		FullMethod: "/types.API/UpdateProcess",
2219
+	}
2220
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
2221
+		return srv.(APIServer).UpdateProcess(ctx, req.(*UpdateProcessRequest))
2222
+	}
2223
+	return interceptor(ctx, in, info, handler)
2224
+}
2225
+
2226
+func _API_AddProcess_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
2227
+	in := new(AddProcessRequest)
2228
+	if err := dec(in); err != nil {
2229
+		return nil, err
2230
+	}
2231
+	if interceptor == nil {
2232
+		return srv.(APIServer).AddProcess(ctx, in)
2233
+	}
2234
+	info := &grpc.UnaryServerInfo{
2235
+		Server:     srv,
2236
+		FullMethod: "/types.API/AddProcess",
2237
+	}
2238
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
2239
+		return srv.(APIServer).AddProcess(ctx, req.(*AddProcessRequest))
2240
+	}
2241
+	return interceptor(ctx, in, info, handler)
2242
+}
2243
+
2244
+func _API_CreateCheckpoint_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
2245
+	in := new(CreateCheckpointRequest)
2246
+	if err := dec(in); err != nil {
2247
+		return nil, err
2248
+	}
2249
+	if interceptor == nil {
2250
+		return srv.(APIServer).CreateCheckpoint(ctx, in)
2251
+	}
2252
+	info := &grpc.UnaryServerInfo{
2253
+		Server:     srv,
2254
+		FullMethod: "/types.API/CreateCheckpoint",
2255
+	}
2256
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
2257
+		return srv.(APIServer).CreateCheckpoint(ctx, req.(*CreateCheckpointRequest))
2258
+	}
2259
+	return interceptor(ctx, in, info, handler)
2260
+}
2261
+
2262
+func _API_DeleteCheckpoint_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
2263
+	in := new(DeleteCheckpointRequest)
2264
+	if err := dec(in); err != nil {
2265
+		return nil, err
2266
+	}
2267
+	if interceptor == nil {
2268
+		return srv.(APIServer).DeleteCheckpoint(ctx, in)
2269
+	}
2270
+	info := &grpc.UnaryServerInfo{
2271
+		Server:     srv,
2272
+		FullMethod: "/types.API/DeleteCheckpoint",
2273
+	}
2274
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
2275
+		return srv.(APIServer).DeleteCheckpoint(ctx, req.(*DeleteCheckpointRequest))
2276
+	}
2277
+	return interceptor(ctx, in, info, handler)
2278
+}
2279
+
2280
+func _API_ListCheckpoint_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
2281
+	in := new(ListCheckpointRequest)
2282
+	if err := dec(in); err != nil {
2283
+		return nil, err
2284
+	}
2285
+	if interceptor == nil {
2286
+		return srv.(APIServer).ListCheckpoint(ctx, in)
2287
+	}
2288
+	info := &grpc.UnaryServerInfo{
2289
+		Server:     srv,
2290
+		FullMethod: "/types.API/ListCheckpoint",
2291
+	}
2292
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
2293
+		return srv.(APIServer).ListCheckpoint(ctx, req.(*ListCheckpointRequest))
2294
+	}
2295
+	return interceptor(ctx, in, info, handler)
2296
+}
2297
+
2298
+func _API_State_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
2299
+	in := new(StateRequest)
2300
+	if err := dec(in); err != nil {
2301
+		return nil, err
2302
+	}
2303
+	if interceptor == nil {
2304
+		return srv.(APIServer).State(ctx, in)
2305
+	}
2306
+	info := &grpc.UnaryServerInfo{
2307
+		Server:     srv,
2308
+		FullMethod: "/types.API/State",
2309
+	}
2310
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
2311
+		return srv.(APIServer).State(ctx, req.(*StateRequest))
2312
+	}
2313
+	return interceptor(ctx, in, info, handler)
2314
+}
2315
+
2316
+func _API_Events_Handler(srv interface{}, stream grpc.ServerStream) error {
2317
+	m := new(EventsRequest)
2318
+	if err := stream.RecvMsg(m); err != nil {
2319
+		return err
2320
+	}
2321
+	return srv.(APIServer).Events(m, &aPIEventsServer{stream})
2322
+}
2323
+
2324
+type API_EventsServer interface {
2325
+	Send(*Event) error
2326
+	grpc.ServerStream
2327
+}
2328
+
2329
+type aPIEventsServer struct {
2330
+	grpc.ServerStream
2331
+}
2332
+
2333
+func (x *aPIEventsServer) Send(m *Event) error {
2334
+	return x.ServerStream.SendMsg(m)
2335
+}
2336
+
2337
+func _API_Stats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
2338
+	in := new(StatsRequest)
2339
+	if err := dec(in); err != nil {
2340
+		return nil, err
2341
+	}
2342
+	if interceptor == nil {
2343
+		return srv.(APIServer).Stats(ctx, in)
2344
+	}
2345
+	info := &grpc.UnaryServerInfo{
2346
+		Server:     srv,
2347
+		FullMethod: "/types.API/Stats",
2348
+	}
2349
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
2350
+		return srv.(APIServer).Stats(ctx, req.(*StatsRequest))
2351
+	}
2352
+	return interceptor(ctx, in, info, handler)
2353
+}
2354
+
2355
+var _API_serviceDesc = grpc.ServiceDesc{
2356
+	ServiceName: "types.API",
2357
+	HandlerType: (*APIServer)(nil),
2358
+	Methods: []grpc.MethodDesc{
2359
+		{
2360
+			MethodName: "GetServerVersion",
2361
+			Handler:    _API_GetServerVersion_Handler,
2362
+		},
2363
+		{
2364
+			MethodName: "CreateContainer",
2365
+			Handler:    _API_CreateContainer_Handler,
2366
+		},
2367
+		{
2368
+			MethodName: "UpdateContainer",
2369
+			Handler:    _API_UpdateContainer_Handler,
2370
+		},
2371
+		{
2372
+			MethodName: "Signal",
2373
+			Handler:    _API_Signal_Handler,
2374
+		},
2375
+		{
2376
+			MethodName: "UpdateProcess",
2377
+			Handler:    _API_UpdateProcess_Handler,
2378
+		},
2379
+		{
2380
+			MethodName: "AddProcess",
2381
+			Handler:    _API_AddProcess_Handler,
2382
+		},
2383
+		{
2384
+			MethodName: "CreateCheckpoint",
2385
+			Handler:    _API_CreateCheckpoint_Handler,
2386
+		},
2387
+		{
2388
+			MethodName: "DeleteCheckpoint",
2389
+			Handler:    _API_DeleteCheckpoint_Handler,
2390
+		},
2391
+		{
2392
+			MethodName: "ListCheckpoint",
2393
+			Handler:    _API_ListCheckpoint_Handler,
2394
+		},
2395
+		{
2396
+			MethodName: "State",
2397
+			Handler:    _API_State_Handler,
2398
+		},
2399
+		{
2400
+			MethodName: "Stats",
2401
+			Handler:    _API_Stats_Handler,
2402
+		},
2403
+	},
2404
+	Streams: []grpc.StreamDesc{
2405
+		{
2406
+			StreamName:    "Events",
2407
+			Handler:       _API_Events_Handler,
2408
+			ServerStreams: true,
2409
+		},
2410
+	},
2411
+	Metadata: "api.proto",
2412
+}
2413
+
2414
+func init() { proto.RegisterFile("api.proto", fileDescriptor0) }
2415
+
2416
+var fileDescriptor0 = []byte{
2417
+	// 2632 bytes of a gzipped FileDescriptorProto
2418
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x19, 0x4d, 0x6f, 0x24, 0x47,
2419
+	0x75, 0x67, 0xa6, 0xed, 0xf1, 0xbc, 0xf9, 0xb0, 0xa7, 0xd6, 0xeb, 0xed, 0x9d, 0x24, 0xbb, 0x4e,
2420
+	0x2b, 0x10, 0x03, 0x91, 0xb3, 0x78, 0x13, 0x58, 0x11, 0x09, 0x69, 0xd7, 0x1b, 0x82, 0xc9, 0x3a,
2421
+	0x99, 0xb4, 0x6d, 0x56, 0x48, 0x48, 0xa3, 0x76, 0x77, 0xed, 0x4c, 0xe1, 0x9e, 0xae, 0x4e, 0x75,
2422
+	0xb5, 0x3d, 0xbe, 0xe4, 0xc0, 0x01, 0x0e, 0x48, 0x70, 0x45, 0xe2, 0xc8, 0x8d, 0x3b, 0x07, 0xf8,
2423
+	0x03, 0x48, 0xfc, 0x10, 0x6e, 0xdc, 0x39, 0xa2, 0xfa, 0xe8, 0xea, 0xea, 0xf9, 0xf0, 0x6e, 0x90,
2424
+	0x10, 0x17, 0x2e, 0xad, 0x7a, 0xaf, 0xde, 0x57, 0xbd, 0x7a, 0xef, 0xd5, 0xab, 0x6a, 0x68, 0x05,
2425
+	0x29, 0xd9, 0x4f, 0x19, 0xe5, 0x14, 0xad, 0xf1, 0xeb, 0x14, 0x67, 0x83, 0x07, 0x63, 0x4a, 0xc7,
2426
+	0x31, 0x7e, 0x5f, 0x22, 0xcf, 0xf3, 0x97, 0xef, 0x73, 0x32, 0xc5, 0x19, 0x0f, 0xa6, 0xa9, 0xa2,
2427
+	0xf3, 0xee, 0xc1, 0xdd, 0x4f, 0x30, 0x3f, 0xc1, 0xec, 0x12, 0xb3, 0x9f, 0x62, 0x96, 0x11, 0x9a,
2428
+	0xf8, 0xf8, 0xcb, 0x1c, 0x67, 0xdc, 0x9b, 0x81, 0xbb, 0x38, 0x95, 0xa5, 0x34, 0xc9, 0x30, 0xda,
2429
+	0x86, 0xb5, 0x69, 0xf0, 0x0b, 0xca, 0xdc, 0xda, 0x6e, 0x6d, 0xaf, 0xeb, 0x2b, 0x40, 0x62, 0x49,
2430
+	0x42, 0x99, 0x5b, 0xd7, 0x58, 0x01, 0x08, 0x6c, 0x1a, 0xf0, 0x70, 0xe2, 0x36, 0x14, 0x56, 0x02,
2431
+	0x68, 0x00, 0x1b, 0x0c, 0x5f, 0x12, 0x21, 0xd5, 0x75, 0x76, 0x6b, 0x7b, 0x2d, 0xdf, 0xc0, 0xde,
2432
+	0xaf, 0x6a, 0xb0, 0x7d, 0x96, 0x46, 0x01, 0xc7, 0x43, 0x46, 0x43, 0x9c, 0x65, 0xda, 0x24, 0xd4,
2433
+	0x83, 0x3a, 0x89, 0xa4, 0xce, 0x96, 0x5f, 0x27, 0x11, 0xda, 0x82, 0x46, 0x4a, 0x22, 0xa9, 0xae,
2434
+	0xe5, 0x8b, 0x21, 0xba, 0x0f, 0x10, 0xc6, 0x34, 0xc3, 0x27, 0x3c, 0x22, 0x89, 0xd4, 0xb8, 0xe1,
2435
+	0x5b, 0x18, 0x61, 0xcc, 0x15, 0x89, 0xf8, 0x44, 0xea, 0xec, 0xfa, 0x0a, 0x40, 0x3b, 0xb0, 0x3e,
2436
+	0xc1, 0x64, 0x3c, 0xe1, 0xee, 0x9a, 0x44, 0x6b, 0xc8, 0xbb, 0x0b, 0x77, 0xe6, 0xec, 0x50, 0xeb,
2437
+	0xf7, 0xfe, 0x5e, 0x87, 0x9d, 0x43, 0x86, 0x03, 0x8e, 0x0f, 0x69, 0xc2, 0x03, 0x92, 0x60, 0xb6,
2438
+	0xca, 0xc6, 0xfb, 0x00, 0xe7, 0x79, 0x12, 0xc5, 0x78, 0x18, 0xf0, 0x89, 0x36, 0xd5, 0xc2, 0x48,
2439
+	0x8b, 0x27, 0x38, 0xbc, 0x48, 0x29, 0x49, 0xb8, 0xb4, 0xb8, 0xe5, 0x5b, 0x18, 0x61, 0x71, 0x26,
2440
+	0x17, 0xa3, 0xbc, 0xa4, 0x00, 0x61, 0x71, 0xc6, 0x23, 0x9a, 0x2b, 0x8b, 0x5b, 0xbe, 0x86, 0x34,
2441
+	0x1e, 0x33, 0xe6, 0xae, 0x1b, 0x3c, 0x66, 0x4c, 0xe0, 0xe3, 0xe0, 0x1c, 0xc7, 0x99, 0xdb, 0xdc,
2442
+	0x6d, 0x08, 0xbc, 0x82, 0xd0, 0x2e, 0xb4, 0x13, 0x3a, 0x24, 0x97, 0x94, 0xfb, 0x94, 0x72, 0x77,
2443
+	0x43, 0x3a, 0xcc, 0x46, 0x21, 0x17, 0x9a, 0x2c, 0x4f, 0x44, 0xdc, 0xb8, 0x2d, 0x29, 0xb2, 0x00,
2444
+	0x05, 0xaf, 0x1e, 0x3e, 0x61, 0xe3, 0xcc, 0x05, 0x29, 0xd8, 0x46, 0xa1, 0x77, 0xa0, 0x5b, 0xae,
2445
+	0xe4, 0x19, 0x61, 0x6e, 0x5b, 0x4a, 0xa8, 0x22, 0xbd, 0x23, 0xb8, 0xbb, 0xe0, 0x4b, 0x1d, 0x67,
2446
+	0xfb, 0xd0, 0x0a, 0x0b, 0xa4, 0xf4, 0x69, 0xfb, 0x60, 0x6b, 0x5f, 0x86, 0xf6, 0x7e, 0x49, 0x5c,
2447
+	0x92, 0x78, 0x47, 0xd0, 0x3d, 0x21, 0xe3, 0x24, 0x88, 0x5f, 0x3f, 0x62, 0x84, 0xc7, 0x24, 0x8b,
2448
+	0x8e, 0x4f, 0x0d, 0x79, 0x5b, 0xd0, 0x2b, 0x44, 0xe9, 0x4d, 0xff, 0x73, 0x03, 0xfa, 0x4f, 0xa2,
2449
+	0xe8, 0x15, 0x31, 0x39, 0x80, 0x0d, 0x8e, 0xd9, 0x94, 0x08, 0x89, 0x75, 0xe9, 0x4e, 0x03, 0xa3,
2450
+	0x07, 0xe0, 0xe4, 0x19, 0x66, 0x52, 0x53, 0xfb, 0xa0, 0xad, 0x57, 0x72, 0x96, 0x61, 0xe6, 0xcb,
2451
+	0x09, 0x84, 0xc0, 0x09, 0x84, 0x2f, 0x1d, 0xe9, 0x4b, 0x39, 0x16, 0x26, 0xe3, 0xe4, 0xd2, 0x5d,
2452
+	0x93, 0x28, 0x31, 0x14, 0x98, 0xf0, 0x2a, 0xd2, 0x3b, 0x2c, 0x86, 0xc5, 0xb2, 0x9a, 0xe5, 0xb2,
2453
+	0x4c, 0xd8, 0x6c, 0x2c, 0x0f, 0x9b, 0xd6, 0x8a, 0xb0, 0x81, 0x4a, 0xd8, 0x78, 0xd0, 0x09, 0x83,
2454
+	0x34, 0x38, 0x27, 0x31, 0xe1, 0x04, 0x67, 0x6e, 0x5b, 0x1a, 0x51, 0xc1, 0xa1, 0x3d, 0xd8, 0x0c,
2455
+	0xd2, 0x34, 0x60, 0x53, 0xca, 0x86, 0x8c, 0xbe, 0x24, 0x31, 0x76, 0x3b, 0x52, 0xc8, 0x3c, 0x5a,
2456
+	0x48, 0xcb, 0x70, 0x4c, 0x92, 0x7c, 0xf6, 0x5c, 0x44, 0x9f, 0xdb, 0x95, 0x64, 0x15, 0x9c, 0x90,
2457
+	0x96, 0xd0, 0xcf, 0xf0, 0xd5, 0x90, 0x91, 0x4b, 0x12, 0xe3, 0x31, 0xce, 0xdc, 0x9e, 0xf4, 0xe2,
2458
+	0x3c, 0x1a, 0xbd, 0x0b, 0x4d, 0x16, 0x93, 0x29, 0xe1, 0x99, 0xbb, 0xb9, 0xdb, 0xd8, 0x6b, 0x1f,
2459
+	0x74, 0xb5, 0x3f, 0x7d, 0x89, 0xf5, 0x8b, 0x59, 0xef, 0x19, 0xac, 0x2b, 0x94, 0x70, 0xaf, 0x20,
2460
+	0xd1, 0xbb, 0x25, 0xc7, 0x02, 0x97, 0xd1, 0x97, 0x5c, 0xee, 0x95, 0xe3, 0xcb, 0xb1, 0xc0, 0x4d,
2461
+	0x02, 0x16, 0xc9, 0x7d, 0x72, 0x7c, 0x39, 0xf6, 0x7c, 0x70, 0xc4, 0x46, 0x09, 0x57, 0xe7, 0x7a,
2462
+	0xc3, 0xbb, 0xbe, 0x18, 0x0a, 0xcc, 0x58, 0xc7, 0x54, 0xd7, 0x17, 0x43, 0xf4, 0x4d, 0xe8, 0x05,
2463
+	0x51, 0x44, 0x38, 0xa1, 0x49, 0x10, 0x7f, 0x42, 0xa2, 0xcc, 0x6d, 0xec, 0x36, 0xf6, 0xba, 0xfe,
2464
+	0x1c, 0xd6, 0x3b, 0x00, 0x64, 0x07, 0x94, 0x0e, 0xfa, 0x37, 0xa1, 0x95, 0x5d, 0x67, 0x1c, 0x4f,
2465
+	0x87, 0x46, 0x4f, 0x89, 0xf0, 0x7e, 0x59, 0x33, 0xe9, 0x62, 0xb2, 0x68, 0x55, 0x2c, 0x7e, 0xb7,
2466
+	0x52, 0x5b, 0xea, 0x32, 0xea, 0xfa, 0x45, 0xfe, 0x94, 0xdc, 0x76, 0xb9, 0x59, 0x48, 0xd9, 0xc6,
2467
+	0xb2, 0x94, 0x1d, 0x80, 0xbb, 0x68, 0x83, 0x4e, 0x93, 0x10, 0xee, 0x3e, 0xc3, 0x31, 0x7e, 0x1d,
2468
+	0xfb, 0x10, 0x38, 0x49, 0x30, 0xc5, 0x3a, 0x1d, 0xe5, 0xf8, 0xf5, 0x0d, 0x58, 0x54, 0xa2, 0x0d,
2469
+	0x38, 0x86, 0x3b, 0xcf, 0x49, 0xc6, 0x5f, 0xad, 0x7e, 0x41, 0x55, 0x7d, 0x99, 0xaa, 0xdf, 0xd7,
2470
+	0x00, 0x4a, 0x59, 0xc6, 0xe6, 0x9a, 0x65, 0x33, 0x02, 0x07, 0xcf, 0x08, 0xd7, 0xf9, 0x2e, 0xc7,
2471
+	0x22, 0x2a, 0x78, 0x98, 0xea, 0x23, 0x48, 0x0c, 0x45, 0xbd, 0xcc, 0x13, 0x32, 0x3b, 0xa1, 0xe1,
2472
+	0x05, 0xe6, 0x99, 0xac, 0xe7, 0x1b, 0xbe, 0x8d, 0x92, 0x49, 0x3b, 0xc1, 0x71, 0x2c, 0x8b, 0xfa,
2473
+	0x86, 0xaf, 0x00, 0x51, 0x81, 0xf1, 0x34, 0xe5, 0xd7, 0x9f, 0x9d, 0xb8, 0xeb, 0x32, 0xff, 0x0a,
2474
+	0xd0, 0x3b, 0x86, 0x9d, 0xf9, 0x95, 0xea, 0x18, 0x7a, 0x04, 0xed, 0x72, 0x15, 0x99, 0x5b, 0x93,
2475
+	0x09, 0xb2, 0x64, 0xeb, 0x6d, 0x2a, 0xef, 0x3e, 0x74, 0x4e, 0x78, 0xc0, 0xf1, 0x0a, 0x7f, 0x79,
2476
+	0x7b, 0xd0, 0x33, 0x55, 0x57, 0x12, 0xaa, 0xba, 0x11, 0xf0, 0x3c, 0xd3, 0x54, 0x1a, 0xf2, 0xfe,
2477
+	0xd2, 0x80, 0xa6, 0x0e, 0xeb, 0xa2, 0x36, 0xd5, 0xca, 0xda, 0xf4, 0x3f, 0x29, 0x91, 0x95, 0xac,
2478
+	0x6a, 0xce, 0x65, 0xd5, 0xff, 0xcb, 0x65, 0x59, 0x2e, 0xff, 0x56, 0x83, 0x96, 0xd9, 0xe6, 0xaf,
2479
+	0xdd, 0xce, 0xbc, 0x07, 0xad, 0x54, 0x6d, 0x3c, 0x56, 0x55, 0xaf, 0x7d, 0xd0, 0xd3, 0x8a, 0x8a,
2480
+	0x3a, 0x57, 0x12, 0x58, 0xf1, 0xe3, 0xd8, 0xf1, 0x63, 0xb5, 0x2b, 0x6b, 0x95, 0x76, 0x05, 0x81,
2481
+	0x93, 0x8a, 0x72, 0xba, 0x2e, 0xcb, 0xa9, 0x1c, 0xdb, 0x0d, 0x4a, 0xb3, 0xd2, 0xa0, 0x78, 0x1f,
2482
+	0x42, 0xf3, 0x38, 0x08, 0x27, 0x24, 0x91, 0x19, 0x1a, 0xa6, 0x3a, 0x4c, 0xbb, 0xbe, 0x1c, 0x0b,
2483
+	0x25, 0x53, 0x3c, 0xa5, 0xec, 0x5a, 0xd7, 0x7e, 0x0d, 0x79, 0x17, 0xd0, 0xd5, 0x69, 0xa0, 0x93,
2484
+	0xe9, 0x21, 0x80, 0x69, 0x31, 0x8a, 0x5c, 0x5a, 0x6c, 0x43, 0x2c, 0x1a, 0xb4, 0x07, 0xcd, 0xa9,
2485
+	0xd2, 0xac, 0xab, 0x6e, 0xe1, 0x03, 0x6d, 0x8f, 0x5f, 0x4c, 0x7b, 0xbf, 0xae, 0xc1, 0x8e, 0xea,
2486
+	0x31, 0x5f, 0xd9, 0x49, 0x2e, 0xef, 0x5d, 0x94, 0xfb, 0x1a, 0x15, 0xf7, 0x3d, 0x82, 0x16, 0xc3,
2487
+	0x19, 0xcd, 0x59, 0x88, 0x95, 0x67, 0xdb, 0x07, 0x77, 0x8a, 0x4c, 0x92, 0xba, 0x7c, 0x3d, 0xeb,
2488
+	0x97, 0x74, 0xde, 0x6f, 0x9a, 0xd0, 0xab, 0xce, 0x8a, 0x8a, 0x75, 0x1e, 0x5f, 0x10, 0xfa, 0x42,
2489
+	0x35, 0xc7, 0x35, 0xe9, 0x26, 0x1b, 0x25, 0xb2, 0x2a, 0x4c, 0xf3, 0x93, 0x49, 0xc0, 0x70, 0xa6,
2490
+	0xdd, 0x58, 0x22, 0xf4, 0xec, 0x10, 0x33, 0x42, 0x8b, 0xc3, 0xb4, 0x44, 0x88, 0x32, 0x10, 0xa6,
2491
+	0xf9, 0x17, 0x39, 0xe5, 0x81, 0x34, 0xd2, 0xf1, 0x0d, 0x2c, 0xbb, 0xe2, 0x34, 0xcf, 0x30, 0x3f,
2492
+	0x14, 0xbb, 0xb6, 0xa6, 0xbb, 0x62, 0x83, 0x29, 0xe7, 0x8f, 0xf1, 0x34, 0xd3, 0x69, 0x6e, 0x61,
2493
+	0x84, 0xe5, 0x6a, 0x37, 0x9f, 0x8b, 0xa0, 0x96, 0x81, 0xe1, 0xf8, 0x36, 0x4a, 0x48, 0x50, 0xe0,
2494
+	0xc9, 0x55, 0x90, 0xca, 0xb4, 0x77, 0x7c, 0x0b, 0x83, 0xde, 0x83, 0xbe, 0x82, 0x7c, 0x9c, 0x61,
2495
+	0x76, 0x19, 0x88, 0x63, 0x5b, 0x96, 0x01, 0xc7, 0x5f, 0x9c, 0x10, 0xd4, 0x17, 0x98, 0x25, 0x38,
2496
+	0x3e, 0xb6, 0xb4, 0x82, 0xa2, 0x5e, 0x98, 0x40, 0x07, 0xb0, 0xad, 0x90, 0xa7, 0x87, 0x43, 0x9b,
2497
+	0xa1, 0x2d, 0x19, 0x96, 0xce, 0x89, 0x4c, 0x97, 0x8e, 0x7f, 0x8e, 0x83, 0x97, 0x7a, 0x3f, 0x3a,
2498
+	0x92, 0x7c, 0x1e, 0x8d, 0x9e, 0x40, 0xdf, 0xda, 0xa2, 0x67, 0xf8, 0x92, 0x84, 0xd8, 0xed, 0xca,
2499
+	0xa8, 0xbd, 0xad, 0xa3, 0xc0, 0x9e, 0xf2, 0x17, 0xa9, 0xd1, 0x19, 0x0c, 0x24, 0xf2, 0x74, 0xc2,
2500
+	0x28, 0xe7, 0x31, 0xf6, 0x71, 0x10, 0x3d, 0x4d, 0x33, 0x2d, 0xab, 0x27, 0x65, 0x15, 0x11, 0x55,
2501
+	0xd0, 0x68, 0x69, 0x37, 0x30, 0xa2, 0x17, 0xf0, 0x46, 0x65, 0xf6, 0x05, 0x23, 0x1c, 0x97, 0x72,
2502
+	0x37, 0x6f, 0x92, 0x7b, 0x13, 0xe7, 0x82, 0x60, 0xa1, 0xf6, 0x88, 0x1a, 0xc1, 0x5b, 0xaf, 0x2f,
2503
+	0xb8, 0xca, 0x89, 0x7e, 0x06, 0x6f, 0x2e, 0xea, 0xb5, 0x24, 0xf7, 0x6f, 0x92, 0x7c, 0x23, 0xab,
2504
+	0x48, 0x0e, 0x51, 0xbf, 0xd4, 0xce, 0x23, 0x95, 0x1c, 0x06, 0xe1, 0x7d, 0x04, 0xdd, 0xa7, 0x31,
2505
+	0x0d, 0x2f, 0x8e, 0x3e, 0xd7, 0xe4, 0x95, 0x2b, 0x77, 0x63, 0xe9, 0x95, 0xbb, 0xa1, 0xaf, 0xdc,
2506
+	0xde, 0x57, 0xd0, 0xa9, 0x6c, 0xe7, 0xf7, 0x64, 0x1e, 0x17, 0xa2, 0xf4, 0x45, 0x6a, 0x5b, 0x1b,
2507
+	0x5d, 0x51, 0xe3, 0xdb, 0x84, 0xa2, 0xbe, 0x5c, 0xa9, 0x50, 0x53, 0xcd, 0xad, 0x86, 0x44, 0xee,
2508
+	0xc4, 0x65, 0x18, 0xaa, 0x7b, 0x93, 0x85, 0xf1, 0x7e, 0x0e, 0xbd, 0xaa, 0x2b, 0xfe, 0x63, 0x0b,
2509
+	0x10, 0x38, 0x2c, 0xe0, 0xb8, 0xe8, 0xce, 0xc5, 0xd8, 0xbb, 0x07, 0x77, 0x17, 0x2a, 0xa6, 0x6e,
2510
+	0xfd, 0xae, 0xa1, 0xfb, 0xf1, 0x25, 0x4e, 0xb8, 0xb9, 0x9d, 0x3d, 0x86, 0x96, 0x79, 0xf2, 0xd0,
2511
+	0xa5, 0x78, 0xb0, 0xaf, 0x1e, 0x45, 0xf6, 0x8b, 0x47, 0x91, 0xfd, 0xd3, 0x82, 0xc2, 0x2f, 0x89,
2512
+	0xc5, 0x1a, 0x33, 0x4e, 0x19, 0x8e, 0x3e, 0x4f, 0xe2, 0xeb, 0xe2, 0x25, 0xa1, 0xc4, 0xe8, 0xea,
2513
+	0xec, 0x98, 0xe6, 0xe8, 0x77, 0x35, 0x58, 0x93, 0xba, 0x97, 0xde, 0x32, 0x14, 0x75, 0xdd, 0xd4,
2514
+	0xf2, 0x6a, 0xe5, 0xee, 0x9a, 0xca, 0xad, 0x6b, 0xbc, 0x53, 0xd6, 0xf8, 0xca, 0x0a, 0xd6, 0xbf,
2515
+	0xc6, 0x0a, 0xbc, 0xdf, 0xd6, 0xa1, 0xf3, 0x19, 0xe6, 0x57, 0x94, 0x5d, 0x88, 0xf3, 0x2c, 0x5b,
2516
+	0xda, 0xba, 0xde, 0x83, 0x0d, 0x36, 0x1b, 0x9d, 0x5f, 0x73, 0x53, 0xbf, 0x9b, 0x6c, 0xf6, 0x54,
2517
+	0x80, 0xe8, 0x2d, 0x00, 0x36, 0x1b, 0x0d, 0x03, 0xd5, 0xae, 0xea, 0xf2, 0xcd, 0x66, 0x1a, 0x81,
2518
+	0xde, 0x80, 0x96, 0x3f, 0x1b, 0x61, 0xc6, 0x28, 0xcb, 0x8a, 0xfa, 0xed, 0xcf, 0x3e, 0x96, 0xb0,
2519
+	0xe0, 0xf5, 0x67, 0xa3, 0x88, 0xd1, 0x34, 0xc5, 0x91, 0xac, 0xdf, 0x8e, 0xdf, 0xf2, 0x67, 0xcf,
2520
+	0x14, 0x42, 0x68, 0x3d, 0x2d, 0xb4, 0xae, 0x2b, 0xad, 0xa7, 0xa5, 0xd6, 0xd3, 0xd9, 0x28, 0xd5,
2521
+	0x5a, 0x55, 0xe1, 0x6e, 0x9d, 0xda, 0x5a, 0x4f, 0x8d, 0x56, 0x55, 0xb5, 0x37, 0x4e, 0x2d, 0xad,
2522
+	0xa7, 0xa5, 0xd6, 0x56, 0xc1, 0xab, 0xb5, 0x7a, 0x7f, 0xaa, 0xc1, 0xc6, 0x61, 0x9a, 0x9f, 0x65,
2523
+	0xc1, 0x18, 0xa3, 0x07, 0xd0, 0xe6, 0x94, 0x07, 0xf1, 0x28, 0x17, 0xa0, 0x3e, 0xdb, 0x40, 0xa2,
2524
+	0x14, 0xc1, 0xdb, 0xd0, 0x49, 0x31, 0x0b, 0xd3, 0x5c, 0x53, 0xd4, 0x77, 0x1b, 0xe2, 0x0c, 0x51,
2525
+	0x38, 0x45, 0xb2, 0x0f, 0xb7, 0xe5, 0xdc, 0x88, 0x24, 0x23, 0x55, 0xb4, 0xa7, 0x34, 0xc2, 0xda,
2526
+	0x55, 0x7d, 0x39, 0x75, 0x94, 0x7c, 0x6a, 0x26, 0xd0, 0xb7, 0xa1, 0x6f, 0xe8, 0x45, 0x33, 0x2b,
2527
+	0xa9, 0x95, 0xeb, 0x36, 0x35, 0xf5, 0x99, 0x46, 0x7b, 0x5f, 0x99, 0x1c, 0x22, 0xc9, 0xf8, 0x59,
2528
+	0xc0, 0x03, 0xd1, 0xe8, 0xa4, 0xf2, 0xe4, 0xcc, 0xb4, 0xb5, 0x05, 0x88, 0xbe, 0x03, 0x7d, 0xae,
2529
+	0xf3, 0x2d, 0x1a, 0x15, 0x34, 0x6a, 0x37, 0xb7, 0xcc, 0xc4, 0x50, 0x13, 0x7f, 0x03, 0x7a, 0x25,
2530
+	0xb1, 0x6c, 0x9b, 0x94, 0xbd, 0x5d, 0x83, 0x15, 0xd1, 0xe4, 0xfd, 0x41, 0x39, 0x4b, 0x45, 0xce,
2531
+	0x7b, 0xf2, 0x20, 0xb7, 0x5c, 0xd5, 0x3e, 0xd8, 0x2c, 0x1a, 0x20, 0xed, 0x0c, 0x79, 0x78, 0x2b,
2532
+	0xb7, 0xfc, 0x10, 0x36, 0xb9, 0x31, 0x7d, 0x14, 0x05, 0x3c, 0xd0, 0xa9, 0x37, 0x57, 0x27, 0xf5,
2533
+	0xc2, 0xfc, 0x1e, 0xaf, 0x2e, 0xf4, 0x6d, 0xe8, 0xa8, 0xce, 0x5c, 0x2b, 0x54, 0xf6, 0xb5, 0x15,
2534
+	0x4e, 0xaa, 0xf0, 0x3e, 0x82, 0xd6, 0x90, 0x44, 0x99, 0xb2, 0xce, 0x85, 0x66, 0x98, 0x33, 0x86,
2535
+	0x93, 0xa2, 0x45, 0x29, 0x40, 0x51, 0x1e, 0x65, 0x57, 0xab, 0x9d, 0xa1, 0x00, 0x8f, 0x02, 0xa8,
2536
+	0x93, 0x55, 0x6a, 0xdb, 0x86, 0x35, 0x3b, 0x04, 0x14, 0x20, 0xe2, 0x6c, 0x1a, 0xcc, 0xcc, 0xd6,
2537
+	0xcb, 0x38, 0x9b, 0x06, 0x33, 0xb5, 0x40, 0x17, 0x9a, 0x2f, 0x03, 0x12, 0x87, 0xfa, 0xc1, 0xce,
2538
+	0xf1, 0x0b, 0xb0, 0x54, 0xe8, 0xd8, 0x0a, 0xff, 0x58, 0x87, 0xb6, 0xd2, 0xa8, 0x0c, 0xde, 0x86,
2539
+	0xb5, 0x30, 0x08, 0x27, 0x46, 0xa5, 0x04, 0xd0, 0xbb, 0x85, 0x21, 0xd5, 0x8b, 0x7a, 0x69, 0x6a,
2540
+	0x61, 0xdb, 0x43, 0x80, 0xec, 0x2a, 0x48, 0x2d, 0xef, 0x2c, 0xa5, 0x6e, 0x09, 0x22, 0x65, 0xf0,
2541
+	0x07, 0xd0, 0x51, 0xf1, 0xa9, 0x79, 0x9c, 0x55, 0x3c, 0x6d, 0x45, 0xa6, 0xb8, 0x1e, 0x89, 0x4b,
2542
+	0x51, 0xc0, 0x55, 0x13, 0xde, 0x3e, 0x78, 0xab, 0x42, 0x2e, 0x57, 0xb2, 0x2f, 0xbf, 0x1f, 0x27,
2543
+	0x9c, 0x5d, 0xfb, 0x8a, 0x76, 0xf0, 0x18, 0xa0, 0x44, 0x8a, 0x7a, 0x76, 0x81, 0xaf, 0x8b, 0xcb,
2544
+	0xdf, 0x05, 0xbe, 0x16, 0x6b, 0xbf, 0x0c, 0xe2, 0xbc, 0x70, 0xaa, 0x02, 0x7e, 0x50, 0x7f, 0x5c,
2545
+	0xf3, 0x42, 0xd8, 0x7c, 0x2a, 0x0e, 0x4c, 0x8b, 0xbd, 0x72, 0xe8, 0x39, 0x4b, 0x0f, 0x3d, 0xa7,
2546
+	0x78, 0x67, 0xee, 0x41, 0x9d, 0xa6, 0xba, 0x11, 0xae, 0xd3, 0xb4, 0x54, 0xe4, 0x58, 0x8a, 0xbc,
2547
+	0x7f, 0x38, 0x00, 0xa5, 0x16, 0x74, 0x02, 0x03, 0x42, 0x47, 0xa2, 0x8f, 0x23, 0x21, 0x56, 0x05,
2548
+	0x69, 0xc4, 0x70, 0x98, 0xb3, 0x8c, 0x5c, 0x62, 0xdd, 0xea, 0xef, 0x98, 0x63, 0xaa, 0x62, 0x9c,
2549
+	0x7f, 0x97, 0xd0, 0x13, 0xc5, 0x28, 0x2b, 0x97, 0x5f, 0xb0, 0xa1, 0x9f, 0xc0, 0x9d, 0x52, 0x68,
2550
+	0x64, 0xc9, 0xab, 0xdf, 0x28, 0xef, 0xb6, 0x91, 0x17, 0x95, 0xb2, 0x7e, 0x04, 0xb7, 0x09, 0x1d,
2551
+	0x7d, 0x99, 0xe3, 0xbc, 0x22, 0xa9, 0x71, 0xa3, 0xa4, 0x3e, 0xa1, 0x5f, 0x48, 0x8e, 0x52, 0xce,
2552
+	0x17, 0x70, 0xcf, 0x5a, 0xa8, 0x48, 0x7b, 0x4b, 0x9a, 0x73, 0xa3, 0xb4, 0x1d, 0x63, 0x97, 0x28,
2553
+	0x0c, 0xa5, 0xc8, 0x4f, 0x61, 0x87, 0xd0, 0xd1, 0x55, 0x40, 0xf8, 0xbc, 0xbc, 0xb5, 0x57, 0xad,
2554
+	0xf3, 0x45, 0x40, 0x78, 0x55, 0x98, 0x5a, 0xe7, 0x14, 0xb3, 0x71, 0x65, 0x9d, 0xeb, 0xaf, 0x5a,
2555
+	0xe7, 0xb1, 0xe4, 0x28, 0xe5, 0x3c, 0x85, 0x3e, 0xa1, 0xf3, 0xf6, 0x34, 0x6f, 0x94, 0xb2, 0x49,
2556
+	0x68, 0xd5, 0x96, 0x43, 0xe8, 0x67, 0x38, 0xe4, 0x94, 0xd9, 0xb1, 0xb0, 0x71, 0xa3, 0x8c, 0x2d,
2557
+	0xcd, 0x60, 0x84, 0x78, 0x5f, 0x42, 0xe7, 0xc7, 0xf9, 0x18, 0xf3, 0xf8, 0xdc, 0xe4, 0xfc, 0x7f,
2558
+	0xbb, 0xcc, 0xfc, 0xab, 0x0e, 0xed, 0xc3, 0x31, 0xa3, 0x79, 0x5a, 0xa9, 0xda, 0x2a, 0x87, 0x17,
2559
+	0xaa, 0xb6, 0xa4, 0x91, 0x55, 0x5b, 0x51, 0x7f, 0x08, 0x1d, 0x75, 0xaf, 0xd1, 0x0c, 0xaa, 0x0a,
2560
+	0xa1, 0xc5, 0xa4, 0x2f, 0xee, 0x51, 0x8a, 0xed, 0x40, 0xdf, 0x11, 0x35, 0x57, 0xb5, 0x1a, 0x95,
2561
+	0x6e, 0xf2, 0xe1, 0xbc, 0xcc, 0xba, 0x23, 0xe8, 0x4e, 0x94, 0x6f, 0x34, 0x97, 0x0a, 0xc0, 0x77,
2562
+	0x0a, 0xe3, 0xca, 0x35, 0xec, 0xdb, 0x3e, 0x54, 0xae, 0xee, 0x4c, 0x6c, 0xb7, 0xbe, 0x0f, 0x20,
2563
+	0x9a, 0xe6, 0x51, 0x51, 0xa8, 0xec, 0x5f, 0x04, 0xe6, 0x84, 0x50, 0x8d, 0xb5, 0x1c, 0x0e, 0x4e,
2564
+	0xa1, 0xbf, 0x20, 0x73, 0x49, 0x99, 0xfa, 0x96, 0x5d, 0xa6, 0xca, 0x8b, 0x93, 0xcd, 0x6a, 0xd7,
2565
+	0xae, 0xbf, 0xd6, 0xd4, 0xa3, 0x41, 0xf9, 0x8a, 0xfb, 0x18, 0xba, 0x89, 0x6a, 0xbe, 0xcc, 0x06,
2566
+	0xd8, 0x37, 0x30, 0xbb, 0x31, 0xf3, 0x3b, 0x89, 0xdd, 0xa6, 0x7d, 0x08, 0x9d, 0x50, 0x7a, 0x60,
2567
+	0xe9, 0x46, 0x58, 0xce, 0xf1, 0xdb, 0xa1, 0xb5, 0xdb, 0x95, 0x46, 0xd1, 0xf9, 0x3a, 0x8d, 0xa2,
2568
+	0x7e, 0xf7, 0x5b, 0xf5, 0x4b, 0xe3, 0xe0, 0x9f, 0xeb, 0xd0, 0x78, 0x32, 0x3c, 0x42, 0x67, 0xb0,
2569
+	0x35, 0xff, 0x47, 0x10, 0xdd, 0xd7, 0x66, 0xad, 0xf8, 0x8b, 0x38, 0x78, 0xb0, 0x72, 0x5e, 0xb7,
2570
+	0xec, 0xb7, 0x90, 0x0f, 0x9b, 0x73, 0xff, 0x7f, 0x50, 0x71, 0xd4, 0x2c, 0xff, 0xc7, 0x36, 0xb8,
2571
+	0xbf, 0x6a, 0xda, 0x96, 0x39, 0x77, 0x47, 0x30, 0x32, 0x97, 0xbf, 0xb6, 0x18, 0x99, 0xab, 0xae,
2572
+	0x16, 0xb7, 0xd0, 0xf7, 0x61, 0x5d, 0xfd, 0x11, 0x42, 0xc5, 0xc5, 0xa5, 0xf2, 0xaf, 0x69, 0x70,
2573
+	0x67, 0x0e, 0x6b, 0x18, 0x9f, 0x43, 0xb7, 0xf2, 0x1b, 0x11, 0xbd, 0x51, 0xd1, 0x55, 0xfd, 0xa1,
2574
+	0x34, 0x78, 0x73, 0xf9, 0xa4, 0x91, 0x76, 0x08, 0x50, 0xfe, 0x34, 0x40, 0xae, 0xa6, 0x5e, 0xf8,
2575
+	0x31, 0x35, 0xb8, 0xb7, 0x64, 0xc6, 0x08, 0x39, 0x83, 0xad, 0xf9, 0x07, 0x7c, 0x34, 0xe7, 0xd5,
2576
+	0xf9, 0xe7, 0x73, 0xb3, 0x95, 0x2b, 0x5f, 0xfe, 0xa5, 0xd8, 0xf9, 0x67, 0x79, 0x23, 0x76, 0xc5,
2577
+	0x4f, 0x01, 0x23, 0x76, 0xe5, 0x7b, 0xfe, 0x2d, 0xf4, 0x39, 0xf4, 0xaa, 0xef, 0xdc, 0xa8, 0x70,
2578
+	0xd2, 0xd2, 0x87, 0xfe, 0xc1, 0x5b, 0x2b, 0x66, 0x8d, 0xc0, 0x0f, 0x60, 0x4d, 0x3d, 0x60, 0x17,
2579
+	0xe9, 0x68, 0xbf, 0x7b, 0x0f, 0xb6, 0xab, 0x48, 0xc3, 0xf5, 0x10, 0xd6, 0xd5, 0xed, 0xd2, 0x04,
2580
+	0x40, 0xe5, 0xb2, 0x39, 0xe8, 0xd8, 0x58, 0xef, 0xd6, 0xc3, 0x5a, 0xa1, 0x27, 0xab, 0xe8, 0xc9,
2581
+	0x96, 0xe9, 0xb1, 0x36, 0xe7, 0x7c, 0x5d, 0xa6, 0xeb, 0xa3, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff,
2582
+	0x4c, 0xa9, 0xa8, 0x4d, 0xd0, 0x1f, 0x00, 0x00,
2583
+}
0 2584
new file mode 100644
... ...
@@ -0,0 +1,344 @@
0
+syntax = "proto3";
1
+
2
+package types;
3
+
4
+import "google/protobuf/timestamp.proto";
5
+
6
+service API {
7
+	rpc GetServerVersion(GetServerVersionRequest) returns (GetServerVersionResponse) {}
8
+	rpc CreateContainer(CreateContainerRequest) returns (CreateContainerResponse) {}
9
+	rpc UpdateContainer(UpdateContainerRequest) returns (UpdateContainerResponse) {}
10
+	rpc Signal(SignalRequest) returns (SignalResponse) {}
11
+	rpc UpdateProcess(UpdateProcessRequest) returns (UpdateProcessResponse) {}
12
+	rpc AddProcess(AddProcessRequest) returns (AddProcessResponse) {}
13
+	rpc CreateCheckpoint(CreateCheckpointRequest) returns (CreateCheckpointResponse) {}
14
+	rpc DeleteCheckpoint(DeleteCheckpointRequest) returns (DeleteCheckpointResponse) {}
15
+	rpc ListCheckpoint(ListCheckpointRequest) returns (ListCheckpointResponse) {}
16
+	rpc State(StateRequest) returns (StateResponse) {}
17
+	rpc Events(EventsRequest) returns (stream Event) {}
18
+	rpc Stats(StatsRequest) returns (StatsResponse) {}
19
+}
20
+
21
+message GetServerVersionRequest {
22
+}
23
+
24
+message GetServerVersionResponse {
25
+	uint32 major = 1;
26
+	uint32 minor = 2;
27
+	uint32 patch = 3;
28
+	string revision = 4;
29
+}
30
+
31
+message UpdateProcessRequest {
32
+	string id = 1;
33
+	string pid = 2;
34
+	bool closeStdin = 3; // Close stdin of the container
35
+	uint32 width = 4;
36
+	uint32 height = 5;
37
+}
38
+
39
+message UpdateProcessResponse {
40
+}
41
+
42
+message CreateContainerRequest {
43
+	string id = 1; // ID of container
44
+	string bundlePath = 2; // path to OCI bundle
45
+	string checkpoint = 3; // checkpoint name if you want to create immediate checkpoint (optional)
46
+	string stdin = 4; // path to the file where stdin will be read (optional)
47
+	string stdout = 5; // path to file where stdout will be written (optional)
48
+	string stderr = 6; // path to file where stderr will be written (optional)
49
+	repeated string labels = 7;
50
+	bool noPivotRoot = 8;
51
+	string runtime = 9;
52
+	repeated string runtimeArgs = 10;
53
+	string checkpointDir = 11; // Directory where checkpoints are stored
54
+}
55
+
56
+message CreateContainerResponse {
57
+	Container container = 1;
58
+}
59
+
60
+message SignalRequest {
61
+	string id = 1; // ID of container
62
+	string pid = 2; // PID of process inside container
63
+	uint32 signal = 3; // Signal which will be sent, you can find value in "man 7 signal"
64
+}
65
+
66
+message SignalResponse {
67
+}
68
+
69
+message AddProcessRequest {
70
+	string id = 1; // ID of container
71
+	bool terminal = 2; // Use tty for container stdio
72
+	User user = 3; // User under which process will be run
73
+	repeated string args = 4; // Arguments for process, first is binary path itself
74
+	repeated string env = 5; // List of environment variables for process
75
+	string cwd = 6; // Working directory of process
76
+	string pid = 7; // Process ID
77
+	string stdin = 8; // path to the file where stdin will be read (optional)
78
+	string stdout = 9; // path to file where stdout will be written (optional)
79
+	string stderr = 10; // path to file where stderr will be written (optional)
80
+	repeated string capabilities = 11;
81
+	string apparmorProfile = 12;
82
+	string selinuxLabel = 13;
83
+	bool noNewPrivileges = 14;
84
+	repeated Rlimit rlimits = 15;
85
+}
86
+
87
+message Rlimit {
88
+	string type = 1;
89
+	uint64 soft = 2;
90
+	uint64 hard = 3;
91
+}
92
+
93
+message User {
94
+	uint32 uid = 1; // UID of user
95
+	uint32 gid = 2; // GID of user
96
+	repeated uint32 additionalGids = 3; // Additional groups to which user will be added
97
+}
98
+
99
+message AddProcessResponse {
100
+	uint32 systemPid = 1;
101
+}
102
+
103
+message CreateCheckpointRequest {
104
+	string id = 1; // ID of container
105
+	Checkpoint checkpoint = 2; // Checkpoint configuration
106
+	string checkpointDir = 3; // Directory where checkpoints are stored
107
+}
108
+
109
+message CreateCheckpointResponse {
110
+}
111
+
112
+message DeleteCheckpointRequest {
113
+	string id = 1; // ID of container
114
+	string name = 2; // Name of checkpoint
115
+	string checkpointDir = 3; // Directory where checkpoints are stored
116
+}
117
+
118
+message DeleteCheckpointResponse {
119
+}
120
+
121
+message ListCheckpointRequest {
122
+	string id = 1; // ID of container
123
+	string checkpointDir = 2; // Directory where checkpoints are stored
124
+}
125
+
126
+message Checkpoint {
127
+	string name = 1; // Name of checkpoint
128
+	bool exit = 2; // checkpoint configuration: should container exit on checkpoint or not
129
+	bool tcp = 3; // allow open tcp connections
130
+	bool unixSockets = 4; // allow external unix sockets
131
+	bool shell = 5; // allow shell-jobs
132
+	repeated string emptyNS = 6;
133
+}
134
+
135
+message ListCheckpointResponse {
136
+	repeated Checkpoint checkpoints = 1; // List of checkpoints
137
+}
138
+
139
+message StateRequest {
140
+	string id = 1; // container id for a single container
141
+}
142
+
143
+message ContainerState {
144
+	string status = 1;
145
+}
146
+
147
+message Process {
148
+	string pid = 1;
149
+	bool terminal = 2; // Use tty for container stdio
150
+	User user = 3; // User under which process will be run
151
+	repeated string args = 4; // Arguments for process, first is binary path itself
152
+	repeated string env = 5; // List of environment variables for process
153
+	string cwd = 6; // Working directory of process
154
+	uint32 systemPid = 7;
155
+	string stdin = 8; // path to the file where stdin will be read (optional)
156
+	string stdout = 9; // path to file where stdout will be written (optional)
157
+	string stderr = 10; // path to file where stderr will be written (optional)
158
+	repeated string capabilities = 11;
159
+	string apparmorProfile = 12;
160
+	string selinuxLabel = 13;
161
+	bool noNewPrivileges = 14;
162
+	repeated Rlimit rlimits = 15;
163
+}
164
+
165
+message Container {
166
+	string id = 1; // ID of container
167
+	string bundlePath = 2; // Path to OCI bundle
168
+	repeated Process processes = 3; // List of processes which run in container
169
+	string status = 4; // Container status ("running", "paused", etc.)
170
+	repeated string labels = 5;
171
+	repeated uint32 pids = 6;
172
+	string runtime = 7; // runtime used to execute the container
173
+}
174
+
175
+// Machine is information about machine on which containerd is run
176
+message Machine {
177
+	uint32 cpus = 1; // number of cpus
178
+	uint64 memory = 2; // amount of memory
179
+}
180
+
181
+// StateResponse is information about containerd daemon
182
+message StateResponse {
183
+	repeated Container containers = 1;
184
+	Machine machine = 2;
185
+}
186
+
187
+message UpdateContainerRequest {
188
+	string id = 1; // ID of container
189
+	string pid = 2;
190
+	string status = 3; // Status to which containerd will try to change
191
+	UpdateResource resources =4;
192
+}
193
+
194
+message UpdateResource {
195
+	uint64 blkioWeight = 1;
196
+	uint64 cpuShares = 2;
197
+	uint64 cpuPeriod = 3;
198
+	uint64 cpuQuota = 4;
199
+	string cpusetCpus = 5;
200
+	string cpusetMems = 6;
201
+	uint64 memoryLimit = 7;
202
+	uint64 memorySwap = 8;
203
+	uint64 memoryReservation = 9;
204
+	uint64 kernelMemoryLimit = 10;
205
+	uint64 kernelTCPMemoryLimit = 11;
206
+	uint64 blkioLeafWeight = 12;
207
+	repeated WeightDevice blkioWeightDevice = 13;
208
+	repeated ThrottleDevice blkioThrottleReadBpsDevice = 14;
209
+	repeated ThrottleDevice blkioThrottleWriteBpsDevice = 15;
210
+	repeated ThrottleDevice blkioThrottleReadIopsDevice = 16;
211
+	repeated ThrottleDevice blkioThrottleWriteIopsDevice = 17;
212
+	uint64 pidsLimit = 18;
213
+}
214
+
215
+message BlockIODevice {
216
+	int64 major = 1;
217
+	int64 minor = 2;
218
+}
219
+
220
+message WeightDevice {
221
+	BlockIODevice blkIODevice = 1;
222
+	uint32 weight = 2;
223
+	uint32 leafWeight = 3;
224
+}
225
+
226
+message ThrottleDevice {
227
+	BlockIODevice blkIODevice = 1;
228
+	uint64 rate = 2;
229
+}
230
+
231
+message UpdateContainerResponse {
232
+}
233
+
234
+message EventsRequest {
235
+	// Tag 1 is deprecated (old uint64 timestamp)
236
+	google.protobuf.Timestamp timestamp = 2;
237
+	bool storedOnly = 3;
238
+	string id = 4;
239
+}
240
+
241
+message Event {
242
+	string type = 1;
243
+	string id = 2;
244
+	uint32 status = 3;
245
+	string pid = 4;
246
+	// Tag 5 is deprecated (old uint64 timestamp)
247
+	google.protobuf.Timestamp timestamp = 6;
248
+}
249
+
250
+message NetworkStats {
251
+	string name = 1; // name of network interface
252
+	uint64 rx_bytes  = 2;
253
+	uint64 rx_Packets = 3;
254
+	uint64 Rx_errors  = 4;
255
+	uint64 Rx_dropped = 5;
256
+	uint64 Tx_bytes   = 6;
257
+	uint64 Tx_packets = 7;
258
+	uint64 Tx_errors  = 8;
259
+	uint64 Tx_dropped = 9;
260
+}
261
+
262
+message CpuUsage {
263
+	uint64 total_usage = 1;
264
+	repeated uint64 percpu_usage = 2;
265
+	uint64 usage_in_kernelmode = 3;
266
+	uint64 usage_in_usermode = 4;
267
+}
268
+
269
+message ThrottlingData {
270
+	uint64 periods = 1;
271
+	uint64 throttled_periods = 2;
272
+	uint64 throttled_time = 3;
273
+}
274
+
275
+message CpuStats {
276
+	CpuUsage cpu_usage = 1;
277
+	ThrottlingData throttling_data = 2;
278
+	uint64 system_usage = 3;
279
+}
280
+
281
+message PidsStats {
282
+	uint64 current = 1;
283
+	uint64 limit = 2;
284
+}
285
+
286
+message MemoryData {
287
+	uint64 usage = 1;
288
+	uint64 max_usage = 2;
289
+	uint64 failcnt = 3;
290
+	uint64 limit = 4;
291
+}
292
+
293
+message MemoryStats {
294
+	uint64 cache = 1;
295
+	MemoryData usage = 2;
296
+	MemoryData swap_usage = 3;
297
+	MemoryData kernel_usage = 4;
298
+	map<string, uint64> stats = 5;
299
+}
300
+
301
+message BlkioStatsEntry {
302
+	uint64 major = 1;
303
+	uint64 minor = 2;
304
+	string op = 3;
305
+	uint64 value = 4;
306
+}
307
+
308
+message BlkioStats {
309
+	repeated BlkioStatsEntry io_service_bytes_recursive = 1; // number of bytes transferred to and from the block device
310
+	repeated BlkioStatsEntry io_serviced_recursive = 2;
311
+	repeated BlkioStatsEntry io_queued_recursive = 3;
312
+	repeated BlkioStatsEntry io_service_time_recursive = 4;
313
+	repeated BlkioStatsEntry io_wait_time_recursive = 5;
314
+	repeated BlkioStatsEntry io_merged_recursive = 6;
315
+	repeated BlkioStatsEntry io_time_recursive = 7;
316
+	repeated BlkioStatsEntry sectors_recursive = 8;
317
+}
318
+
319
+message HugetlbStats {
320
+	uint64 usage = 1;
321
+	uint64 max_usage = 2;
322
+	uint64 failcnt = 3;
323
+	uint64 limit = 4;
324
+}
325
+
326
+message CgroupStats {
327
+	CpuStats cpu_stats = 1;
328
+	MemoryStats memory_stats  = 2;
329
+	BlkioStats blkio_stats = 3;
330
+	map<string, HugetlbStats> hugetlb_stats = 4; // the map is in the format "size of hugepage: stats of the hugepage"
331
+	PidsStats pids_stats = 5;
332
+}
333
+
334
+message StatsResponse {
335
+	repeated NetworkStats network_stats = 1;
336
+	CgroupStats cgroup_stats = 2;
337
+	// Tag 3 is deprecated (old uint64 timestamp)
338
+	google.protobuf.Timestamp timestamp = 4;
339
+};
340
+
341
+message StatsRequest {
342
+	string id = 1;
343
+}
0 344
new file mode 100644
... ...
@@ -0,0 +1,18 @@
0
+// +build !windows,!darwin
1
+
2
+package osutils
3
+
4
+import (
5
+	"io/ioutil"
6
+	"path/filepath"
7
+	"strconv"
8
+)
9
+
10
+// GetOpenFds returns the number of open fds for the process provided by pid
11
+func GetOpenFds(pid int) (int, error) {
12
+	dirs, err := ioutil.ReadDir(filepath.Join("/proc", strconv.Itoa(pid), "fd"))
13
+	if err != nil {
14
+		return -1, err
15
+	}
16
+	return len(dirs), nil
17
+}
0 18
new file mode 100644
... ...
@@ -0,0 +1,15 @@
0
+// +build !solaris
1
+
2
+package osutils
3
+
4
+import (
5
+	"syscall"
6
+)
7
+
8
+// SetPDeathSig sets the parent death signal to SIGKILL so that if the
9
+// shim dies the container process also dies.
10
+func SetPDeathSig() *syscall.SysProcAttr {
11
+	return &syscall.SysProcAttr{
12
+		Pdeathsig: syscall.SIGKILL,
13
+	}
14
+}
0 15
new file mode 100644
... ...
@@ -0,0 +1,8 @@
0
+// +build solaris
1
+
2
+package osutils
3
+
4
+// SetPDeathSig is a no-op on Solaris as Pdeathsig is not defined.
5
+func SetPDeathSig() *syscall.SysProcAttr {
6
+	return nil
7
+}
0 8
new file mode 100644
... ...
@@ -0,0 +1,48 @@
0
+// +build linux
1
+
2
+// Package osutils provide access to the Get Child and Set Child prctl
3
+// flags.
4
+// See http://man7.org/linux/man-pages/man2/prctl.2.html
5
+package osutils
6
+
7
+import (
8
+	"syscall"
9
+	"unsafe"
10
+)
11
+
12
+// PR_SET_CHILD_SUBREAPER allows setting the child subreaper.
13
+// If arg2 is nonzero, set the "child subreaper" attribute of the
14
+// calling process; if arg2 is zero, unset the attribute.  When a
15
+// process is marked as a child subreaper, all of the children
16
+// that it creates, and their descendants, will be marked as
17
+// having a subreaper.  In effect, a subreaper fulfills the role
18
+// of init(1) for its descendant processes.  Upon termination of
19
+// a process that is orphaned (i.e., its immediate parent has
20
+// already terminated) and marked as having a subreaper, the
21
+// nearest still living ancestor subreaper will receive a SIGCHLD
22
+// signal and be able to wait(2) on the process to discover its
23
+// termination status.
24
+const prSetChildSubreaper = 36
25
+
26
+// PR_GET_CHILD_SUBREAPER allows retrieving the current child
27
+// subreaper.
28
+// Return the "child subreaper" setting of the caller, in the
29
+// location pointed to by (int *) arg2.
30
+const prGetChildSubreaper = 37
31
+
32
+// GetSubreaper returns the subreaper setting for the calling process
33
+func GetSubreaper() (int, error) {
34
+	var i uintptr
35
+	if _, _, err := syscall.RawSyscall(syscall.SYS_PRCTL, prGetChildSubreaper, uintptr(unsafe.Pointer(&i)), 0); err != 0 {
36
+		return -1, err
37
+	}
38
+	return int(i), nil
39
+}
40
+
41
+// SetSubreaper sets the value i as the subreaper setting for the calling process
42
+func SetSubreaper(i int) error {
43
+	if _, _, err := syscall.RawSyscall(syscall.SYS_PRCTL, prSetChildSubreaper, uintptr(i), 0); err != 0 {
44
+		return err
45
+	}
46
+	return nil
47
+}
0 48
new file mode 100644
... ...
@@ -0,0 +1,19 @@
0
+// +build solaris
1
+
2
+package osutils
3
+
4
+import (
5
+	"errors"
6
+)
7
+
8
+//Solaris TODO
9
+
10
+// GetSubreaper returns the subreaper setting for the calling process
11
+func GetSubreaper() (int, error) {
12
+	return 0, errors.New("osutils GetSubreaper not implemented on Solaris")
13
+}
14
+
15
+// SetSubreaper sets the value i as the subreaper setting for the calling process
16
+func SetSubreaper(i int) error {
17
+	return nil
18
+}
0 19
new file mode 100644
... ...
@@ -0,0 +1,51 @@
0
+// +build !windows
1
+
2
+package osutils
3
+
4
+import "syscall"
5
+
6
+// Exit is the wait4 information from an exited process
7
+type Exit struct {
8
+	Pid    int
9
+	Status int
10
+}
11
+
12
+// Reap reaps all child processes for the calling process and returns their
13
+// exit information
14
+func Reap(wait bool) (exits []Exit, err error) {
15
+	var (
16
+		ws  syscall.WaitStatus
17
+		rus syscall.Rusage
18
+	)
19
+	flag := syscall.WNOHANG
20
+	if wait {
21
+		flag = 0
22
+	}
23
+	for {
24
+		pid, err := syscall.Wait4(-1, &ws, flag, &rus)
25
+		if err != nil {
26
+			if err == syscall.ECHILD {
27
+				return exits, nil
28
+			}
29
+			return exits, err
30
+		}
31
+		if pid <= 0 {
32
+			return exits, nil
33
+		}
34
+		exits = append(exits, Exit{
35
+			Pid:    pid,
36
+			Status: exitStatus(ws),
37
+		})
38
+	}
39
+}
40
+
41
+const exitSignalOffset = 128
42
+
43
+// exitStatus returns the correct exit status for a process based on if it
44
+// was signaled or exited cleanly
45
+func exitStatus(status syscall.WaitStatus) int {
46
+	if status.Signaled() {
47
+		return exitSignalOffset + int(status.Signal())
48
+	}
49
+	return status.ExitStatus()
50
+}
0 51
new file mode 100644
... ...
@@ -0,0 +1,749 @@
0
+package runtime
1
+
2
+import (
3
+	"encoding/json"
4
+	"fmt"
5
+	"io"
6
+	"io/ioutil"
7
+	"os"
8
+	"os/exec"
9
+	"path/filepath"
10
+	"strings"
11
+	"syscall"
12
+	"time"
13
+
14
+	"github.com/Sirupsen/logrus"
15
+	"github.com/containerd/containerd/specs"
16
+	ocs "github.com/opencontainers/runtime-spec/specs-go"
17
+	"golang.org/x/net/context"
18
+	"golang.org/x/sys/unix"
19
+)
20
+
21
+// Container defines the operations allowed on a container
22
+type Container interface {
23
+	// ID returns the container ID
24
+	ID() string
25
+	// Path returns the path to the bundle
26
+	Path() string
27
+	// Start starts the init process of the container
28
+	Start(ctx context.Context, checkpointPath string, s Stdio) (Process, error)
29
+	// Exec starts another process in an existing container
30
+	Exec(context.Context, string, specs.ProcessSpec, Stdio) (Process, error)
31
+	// Delete removes the container's state and any resources
32
+	Delete() error
33
+	// Processes returns all the containers processes that have been added
34
+	Processes() ([]Process, error)
35
+	// State returns the containers runtime state
36
+	State() State
37
+	// Resume resumes a paused container
38
+	Resume() error
39
+	// Pause pauses a running container
40
+	Pause() error
41
+	// RemoveProcess removes the specified process from the container
42
+	RemoveProcess(string) error
43
+	// Checkpoints returns all the checkpoints for a container
44
+	Checkpoints(checkpointDir string) ([]Checkpoint, error)
45
+	// Checkpoint creates a new checkpoint
46
+	Checkpoint(checkpoint Checkpoint, checkpointDir string) error
47
+	// DeleteCheckpoint deletes the checkpoint for the provided name
48
+	DeleteCheckpoint(name string, checkpointDir string) error
49
+	// Labels are user provided labels for the container
50
+	Labels() []string
51
+	// Pids returns all pids inside the container
52
+	Pids() ([]int, error)
53
+	// Stats returns realtime container stats and resource information
54
+	Stats() (*Stat, error)
55
+	// Name or path of the OCI compliant runtime used to execute the container
56
+	Runtime() string
57
+	// OOM signals the channel if the container received an OOM notification
58
+	OOM() (OOM, error)
59
+	// UpdateResource updates the containers resources to new values
60
+	UpdateResources(*Resource) error
61
+
62
+	// Status return the current status of the container.
63
+	Status() (State, error)
64
+}
65
+
66
+// OOM wraps a container OOM.
67
+type OOM interface {
68
+	io.Closer
69
+	FD() int
70
+	ContainerID() string
71
+	Flush()
72
+	Removed() bool
73
+}
74
+
75
+// Stdio holds the path to the 3 pipes used for the standard ios.
76
+type Stdio struct {
77
+	Stdin  string
78
+	Stdout string
79
+	Stderr string
80
+}
81
+
82
+// NewStdio wraps the given standard io path into an Stdio struct.
83
+// If a given parameter is the empty string, it is replaced by "/dev/null"
84
+func NewStdio(stdin, stdout, stderr string) Stdio {
85
+	for _, s := range []*string{
86
+		&stdin, &stdout, &stderr,
87
+	} {
88
+		if *s == "" {
89
+			*s = "/dev/null"
90
+		}
91
+	}
92
+	return Stdio{
93
+		Stdin:  stdin,
94
+		Stdout: stdout,
95
+		Stderr: stderr,
96
+	}
97
+}
98
+
99
+// ContainerOpts keeps the options passed at container creation
100
+type ContainerOpts struct {
101
+	Root        string
102
+	ID          string
103
+	Bundle      string
104
+	Runtime     string
105
+	RuntimeArgs []string
106
+	Shim        string
107
+	Labels      []string
108
+	NoPivotRoot bool
109
+	Timeout     time.Duration
110
+}
111
+
112
+// New returns a new container
113
+func New(opts ContainerOpts) (Container, error) {
114
+	c := &container{
115
+		root:        opts.Root,
116
+		id:          opts.ID,
117
+		bundle:      opts.Bundle,
118
+		labels:      opts.Labels,
119
+		processes:   make(map[string]*process),
120
+		runtime:     opts.Runtime,
121
+		runtimeArgs: opts.RuntimeArgs,
122
+		shim:        opts.Shim,
123
+		noPivotRoot: opts.NoPivotRoot,
124
+		timeout:     opts.Timeout,
125
+	}
126
+	if err := os.Mkdir(filepath.Join(c.root, c.id), 0755); err != nil {
127
+		return nil, err
128
+	}
129
+	f, err := os.Create(filepath.Join(c.root, c.id, StateFile))
130
+	if err != nil {
131
+		return nil, err
132
+	}
133
+	defer f.Close()
134
+	if err := json.NewEncoder(f).Encode(state{
135
+		Bundle:      c.bundle,
136
+		Labels:      c.labels,
137
+		Runtime:     c.runtime,
138
+		RuntimeArgs: c.runtimeArgs,
139
+		Shim:        c.shim,
140
+		NoPivotRoot: opts.NoPivotRoot,
141
+	}); err != nil {
142
+		return nil, err
143
+	}
144
+	return c, nil
145
+}
146
+
147
+// Load return a new container from the matchin state file on disk.
148
+func Load(root, id, shimName string, timeout time.Duration) (Container, error) {
149
+	var s state
150
+	f, err := os.Open(filepath.Join(root, id, StateFile))
151
+	if err != nil {
152
+		return nil, err
153
+	}
154
+	defer f.Close()
155
+	if err := json.NewDecoder(f).Decode(&s); err != nil {
156
+		return nil, err
157
+	}
158
+	c := &container{
159
+		root:        root,
160
+		id:          id,
161
+		bundle:      s.Bundle,
162
+		labels:      s.Labels,
163
+		runtime:     s.Runtime,
164
+		runtimeArgs: s.RuntimeArgs,
165
+		shim:        s.Shim,
166
+		noPivotRoot: s.NoPivotRoot,
167
+		processes:   make(map[string]*process),
168
+		timeout:     timeout,
169
+	}
170
+
171
+	if c.shim == "" {
172
+		c.shim = shimName
173
+	}
174
+
175
+	dirs, err := ioutil.ReadDir(filepath.Join(root, id))
176
+	if err != nil {
177
+		return nil, err
178
+	}
179
+	for _, d := range dirs {
180
+		if !d.IsDir() {
181
+			continue
182
+		}
183
+		pid := d.Name()
184
+		s, err := readProcessState(filepath.Join(root, id, pid))
185
+		if err != nil {
186
+			return nil, err
187
+		}
188
+		p, err := loadProcess(filepath.Join(root, id, pid), pid, c, s)
189
+		if err != nil {
190
+			logrus.WithField("id", id).WithField("pid", pid).Debugf("containerd: error loading process %s", err)
191
+			continue
192
+		}
193
+		c.processes[pid] = p
194
+	}
195
+
196
+	_, err = os.Stat(c.bundle)
197
+	if err != nil && !os.IsExist(err) {
198
+		for key, p := range c.processes {
199
+			if key == InitProcessID {
200
+				p.Delete()
201
+				break
202
+			}
203
+		}
204
+		return nil, fmt.Errorf("bundle dir %s don't exist", c.bundle)
205
+	}
206
+	return c, nil
207
+}
208
+
209
+func readProcessState(dir string) (*ProcessState, error) {
210
+	f, err := os.Open(filepath.Join(dir, "process.json"))
211
+	if err != nil {
212
+		return nil, err
213
+	}
214
+	defer f.Close()
215
+	var s ProcessState
216
+	if err := json.NewDecoder(f).Decode(&s); err != nil {
217
+		return nil, err
218
+	}
219
+	return &s, nil
220
+}
221
+
222
+type container struct {
223
+	// path to store runtime state information
224
+	root        string
225
+	id          string
226
+	bundle      string
227
+	runtime     string
228
+	runtimeArgs []string
229
+	shim        string
230
+	processes   map[string]*process
231
+	labels      []string
232
+	oomFds      []int
233
+	noPivotRoot bool
234
+	timeout     time.Duration
235
+}
236
+
237
+func (c *container) ID() string {
238
+	return c.id
239
+}
240
+
241
+func (c *container) Path() string {
242
+	return c.bundle
243
+}
244
+
245
+func (c *container) Labels() []string {
246
+	return c.labels
247
+}
248
+
249
+func (c *container) readSpec() (*specs.Spec, error) {
250
+	var spec specs.Spec
251
+	f, err := os.Open(filepath.Join(c.bundle, "config.json"))
252
+	if err != nil {
253
+		return nil, err
254
+	}
255
+	defer f.Close()
256
+	if err := json.NewDecoder(f).Decode(&spec); err != nil {
257
+		return nil, err
258
+	}
259
+	return &spec, nil
260
+}
261
+
262
+func (c *container) Delete() error {
263
+	var err error
264
+	args := append(c.runtimeArgs, "delete", c.id)
265
+	if b, derr := exec.Command(c.runtime, args...).CombinedOutput(); derr != nil && !strings.Contains(string(b), "does not exist") {
266
+		err = fmt.Errorf("%s: %q", derr, string(b))
267
+	}
268
+	if rerr := os.RemoveAll(filepath.Join(c.root, c.id)); rerr != nil {
269
+		if err != nil {
270
+			err = fmt.Errorf("%s; failed to remove %s: %s", err, filepath.Join(c.root, c.id), rerr)
271
+		} else {
272
+			err = rerr
273
+		}
274
+	}
275
+	return err
276
+}
277
+
278
+func (c *container) Processes() ([]Process, error) {
279
+	out := []Process{}
280
+	for _, p := range c.processes {
281
+		out = append(out, p)
282
+	}
283
+	return out, nil
284
+}
285
+
286
+func (c *container) RemoveProcess(pid string) error {
287
+	delete(c.processes, pid)
288
+	return os.RemoveAll(filepath.Join(c.root, c.id, pid))
289
+}
290
+
291
+func (c *container) State() State {
292
+	proc := c.processes[InitProcessID]
293
+	if proc == nil {
294
+		return Stopped
295
+	}
296
+	return proc.State()
297
+}
298
+
299
+func (c *container) Runtime() string {
300
+	return c.runtime
301
+}
302
+
303
+func (c *container) Pause() error {
304
+	args := c.runtimeArgs
305
+	args = append(args, "pause", c.id)
306
+	b, err := exec.Command(c.runtime, args...).CombinedOutput()
307
+	if err != nil {
308
+		return fmt.Errorf("%s: %q", err.Error(), string(b))
309
+	}
310
+	return nil
311
+}
312
+
313
+func (c *container) Resume() error {
314
+	args := c.runtimeArgs
315
+	args = append(args, "resume", c.id)
316
+	b, err := exec.Command(c.runtime, args...).CombinedOutput()
317
+	if err != nil {
318
+		return fmt.Errorf("%s: %q", err.Error(), string(b))
319
+	}
320
+	return nil
321
+}
322
+
323
+func (c *container) Checkpoints(checkpointDir string) ([]Checkpoint, error) {
324
+	if checkpointDir == "" {
325
+		checkpointDir = filepath.Join(c.bundle, "checkpoints")
326
+	}
327
+
328
+	dirs, err := ioutil.ReadDir(checkpointDir)
329
+	if err != nil {
330
+		return nil, err
331
+	}
332
+	var out []Checkpoint
333
+	for _, d := range dirs {
334
+		if !d.IsDir() {
335
+			continue
336
+		}
337
+		path := filepath.Join(checkpointDir, d.Name(), "config.json")
338
+		data, err := ioutil.ReadFile(path)
339
+		if err != nil {
340
+			return nil, err
341
+		}
342
+		var cpt Checkpoint
343
+		if err := json.Unmarshal(data, &cpt); err != nil {
344
+			return nil, err
345
+		}
346
+		out = append(out, cpt)
347
+	}
348
+	return out, nil
349
+}
350
+
351
+func (c *container) Checkpoint(cpt Checkpoint, checkpointDir string) error {
352
+	if checkpointDir == "" {
353
+		checkpointDir = filepath.Join(c.bundle, "checkpoints")
354
+	}
355
+
356
+	if err := os.MkdirAll(checkpointDir, 0755); err != nil {
357
+		return err
358
+	}
359
+
360
+	path := filepath.Join(checkpointDir, cpt.Name)
361
+	if err := os.Mkdir(path, 0755); err != nil {
362
+		return err
363
+	}
364
+	f, err := os.Create(filepath.Join(path, "config.json"))
365
+	if err != nil {
366
+		return err
367
+	}
368
+	cpt.Created = time.Now()
369
+	err = json.NewEncoder(f).Encode(cpt)
370
+	f.Close()
371
+	if err != nil {
372
+		return err
373
+	}
374
+	args := []string{
375
+		"checkpoint",
376
+		"--image-path", path,
377
+		"--work-path", filepath.Join(path, "criu.work"),
378
+	}
379
+	add := func(flags ...string) {
380
+		args = append(args, flags...)
381
+	}
382
+	add(c.runtimeArgs...)
383
+	if !cpt.Exit {
384
+		add("--leave-running")
385
+	}
386
+	if cpt.Shell {
387
+		add("--shell-job")
388
+	}
389
+	if cpt.TCP {
390
+		add("--tcp-established")
391
+	}
392
+	if cpt.UnixSockets {
393
+		add("--ext-unix-sk")
394
+	}
395
+	for _, ns := range cpt.EmptyNS {
396
+		add("--empty-ns", ns)
397
+	}
398
+	add(c.id)
399
+	out, err := exec.Command(c.runtime, args...).CombinedOutput()
400
+	if err != nil {
401
+		return fmt.Errorf("%s: %q", err.Error(), string(out))
402
+	}
403
+	return err
404
+}
405
+
406
+func (c *container) DeleteCheckpoint(name string, checkpointDir string) error {
407
+	if checkpointDir == "" {
408
+		checkpointDir = filepath.Join(c.bundle, "checkpoints")
409
+	}
410
+	return os.RemoveAll(filepath.Join(checkpointDir, name))
411
+}
412
+
413
+func (c *container) Start(ctx context.Context, checkpointPath string, s Stdio) (Process, error) {
414
+	processRoot := filepath.Join(c.root, c.id, InitProcessID)
415
+	if err := os.Mkdir(processRoot, 0755); err != nil {
416
+		return nil, err
417
+	}
418
+	cmd := exec.Command(c.shim,
419
+		c.id, c.bundle, c.runtime,
420
+	)
421
+	cmd.Dir = processRoot
422
+	cmd.SysProcAttr = &syscall.SysProcAttr{
423
+		Setpgid: true,
424
+	}
425
+	spec, err := c.readSpec()
426
+	if err != nil {
427
+		return nil, err
428
+	}
429
+	config := &processConfig{
430
+		checkpoint:  checkpointPath,
431
+		root:        processRoot,
432
+		id:          InitProcessID,
433
+		c:           c,
434
+		stdio:       s,
435
+		spec:        spec,
436
+		processSpec: specs.ProcessSpec(spec.Process),
437
+	}
438
+	p, err := newProcess(config)
439
+	if err != nil {
440
+		return nil, err
441
+	}
442
+	if err := c.createCmd(ctx, InitProcessID, cmd, p); err != nil {
443
+		return nil, err
444
+	}
445
+	return p, nil
446
+}
447
+
448
+func (c *container) Exec(ctx context.Context, pid string, pspec specs.ProcessSpec, s Stdio) (pp Process, err error) {
449
+	processRoot := filepath.Join(c.root, c.id, pid)
450
+	if err := os.Mkdir(processRoot, 0755); err != nil {
451
+		return nil, err
452
+	}
453
+	defer func() {
454
+		if err != nil {
455
+			c.RemoveProcess(pid)
456
+		}
457
+	}()
458
+	cmd := exec.Command(c.shim,
459
+		c.id, c.bundle, c.runtime,
460
+	)
461
+	cmd.Dir = processRoot
462
+	cmd.SysProcAttr = &syscall.SysProcAttr{
463
+		Setpgid: true,
464
+	}
465
+	spec, err := c.readSpec()
466
+	if err != nil {
467
+		return nil, err
468
+	}
469
+	config := &processConfig{
470
+		exec:        true,
471
+		id:          pid,
472
+		root:        processRoot,
473
+		c:           c,
474
+		processSpec: pspec,
475
+		spec:        spec,
476
+		stdio:       s,
477
+	}
478
+	p, err := newProcess(config)
479
+	if err != nil {
480
+		return nil, err
481
+	}
482
+	if err := c.createCmd(ctx, pid, cmd, p); err != nil {
483
+		return nil, err
484
+	}
485
+	return p, nil
486
+}
487
+
488
+func (c *container) createCmd(ctx context.Context, pid string, cmd *exec.Cmd, p *process) error {
489
+	p.cmd = cmd
490
+	if err := cmd.Start(); err != nil {
491
+		close(p.cmdDoneCh)
492
+		if exErr, ok := err.(*exec.Error); ok {
493
+			if exErr.Err == exec.ErrNotFound || exErr.Err == os.ErrNotExist {
494
+				return fmt.Errorf("%s not installed on system", c.shim)
495
+			}
496
+		}
497
+		return err
498
+	}
499
+	// We need the pid file to have been written to run
500
+	defer func() {
501
+		go func() {
502
+			err := p.cmd.Wait()
503
+			if err == nil {
504
+				p.cmdSuccess = true
505
+			}
506
+
507
+			if same, err := p.isSameProcess(); same && p.pid > 0 {
508
+				// The process changed its PR_SET_PDEATHSIG, so force
509
+				// kill it
510
+				logrus.Infof("containerd: %s:%s (pid %v) has become an orphan, killing it", p.container.id, p.id, p.pid)
511
+				err = unix.Kill(p.pid, syscall.SIGKILL)
512
+				if err != nil && err != syscall.ESRCH {
513
+					logrus.Errorf("containerd: unable to SIGKILL %s:%s (pid %v): %v", p.container.id, p.id, p.pid, err)
514
+				} else {
515
+					for {
516
+						err = unix.Kill(p.pid, 0)
517
+						if err != nil {
518
+							break
519
+						}
520
+						time.Sleep(5 * time.Millisecond)
521
+					}
522
+				}
523
+			}
524
+			close(p.cmdDoneCh)
525
+		}()
526
+	}()
527
+
528
+	ch := make(chan error)
529
+	go func() {
530
+		if err := c.waitForCreate(p, cmd); err != nil {
531
+			ch <- err
532
+			return
533
+		}
534
+		c.processes[pid] = p
535
+		ch <- nil
536
+	}()
537
+	select {
538
+	case <-ctx.Done():
539
+		cmd.Process.Kill()
540
+		cmd.Wait()
541
+		<-ch
542
+		return ctx.Err()
543
+	case err := <-ch:
544
+		return err
545
+	}
546
+	return nil
547
+}
548
+
549
+func hostIDFromMap(id uint32, mp []ocs.LinuxIDMapping) int {
550
+	for _, m := range mp {
551
+		if (id >= m.ContainerID) && (id <= (m.ContainerID + m.Size - 1)) {
552
+			return int(m.HostID + (id - m.ContainerID))
553
+		}
554
+	}
555
+	return 0
556
+}
557
+
558
+func (c *container) Stats() (*Stat, error) {
559
+	now := time.Now()
560
+	args := c.runtimeArgs
561
+	args = append(args, "events", "--stats", c.id)
562
+	out, err := exec.Command(c.runtime, args...).CombinedOutput()
563
+	if err != nil {
564
+		return nil, fmt.Errorf("%s: %q", err.Error(), out)
565
+	}
566
+	s := struct {
567
+		Data *Stat `json:"data"`
568
+	}{}
569
+	if err := json.Unmarshal(out, &s); err != nil {
570
+		return nil, err
571
+	}
572
+	s.Data.Timestamp = now
573
+	return s.Data, nil
574
+}
575
+
576
+// Status implements the runtime Container interface.
577
+func (c *container) Status() (State, error) {
578
+	args := c.runtimeArgs
579
+	args = append(args, "state", c.id)
580
+
581
+	out, err := exec.Command(c.runtime, args...).CombinedOutput()
582
+	if err != nil {
583
+		return "", fmt.Errorf("%s: %q", err.Error(), out)
584
+	}
585
+
586
+	// We only require the runtime json output to have a top level Status field.
587
+	var s struct {
588
+		Status State `json:"status"`
589
+	}
590
+	if err := json.Unmarshal(out, &s); err != nil {
591
+		return "", err
592
+	}
593
+	return s.Status, nil
594
+}
595
+
596
+func (c *container) writeEventFD(root string, cfd, efd int) error {
597
+	f, err := os.OpenFile(filepath.Join(root, "cgroup.event_control"), os.O_WRONLY, 0)
598
+	if err != nil {
599
+		return err
600
+	}
601
+	defer f.Close()
602
+	_, err = f.WriteString(fmt.Sprintf("%d %d", efd, cfd))
603
+	return err
604
+}
605
+
606
+type waitArgs struct {
607
+	pid int
608
+	err error
609
+}
610
+
611
+func (c *container) waitForCreate(p *process, cmd *exec.Cmd) error {
612
+	wc := make(chan error, 1)
613
+	go func() {
614
+		for {
615
+			if _, err := p.getPidFromFile(); err != nil {
616
+				if os.IsNotExist(err) || err == errInvalidPidInt || err == errContainerNotFound {
617
+					alive, err := isAlive(cmd)
618
+					if err != nil {
619
+						wc <- err
620
+						return
621
+					}
622
+					if !alive {
623
+						// runc could have failed to run the container so lets get the error
624
+						// out of the logs or the shim could have encountered an error
625
+						messages, err := readLogMessages(filepath.Join(p.root, "shim-log.json"))
626
+						if err != nil {
627
+							wc <- err
628
+							return
629
+						}
630
+						for _, m := range messages {
631
+							if m.Level == "error" {
632
+								wc <- fmt.Errorf("shim error: %v", m.Msg)
633
+								return
634
+							}
635
+						}
636
+						// no errors reported back from shim, check for runc/runtime errors
637
+						messages, err = readLogMessages(filepath.Join(p.root, "log.json"))
638
+						if err != nil {
639
+							if os.IsNotExist(err) {
640
+								err = ErrContainerNotStarted
641
+							}
642
+							wc <- err
643
+							return
644
+						}
645
+						for _, m := range messages {
646
+							if m.Level == "error" {
647
+								wc <- fmt.Errorf("oci runtime error: %v", m.Msg)
648
+								return
649
+							}
650
+						}
651
+						wc <- ErrContainerNotStarted
652
+						return
653
+					}
654
+					time.Sleep(15 * time.Millisecond)
655
+					continue
656
+				}
657
+				wc <- err
658
+				return
659
+			}
660
+			// the pid file was read successfully
661
+			wc <- nil
662
+			return
663
+		}
664
+	}()
665
+	select {
666
+	case err := <-wc:
667
+		if err != nil {
668
+			return err
669
+		}
670
+		err = p.saveStartTime()
671
+		if err != nil && !os.IsNotExist(err) {
672
+			logrus.Warnf("containerd: unable to save %s:%s starttime: %v", p.container.id, p.id, err)
673
+		}
674
+		return nil
675
+	case <-time.After(c.timeout):
676
+		cmd.Process.Kill()
677
+		cmd.Wait()
678
+		return ErrContainerStartTimeout
679
+	}
680
+}
681
+
682
+// isAlive checks if the shim that launched the container is still alive
683
+func isAlive(cmd *exec.Cmd) (bool, error) {
684
+	if _, err := syscall.Wait4(cmd.Process.Pid, nil, syscall.WNOHANG, nil); err == nil {
685
+		return true, nil
686
+	}
687
+	if err := syscall.Kill(cmd.Process.Pid, 0); err != nil {
688
+		if err == syscall.ESRCH {
689
+			return false, nil
690
+		}
691
+		return false, err
692
+	}
693
+	return true, nil
694
+}
695
+
696
+type oom struct {
697
+	id      string
698
+	root    string
699
+	eventfd int
700
+}
701
+
702
+func (o *oom) ContainerID() string {
703
+	return o.id
704
+}
705
+
706
+func (o *oom) FD() int {
707
+	return o.eventfd
708
+}
709
+
710
+func (o *oom) Flush() {
711
+	buf := make([]byte, 8)
712
+	syscall.Read(o.eventfd, buf)
713
+}
714
+
715
+func (o *oom) Removed() bool {
716
+	_, err := os.Lstat(filepath.Join(o.root, "cgroup.event_control"))
717
+	return os.IsNotExist(err)
718
+}
719
+
720
+func (o *oom) Close() error {
721
+	return syscall.Close(o.eventfd)
722
+}
723
+
724
+type message struct {
725
+	Level string `json:"level"`
726
+	Msg   string `json:"msg"`
727
+}
728
+
729
+func readLogMessages(path string) ([]message, error) {
730
+	var out []message
731
+	f, err := os.Open(path)
732
+	if err != nil {
733
+		return nil, err
734
+	}
735
+	defer f.Close()
736
+	dec := json.NewDecoder(f)
737
+	for {
738
+		var m message
739
+		if err := dec.Decode(&m); err != nil {
740
+			if err == io.EOF {
741
+				break
742
+			}
743
+			return nil, err
744
+		}
745
+		out = append(out, m)
746
+	}
747
+	return out, nil
748
+}
0 749
new file mode 100644
... ...
@@ -0,0 +1,190 @@
0
+package runtime
1
+
2
+import (
3
+	"bufio"
4
+	"bytes"
5
+	"encoding/json"
6
+	"fmt"
7
+	"os"
8
+	"os/exec"
9
+	"path/filepath"
10
+	"strings"
11
+	"syscall"
12
+
13
+	"github.com/containerd/containerd/specs"
14
+	ocs "github.com/opencontainers/runtime-spec/specs-go"
15
+)
16
+
17
+func findCgroupMountpointAndRoot(pid int, subsystem string) (string, string, error) {
18
+	f, err := os.Open(fmt.Sprintf("/proc/%d/mountinfo", pid))
19
+	if err != nil {
20
+		return "", "", err
21
+	}
22
+	defer f.Close()
23
+
24
+	scanner := bufio.NewScanner(f)
25
+	for scanner.Scan() {
26
+		txt := scanner.Text()
27
+		fields := strings.Split(txt, " ")
28
+		for _, opt := range strings.Split(fields[len(fields)-1], ",") {
29
+			if opt == subsystem {
30
+				return fields[4], fields[3], nil
31
+			}
32
+		}
33
+	}
34
+	if err := scanner.Err(); err != nil {
35
+		return "", "", err
36
+	}
37
+
38
+	return "", "", fmt.Errorf("cgroup path for %s not found", subsystem)
39
+}
40
+
41
+func parseCgroupFile(path string) (map[string]string, error) {
42
+	f, err := os.Open(path)
43
+	if err != nil {
44
+		return nil, err
45
+	}
46
+	defer f.Close()
47
+
48
+	s := bufio.NewScanner(f)
49
+	cgroups := make(map[string]string)
50
+
51
+	for s.Scan() {
52
+		if err := s.Err(); err != nil {
53
+			return nil, err
54
+		}
55
+
56
+		text := s.Text()
57
+		parts := strings.Split(text, ":")
58
+
59
+		for _, subs := range strings.Split(parts[1], ",") {
60
+			cgroups[subs] = parts[2]
61
+		}
62
+	}
63
+	return cgroups, nil
64
+}
65
+
66
+func (c *container) OOM() (OOM, error) {
67
+	p := c.processes[InitProcessID]
68
+	if p == nil {
69
+		return nil, fmt.Errorf("no init process found")
70
+	}
71
+
72
+	mountpoint, hostRoot, err := findCgroupMountpointAndRoot(os.Getpid(), "memory")
73
+	if err != nil {
74
+		return nil, err
75
+	}
76
+
77
+	cgroups, err := parseCgroupFile(fmt.Sprintf("/proc/%d/cgroup", p.pid))
78
+	if err != nil {
79
+		return nil, err
80
+	}
81
+
82
+	root, ok := cgroups["memory"]
83
+	if !ok {
84
+		return nil, fmt.Errorf("no memory cgroup for container %s", c.ID())
85
+	}
86
+
87
+	// Take care of the case were we're running inside a container
88
+	// ourself
89
+	root = strings.TrimPrefix(root, hostRoot)
90
+
91
+	return c.getMemoryEventFD(filepath.Join(mountpoint, root))
92
+}
93
+
94
+func (c *container) Pids() ([]int, error) {
95
+	var pids []int
96
+	args := c.runtimeArgs
97
+	args = append(args, "ps", "--format=json", c.id)
98
+	out, err := exec.Command(c.runtime, args...).CombinedOutput()
99
+	if err != nil {
100
+		return nil, fmt.Errorf("%s: %q", err.Error(), out)
101
+	}
102
+	if err := json.Unmarshal(out, &pids); err != nil {
103
+		return nil, err
104
+	}
105
+	return pids, nil
106
+}
107
+
108
+func u64Ptr(i uint64) *uint64 { return &i }
109
+func i64Ptr(i int64) *int64   { return &i }
110
+
111
+func (c *container) UpdateResources(r *Resource) error {
112
+	sr := ocs.LinuxResources{
113
+		Memory: &ocs.LinuxMemory{
114
+			Limit:       u64Ptr(uint64(r.Memory)),
115
+			Reservation: u64Ptr(uint64(r.MemoryReservation)),
116
+			Swap:        u64Ptr(uint64(r.MemorySwap)),
117
+			Kernel:      u64Ptr(uint64(r.KernelMemory)),
118
+			KernelTCP:   u64Ptr(uint64(r.KernelTCPMemory)),
119
+		},
120
+		CPU: &ocs.LinuxCPU{
121
+			Shares: u64Ptr(uint64(r.CPUShares)),
122
+			Quota:  i64Ptr(int64(r.CPUQuota)),
123
+			Period: u64Ptr(uint64(r.CPUPeriod)),
124
+			Cpus:   r.CpusetCpus,
125
+			Mems:   r.CpusetMems,
126
+		},
127
+		BlockIO: &ocs.LinuxBlockIO{
128
+			Weight: &r.BlkioWeight,
129
+		},
130
+		Pids: &ocs.LinuxPids{
131
+			Limit: r.PidsLimit,
132
+		},
133
+	}
134
+
135
+	srStr := bytes.NewBuffer(nil)
136
+	if err := json.NewEncoder(srStr).Encode(&sr); err != nil {
137
+		return err
138
+	}
139
+
140
+	args := c.runtimeArgs
141
+	args = append(args, "update", "-r", "-", c.id)
142
+	cmd := exec.Command(c.runtime, args...)
143
+	cmd.Stdin = srStr
144
+	b, err := cmd.CombinedOutput()
145
+	if err != nil {
146
+		return fmt.Errorf(string(b))
147
+	}
148
+	return nil
149
+}
150
+
151
+func getRootIDs(s *specs.Spec) (int, int, error) {
152
+	if s == nil {
153
+		return 0, 0, nil
154
+	}
155
+	var hasUserns bool
156
+	for _, ns := range s.Linux.Namespaces {
157
+		if ns.Type == ocs.UserNamespace {
158
+			hasUserns = true
159
+			break
160
+		}
161
+	}
162
+	if !hasUserns {
163
+		return 0, 0, nil
164
+	}
165
+	uid := hostIDFromMap(0, s.Linux.UIDMappings)
166
+	gid := hostIDFromMap(0, s.Linux.GIDMappings)
167
+	return uid, gid, nil
168
+}
169
+
170
+func (c *container) getMemoryEventFD(root string) (*oom, error) {
171
+	f, err := os.Open(filepath.Join(root, "memory.oom_control"))
172
+	if err != nil {
173
+		return nil, err
174
+	}
175
+	defer f.Close()
176
+	fd, _, serr := syscall.RawSyscall(syscall.SYS_EVENTFD2, 0, syscall.FD_CLOEXEC, 0)
177
+	if serr != 0 {
178
+		return nil, serr
179
+	}
180
+	if err := c.writeEventFD(root, int(f.Fd()), int(fd)); err != nil {
181
+		syscall.Close(int(fd))
182
+		return nil, err
183
+	}
184
+	return &oom{
185
+		root:    root,
186
+		id:      c.id,
187
+		eventfd: int(fd),
188
+	}, nil
189
+}
0 190
new file mode 100644
... ...
@@ -0,0 +1,48 @@
0
+package runtime
1
+
2
+import (
3
+	"bytes"
4
+	"encoding/json"
5
+	"fmt"
6
+	"os/exec"
7
+	"strings"
8
+
9
+	"github.com/containerd/containerd/specs"
10
+	ocs "github.com/opencontainers/runtime-spec/specs-go"
11
+)
12
+
13
+func getRootIDs(s *specs.Spec) (int, int, error) {
14
+	return 0, 0, nil
15
+}
16
+
17
+func (c *container) OOM() (OOM, error) {
18
+	return nil, nil
19
+}
20
+
21
+func (c *container) Pids() ([]int, error) {
22
+	var pids []int
23
+
24
+	// TODO: This could be racy. Needs more investigation.
25
+	//we get this information from runz state
26
+	cmd := exec.Command(c.runtime, "state", c.id)
27
+	outBuf, errBuf := new(bytes.Buffer), new(bytes.Buffer)
28
+	cmd.Stdout, cmd.Stderr = outBuf, errBuf
29
+
30
+	if err := cmd.Run(); err != nil {
31
+		if strings.Contains(errBuf.String(), "Container not found") {
32
+			return nil, errContainerNotFound
33
+		}
34
+		return nil, fmt.Errorf("Error is: %+v\n", err)
35
+	}
36
+	response := ocs.State{}
37
+	decoder := json.NewDecoder(outBuf)
38
+	if err := decoder.Decode(&response); err != nil {
39
+		return nil, fmt.Errorf("unable to decode json response: %+v", err)
40
+	}
41
+	pids = append(pids, response.Pid)
42
+	return pids, nil
43
+}
44
+
45
+func (c *container) UpdateResources(r *Resource) error {
46
+	return nil
47
+}
0 48
new file mode 100644
... ...
@@ -0,0 +1,476 @@
0
+package runtime
1
+
2
+import (
3
+	"encoding/json"
4
+	"fmt"
5
+	"io"
6
+	"io/ioutil"
7
+	"os"
8
+	"os/exec"
9
+	"path/filepath"
10
+	"strconv"
11
+	"strings"
12
+	"sync"
13
+	"syscall"
14
+	"time"
15
+
16
+	"github.com/Sirupsen/logrus"
17
+	"github.com/containerd/containerd/osutils"
18
+	"github.com/containerd/containerd/specs"
19
+	"golang.org/x/sys/unix"
20
+)
21
+
22
+// Process holds the operation allowed on a container's process
23
+type Process interface {
24
+	io.Closer
25
+
26
+	// ID of the process.
27
+	// This is either "init" when it is the container's init process or
28
+	// it is a user provided id for the process similar to the container id
29
+	ID() string
30
+	// Start unblocks the associated container init process.
31
+	// This should only be called on the process with ID "init"
32
+	Start() error
33
+	CloseStdin() error
34
+	Resize(int, int) error
35
+	// ExitFD returns the fd the provides an event when the process exits
36
+	ExitFD() int
37
+	// ExitStatus returns the exit status of the process or an error if it
38
+	// has not exited
39
+	ExitStatus() (uint32, error)
40
+	// Spec returns the process spec that created the process
41
+	Spec() specs.ProcessSpec
42
+	// Signal sends the provided signal to the process
43
+	Signal(os.Signal) error
44
+	// Container returns the container that the process belongs to
45
+	Container() Container
46
+	// Stdio of the container
47
+	Stdio() Stdio
48
+	// SystemPid is the pid on the system
49
+	SystemPid() int
50
+	// State returns if the process is running or not
51
+	State() State
52
+	// Wait reaps the shim process if avaliable
53
+	Wait()
54
+}
55
+
56
+type processConfig struct {
57
+	id          string
58
+	root        string
59
+	processSpec specs.ProcessSpec
60
+	spec        *specs.Spec
61
+	c           *container
62
+	stdio       Stdio
63
+	exec        bool
64
+	checkpoint  string
65
+}
66
+
67
+func newProcess(config *processConfig) (*process, error) {
68
+	p := &process{
69
+		root:      config.root,
70
+		id:        config.id,
71
+		container: config.c,
72
+		spec:      config.processSpec,
73
+		stdio:     config.stdio,
74
+		cmdDoneCh: make(chan struct{}),
75
+		state:     Running,
76
+	}
77
+	uid, gid, err := getRootIDs(config.spec)
78
+	if err != nil {
79
+		return nil, err
80
+	}
81
+	f, err := os.Create(filepath.Join(config.root, "process.json"))
82
+	if err != nil {
83
+		return nil, err
84
+	}
85
+	defer f.Close()
86
+
87
+	ps := ProcessState{
88
+		ProcessSpec: config.processSpec,
89
+		Exec:        config.exec,
90
+		PlatformProcessState: PlatformProcessState{
91
+			Checkpoint: config.checkpoint,
92
+			RootUID:    uid,
93
+			RootGID:    gid,
94
+		},
95
+		Stdin:       config.stdio.Stdin,
96
+		Stdout:      config.stdio.Stdout,
97
+		Stderr:      config.stdio.Stderr,
98
+		RuntimeArgs: config.c.runtimeArgs,
99
+		NoPivotRoot: config.c.noPivotRoot,
100
+	}
101
+
102
+	if err := json.NewEncoder(f).Encode(ps); err != nil {
103
+		return nil, err
104
+	}
105
+	exit, err := getExitPipe(filepath.Join(config.root, ExitFile))
106
+	if err != nil {
107
+		return nil, err
108
+	}
109
+	control, err := getControlPipe(filepath.Join(config.root, ControlFile))
110
+	if err != nil {
111
+		return nil, err
112
+	}
113
+	p.exitPipe = exit
114
+	p.controlPipe = control
115
+	return p, nil
116
+}
117
+
118
+func loadProcess(root, id string, c *container, s *ProcessState) (*process, error) {
119
+	p := &process{
120
+		root:      root,
121
+		id:        id,
122
+		container: c,
123
+		spec:      s.ProcessSpec,
124
+		stdio: Stdio{
125
+			Stdin:  s.Stdin,
126
+			Stdout: s.Stdout,
127
+			Stderr: s.Stderr,
128
+		},
129
+		state: Stopped,
130
+	}
131
+
132
+	startTime, err := ioutil.ReadFile(filepath.Join(p.root, StartTimeFile))
133
+	if err != nil && !os.IsNotExist(err) {
134
+		return nil, err
135
+	}
136
+	p.startTime = string(startTime)
137
+
138
+	if _, err := p.getPidFromFile(); err != nil {
139
+		return nil, err
140
+	}
141
+	if _, err := p.ExitStatus(); err != nil {
142
+		if err == ErrProcessNotExited {
143
+			exit, err := getExitPipe(filepath.Join(root, ExitFile))
144
+			if err != nil {
145
+				return nil, err
146
+			}
147
+			p.exitPipe = exit
148
+
149
+			control, err := getControlPipe(filepath.Join(root, ControlFile))
150
+			if err != nil {
151
+				return nil, err
152
+			}
153
+			p.controlPipe = control
154
+
155
+			p.state = Running
156
+			return p, nil
157
+		}
158
+		return nil, err
159
+	}
160
+	return p, nil
161
+}
162
+
163
+func readProcStatField(pid int, field int) (string, error) {
164
+	data, err := ioutil.ReadFile(filepath.Join(string(filepath.Separator), "proc", strconv.Itoa(pid), "stat"))
165
+	if err != nil {
166
+		return "", err
167
+	}
168
+
169
+	if field > 2 {
170
+		// First, split out the name since he could contains spaces.
171
+		parts := strings.Split(string(data), ") ")
172
+		// Now split out the rest, we end up with 2 fields less
173
+		parts = strings.Split(parts[1], " ")
174
+		return parts[field-2-1], nil // field count start at 1 in manual
175
+	}
176
+
177
+	parts := strings.Split(string(data), " (")
178
+
179
+	if field == 1 {
180
+		return parts[0], nil
181
+	}
182
+
183
+	parts = strings.Split(parts[1], ") ")
184
+	return parts[0], nil
185
+}
186
+
187
+type process struct {
188
+	root        string
189
+	id          string
190
+	pid         int
191
+	exitPipe    *os.File
192
+	controlPipe *os.File
193
+	container   *container
194
+	spec        specs.ProcessSpec
195
+	stdio       Stdio
196
+	cmd         *exec.Cmd
197
+	cmdSuccess  bool
198
+	cmdDoneCh   chan struct{}
199
+	state       State
200
+	stateLock   sync.Mutex
201
+	startTime   string
202
+}
203
+
204
+func (p *process) ID() string {
205
+	return p.id
206
+}
207
+
208
+func (p *process) Container() Container {
209
+	return p.container
210
+}
211
+
212
+func (p *process) SystemPid() int {
213
+	return p.pid
214
+}
215
+
216
+// ExitFD returns the fd of the exit pipe
217
+func (p *process) ExitFD() int {
218
+	return int(p.exitPipe.Fd())
219
+}
220
+
221
+func (p *process) CloseStdin() error {
222
+	_, err := fmt.Fprintf(p.controlPipe, "%d %d %d\n", 0, 0, 0)
223
+	return err
224
+}
225
+
226
+func (p *process) Resize(w, h int) error {
227
+	_, err := fmt.Fprintf(p.controlPipe, "%d %d %d\n", 1, w, h)
228
+	return err
229
+}
230
+
231
+func (p *process) updateExitStatusFile(status uint32) (uint32, error) {
232
+	p.stateLock.Lock()
233
+	p.state = Stopped
234
+	p.stateLock.Unlock()
235
+	err := ioutil.WriteFile(filepath.Join(p.root, ExitStatusFile), []byte(fmt.Sprintf("%u", status)), 0644)
236
+	return status, err
237
+}
238
+
239
+func (p *process) handleSigkilledShim(rst uint32, rerr error) (uint32, error) {
240
+	if p.cmd == nil || p.cmd.Process == nil {
241
+		e := unix.Kill(p.pid, 0)
242
+		if e == syscall.ESRCH {
243
+			logrus.Warnf("containerd: %s:%s (pid %d) does not exist", p.container.id, p.id, p.pid)
244
+			// The process died while containerd was down (probably of
245
+			// SIGKILL, but no way to be sure)
246
+			return p.updateExitStatusFile(UnknownStatus)
247
+		}
248
+
249
+		// If it's not the same process, just mark it stopped and set
250
+		// the status to the UnknownStatus value (i.e. 255)
251
+		if same, err := p.isSameProcess(); !same {
252
+			logrus.Warnf("containerd: %s:%s (pid %d) is not the same process anymore (%v)", p.container.id, p.id, p.pid, err)
253
+			// Create the file so we get the exit event generated once monitor kicks in
254
+			// without having to go through all this process again
255
+			return p.updateExitStatusFile(UnknownStatus)
256
+		}
257
+
258
+		ppid, err := readProcStatField(p.pid, 4)
259
+		if err != nil {
260
+			return rst, fmt.Errorf("could not check process ppid: %v (%v)", err, rerr)
261
+		}
262
+		if ppid == "1" {
263
+			logrus.Warnf("containerd: %s:%s shim died, killing associated process", p.container.id, p.id)
264
+			unix.Kill(p.pid, syscall.SIGKILL)
265
+			if err != nil && err != syscall.ESRCH {
266
+				return UnknownStatus, fmt.Errorf("containerd: unable to SIGKILL %s:%s (pid %v): %v", p.container.id, p.id, p.pid, err)
267
+			}
268
+
269
+			// wait for the process to die
270
+			for {
271
+				e := unix.Kill(p.pid, 0)
272
+				if e == syscall.ESRCH {
273
+					break
274
+				}
275
+				time.Sleep(5 * time.Millisecond)
276
+			}
277
+			// Create the file so we get the exit event generated once monitor kicks in
278
+			// without having to go through all this process again
279
+			return p.updateExitStatusFile(128 + uint32(syscall.SIGKILL))
280
+		}
281
+
282
+		return rst, rerr
283
+	}
284
+
285
+	// Possible that the shim was SIGKILLED
286
+	e := unix.Kill(p.cmd.Process.Pid, 0)
287
+	if e != syscall.ESRCH {
288
+		return rst, rerr
289
+	}
290
+
291
+	// Ensure we got the shim ProcessState
292
+	<-p.cmdDoneCh
293
+
294
+	shimStatus := p.cmd.ProcessState.Sys().(syscall.WaitStatus)
295
+	if shimStatus.Signaled() && shimStatus.Signal() == syscall.SIGKILL {
296
+		logrus.Debugf("containerd: ExitStatus(container: %s, process: %s): shim was SIGKILL'ed reaping its child with pid %d", p.container.id, p.id, p.pid)
297
+
298
+		rerr = nil
299
+		rst = 128 + uint32(shimStatus.Signal())
300
+
301
+		p.stateLock.Lock()
302
+		p.state = Stopped
303
+		p.stateLock.Unlock()
304
+	}
305
+
306
+	return rst, rerr
307
+}
308
+
309
+func (p *process) ExitStatus() (rst uint32, rerr error) {
310
+	data, err := ioutil.ReadFile(filepath.Join(p.root, ExitStatusFile))
311
+	defer func() {
312
+		if rerr != nil {
313
+			rst, rerr = p.handleSigkilledShim(rst, rerr)
314
+		}
315
+	}()
316
+	if err != nil {
317
+		if os.IsNotExist(err) {
318
+			return UnknownStatus, ErrProcessNotExited
319
+		}
320
+		return UnknownStatus, err
321
+	}
322
+	if len(data) == 0 {
323
+		return UnknownStatus, ErrProcessNotExited
324
+	}
325
+	p.stateLock.Lock()
326
+	p.state = Stopped
327
+	p.stateLock.Unlock()
328
+
329
+	i, err := strconv.ParseUint(string(data), 10, 32)
330
+	return uint32(i), err
331
+}
332
+
333
+func (p *process) Spec() specs.ProcessSpec {
334
+	return p.spec
335
+}
336
+
337
+func (p *process) Stdio() Stdio {
338
+	return p.stdio
339
+}
340
+
341
+// Close closes any open files and/or resouces on the process
342
+func (p *process) Close() error {
343
+	err := p.exitPipe.Close()
344
+	if cerr := p.controlPipe.Close(); err == nil {
345
+		err = cerr
346
+	}
347
+	return err
348
+}
349
+
350
+func (p *process) State() State {
351
+	p.stateLock.Lock()
352
+	defer p.stateLock.Unlock()
353
+	return p.state
354
+}
355
+
356
+func (p *process) readStartTime() (string, error) {
357
+	return readProcStatField(p.pid, 22)
358
+}
359
+
360
+func (p *process) saveStartTime() error {
361
+	startTime, err := p.readStartTime()
362
+	if err != nil {
363
+		return err
364
+	}
365
+
366
+	p.startTime = startTime
367
+	return ioutil.WriteFile(filepath.Join(p.root, StartTimeFile), []byte(startTime), 0644)
368
+}
369
+
370
+func (p *process) isSameProcess() (bool, error) {
371
+	if p.pid == 0 {
372
+		_, err := p.getPidFromFile()
373
+		if err != nil {
374
+			return false, err
375
+		}
376
+	}
377
+
378
+	// for backward compat assume it's the same if startTime wasn't set
379
+	if p.startTime == "" {
380
+		// Sometimes the process dies before we can get the starttime,
381
+		// check that the process actually exists
382
+		if err := unix.Kill(p.pid, 0); err != syscall.ESRCH {
383
+			return true, nil
384
+		}
385
+		return false, nil
386
+	}
387
+
388
+	startTime, err := p.readStartTime()
389
+	if err != nil {
390
+		return false, err
391
+	}
392
+
393
+	return startTime == p.startTime, nil
394
+}
395
+
396
+// Wait will reap the shim process
397
+func (p *process) Wait() {
398
+	if p.cmdDoneCh != nil {
399
+		<-p.cmdDoneCh
400
+	}
401
+}
402
+
403
+func getExitPipe(path string) (*os.File, error) {
404
+	if err := unix.Mkfifo(path, 0755); err != nil && !os.IsExist(err) {
405
+		return nil, err
406
+	}
407
+	// add NONBLOCK in case the other side has already closed or else
408
+	// this function would never return
409
+	return os.OpenFile(path, syscall.O_RDONLY|syscall.O_NONBLOCK, 0)
410
+}
411
+
412
+func getControlPipe(path string) (*os.File, error) {
413
+	if err := unix.Mkfifo(path, 0755); err != nil && !os.IsExist(err) {
414
+		return nil, err
415
+	}
416
+	return os.OpenFile(path, syscall.O_RDWR|syscall.O_NONBLOCK, 0)
417
+}
418
+
419
+// Signal sends the provided signal to the process
420
+func (p *process) Signal(s os.Signal) error {
421
+	return syscall.Kill(p.pid, s.(syscall.Signal))
422
+}
423
+
424
+// Start unblocks the associated container init process.
425
+// This should only be called on the process with ID "init"
426
+func (p *process) Start() error {
427
+	if p.ID() == InitProcessID {
428
+		var (
429
+			errC = make(chan error, 1)
430
+			args = append(p.container.runtimeArgs, "start", p.container.id)
431
+			cmd  = exec.Command(p.container.runtime, args...)
432
+		)
433
+		go func() {
434
+			out, err := cmd.CombinedOutput()
435
+			if err != nil {
436
+				errC <- fmt.Errorf("%s: %q", err.Error(), out)
437
+			}
438
+			errC <- nil
439
+		}()
440
+		select {
441
+		case err := <-errC:
442
+			if err != nil {
443
+				return err
444
+			}
445
+		case <-p.cmdDoneCh:
446
+			if !p.cmdSuccess {
447
+				if cmd.Process != nil {
448
+					cmd.Process.Kill()
449
+				}
450
+				cmd.Wait()
451
+				return ErrShimExited
452
+			}
453
+			err := <-errC
454
+			if err != nil {
455
+				return err
456
+			}
457
+		}
458
+	}
459
+	return nil
460
+}
461
+
462
+// Delete delete any resources held by the container
463
+func (p *process) Delete() error {
464
+	var (
465
+		args = append(p.container.runtimeArgs, "delete", "-f", p.container.id)
466
+		cmd  = exec.Command(p.container.runtime, args...)
467
+	)
468
+
469
+	cmd.SysProcAttr = osutils.SetPDeathSig()
470
+	out, err := cmd.CombinedOutput()
471
+	if err != nil {
472
+		return fmt.Errorf("%s: %v", out, err)
473
+	}
474
+	return nil
475
+}
0 476
new file mode 100644
... ...
@@ -0,0 +1,22 @@
0
+// +build linux
1
+
2
+package runtime
3
+
4
+import (
5
+	"io/ioutil"
6
+	"path/filepath"
7
+	"strconv"
8
+)
9
+
10
+func (p *process) getPidFromFile() (int, error) {
11
+	data, err := ioutil.ReadFile(filepath.Join(p.root, "pid"))
12
+	if err != nil {
13
+		return -1, err
14
+	}
15
+	i, err := strconv.Atoi(string(data))
16
+	if err != nil {
17
+		return -1, errInvalidPidInt
18
+	}
19
+	p.pid = i
20
+	return i, nil
21
+}
0 22
new file mode 100644
... ...
@@ -0,0 +1,34 @@
0
+// +build solaris
1
+
2
+package runtime
3
+
4
+import (
5
+	"bytes"
6
+	"encoding/json"
7
+	"fmt"
8
+	"os/exec"
9
+
10
+	runtimespec "github.com/opencontainers/runtime-spec/specs-go"
11
+)
12
+
13
+// On Solaris we already have a state file maintained by the framework.
14
+// This is read by runz state. We just call that instead of maintaining
15
+// a separate file.
16
+func (p *process) getPidFromFile() (int, error) {
17
+	//we get this information from runz state
18
+	cmd := exec.Command("runc", "state", p.container.ID())
19
+	outBuf, errBuf := new(bytes.Buffer), new(bytes.Buffer)
20
+	cmd.Stdout, cmd.Stderr = outBuf, errBuf
21
+
22
+	if err := cmd.Run(); err != nil {
23
+		// TODO: Improve logic
24
+		return -1, errContainerNotFound
25
+	}
26
+	response := runtimespec.State{}
27
+	decoder := json.NewDecoder(outBuf)
28
+	if err := decoder.Decode(&response); err != nil {
29
+		return -1, fmt.Errorf("unable to decode json response: %+v", err)
30
+	}
31
+	p.pid = response.Pid
32
+	return p.pid, nil
33
+}
0 34
new file mode 100644
... ...
@@ -0,0 +1,132 @@
0
+package runtime
1
+
2
+import (
3
+	"errors"
4
+	"time"
5
+
6
+	"github.com/containerd/containerd/specs"
7
+)
8
+
9
+var (
10
+	// ErrContainerExited is returned when access to an exited
11
+	// container is attempted
12
+	ErrContainerExited = errors.New("containerd: container has exited")
13
+	// ErrProcessNotExited is returned when trying to retrieve the exit
14
+	// status of an alive process
15
+	ErrProcessNotExited = errors.New("containerd: process has not exited")
16
+	// ErrContainerNotStarted is returned when a container fails to
17
+	// start without error from the shim or the OCI runtime
18
+	ErrContainerNotStarted = errors.New("containerd: container not started")
19
+	// ErrContainerStartTimeout is returned if a container takes too
20
+	// long to start
21
+	ErrContainerStartTimeout = errors.New("containerd: container did not start before the specified timeout")
22
+	// ErrShimExited is returned if the shim or the contianer's init process
23
+	// exits before completing
24
+	ErrShimExited = errors.New("containerd: shim exited before container process was started")
25
+
26
+	errNoPidFile         = errors.New("containerd: no process pid file found")
27
+	errInvalidPidInt     = errors.New("containerd: process pid is invalid")
28
+	errContainerNotFound = errors.New("containerd: container not found")
29
+	errNotImplemented    = errors.New("containerd: not implemented")
30
+)
31
+
32
+const (
33
+	// ExitFile holds the name of the pipe used to monitor process
34
+	// exit
35
+	ExitFile = "exit"
36
+	// ExitStatusFile holds the name of the file where the container
37
+	// exit code is to be written
38
+	ExitStatusFile = "exitStatus"
39
+	// StateFile holds the name of the file where the container state
40
+	// is written
41
+	StateFile = "state.json"
42
+	// ControlFile holds the name of the pipe used to control the shim
43
+	ControlFile = "control"
44
+	// InitProcessID holds the special ID used for the very first
45
+	// container's process
46
+	InitProcessID = "init"
47
+	// StartTimeFile holds the name of the file in which the process
48
+	// start time is saved
49
+	StartTimeFile = "starttime"
50
+
51
+	// UnknownStatus is the value returned when a process exit
52
+	// status cannot be determined
53
+	UnknownStatus = 255
54
+)
55
+
56
+// Checkpoint holds information regarding a container checkpoint
57
+type Checkpoint struct {
58
+	// Timestamp is the time that checkpoint happened
59
+	Created time.Time `json:"created"`
60
+	// Name is the name of the checkpoint
61
+	Name string `json:"name"`
62
+	// TCP checkpoints open tcp connections
63
+	TCP bool `json:"tcp"`
64
+	// UnixSockets persists unix sockets in the checkpoint
65
+	UnixSockets bool `json:"unixSockets"`
66
+	// Shell persists tty sessions in the checkpoint
67
+	Shell bool `json:"shell"`
68
+	// Exit exits the container after the checkpoint is finished
69
+	Exit bool `json:"exit"`
70
+	// EmptyNS tells CRIU to omit a specified namespace
71
+	EmptyNS []string `json:"emptyNS,omitempty"`
72
+}
73
+
74
+// PlatformProcessState container platform-specific fields in the ProcessState structure
75
+type PlatformProcessState struct {
76
+	Checkpoint string `json:"checkpoint"`
77
+	RootUID    int    `json:"rootUID"`
78
+	RootGID    int    `json:"rootGID"`
79
+}
80
+
81
+// State represents a container state
82
+type State string
83
+
84
+// Resource regroups the various container limits that can be updated
85
+type Resource struct {
86
+	CPUShares         int64
87
+	BlkioWeight       uint16
88
+	CPUPeriod         int64
89
+	CPUQuota          int64
90
+	CpusetCpus        string
91
+	CpusetMems        string
92
+	KernelMemory      int64
93
+	KernelTCPMemory   int64
94
+	Memory            int64
95
+	MemoryReservation int64
96
+	MemorySwap        int64
97
+	PidsLimit         int64
98
+}
99
+
100
+// Possible container states
101
+const (
102
+	Paused  = State("paused")
103
+	Stopped = State("stopped")
104
+	Running = State("running")
105
+)
106
+
107
+type state struct {
108
+	Bundle      string   `json:"bundle"`
109
+	Labels      []string `json:"labels"`
110
+	Stdin       string   `json:"stdin"`
111
+	Stdout      string   `json:"stdout"`
112
+	Stderr      string   `json:"stderr"`
113
+	Runtime     string   `json:"runtime"`
114
+	RuntimeArgs []string `json:"runtimeArgs"`
115
+	Shim        string   `json:"shim"`
116
+	NoPivotRoot bool     `json:"noPivotRoot"`
117
+}
118
+
119
+// ProcessState holds the process OCI specs along with various fields
120
+// required by containerd
121
+type ProcessState struct {
122
+	specs.ProcessSpec
123
+	Exec        bool     `json:"exec"`
124
+	Stdin       string   `json:"containerdStdin"`
125
+	Stdout      string   `json:"containerdStdout"`
126
+	Stderr      string   `json:"containerdStderr"`
127
+	RuntimeArgs []string `json:"runtimeArgs"`
128
+	NoPivotRoot bool     `json:"noPivotRoot"`
129
+
130
+	PlatformProcessState
131
+}
0 132
new file mode 100644
... ...
@@ -0,0 +1,87 @@
0
+package runtime
1
+
2
+import "time"
3
+
4
+// Stat holds a container statistics
5
+type Stat struct {
6
+	// Timestamp is the time that the statistics where collected
7
+	Timestamp time.Time
8
+	CPU       CPU                `json:"cpu"`
9
+	Memory    Memory             `json:"memory"`
10
+	Pids      Pids               `json:"pids"`
11
+	Blkio     Blkio              `json:"blkio"`
12
+	Hugetlb   map[string]Hugetlb `json:"hugetlb"`
13
+}
14
+
15
+// Hugetlb holds information regarding a container huge tlb usage
16
+type Hugetlb struct {
17
+	Usage   uint64 `json:"usage,omitempty"`
18
+	Max     uint64 `json:"max,omitempty"`
19
+	Failcnt uint64 `json:"failcnt"`
20
+}
21
+
22
+// BlkioEntry represents a single record for a Blkio stat
23
+type BlkioEntry struct {
24
+	Major uint64 `json:"major,omitempty"`
25
+	Minor uint64 `json:"minor,omitempty"`
26
+	Op    string `json:"op,omitempty"`
27
+	Value uint64 `json:"value,omitempty"`
28
+}
29
+
30
+// Blkio regroups all the Blkio related stats
31
+type Blkio struct {
32
+	IoServiceBytesRecursive []BlkioEntry `json:"ioServiceBytesRecursive,omitempty"`
33
+	IoServicedRecursive     []BlkioEntry `json:"ioServicedRecursive,omitempty"`
34
+	IoQueuedRecursive       []BlkioEntry `json:"ioQueueRecursive,omitempty"`
35
+	IoServiceTimeRecursive  []BlkioEntry `json:"ioServiceTimeRecursive,omitempty"`
36
+	IoWaitTimeRecursive     []BlkioEntry `json:"ioWaitTimeRecursive,omitempty"`
37
+	IoMergedRecursive       []BlkioEntry `json:"ioMergedRecursive,omitempty"`
38
+	IoTimeRecursive         []BlkioEntry `json:"ioTimeRecursive,omitempty"`
39
+	SectorsRecursive        []BlkioEntry `json:"sectorsRecursive,omitempty"`
40
+}
41
+
42
+// Pids holds the stat of the pid usage of the machine
43
+type Pids struct {
44
+	Current uint64 `json:"current,omitempty"`
45
+	Limit   uint64 `json:"limit,omitempty"`
46
+}
47
+
48
+// Throttling holds a cpu throttling information
49
+type Throttling struct {
50
+	Periods          uint64 `json:"periods,omitempty"`
51
+	ThrottledPeriods uint64 `json:"throttledPeriods,omitempty"`
52
+	ThrottledTime    uint64 `json:"throttledTime,omitempty"`
53
+}
54
+
55
+// CPUUsage holds information regarding cpu usage
56
+type CPUUsage struct {
57
+	// Units: nanoseconds.
58
+	Total  uint64   `json:"total,omitempty"`
59
+	Percpu []uint64 `json:"percpu,omitempty"`
60
+	Kernel uint64   `json:"kernel"`
61
+	User   uint64   `json:"user"`
62
+}
63
+
64
+// CPU regroups both a CPU usage and throttling information
65
+type CPU struct {
66
+	Usage      CPUUsage   `json:"usage,omitempty"`
67
+	Throttling Throttling `json:"throttling,omitempty"`
68
+}
69
+
70
+// MemoryEntry regroups statistic about a given type of memory
71
+type MemoryEntry struct {
72
+	Limit   uint64 `json:"limit"`
73
+	Usage   uint64 `json:"usage,omitempty"`
74
+	Max     uint64 `json:"max,omitempty"`
75
+	Failcnt uint64 `json:"failcnt"`
76
+}
77
+
78
+// Memory holds information regarding the different type of memories available
79
+type Memory struct {
80
+	Cache     uint64            `json:"cache,omitempty"`
81
+	Usage     MemoryEntry       `json:"usage,omitempty"`
82
+	Swap      MemoryEntry       `json:"swap,omitempty"`
83
+	Kernel    MemoryEntry       `json:"kernel,omitempty"`
84
+	KernelTCP MemoryEntry       `json:"kernelTCP,omitempty"`
85
+	Raw       map[string]uint64 `json:"raw,omitempty"`
86
+}
0 87
new file mode 100644
... ...
@@ -0,0 +1,12 @@
0
+package specs
1
+
2
+import oci "github.com/opencontainers/runtime-spec/specs-go"
3
+
4
+type (
5
+	// ProcessSpec aliases the platform process specs
6
+	ProcessSpec oci.Process
7
+	// Spec aliases the platform oci spec
8
+	Spec oci.Spec
9
+	// Rlimit aliases the platform resource limit
10
+	Rlimit oci.LinuxRlimit
11
+)
0 12
new file mode 100644
... ...
@@ -0,0 +1,10 @@
0
+package specs
1
+
2
+import ocs "github.com/opencontainers/runtime-spec/specs-go"
3
+
4
+type (
5
+	// ProcessSpec aliases the platform process specs
6
+	ProcessSpec ocs.Process
7
+	// Spec aliases the platform oci spec
8
+	Spec ocs.Spec
9
+)
0 10
deleted file mode 100644
... ...
@@ -1,191 +0,0 @@
1
-
2
-                                 Apache License
3
-                           Version 2.0, January 2004
4
-                        https://www.apache.org/licenses/
5
-
6
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
-
8
-   1. Definitions.
9
-
10
-      "License" shall mean the terms and conditions for use, reproduction,
11
-      and distribution as defined by Sections 1 through 9 of this document.
12
-
13
-      "Licensor" shall mean the copyright owner or entity authorized by
14
-      the copyright owner that is granting the License.
15
-
16
-      "Legal Entity" shall mean the union of the acting entity and all
17
-      other entities that control, are controlled by, or are under common
18
-      control with that entity. For the purposes of this definition,
19
-      "control" means (i) the power, direct or indirect, to cause the
20
-      direction or management of such entity, whether by contract or
21
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
-      outstanding shares, or (iii) beneficial ownership of such entity.
23
-
24
-      "You" (or "Your") shall mean an individual or Legal Entity
25
-      exercising permissions granted by this License.
26
-
27
-      "Source" form shall mean the preferred form for making modifications,
28
-      including but not limited to software source code, documentation
29
-      source, and configuration files.
30
-
31
-      "Object" form shall mean any form resulting from mechanical
32
-      transformation or translation of a Source form, including but
33
-      not limited to compiled object code, generated documentation,
34
-      and conversions to other media types.
35
-
36
-      "Work" shall mean the work of authorship, whether in Source or
37
-      Object form, made available under the License, as indicated by a
38
-      copyright notice that is included in or attached to the work
39
-      (an example is provided in the Appendix below).
40
-
41
-      "Derivative Works" shall mean any work, whether in Source or Object
42
-      form, that is based on (or derived from) the Work and for which the
43
-      editorial revisions, annotations, elaborations, or other modifications
44
-      represent, as a whole, an original work of authorship. For the purposes
45
-      of this License, Derivative Works shall not include works that remain
46
-      separable from, or merely link (or bind by name) to the interfaces of,
47
-      the Work and Derivative Works thereof.
48
-
49
-      "Contribution" shall mean any work of authorship, including
50
-      the original version of the Work and any modifications or additions
51
-      to that Work or Derivative Works thereof, that is intentionally
52
-      submitted to Licensor for inclusion in the Work by the copyright owner
53
-      or by an individual or Legal Entity authorized to submit on behalf of
54
-      the copyright owner. For the purposes of this definition, "submitted"
55
-      means any form of electronic, verbal, or written communication sent
56
-      to the Licensor or its representatives, including but not limited to
57
-      communication on electronic mailing lists, source code control systems,
58
-      and issue tracking systems that are managed by, or on behalf of, the
59
-      Licensor for the purpose of discussing and improving the Work, but
60
-      excluding communication that is conspicuously marked or otherwise
61
-      designated in writing by the copyright owner as "Not a Contribution."
62
-
63
-      "Contributor" shall mean Licensor and any individual or Legal Entity
64
-      on behalf of whom a Contribution has been received by Licensor and
65
-      subsequently incorporated within the Work.
66
-
67
-   2. Grant of Copyright License. Subject to the terms and conditions of
68
-      this License, each Contributor hereby grants to You a perpetual,
69
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
-      copyright license to reproduce, prepare Derivative Works of,
71
-      publicly display, publicly perform, sublicense, and distribute the
72
-      Work and such Derivative Works in Source or Object form.
73
-
74
-   3. Grant of Patent License. Subject to the terms and conditions of
75
-      this License, each Contributor hereby grants to You a perpetual,
76
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
-      (except as stated in this section) patent license to make, have made,
78
-      use, offer to sell, sell, import, and otherwise transfer the Work,
79
-      where such license applies only to those patent claims licensable
80
-      by such Contributor that are necessarily infringed by their
81
-      Contribution(s) alone or by combination of their Contribution(s)
82
-      with the Work to which such Contribution(s) was submitted. If You
83
-      institute patent litigation against any entity (including a
84
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
85
-      or a Contribution incorporated within the Work constitutes direct
86
-      or contributory patent infringement, then any patent licenses
87
-      granted to You under this License for that Work shall terminate
88
-      as of the date such litigation is filed.
89
-
90
-   4. Redistribution. You may reproduce and distribute copies of the
91
-      Work or Derivative Works thereof in any medium, with or without
92
-      modifications, and in Source or Object form, provided that You
93
-      meet the following conditions:
94
-
95
-      (a) You must give any other recipients of the Work or
96
-          Derivative Works a copy of this License; and
97
-
98
-      (b) You must cause any modified files to carry prominent notices
99
-          stating that You changed the files; and
100
-
101
-      (c) You must retain, in the Source form of any Derivative Works
102
-          that You distribute, all copyright, patent, trademark, and
103
-          attribution notices from the Source form of the Work,
104
-          excluding those notices that do not pertain to any part of
105
-          the Derivative Works; and
106
-
107
-      (d) If the Work includes a "NOTICE" text file as part of its
108
-          distribution, then any Derivative Works that You distribute must
109
-          include a readable copy of the attribution notices contained
110
-          within such NOTICE file, excluding those notices that do not
111
-          pertain to any part of the Derivative Works, in at least one
112
-          of the following places: within a NOTICE text file distributed
113
-          as part of the Derivative Works; within the Source form or
114
-          documentation, if provided along with the Derivative Works; or,
115
-          within a display generated by the Derivative Works, if and
116
-          wherever such third-party notices normally appear. The contents
117
-          of the NOTICE file are for informational purposes only and
118
-          do not modify the License. You may add Your own attribution
119
-          notices within Derivative Works that You distribute, alongside
120
-          or as an addendum to the NOTICE text from the Work, provided
121
-          that such additional attribution notices cannot be construed
122
-          as modifying the License.
123
-
124
-      You may add Your own copyright statement to Your modifications and
125
-      may provide additional or different license terms and conditions
126
-      for use, reproduction, or distribution of Your modifications, or
127
-      for any such Derivative Works as a whole, provided Your use,
128
-      reproduction, and distribution of the Work otherwise complies with
129
-      the conditions stated in this License.
130
-
131
-   5. Submission of Contributions. Unless You explicitly state otherwise,
132
-      any Contribution intentionally submitted for inclusion in the Work
133
-      by You to the Licensor shall be under the terms and conditions of
134
-      this License, without any additional terms or conditions.
135
-      Notwithstanding the above, nothing herein shall supersede or modify
136
-      the terms of any separate license agreement you may have executed
137
-      with Licensor regarding such Contributions.
138
-
139
-   6. Trademarks. This License does not grant permission to use the trade
140
-      names, trademarks, service marks, or product names of the Licensor,
141
-      except as required for reasonable and customary use in describing the
142
-      origin of the Work and reproducing the content of the NOTICE file.
143
-
144
-   7. Disclaimer of Warranty. Unless required by applicable law or
145
-      agreed to in writing, Licensor provides the Work (and each
146
-      Contributor provides its Contributions) on an "AS IS" BASIS,
147
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
-      implied, including, without limitation, any warranties or conditions
149
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
-      PARTICULAR PURPOSE. You are solely responsible for determining the
151
-      appropriateness of using or redistributing the Work and assume any
152
-      risks associated with Your exercise of permissions under this License.
153
-
154
-   8. Limitation of Liability. In no event and under no legal theory,
155
-      whether in tort (including negligence), contract, or otherwise,
156
-      unless required by applicable law (such as deliberate and grossly
157
-      negligent acts) or agreed to in writing, shall any Contributor be
158
-      liable to You for damages, including any direct, indirect, special,
159
-      incidental, or consequential damages of any character arising as a
160
-      result of this License or out of the use or inability to use the
161
-      Work (including but not limited to damages for loss of goodwill,
162
-      work stoppage, computer failure or malfunction, or any and all
163
-      other commercial damages or losses), even if such Contributor
164
-      has been advised of the possibility of such damages.
165
-
166
-   9. Accepting Warranty or Additional Liability. While redistributing
167
-      the Work or Derivative Works thereof, You may choose to offer,
168
-      and charge a fee for, acceptance of support, warranty, indemnity,
169
-      or other liability obligations and/or rights consistent with this
170
-      License. However, in accepting such obligations, You may act only
171
-      on Your own behalf and on Your sole responsibility, not on behalf
172
-      of any other Contributor, and only if You agree to indemnify,
173
-      defend, and hold each Contributor harmless for any liability
174
-      incurred by, or claims asserted against, such Contributor by reason
175
-      of your accepting any such warranty or additional liability.
176
-
177
-   END OF TERMS AND CONDITIONS
178
-
179
-   Copyright 2013-2016 Docker, Inc.
180
-
181
-   Licensed under the Apache License, Version 2.0 (the "License");
182
-   you may not use this file except in compliance with the License.
183
-   You may obtain a copy of the License at
184
-
185
-       https://www.apache.org/licenses/LICENSE-2.0
186
-
187
-   Unless required by applicable law or agreed to in writing, software
188
-   distributed under the License is distributed on an "AS IS" BASIS,
189
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
190
-   See the License for the specific language governing permissions and
191
-   limitations under the License.
192 1
deleted file mode 100644
... ...
@@ -1,425 +0,0 @@
1
-Attribution-ShareAlike 4.0 International
2
-
3
-=======================================================================
4
-
5
-Creative Commons Corporation ("Creative Commons") is not a law firm and
6
-does not provide legal services or legal advice. Distribution of
7
-Creative Commons public licenses does not create a lawyer-client or
8
-other relationship. Creative Commons makes its licenses and related
9
-information available on an "as-is" basis. Creative Commons gives no
10
-warranties regarding its licenses, any material licensed under their
11
-terms and conditions, or any related information. Creative Commons
12
-disclaims all liability for damages resulting from their use to the
13
-fullest extent possible.
14
-
15
-Using Creative Commons Public Licenses
16
-
17
-Creative Commons public licenses provide a standard set of terms and
18
-conditions that creators and other rights holders may use to share
19
-original works of authorship and other material subject to copyright
20
-and certain other rights specified in the public license below. The
21
-following considerations are for informational purposes only, are not
22
-exhaustive, and do not form part of our licenses.
23
-
24
-     Considerations for licensors: Our public licenses are
25
-     intended for use by those authorized to give the public
26
-     permission to use material in ways otherwise restricted by
27
-     copyright and certain other rights. Our licenses are
28
-     irrevocable. Licensors should read and understand the terms
29
-     and conditions of the license they choose before applying it.
30
-     Licensors should also secure all rights necessary before
31
-     applying our licenses so that the public can reuse the
32
-     material as expected. Licensors should clearly mark any
33
-     material not subject to the license. This includes other CC-
34
-     licensed material, or material used under an exception or
35
-     limitation to copyright. More considerations for licensors:
36
-	wiki.creativecommons.org/Considerations_for_licensors
37
-
38
-     Considerations for the public: By using one of our public
39
-     licenses, a licensor grants the public permission to use the
40
-     licensed material under specified terms and conditions. If
41
-     the licensor's permission is not necessary for any reason--for
42
-     example, because of any applicable exception or limitation to
43
-     copyright--then that use is not regulated by the license. Our
44
-     licenses grant only permissions under copyright and certain
45
-     other rights that a licensor has authority to grant. Use of
46
-     the licensed material may still be restricted for other
47
-     reasons, including because others have copyright or other
48
-     rights in the material. A licensor may make special requests,
49
-     such as asking that all changes be marked or described.
50
-     Although not required by our licenses, you are encouraged to
51
-     respect those requests where reasonable. More_considerations
52
-     for the public:
53
-	wiki.creativecommons.org/Considerations_for_licensees
54
-
55
-=======================================================================
56
-
57
-Creative Commons Attribution-ShareAlike 4.0 International Public
58
-License
59
-
60
-By exercising the Licensed Rights (defined below), You accept and agree
61
-to be bound by the terms and conditions of this Creative Commons
62
-Attribution-ShareAlike 4.0 International Public License ("Public
63
-License"). To the extent this Public License may be interpreted as a
64
-contract, You are granted the Licensed Rights in consideration of Your
65
-acceptance of these terms and conditions, and the Licensor grants You
66
-such rights in consideration of benefits the Licensor receives from
67
-making the Licensed Material available under these terms and
68
-conditions.
69
-
70
-
71
-Section 1 -- Definitions.
72
-
73
-  a. Adapted Material means material subject to Copyright and Similar
74
-     Rights that is derived from or based upon the Licensed Material
75
-     and in which the Licensed Material is translated, altered,
76
-     arranged, transformed, or otherwise modified in a manner requiring
77
-     permission under the Copyright and Similar Rights held by the
78
-     Licensor. For purposes of this Public License, where the Licensed
79
-     Material is a musical work, performance, or sound recording,
80
-     Adapted Material is always produced where the Licensed Material is
81
-     synched in timed relation with a moving image.
82
-
83
-  b. Adapter's License means the license You apply to Your Copyright
84
-     and Similar Rights in Your contributions to Adapted Material in
85
-     accordance with the terms and conditions of this Public License.
86
-
87
-  c. BY-SA Compatible License means a license listed at
88
-     creativecommons.org/compatiblelicenses, approved by Creative
89
-     Commons as essentially the equivalent of this Public License.
90
-
91
-  d. Copyright and Similar Rights means copyright and/or similar rights
92
-     closely related to copyright including, without limitation,
93
-     performance, broadcast, sound recording, and Sui Generis Database
94
-     Rights, without regard to how the rights are labeled or
95
-     categorized. For purposes of this Public License, the rights
96
-     specified in Section 2(b)(1)-(2) are not Copyright and Similar
97
-     Rights.
98
-
99
-  e. Effective Technological Measures means those measures that, in the
100
-     absence of proper authority, may not be circumvented under laws
101
-     fulfilling obligations under Article 11 of the WIPO Copyright
102
-     Treaty adopted on December 20, 1996, and/or similar international
103
-     agreements.
104
-
105
-  f. Exceptions and Limitations means fair use, fair dealing, and/or
106
-     any other exception or limitation to Copyright and Similar Rights
107
-     that applies to Your use of the Licensed Material.
108
-
109
-  g. License Elements means the license attributes listed in the name
110
-     of a Creative Commons Public License. The License Elements of this
111
-     Public License are Attribution and ShareAlike.
112
-
113
-  h. Licensed Material means the artistic or literary work, database,
114
-     or other material to which the Licensor applied this Public
115
-     License.
116
-
117
-  i. Licensed Rights means the rights granted to You subject to the
118
-     terms and conditions of this Public License, which are limited to
119
-     all Copyright and Similar Rights that apply to Your use of the
120
-     Licensed Material and that the Licensor has authority to license.
121
-
122
-  j. Licensor means the individual(s) or entity(ies) granting rights
123
-     under this Public License.
124
-
125
-  k. Share means to provide material to the public by any means or
126
-     process that requires permission under the Licensed Rights, such
127
-     as reproduction, public display, public performance, distribution,
128
-     dissemination, communication, or importation, and to make material
129
-     available to the public including in ways that members of the
130
-     public may access the material from a place and at a time
131
-     individually chosen by them.
132
-
133
-  l. Sui Generis Database Rights means rights other than copyright
134
-     resulting from Directive 96/9/EC of the European Parliament and of
135
-     the Council of 11 March 1996 on the legal protection of databases,
136
-     as amended and/or succeeded, as well as other essentially
137
-     equivalent rights anywhere in the world.
138
-
139
-  m. You means the individual or entity exercising the Licensed Rights
140
-     under this Public License. Your has a corresponding meaning.
141
-
142
-
143
-Section 2 -- Scope.
144
-
145
-  a. License grant.
146
-
147
-       1. Subject to the terms and conditions of this Public License,
148
-          the Licensor hereby grants You a worldwide, royalty-free,
149
-          non-sublicensable, non-exclusive, irrevocable license to
150
-          exercise the Licensed Rights in the Licensed Material to:
151
-
152
-            a. reproduce and Share the Licensed Material, in whole or
153
-               in part; and
154
-
155
-            b. produce, reproduce, and Share Adapted Material.
156
-
157
-       2. Exceptions and Limitations. For the avoidance of doubt, where
158
-          Exceptions and Limitations apply to Your use, this Public
159
-          License does not apply, and You do not need to comply with
160
-          its terms and conditions.
161
-
162
-       3. Term. The term of this Public License is specified in Section
163
-          6(a).
164
-
165
-       4. Media and formats; technical modifications allowed. The
166
-          Licensor authorizes You to exercise the Licensed Rights in
167
-          all media and formats whether now known or hereafter created,
168
-          and to make technical modifications necessary to do so. The
169
-          Licensor waives and/or agrees not to assert any right or
170
-          authority to forbid You from making technical modifications
171
-          necessary to exercise the Licensed Rights, including
172
-          technical modifications necessary to circumvent Effective
173
-          Technological Measures. For purposes of this Public License,
174
-          simply making modifications authorized by this Section 2(a)
175
-          (4) never produces Adapted Material.
176
-
177
-       5. Downstream recipients.
178
-
179
-            a. Offer from the Licensor -- Licensed Material. Every
180
-               recipient of the Licensed Material automatically
181
-               receives an offer from the Licensor to exercise the
182
-               Licensed Rights under the terms and conditions of this
183
-               Public License.
184
-
185
-            b. Additional offer from the Licensor -- Adapted Material.
186
-               Every recipient of Adapted Material from You
187
-               automatically receives an offer from the Licensor to
188
-               exercise the Licensed Rights in the Adapted Material
189
-               under the conditions of the Adapter's License You apply.
190
-
191
-            c. No downstream restrictions. You may not offer or impose
192
-               any additional or different terms or conditions on, or
193
-               apply any Effective Technological Measures to, the
194
-               Licensed Material if doing so restricts exercise of the
195
-               Licensed Rights by any recipient of the Licensed
196
-               Material.
197
-
198
-       6. No endorsement. Nothing in this Public License constitutes or
199
-          may be construed as permission to assert or imply that You
200
-          are, or that Your use of the Licensed Material is, connected
201
-          with, or sponsored, endorsed, or granted official status by,
202
-          the Licensor or others designated to receive attribution as
203
-          provided in Section 3(a)(1)(A)(i).
204
-
205
-  b. Other rights.
206
-
207
-       1. Moral rights, such as the right of integrity, are not
208
-          licensed under this Public License, nor are publicity,
209
-          privacy, and/or other similar personality rights; however, to
210
-          the extent possible, the Licensor waives and/or agrees not to
211
-          assert any such rights held by the Licensor to the limited
212
-          extent necessary to allow You to exercise the Licensed
213
-          Rights, but not otherwise.
214
-
215
-       2. Patent and trademark rights are not licensed under this
216
-          Public License.
217
-
218
-       3. To the extent possible, the Licensor waives any right to
219
-          collect royalties from You for the exercise of the Licensed
220
-          Rights, whether directly or through a collecting society
221
-          under any voluntary or waivable statutory or compulsory
222
-          licensing scheme. In all other cases the Licensor expressly
223
-          reserves any right to collect such royalties.
224
-
225
-
226
-Section 3 -- License Conditions.
227
-
228
-Your exercise of the Licensed Rights is expressly made subject to the
229
-following conditions.
230
-
231
-  a. Attribution.
232
-
233
-       1. If You Share the Licensed Material (including in modified
234
-          form), You must:
235
-
236
-            a. retain the following if it is supplied by the Licensor
237
-               with the Licensed Material:
238
-
239
-                 i. identification of the creator(s) of the Licensed
240
-                    Material and any others designated to receive
241
-                    attribution, in any reasonable manner requested by
242
-                    the Licensor (including by pseudonym if
243
-                    designated);
244
-
245
-                ii. a copyright notice;
246
-
247
-               iii. a notice that refers to this Public License;
248
-
249
-                iv. a notice that refers to the disclaimer of
250
-                    warranties;
251
-
252
-                 v. a URI or hyperlink to the Licensed Material to the
253
-                    extent reasonably practicable;
254
-
255
-            b. indicate if You modified the Licensed Material and
256
-               retain an indication of any previous modifications; and
257
-
258
-            c. indicate the Licensed Material is licensed under this
259
-               Public License, and include the text of, or the URI or
260
-               hyperlink to, this Public License.
261
-
262
-       2. You may satisfy the conditions in Section 3(a)(1) in any
263
-          reasonable manner based on the medium, means, and context in
264
-          which You Share the Licensed Material. For example, it may be
265
-          reasonable to satisfy the conditions by providing a URI or
266
-          hyperlink to a resource that includes the required
267
-          information.
268
-
269
-       3. If requested by the Licensor, You must remove any of the
270
-          information required by Section 3(a)(1)(A) to the extent
271
-          reasonably practicable.
272
-
273
-  b. ShareAlike.
274
-
275
-     In addition to the conditions in Section 3(a), if You Share
276
-     Adapted Material You produce, the following conditions also apply.
277
-
278
-       1. The Adapter's License You apply must be a Creative Commons
279
-          license with the same License Elements, this version or
280
-          later, or a BY-SA Compatible License.
281
-
282
-       2. You must include the text of, or the URI or hyperlink to, the
283
-          Adapter's License You apply. You may satisfy this condition
284
-          in any reasonable manner based on the medium, means, and
285
-          context in which You Share Adapted Material.
286
-
287
-       3. You may not offer or impose any additional or different terms
288
-          or conditions on, or apply any Effective Technological
289
-          Measures to, Adapted Material that restrict exercise of the
290
-          rights granted under the Adapter's License You apply.
291
-
292
-
293
-Section 4 -- Sui Generis Database Rights.
294
-
295
-Where the Licensed Rights include Sui Generis Database Rights that
296
-apply to Your use of the Licensed Material:
297
-
298
-  a. for the avoidance of doubt, Section 2(a)(1) grants You the right
299
-     to extract, reuse, reproduce, and Share all or a substantial
300
-     portion of the contents of the database;
301
-
302
-  b. if You include all or a substantial portion of the database
303
-     contents in a database in which You have Sui Generis Database
304
-     Rights, then the database in which You have Sui Generis Database
305
-     Rights (but not its individual contents) is Adapted Material,
306
-
307
-     including for purposes of Section 3(b); and
308
-  c. You must comply with the conditions in Section 3(a) if You Share
309
-     all or a substantial portion of the contents of the database.
310
-
311
-For the avoidance of doubt, this Section 4 supplements and does not
312
-replace Your obligations under this Public License where the Licensed
313
-Rights include other Copyright and Similar Rights.
314
-
315
-
316
-Section 5 -- Disclaimer of Warranties and Limitation of Liability.
317
-
318
-  a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
319
-     EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
320
-     AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
321
-     ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
322
-     IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
323
-     WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
324
-     PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
325
-     ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
326
-     KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
327
-     ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
328
-
329
-  b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
330
-     TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
331
-     NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
332
-     INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
333
-     COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
334
-     USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
335
-     ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
336
-     DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
337
-     IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
338
-
339
-  c. The disclaimer of warranties and limitation of liability provided
340
-     above shall be interpreted in a manner that, to the extent
341
-     possible, most closely approximates an absolute disclaimer and
342
-     waiver of all liability.
343
-
344
-
345
-Section 6 -- Term and Termination.
346
-
347
-  a. This Public License applies for the term of the Copyright and
348
-     Similar Rights licensed here. However, if You fail to comply with
349
-     this Public License, then Your rights under this Public License
350
-     terminate automatically.
351
-
352
-  b. Where Your right to use the Licensed Material has terminated under
353
-     Section 6(a), it reinstates:
354
-
355
-       1. automatically as of the date the violation is cured, provided
356
-          it is cured within 30 days of Your discovery of the
357
-          violation; or
358
-
359
-       2. upon express reinstatement by the Licensor.
360
-
361
-     For the avoidance of doubt, this Section 6(b) does not affect any
362
-     right the Licensor may have to seek remedies for Your violations
363
-     of this Public License.
364
-
365
-  c. For the avoidance of doubt, the Licensor may also offer the
366
-     Licensed Material under separate terms or conditions or stop
367
-     distributing the Licensed Material at any time; however, doing so
368
-     will not terminate this Public License.
369
-
370
-  d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
371
-     License.
372
-
373
-
374
-Section 7 -- Other Terms and Conditions.
375
-
376
-  a. The Licensor shall not be bound by any additional or different
377
-     terms or conditions communicated by You unless expressly agreed.
378
-
379
-  b. Any arrangements, understandings, or agreements regarding the
380
-     Licensed Material not stated herein are separate from and
381
-     independent of the terms and conditions of this Public License.
382
-
383
-
384
-Section 8 -- Interpretation.
385
-
386
-  a. For the avoidance of doubt, this Public License does not, and
387
-     shall not be interpreted to, reduce, limit, restrict, or impose
388
-     conditions on any use of the Licensed Material that could lawfully
389
-     be made without permission under this Public License.
390
-
391
-  b. To the extent possible, if any provision of this Public License is
392
-     deemed unenforceable, it shall be automatically reformed to the
393
-     minimum extent necessary to make it enforceable. If the provision
394
-     cannot be reformed, it shall be severed from this Public License
395
-     without affecting the enforceability of the remaining terms and
396
-     conditions.
397
-
398
-  c. No term or condition of this Public License will be waived and no
399
-     failure to comply consented to unless expressly agreed to by the
400
-     Licensor.
401
-
402
-  d. Nothing in this Public License constitutes or may be interpreted
403
-     as a limitation upon, or waiver of, any privileges and immunities
404
-     that apply to the Licensor or You, including from the legal
405
-     processes of any jurisdiction or authority.
406
-
407
-
408
-=======================================================================
409
-
410
-Creative Commons is not a party to its public licenses.
411
-Notwithstanding, Creative Commons may elect to apply one of its public
412
-licenses to material it publishes and in those instances will be
413
-considered the "Licensor." Except for the limited purpose of indicating
414
-that material is shared under a Creative Commons public license or as
415
-otherwise permitted by the Creative Commons policies published at
416
-creativecommons.org/policies, Creative Commons does not authorize the
417
-use of the trademark "Creative Commons" or any other trademark or logo
418
-of Creative Commons without its prior written consent including,
419
-without limitation, in connection with any unauthorized modifications
420
-to any of its public licenses or any other arrangements,
421
-understandings, or agreements concerning use of licensed material. For
422
-the avoidance of doubt, this paragraph does not form part of the public
423
-licenses.
424
-
425
-Creative Commons may be contacted at creativecommons.org.
426 1
deleted file mode 100644
... ...
@@ -1,16 +0,0 @@
1
-Docker
2
-Copyright 2012-2015 Docker, Inc.
3
-
4
-This product includes software developed at Docker, Inc. (https://www.docker.com).
5
-
6
-The following is courtesy of our legal counsel:
7
-
8
-
9
-Use and transfer of Docker may be subject to certain restrictions by the
10
-United States and other governments.
11
-It is your responsibility to ensure that your use and/or transfer does not
12
-violate applicable laws.
13
-
14
-For more information, please see https://www.bis.doc.gov
15
-
16
-See also https://www.apache.org/dev/crypto.html and/or seek legal counsel.
17 1
deleted file mode 100644
... ...
@@ -1,72 +0,0 @@
1
-# containerd
2
-
3
-containerd is a daemon to control runC, built for performance and density. 
4
-containerd leverages runC's advanced features such as seccomp and user namespace support as well
5
-as checkpoint and restore for cloning and live migration of containers.
6
-
7
-## Getting started
8
-
9
-The easiest way to start using containerd is to download binaries from the [releases page](https://github.com/containerd/containerd/releases).
10
-
11
-The included `ctr` command-line tool allows you interact with the containerd daemon:
12
-
13
-```
14
-$ sudo ctr containers start redis /containers/redis
15
-$ sudo ctr containers list
16
-ID                  PATH                STATUS              PROCESSES
17
-redis               /containers/redis   running             14063
18
-```
19
-
20
-`/containers/redis` is the path to an OCI bundle. [See the docs for more information.](docs/bundle.md)
21
-
22
-## Docs
23
-
24
- * [Client CLI reference (`ctr`)](docs/cli.md)
25
- * [Daemon CLI reference (`containerd`)](docs/daemon.md)
26
- * [Creating OCI bundles](docs/bundle.md)
27
- * [containerd changes to the bundle](docs/bundle-changes.md)
28
- * [Attaching to STDIO or TTY](docs/attach.md)
29
- * [Telemetry and metrics](docs/telemetry.md)
30
-
31
-All documentation is contained in the `/docs` directory in this repository.
32
-
33
-## Building
34
-
35
-You will need to make sure that you have Go installed on your system and the containerd repository is cloned
36
-in your `$GOPATH`.  You will also need to make sure that you have all the dependencies cloned as well.
37
-Currently, contributing to containerd is not for the first time devs as many dependencies are not vendored and 
38
-work is being completed at a high rate.  
39
-
40
-After that just run `make` and the binaries for the daemon and client will be localed in the `bin/` directory.
41
-
42
-## Performance
43
-
44
-Starting 1000 containers concurrently runs at 126-140 containers per second.
45
-
46
-Overall start times:
47
-
48
-```
49
-[containerd] 2015/12/04 15:00:54   count:        1000
50
-[containerd] 2015/12/04 14:59:54   min:          23ms
51
-[containerd] 2015/12/04 14:59:54   max:         355ms
52
-[containerd] 2015/12/04 14:59:54   mean:         78ms
53
-[containerd] 2015/12/04 14:59:54   stddev:       34ms
54
-[containerd] 2015/12/04 14:59:54   median:       73ms
55
-[containerd] 2015/12/04 14:59:54   75%:          91ms
56
-[containerd] 2015/12/04 14:59:54   95%:         123ms
57
-[containerd] 2015/12/04 14:59:54   99%:         287ms
58
-[containerd] 2015/12/04 14:59:54   99.9%:       355ms
59
-```
60
-
61
-## Roadmap
62
-
63
-The current roadmap and milestones for alpha and beta completion are in the github issues on this repository.  Please refer to these issues for what is being worked on and completed for the various stages of development.
64
-
65
-## Copyright and license
66
-
67
-Copyright © 2016 Docker, Inc. All rights reserved, except as follows. Code
68
-is released under the Apache 2.0 license. The README.md file, and files in the
69
-"docs" folder are licensed under the Creative Commons Attribution 4.0
70
-International License under the terms and conditions set forth in the file
71
-"LICENSE.docs". You may obtain a duplicate copy of the same license, titled
72
-CC-BY-SA-4.0, at http://creativecommons.org/licenses/by/4.0/.
73 1
deleted file mode 100644
... ...
@@ -1,2584 +0,0 @@
1
-// Code generated by protoc-gen-go.
2
-// source: api.proto
3
-// DO NOT EDIT!
4
-
5
-/*
6
-Package types is a generated protocol buffer package.
7
-
8
-It is generated from these files:
9
-	api.proto
10
-
11
-It has these top-level messages:
12
-	GetServerVersionRequest
13
-	GetServerVersionResponse
14
-	UpdateProcessRequest
15
-	UpdateProcessResponse
16
-	CreateContainerRequest
17
-	CreateContainerResponse
18
-	SignalRequest
19
-	SignalResponse
20
-	AddProcessRequest
21
-	Rlimit
22
-	User
23
-	AddProcessResponse
24
-	CreateCheckpointRequest
25
-	CreateCheckpointResponse
26
-	DeleteCheckpointRequest
27
-	DeleteCheckpointResponse
28
-	ListCheckpointRequest
29
-	Checkpoint
30
-	ListCheckpointResponse
31
-	StateRequest
32
-	ContainerState
33
-	Process
34
-	Container
35
-	Machine
36
-	StateResponse
37
-	UpdateContainerRequest
38
-	UpdateResource
39
-	BlockIODevice
40
-	WeightDevice
41
-	ThrottleDevice
42
-	UpdateContainerResponse
43
-	EventsRequest
44
-	Event
45
-	NetworkStats
46
-	CpuUsage
47
-	ThrottlingData
48
-	CpuStats
49
-	PidsStats
50
-	MemoryData
51
-	MemoryStats
52
-	BlkioStatsEntry
53
-	BlkioStats
54
-	HugetlbStats
55
-	CgroupStats
56
-	StatsResponse
57
-	StatsRequest
58
-*/
59
-package types
60
-
61
-import proto "github.com/golang/protobuf/proto"
62
-import fmt "fmt"
63
-import math "math"
64
-import google_protobuf "github.com/golang/protobuf/ptypes/timestamp"
65
-
66
-import (
67
-	context "golang.org/x/net/context"
68
-	grpc "google.golang.org/grpc"
69
-)
70
-
71
-// Reference imports to suppress errors if they are not otherwise used.
72
-var _ = proto.Marshal
73
-var _ = fmt.Errorf
74
-var _ = math.Inf
75
-
76
-// This is a compile-time assertion to ensure that this generated file
77
-// is compatible with the proto package it is being compiled against.
78
-// A compilation error at this line likely means your copy of the
79
-// proto package needs to be updated.
80
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
81
-
82
-type GetServerVersionRequest struct {
83
-}
84
-
85
-func (m *GetServerVersionRequest) Reset()                    { *m = GetServerVersionRequest{} }
86
-func (m *GetServerVersionRequest) String() string            { return proto.CompactTextString(m) }
87
-func (*GetServerVersionRequest) ProtoMessage()               {}
88
-func (*GetServerVersionRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
89
-
90
-type GetServerVersionResponse struct {
91
-	Major    uint32 `protobuf:"varint,1,opt,name=major" json:"major,omitempty"`
92
-	Minor    uint32 `protobuf:"varint,2,opt,name=minor" json:"minor,omitempty"`
93
-	Patch    uint32 `protobuf:"varint,3,opt,name=patch" json:"patch,omitempty"`
94
-	Revision string `protobuf:"bytes,4,opt,name=revision" json:"revision,omitempty"`
95
-}
96
-
97
-func (m *GetServerVersionResponse) Reset()                    { *m = GetServerVersionResponse{} }
98
-func (m *GetServerVersionResponse) String() string            { return proto.CompactTextString(m) }
99
-func (*GetServerVersionResponse) ProtoMessage()               {}
100
-func (*GetServerVersionResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
101
-
102
-func (m *GetServerVersionResponse) GetMajor() uint32 {
103
-	if m != nil {
104
-		return m.Major
105
-	}
106
-	return 0
107
-}
108
-
109
-func (m *GetServerVersionResponse) GetMinor() uint32 {
110
-	if m != nil {
111
-		return m.Minor
112
-	}
113
-	return 0
114
-}
115
-
116
-func (m *GetServerVersionResponse) GetPatch() uint32 {
117
-	if m != nil {
118
-		return m.Patch
119
-	}
120
-	return 0
121
-}
122
-
123
-func (m *GetServerVersionResponse) GetRevision() string {
124
-	if m != nil {
125
-		return m.Revision
126
-	}
127
-	return ""
128
-}
129
-
130
-type UpdateProcessRequest struct {
131
-	Id         string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
132
-	Pid        string `protobuf:"bytes,2,opt,name=pid" json:"pid,omitempty"`
133
-	CloseStdin bool   `protobuf:"varint,3,opt,name=closeStdin" json:"closeStdin,omitempty"`
134
-	Width      uint32 `protobuf:"varint,4,opt,name=width" json:"width,omitempty"`
135
-	Height     uint32 `protobuf:"varint,5,opt,name=height" json:"height,omitempty"`
136
-}
137
-
138
-func (m *UpdateProcessRequest) Reset()                    { *m = UpdateProcessRequest{} }
139
-func (m *UpdateProcessRequest) String() string            { return proto.CompactTextString(m) }
140
-func (*UpdateProcessRequest) ProtoMessage()               {}
141
-func (*UpdateProcessRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
142
-
143
-func (m *UpdateProcessRequest) GetId() string {
144
-	if m != nil {
145
-		return m.Id
146
-	}
147
-	return ""
148
-}
149
-
150
-func (m *UpdateProcessRequest) GetPid() string {
151
-	if m != nil {
152
-		return m.Pid
153
-	}
154
-	return ""
155
-}
156
-
157
-func (m *UpdateProcessRequest) GetCloseStdin() bool {
158
-	if m != nil {
159
-		return m.CloseStdin
160
-	}
161
-	return false
162
-}
163
-
164
-func (m *UpdateProcessRequest) GetWidth() uint32 {
165
-	if m != nil {
166
-		return m.Width
167
-	}
168
-	return 0
169
-}
170
-
171
-func (m *UpdateProcessRequest) GetHeight() uint32 {
172
-	if m != nil {
173
-		return m.Height
174
-	}
175
-	return 0
176
-}
177
-
178
-type UpdateProcessResponse struct {
179
-}
180
-
181
-func (m *UpdateProcessResponse) Reset()                    { *m = UpdateProcessResponse{} }
182
-func (m *UpdateProcessResponse) String() string            { return proto.CompactTextString(m) }
183
-func (*UpdateProcessResponse) ProtoMessage()               {}
184
-func (*UpdateProcessResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
185
-
186
-type CreateContainerRequest struct {
187
-	Id            string   `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
188
-	BundlePath    string   `protobuf:"bytes,2,opt,name=bundlePath" json:"bundlePath,omitempty"`
189
-	Checkpoint    string   `protobuf:"bytes,3,opt,name=checkpoint" json:"checkpoint,omitempty"`
190
-	Stdin         string   `protobuf:"bytes,4,opt,name=stdin" json:"stdin,omitempty"`
191
-	Stdout        string   `protobuf:"bytes,5,opt,name=stdout" json:"stdout,omitempty"`
192
-	Stderr        string   `protobuf:"bytes,6,opt,name=stderr" json:"stderr,omitempty"`
193
-	Labels        []string `protobuf:"bytes,7,rep,name=labels" json:"labels,omitempty"`
194
-	NoPivotRoot   bool     `protobuf:"varint,8,opt,name=noPivotRoot" json:"noPivotRoot,omitempty"`
195
-	Runtime       string   `protobuf:"bytes,9,opt,name=runtime" json:"runtime,omitempty"`
196
-	RuntimeArgs   []string `protobuf:"bytes,10,rep,name=runtimeArgs" json:"runtimeArgs,omitempty"`
197
-	CheckpointDir string   `protobuf:"bytes,11,opt,name=checkpointDir" json:"checkpointDir,omitempty"`
198
-}
199
-
200
-func (m *CreateContainerRequest) Reset()                    { *m = CreateContainerRequest{} }
201
-func (m *CreateContainerRequest) String() string            { return proto.CompactTextString(m) }
202
-func (*CreateContainerRequest) ProtoMessage()               {}
203
-func (*CreateContainerRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
204
-
205
-func (m *CreateContainerRequest) GetId() string {
206
-	if m != nil {
207
-		return m.Id
208
-	}
209
-	return ""
210
-}
211
-
212
-func (m *CreateContainerRequest) GetBundlePath() string {
213
-	if m != nil {
214
-		return m.BundlePath
215
-	}
216
-	return ""
217
-}
218
-
219
-func (m *CreateContainerRequest) GetCheckpoint() string {
220
-	if m != nil {
221
-		return m.Checkpoint
222
-	}
223
-	return ""
224
-}
225
-
226
-func (m *CreateContainerRequest) GetStdin() string {
227
-	if m != nil {
228
-		return m.Stdin
229
-	}
230
-	return ""
231
-}
232
-
233
-func (m *CreateContainerRequest) GetStdout() string {
234
-	if m != nil {
235
-		return m.Stdout
236
-	}
237
-	return ""
238
-}
239
-
240
-func (m *CreateContainerRequest) GetStderr() string {
241
-	if m != nil {
242
-		return m.Stderr
243
-	}
244
-	return ""
245
-}
246
-
247
-func (m *CreateContainerRequest) GetLabels() []string {
248
-	if m != nil {
249
-		return m.Labels
250
-	}
251
-	return nil
252
-}
253
-
254
-func (m *CreateContainerRequest) GetNoPivotRoot() bool {
255
-	if m != nil {
256
-		return m.NoPivotRoot
257
-	}
258
-	return false
259
-}
260
-
261
-func (m *CreateContainerRequest) GetRuntime() string {
262
-	if m != nil {
263
-		return m.Runtime
264
-	}
265
-	return ""
266
-}
267
-
268
-func (m *CreateContainerRequest) GetRuntimeArgs() []string {
269
-	if m != nil {
270
-		return m.RuntimeArgs
271
-	}
272
-	return nil
273
-}
274
-
275
-func (m *CreateContainerRequest) GetCheckpointDir() string {
276
-	if m != nil {
277
-		return m.CheckpointDir
278
-	}
279
-	return ""
280
-}
281
-
282
-type CreateContainerResponse struct {
283
-	Container *Container `protobuf:"bytes,1,opt,name=container" json:"container,omitempty"`
284
-}
285
-
286
-func (m *CreateContainerResponse) Reset()                    { *m = CreateContainerResponse{} }
287
-func (m *CreateContainerResponse) String() string            { return proto.CompactTextString(m) }
288
-func (*CreateContainerResponse) ProtoMessage()               {}
289
-func (*CreateContainerResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
290
-
291
-func (m *CreateContainerResponse) GetContainer() *Container {
292
-	if m != nil {
293
-		return m.Container
294
-	}
295
-	return nil
296
-}
297
-
298
-type SignalRequest struct {
299
-	Id     string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
300
-	Pid    string `protobuf:"bytes,2,opt,name=pid" json:"pid,omitempty"`
301
-	Signal uint32 `protobuf:"varint,3,opt,name=signal" json:"signal,omitempty"`
302
-}
303
-
304
-func (m *SignalRequest) Reset()                    { *m = SignalRequest{} }
305
-func (m *SignalRequest) String() string            { return proto.CompactTextString(m) }
306
-func (*SignalRequest) ProtoMessage()               {}
307
-func (*SignalRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
308
-
309
-func (m *SignalRequest) GetId() string {
310
-	if m != nil {
311
-		return m.Id
312
-	}
313
-	return ""
314
-}
315
-
316
-func (m *SignalRequest) GetPid() string {
317
-	if m != nil {
318
-		return m.Pid
319
-	}
320
-	return ""
321
-}
322
-
323
-func (m *SignalRequest) GetSignal() uint32 {
324
-	if m != nil {
325
-		return m.Signal
326
-	}
327
-	return 0
328
-}
329
-
330
-type SignalResponse struct {
331
-}
332
-
333
-func (m *SignalResponse) Reset()                    { *m = SignalResponse{} }
334
-func (m *SignalResponse) String() string            { return proto.CompactTextString(m) }
335
-func (*SignalResponse) ProtoMessage()               {}
336
-func (*SignalResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
337
-
338
-type AddProcessRequest struct {
339
-	Id              string    `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
340
-	Terminal        bool      `protobuf:"varint,2,opt,name=terminal" json:"terminal,omitempty"`
341
-	User            *User     `protobuf:"bytes,3,opt,name=user" json:"user,omitempty"`
342
-	Args            []string  `protobuf:"bytes,4,rep,name=args" json:"args,omitempty"`
343
-	Env             []string  `protobuf:"bytes,5,rep,name=env" json:"env,omitempty"`
344
-	Cwd             string    `protobuf:"bytes,6,opt,name=cwd" json:"cwd,omitempty"`
345
-	Pid             string    `protobuf:"bytes,7,opt,name=pid" json:"pid,omitempty"`
346
-	Stdin           string    `protobuf:"bytes,8,opt,name=stdin" json:"stdin,omitempty"`
347
-	Stdout          string    `protobuf:"bytes,9,opt,name=stdout" json:"stdout,omitempty"`
348
-	Stderr          string    `protobuf:"bytes,10,opt,name=stderr" json:"stderr,omitempty"`
349
-	Capabilities    []string  `protobuf:"bytes,11,rep,name=capabilities" json:"capabilities,omitempty"`
350
-	ApparmorProfile string    `protobuf:"bytes,12,opt,name=apparmorProfile" json:"apparmorProfile,omitempty"`
351
-	SelinuxLabel    string    `protobuf:"bytes,13,opt,name=selinuxLabel" json:"selinuxLabel,omitempty"`
352
-	NoNewPrivileges bool      `protobuf:"varint,14,opt,name=noNewPrivileges" json:"noNewPrivileges,omitempty"`
353
-	Rlimits         []*Rlimit `protobuf:"bytes,15,rep,name=rlimits" json:"rlimits,omitempty"`
354
-}
355
-
356
-func (m *AddProcessRequest) Reset()                    { *m = AddProcessRequest{} }
357
-func (m *AddProcessRequest) String() string            { return proto.CompactTextString(m) }
358
-func (*AddProcessRequest) ProtoMessage()               {}
359
-func (*AddProcessRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
360
-
361
-func (m *AddProcessRequest) GetId() string {
362
-	if m != nil {
363
-		return m.Id
364
-	}
365
-	return ""
366
-}
367
-
368
-func (m *AddProcessRequest) GetTerminal() bool {
369
-	if m != nil {
370
-		return m.Terminal
371
-	}
372
-	return false
373
-}
374
-
375
-func (m *AddProcessRequest) GetUser() *User {
376
-	if m != nil {
377
-		return m.User
378
-	}
379
-	return nil
380
-}
381
-
382
-func (m *AddProcessRequest) GetArgs() []string {
383
-	if m != nil {
384
-		return m.Args
385
-	}
386
-	return nil
387
-}
388
-
389
-func (m *AddProcessRequest) GetEnv() []string {
390
-	if m != nil {
391
-		return m.Env
392
-	}
393
-	return nil
394
-}
395
-
396
-func (m *AddProcessRequest) GetCwd() string {
397
-	if m != nil {
398
-		return m.Cwd
399
-	}
400
-	return ""
401
-}
402
-
403
-func (m *AddProcessRequest) GetPid() string {
404
-	if m != nil {
405
-		return m.Pid
406
-	}
407
-	return ""
408
-}
409
-
410
-func (m *AddProcessRequest) GetStdin() string {
411
-	if m != nil {
412
-		return m.Stdin
413
-	}
414
-	return ""
415
-}
416
-
417
-func (m *AddProcessRequest) GetStdout() string {
418
-	if m != nil {
419
-		return m.Stdout
420
-	}
421
-	return ""
422
-}
423
-
424
-func (m *AddProcessRequest) GetStderr() string {
425
-	if m != nil {
426
-		return m.Stderr
427
-	}
428
-	return ""
429
-}
430
-
431
-func (m *AddProcessRequest) GetCapabilities() []string {
432
-	if m != nil {
433
-		return m.Capabilities
434
-	}
435
-	return nil
436
-}
437
-
438
-func (m *AddProcessRequest) GetApparmorProfile() string {
439
-	if m != nil {
440
-		return m.ApparmorProfile
441
-	}
442
-	return ""
443
-}
444
-
445
-func (m *AddProcessRequest) GetSelinuxLabel() string {
446
-	if m != nil {
447
-		return m.SelinuxLabel
448
-	}
449
-	return ""
450
-}
451
-
452
-func (m *AddProcessRequest) GetNoNewPrivileges() bool {
453
-	if m != nil {
454
-		return m.NoNewPrivileges
455
-	}
456
-	return false
457
-}
458
-
459
-func (m *AddProcessRequest) GetRlimits() []*Rlimit {
460
-	if m != nil {
461
-		return m.Rlimits
462
-	}
463
-	return nil
464
-}
465
-
466
-type Rlimit struct {
467
-	Type string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"`
468
-	Soft uint64 `protobuf:"varint,2,opt,name=soft" json:"soft,omitempty"`
469
-	Hard uint64 `protobuf:"varint,3,opt,name=hard" json:"hard,omitempty"`
470
-}
471
-
472
-func (m *Rlimit) Reset()                    { *m = Rlimit{} }
473
-func (m *Rlimit) String() string            { return proto.CompactTextString(m) }
474
-func (*Rlimit) ProtoMessage()               {}
475
-func (*Rlimit) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
476
-
477
-func (m *Rlimit) GetType() string {
478
-	if m != nil {
479
-		return m.Type
480
-	}
481
-	return ""
482
-}
483
-
484
-func (m *Rlimit) GetSoft() uint64 {
485
-	if m != nil {
486
-		return m.Soft
487
-	}
488
-	return 0
489
-}
490
-
491
-func (m *Rlimit) GetHard() uint64 {
492
-	if m != nil {
493
-		return m.Hard
494
-	}
495
-	return 0
496
-}
497
-
498
-type User struct {
499
-	Uid            uint32   `protobuf:"varint,1,opt,name=uid" json:"uid,omitempty"`
500
-	Gid            uint32   `protobuf:"varint,2,opt,name=gid" json:"gid,omitempty"`
501
-	AdditionalGids []uint32 `protobuf:"varint,3,rep,packed,name=additionalGids" json:"additionalGids,omitempty"`
502
-}
503
-
504
-func (m *User) Reset()                    { *m = User{} }
505
-func (m *User) String() string            { return proto.CompactTextString(m) }
506
-func (*User) ProtoMessage()               {}
507
-func (*User) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} }
508
-
509
-func (m *User) GetUid() uint32 {
510
-	if m != nil {
511
-		return m.Uid
512
-	}
513
-	return 0
514
-}
515
-
516
-func (m *User) GetGid() uint32 {
517
-	if m != nil {
518
-		return m.Gid
519
-	}
520
-	return 0
521
-}
522
-
523
-func (m *User) GetAdditionalGids() []uint32 {
524
-	if m != nil {
525
-		return m.AdditionalGids
526
-	}
527
-	return nil
528
-}
529
-
530
-type AddProcessResponse struct {
531
-	SystemPid uint32 `protobuf:"varint,1,opt,name=systemPid" json:"systemPid,omitempty"`
532
-}
533
-
534
-func (m *AddProcessResponse) Reset()                    { *m = AddProcessResponse{} }
535
-func (m *AddProcessResponse) String() string            { return proto.CompactTextString(m) }
536
-func (*AddProcessResponse) ProtoMessage()               {}
537
-func (*AddProcessResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} }
538
-
539
-func (m *AddProcessResponse) GetSystemPid() uint32 {
540
-	if m != nil {
541
-		return m.SystemPid
542
-	}
543
-	return 0
544
-}
545
-
546
-type CreateCheckpointRequest struct {
547
-	Id            string      `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
548
-	Checkpoint    *Checkpoint `protobuf:"bytes,2,opt,name=checkpoint" json:"checkpoint,omitempty"`
549
-	CheckpointDir string      `protobuf:"bytes,3,opt,name=checkpointDir" json:"checkpointDir,omitempty"`
550
-}
551
-
552
-func (m *CreateCheckpointRequest) Reset()                    { *m = CreateCheckpointRequest{} }
553
-func (m *CreateCheckpointRequest) String() string            { return proto.CompactTextString(m) }
554
-func (*CreateCheckpointRequest) ProtoMessage()               {}
555
-func (*CreateCheckpointRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} }
556
-
557
-func (m *CreateCheckpointRequest) GetId() string {
558
-	if m != nil {
559
-		return m.Id
560
-	}
561
-	return ""
562
-}
563
-
564
-func (m *CreateCheckpointRequest) GetCheckpoint() *Checkpoint {
565
-	if m != nil {
566
-		return m.Checkpoint
567
-	}
568
-	return nil
569
-}
570
-
571
-func (m *CreateCheckpointRequest) GetCheckpointDir() string {
572
-	if m != nil {
573
-		return m.CheckpointDir
574
-	}
575
-	return ""
576
-}
577
-
578
-type CreateCheckpointResponse struct {
579
-}
580
-
581
-func (m *CreateCheckpointResponse) Reset()                    { *m = CreateCheckpointResponse{} }
582
-func (m *CreateCheckpointResponse) String() string            { return proto.CompactTextString(m) }
583
-func (*CreateCheckpointResponse) ProtoMessage()               {}
584
-func (*CreateCheckpointResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} }
585
-
586
-type DeleteCheckpointRequest struct {
587
-	Id            string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
588
-	Name          string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
589
-	CheckpointDir string `protobuf:"bytes,3,opt,name=checkpointDir" json:"checkpointDir,omitempty"`
590
-}
591
-
592
-func (m *DeleteCheckpointRequest) Reset()                    { *m = DeleteCheckpointRequest{} }
593
-func (m *DeleteCheckpointRequest) String() string            { return proto.CompactTextString(m) }
594
-func (*DeleteCheckpointRequest) ProtoMessage()               {}
595
-func (*DeleteCheckpointRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} }
596
-
597
-func (m *DeleteCheckpointRequest) GetId() string {
598
-	if m != nil {
599
-		return m.Id
600
-	}
601
-	return ""
602
-}
603
-
604
-func (m *DeleteCheckpointRequest) GetName() string {
605
-	if m != nil {
606
-		return m.Name
607
-	}
608
-	return ""
609
-}
610
-
611
-func (m *DeleteCheckpointRequest) GetCheckpointDir() string {
612
-	if m != nil {
613
-		return m.CheckpointDir
614
-	}
615
-	return ""
616
-}
617
-
618
-type DeleteCheckpointResponse struct {
619
-}
620
-
621
-func (m *DeleteCheckpointResponse) Reset()                    { *m = DeleteCheckpointResponse{} }
622
-func (m *DeleteCheckpointResponse) String() string            { return proto.CompactTextString(m) }
623
-func (*DeleteCheckpointResponse) ProtoMessage()               {}
624
-func (*DeleteCheckpointResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} }
625
-
626
-type ListCheckpointRequest struct {
627
-	Id            string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
628
-	CheckpointDir string `protobuf:"bytes,2,opt,name=checkpointDir" json:"checkpointDir,omitempty"`
629
-}
630
-
631
-func (m *ListCheckpointRequest) Reset()                    { *m = ListCheckpointRequest{} }
632
-func (m *ListCheckpointRequest) String() string            { return proto.CompactTextString(m) }
633
-func (*ListCheckpointRequest) ProtoMessage()               {}
634
-func (*ListCheckpointRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} }
635
-
636
-func (m *ListCheckpointRequest) GetId() string {
637
-	if m != nil {
638
-		return m.Id
639
-	}
640
-	return ""
641
-}
642
-
643
-func (m *ListCheckpointRequest) GetCheckpointDir() string {
644
-	if m != nil {
645
-		return m.CheckpointDir
646
-	}
647
-	return ""
648
-}
649
-
650
-type Checkpoint struct {
651
-	Name        string   `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
652
-	Exit        bool     `protobuf:"varint,2,opt,name=exit" json:"exit,omitempty"`
653
-	Tcp         bool     `protobuf:"varint,3,opt,name=tcp" json:"tcp,omitempty"`
654
-	UnixSockets bool     `protobuf:"varint,4,opt,name=unixSockets" json:"unixSockets,omitempty"`
655
-	Shell       bool     `protobuf:"varint,5,opt,name=shell" json:"shell,omitempty"`
656
-	EmptyNS     []string `protobuf:"bytes,6,rep,name=emptyNS" json:"emptyNS,omitempty"`
657
-}
658
-
659
-func (m *Checkpoint) Reset()                    { *m = Checkpoint{} }
660
-func (m *Checkpoint) String() string            { return proto.CompactTextString(m) }
661
-func (*Checkpoint) ProtoMessage()               {}
662
-func (*Checkpoint) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} }
663
-
664
-func (m *Checkpoint) GetName() string {
665
-	if m != nil {
666
-		return m.Name
667
-	}
668
-	return ""
669
-}
670
-
671
-func (m *Checkpoint) GetExit() bool {
672
-	if m != nil {
673
-		return m.Exit
674
-	}
675
-	return false
676
-}
677
-
678
-func (m *Checkpoint) GetTcp() bool {
679
-	if m != nil {
680
-		return m.Tcp
681
-	}
682
-	return false
683
-}
684
-
685
-func (m *Checkpoint) GetUnixSockets() bool {
686
-	if m != nil {
687
-		return m.UnixSockets
688
-	}
689
-	return false
690
-}
691
-
692
-func (m *Checkpoint) GetShell() bool {
693
-	if m != nil {
694
-		return m.Shell
695
-	}
696
-	return false
697
-}
698
-
699
-func (m *Checkpoint) GetEmptyNS() []string {
700
-	if m != nil {
701
-		return m.EmptyNS
702
-	}
703
-	return nil
704
-}
705
-
706
-type ListCheckpointResponse struct {
707
-	Checkpoints []*Checkpoint `protobuf:"bytes,1,rep,name=checkpoints" json:"checkpoints,omitempty"`
708
-}
709
-
710
-func (m *ListCheckpointResponse) Reset()                    { *m = ListCheckpointResponse{} }
711
-func (m *ListCheckpointResponse) String() string            { return proto.CompactTextString(m) }
712
-func (*ListCheckpointResponse) ProtoMessage()               {}
713
-func (*ListCheckpointResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} }
714
-
715
-func (m *ListCheckpointResponse) GetCheckpoints() []*Checkpoint {
716
-	if m != nil {
717
-		return m.Checkpoints
718
-	}
719
-	return nil
720
-}
721
-
722
-type StateRequest struct {
723
-	Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
724
-}
725
-
726
-func (m *StateRequest) Reset()                    { *m = StateRequest{} }
727
-func (m *StateRequest) String() string            { return proto.CompactTextString(m) }
728
-func (*StateRequest) ProtoMessage()               {}
729
-func (*StateRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19} }
730
-
731
-func (m *StateRequest) GetId() string {
732
-	if m != nil {
733
-		return m.Id
734
-	}
735
-	return ""
736
-}
737
-
738
-type ContainerState struct {
739
-	Status string `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
740
-}
741
-
742
-func (m *ContainerState) Reset()                    { *m = ContainerState{} }
743
-func (m *ContainerState) String() string            { return proto.CompactTextString(m) }
744
-func (*ContainerState) ProtoMessage()               {}
745
-func (*ContainerState) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{20} }
746
-
747
-func (m *ContainerState) GetStatus() string {
748
-	if m != nil {
749
-		return m.Status
750
-	}
751
-	return ""
752
-}
753
-
754
-type Process struct {
755
-	Pid             string    `protobuf:"bytes,1,opt,name=pid" json:"pid,omitempty"`
756
-	Terminal        bool      `protobuf:"varint,2,opt,name=terminal" json:"terminal,omitempty"`
757
-	User            *User     `protobuf:"bytes,3,opt,name=user" json:"user,omitempty"`
758
-	Args            []string  `protobuf:"bytes,4,rep,name=args" json:"args,omitempty"`
759
-	Env             []string  `protobuf:"bytes,5,rep,name=env" json:"env,omitempty"`
760
-	Cwd             string    `protobuf:"bytes,6,opt,name=cwd" json:"cwd,omitempty"`
761
-	SystemPid       uint32    `protobuf:"varint,7,opt,name=systemPid" json:"systemPid,omitempty"`
762
-	Stdin           string    `protobuf:"bytes,8,opt,name=stdin" json:"stdin,omitempty"`
763
-	Stdout          string    `protobuf:"bytes,9,opt,name=stdout" json:"stdout,omitempty"`
764
-	Stderr          string    `protobuf:"bytes,10,opt,name=stderr" json:"stderr,omitempty"`
765
-	Capabilities    []string  `protobuf:"bytes,11,rep,name=capabilities" json:"capabilities,omitempty"`
766
-	ApparmorProfile string    `protobuf:"bytes,12,opt,name=apparmorProfile" json:"apparmorProfile,omitempty"`
767
-	SelinuxLabel    string    `protobuf:"bytes,13,opt,name=selinuxLabel" json:"selinuxLabel,omitempty"`
768
-	NoNewPrivileges bool      `protobuf:"varint,14,opt,name=noNewPrivileges" json:"noNewPrivileges,omitempty"`
769
-	Rlimits         []*Rlimit `protobuf:"bytes,15,rep,name=rlimits" json:"rlimits,omitempty"`
770
-}
771
-
772
-func (m *Process) Reset()                    { *m = Process{} }
773
-func (m *Process) String() string            { return proto.CompactTextString(m) }
774
-func (*Process) ProtoMessage()               {}
775
-func (*Process) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{21} }
776
-
777
-func (m *Process) GetPid() string {
778
-	if m != nil {
779
-		return m.Pid
780
-	}
781
-	return ""
782
-}
783
-
784
-func (m *Process) GetTerminal() bool {
785
-	if m != nil {
786
-		return m.Terminal
787
-	}
788
-	return false
789
-}
790
-
791
-func (m *Process) GetUser() *User {
792
-	if m != nil {
793
-		return m.User
794
-	}
795
-	return nil
796
-}
797
-
798
-func (m *Process) GetArgs() []string {
799
-	if m != nil {
800
-		return m.Args
801
-	}
802
-	return nil
803
-}
804
-
805
-func (m *Process) GetEnv() []string {
806
-	if m != nil {
807
-		return m.Env
808
-	}
809
-	return nil
810
-}
811
-
812
-func (m *Process) GetCwd() string {
813
-	if m != nil {
814
-		return m.Cwd
815
-	}
816
-	return ""
817
-}
818
-
819
-func (m *Process) GetSystemPid() uint32 {
820
-	if m != nil {
821
-		return m.SystemPid
822
-	}
823
-	return 0
824
-}
825
-
826
-func (m *Process) GetStdin() string {
827
-	if m != nil {
828
-		return m.Stdin
829
-	}
830
-	return ""
831
-}
832
-
833
-func (m *Process) GetStdout() string {
834
-	if m != nil {
835
-		return m.Stdout
836
-	}
837
-	return ""
838
-}
839
-
840
-func (m *Process) GetStderr() string {
841
-	if m != nil {
842
-		return m.Stderr
843
-	}
844
-	return ""
845
-}
846
-
847
-func (m *Process) GetCapabilities() []string {
848
-	if m != nil {
849
-		return m.Capabilities
850
-	}
851
-	return nil
852
-}
853
-
854
-func (m *Process) GetApparmorProfile() string {
855
-	if m != nil {
856
-		return m.ApparmorProfile
857
-	}
858
-	return ""
859
-}
860
-
861
-func (m *Process) GetSelinuxLabel() string {
862
-	if m != nil {
863
-		return m.SelinuxLabel
864
-	}
865
-	return ""
866
-}
867
-
868
-func (m *Process) GetNoNewPrivileges() bool {
869
-	if m != nil {
870
-		return m.NoNewPrivileges
871
-	}
872
-	return false
873
-}
874
-
875
-func (m *Process) GetRlimits() []*Rlimit {
876
-	if m != nil {
877
-		return m.Rlimits
878
-	}
879
-	return nil
880
-}
881
-
882
-type Container struct {
883
-	Id         string     `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
884
-	BundlePath string     `protobuf:"bytes,2,opt,name=bundlePath" json:"bundlePath,omitempty"`
885
-	Processes  []*Process `protobuf:"bytes,3,rep,name=processes" json:"processes,omitempty"`
886
-	Status     string     `protobuf:"bytes,4,opt,name=status" json:"status,omitempty"`
887
-	Labels     []string   `protobuf:"bytes,5,rep,name=labels" json:"labels,omitempty"`
888
-	Pids       []uint32   `protobuf:"varint,6,rep,packed,name=pids" json:"pids,omitempty"`
889
-	Runtime    string     `protobuf:"bytes,7,opt,name=runtime" json:"runtime,omitempty"`
890
-}
891
-
892
-func (m *Container) Reset()                    { *m = Container{} }
893
-func (m *Container) String() string            { return proto.CompactTextString(m) }
894
-func (*Container) ProtoMessage()               {}
895
-func (*Container) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{22} }
896
-
897
-func (m *Container) GetId() string {
898
-	if m != nil {
899
-		return m.Id
900
-	}
901
-	return ""
902
-}
903
-
904
-func (m *Container) GetBundlePath() string {
905
-	if m != nil {
906
-		return m.BundlePath
907
-	}
908
-	return ""
909
-}
910
-
911
-func (m *Container) GetProcesses() []*Process {
912
-	if m != nil {
913
-		return m.Processes
914
-	}
915
-	return nil
916
-}
917
-
918
-func (m *Container) GetStatus() string {
919
-	if m != nil {
920
-		return m.Status
921
-	}
922
-	return ""
923
-}
924
-
925
-func (m *Container) GetLabels() []string {
926
-	if m != nil {
927
-		return m.Labels
928
-	}
929
-	return nil
930
-}
931
-
932
-func (m *Container) GetPids() []uint32 {
933
-	if m != nil {
934
-		return m.Pids
935
-	}
936
-	return nil
937
-}
938
-
939
-func (m *Container) GetRuntime() string {
940
-	if m != nil {
941
-		return m.Runtime
942
-	}
943
-	return ""
944
-}
945
-
946
-// Machine is information about machine on which containerd is run
947
-type Machine struct {
948
-	Cpus   uint32 `protobuf:"varint,1,opt,name=cpus" json:"cpus,omitempty"`
949
-	Memory uint64 `protobuf:"varint,2,opt,name=memory" json:"memory,omitempty"`
950
-}
951
-
952
-func (m *Machine) Reset()                    { *m = Machine{} }
953
-func (m *Machine) String() string            { return proto.CompactTextString(m) }
954
-func (*Machine) ProtoMessage()               {}
955
-func (*Machine) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{23} }
956
-
957
-func (m *Machine) GetCpus() uint32 {
958
-	if m != nil {
959
-		return m.Cpus
960
-	}
961
-	return 0
962
-}
963
-
964
-func (m *Machine) GetMemory() uint64 {
965
-	if m != nil {
966
-		return m.Memory
967
-	}
968
-	return 0
969
-}
970
-
971
-// StateResponse is information about containerd daemon
972
-type StateResponse struct {
973
-	Containers []*Container `protobuf:"bytes,1,rep,name=containers" json:"containers,omitempty"`
974
-	Machine    *Machine     `protobuf:"bytes,2,opt,name=machine" json:"machine,omitempty"`
975
-}
976
-
977
-func (m *StateResponse) Reset()                    { *m = StateResponse{} }
978
-func (m *StateResponse) String() string            { return proto.CompactTextString(m) }
979
-func (*StateResponse) ProtoMessage()               {}
980
-func (*StateResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{24} }
981
-
982
-func (m *StateResponse) GetContainers() []*Container {
983
-	if m != nil {
984
-		return m.Containers
985
-	}
986
-	return nil
987
-}
988
-
989
-func (m *StateResponse) GetMachine() *Machine {
990
-	if m != nil {
991
-		return m.Machine
992
-	}
993
-	return nil
994
-}
995
-
996
-type UpdateContainerRequest struct {
997
-	Id        string          `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
998
-	Pid       string          `protobuf:"bytes,2,opt,name=pid" json:"pid,omitempty"`
999
-	Status    string          `protobuf:"bytes,3,opt,name=status" json:"status,omitempty"`
1000
-	Resources *UpdateResource `protobuf:"bytes,4,opt,name=resources" json:"resources,omitempty"`
1001
-}
1002
-
1003
-func (m *UpdateContainerRequest) Reset()                    { *m = UpdateContainerRequest{} }
1004
-func (m *UpdateContainerRequest) String() string            { return proto.CompactTextString(m) }
1005
-func (*UpdateContainerRequest) ProtoMessage()               {}
1006
-func (*UpdateContainerRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{25} }
1007
-
1008
-func (m *UpdateContainerRequest) GetId() string {
1009
-	if m != nil {
1010
-		return m.Id
1011
-	}
1012
-	return ""
1013
-}
1014
-
1015
-func (m *UpdateContainerRequest) GetPid() string {
1016
-	if m != nil {
1017
-		return m.Pid
1018
-	}
1019
-	return ""
1020
-}
1021
-
1022
-func (m *UpdateContainerRequest) GetStatus() string {
1023
-	if m != nil {
1024
-		return m.Status
1025
-	}
1026
-	return ""
1027
-}
1028
-
1029
-func (m *UpdateContainerRequest) GetResources() *UpdateResource {
1030
-	if m != nil {
1031
-		return m.Resources
1032
-	}
1033
-	return nil
1034
-}
1035
-
1036
-type UpdateResource struct {
1037
-	BlkioWeight                  uint64            `protobuf:"varint,1,opt,name=blkioWeight" json:"blkioWeight,omitempty"`
1038
-	CpuShares                    uint64            `protobuf:"varint,2,opt,name=cpuShares" json:"cpuShares,omitempty"`
1039
-	CpuPeriod                    uint64            `protobuf:"varint,3,opt,name=cpuPeriod" json:"cpuPeriod,omitempty"`
1040
-	CpuQuota                     uint64            `protobuf:"varint,4,opt,name=cpuQuota" json:"cpuQuota,omitempty"`
1041
-	CpusetCpus                   string            `protobuf:"bytes,5,opt,name=cpusetCpus" json:"cpusetCpus,omitempty"`
1042
-	CpusetMems                   string            `protobuf:"bytes,6,opt,name=cpusetMems" json:"cpusetMems,omitempty"`
1043
-	MemoryLimit                  uint64            `protobuf:"varint,7,opt,name=memoryLimit" json:"memoryLimit,omitempty"`
1044
-	MemorySwap                   uint64            `protobuf:"varint,8,opt,name=memorySwap" json:"memorySwap,omitempty"`
1045
-	MemoryReservation            uint64            `protobuf:"varint,9,opt,name=memoryReservation" json:"memoryReservation,omitempty"`
1046
-	KernelMemoryLimit            uint64            `protobuf:"varint,10,opt,name=kernelMemoryLimit" json:"kernelMemoryLimit,omitempty"`
1047
-	KernelTCPMemoryLimit         uint64            `protobuf:"varint,11,opt,name=kernelTCPMemoryLimit" json:"kernelTCPMemoryLimit,omitempty"`
1048
-	BlkioLeafWeight              uint64            `protobuf:"varint,12,opt,name=blkioLeafWeight" json:"blkioLeafWeight,omitempty"`
1049
-	BlkioWeightDevice            []*WeightDevice   `protobuf:"bytes,13,rep,name=blkioWeightDevice" json:"blkioWeightDevice,omitempty"`
1050
-	BlkioThrottleReadBpsDevice   []*ThrottleDevice `protobuf:"bytes,14,rep,name=blkioThrottleReadBpsDevice" json:"blkioThrottleReadBpsDevice,omitempty"`
1051
-	BlkioThrottleWriteBpsDevice  []*ThrottleDevice `protobuf:"bytes,15,rep,name=blkioThrottleWriteBpsDevice" json:"blkioThrottleWriteBpsDevice,omitempty"`
1052
-	BlkioThrottleReadIopsDevice  []*ThrottleDevice `protobuf:"bytes,16,rep,name=blkioThrottleReadIopsDevice" json:"blkioThrottleReadIopsDevice,omitempty"`
1053
-	BlkioThrottleWriteIopsDevice []*ThrottleDevice `protobuf:"bytes,17,rep,name=blkioThrottleWriteIopsDevice" json:"blkioThrottleWriteIopsDevice,omitempty"`
1054
-	PidsLimit                    uint64            `protobuf:"varint,18,opt,name=pidsLimit" json:"pidsLimit,omitempty"`
1055
-}
1056
-
1057
-func (m *UpdateResource) Reset()                    { *m = UpdateResource{} }
1058
-func (m *UpdateResource) String() string            { return proto.CompactTextString(m) }
1059
-func (*UpdateResource) ProtoMessage()               {}
1060
-func (*UpdateResource) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{26} }
1061
-
1062
-func (m *UpdateResource) GetBlkioWeight() uint64 {
1063
-	if m != nil {
1064
-		return m.BlkioWeight
1065
-	}
1066
-	return 0
1067
-}
1068
-
1069
-func (m *UpdateResource) GetCpuShares() uint64 {
1070
-	if m != nil {
1071
-		return m.CpuShares
1072
-	}
1073
-	return 0
1074
-}
1075
-
1076
-func (m *UpdateResource) GetCpuPeriod() uint64 {
1077
-	if m != nil {
1078
-		return m.CpuPeriod
1079
-	}
1080
-	return 0
1081
-}
1082
-
1083
-func (m *UpdateResource) GetCpuQuota() uint64 {
1084
-	if m != nil {
1085
-		return m.CpuQuota
1086
-	}
1087
-	return 0
1088
-}
1089
-
1090
-func (m *UpdateResource) GetCpusetCpus() string {
1091
-	if m != nil {
1092
-		return m.CpusetCpus
1093
-	}
1094
-	return ""
1095
-}
1096
-
1097
-func (m *UpdateResource) GetCpusetMems() string {
1098
-	if m != nil {
1099
-		return m.CpusetMems
1100
-	}
1101
-	return ""
1102
-}
1103
-
1104
-func (m *UpdateResource) GetMemoryLimit() uint64 {
1105
-	if m != nil {
1106
-		return m.MemoryLimit
1107
-	}
1108
-	return 0
1109
-}
1110
-
1111
-func (m *UpdateResource) GetMemorySwap() uint64 {
1112
-	if m != nil {
1113
-		return m.MemorySwap
1114
-	}
1115
-	return 0
1116
-}
1117
-
1118
-func (m *UpdateResource) GetMemoryReservation() uint64 {
1119
-	if m != nil {
1120
-		return m.MemoryReservation
1121
-	}
1122
-	return 0
1123
-}
1124
-
1125
-func (m *UpdateResource) GetKernelMemoryLimit() uint64 {
1126
-	if m != nil {
1127
-		return m.KernelMemoryLimit
1128
-	}
1129
-	return 0
1130
-}
1131
-
1132
-func (m *UpdateResource) GetKernelTCPMemoryLimit() uint64 {
1133
-	if m != nil {
1134
-		return m.KernelTCPMemoryLimit
1135
-	}
1136
-	return 0
1137
-}
1138
-
1139
-func (m *UpdateResource) GetBlkioLeafWeight() uint64 {
1140
-	if m != nil {
1141
-		return m.BlkioLeafWeight
1142
-	}
1143
-	return 0
1144
-}
1145
-
1146
-func (m *UpdateResource) GetBlkioWeightDevice() []*WeightDevice {
1147
-	if m != nil {
1148
-		return m.BlkioWeightDevice
1149
-	}
1150
-	return nil
1151
-}
1152
-
1153
-func (m *UpdateResource) GetBlkioThrottleReadBpsDevice() []*ThrottleDevice {
1154
-	if m != nil {
1155
-		return m.BlkioThrottleReadBpsDevice
1156
-	}
1157
-	return nil
1158
-}
1159
-
1160
-func (m *UpdateResource) GetBlkioThrottleWriteBpsDevice() []*ThrottleDevice {
1161
-	if m != nil {
1162
-		return m.BlkioThrottleWriteBpsDevice
1163
-	}
1164
-	return nil
1165
-}
1166
-
1167
-func (m *UpdateResource) GetBlkioThrottleReadIopsDevice() []*ThrottleDevice {
1168
-	if m != nil {
1169
-		return m.BlkioThrottleReadIopsDevice
1170
-	}
1171
-	return nil
1172
-}
1173
-
1174
-func (m *UpdateResource) GetBlkioThrottleWriteIopsDevice() []*ThrottleDevice {
1175
-	if m != nil {
1176
-		return m.BlkioThrottleWriteIopsDevice
1177
-	}
1178
-	return nil
1179
-}
1180
-
1181
-func (m *UpdateResource) GetPidsLimit() uint64 {
1182
-	if m != nil {
1183
-		return m.PidsLimit
1184
-	}
1185
-	return 0
1186
-}
1187
-
1188
-type BlockIODevice struct {
1189
-	Major int64 `protobuf:"varint,1,opt,name=major" json:"major,omitempty"`
1190
-	Minor int64 `protobuf:"varint,2,opt,name=minor" json:"minor,omitempty"`
1191
-}
1192
-
1193
-func (m *BlockIODevice) Reset()                    { *m = BlockIODevice{} }
1194
-func (m *BlockIODevice) String() string            { return proto.CompactTextString(m) }
1195
-func (*BlockIODevice) ProtoMessage()               {}
1196
-func (*BlockIODevice) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{27} }
1197
-
1198
-func (m *BlockIODevice) GetMajor() int64 {
1199
-	if m != nil {
1200
-		return m.Major
1201
-	}
1202
-	return 0
1203
-}
1204
-
1205
-func (m *BlockIODevice) GetMinor() int64 {
1206
-	if m != nil {
1207
-		return m.Minor
1208
-	}
1209
-	return 0
1210
-}
1211
-
1212
-type WeightDevice struct {
1213
-	BlkIODevice *BlockIODevice `protobuf:"bytes,1,opt,name=blkIODevice" json:"blkIODevice,omitempty"`
1214
-	Weight      uint32         `protobuf:"varint,2,opt,name=weight" json:"weight,omitempty"`
1215
-	LeafWeight  uint32         `protobuf:"varint,3,opt,name=leafWeight" json:"leafWeight,omitempty"`
1216
-}
1217
-
1218
-func (m *WeightDevice) Reset()                    { *m = WeightDevice{} }
1219
-func (m *WeightDevice) String() string            { return proto.CompactTextString(m) }
1220
-func (*WeightDevice) ProtoMessage()               {}
1221
-func (*WeightDevice) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{28} }
1222
-
1223
-func (m *WeightDevice) GetBlkIODevice() *BlockIODevice {
1224
-	if m != nil {
1225
-		return m.BlkIODevice
1226
-	}
1227
-	return nil
1228
-}
1229
-
1230
-func (m *WeightDevice) GetWeight() uint32 {
1231
-	if m != nil {
1232
-		return m.Weight
1233
-	}
1234
-	return 0
1235
-}
1236
-
1237
-func (m *WeightDevice) GetLeafWeight() uint32 {
1238
-	if m != nil {
1239
-		return m.LeafWeight
1240
-	}
1241
-	return 0
1242
-}
1243
-
1244
-type ThrottleDevice struct {
1245
-	BlkIODevice *BlockIODevice `protobuf:"bytes,1,opt,name=blkIODevice" json:"blkIODevice,omitempty"`
1246
-	Rate        uint64         `protobuf:"varint,2,opt,name=rate" json:"rate,omitempty"`
1247
-}
1248
-
1249
-func (m *ThrottleDevice) Reset()                    { *m = ThrottleDevice{} }
1250
-func (m *ThrottleDevice) String() string            { return proto.CompactTextString(m) }
1251
-func (*ThrottleDevice) ProtoMessage()               {}
1252
-func (*ThrottleDevice) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{29} }
1253
-
1254
-func (m *ThrottleDevice) GetBlkIODevice() *BlockIODevice {
1255
-	if m != nil {
1256
-		return m.BlkIODevice
1257
-	}
1258
-	return nil
1259
-}
1260
-
1261
-func (m *ThrottleDevice) GetRate() uint64 {
1262
-	if m != nil {
1263
-		return m.Rate
1264
-	}
1265
-	return 0
1266
-}
1267
-
1268
-type UpdateContainerResponse struct {
1269
-}
1270
-
1271
-func (m *UpdateContainerResponse) Reset()                    { *m = UpdateContainerResponse{} }
1272
-func (m *UpdateContainerResponse) String() string            { return proto.CompactTextString(m) }
1273
-func (*UpdateContainerResponse) ProtoMessage()               {}
1274
-func (*UpdateContainerResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{30} }
1275
-
1276
-type EventsRequest struct {
1277
-	// Tag 1 is deprecated (old uint64 timestamp)
1278
-	Timestamp  *google_protobuf.Timestamp `protobuf:"bytes,2,opt,name=timestamp" json:"timestamp,omitempty"`
1279
-	StoredOnly bool                       `protobuf:"varint,3,opt,name=storedOnly" json:"storedOnly,omitempty"`
1280
-	Id         string                     `protobuf:"bytes,4,opt,name=id" json:"id,omitempty"`
1281
-}
1282
-
1283
-func (m *EventsRequest) Reset()                    { *m = EventsRequest{} }
1284
-func (m *EventsRequest) String() string            { return proto.CompactTextString(m) }
1285
-func (*EventsRequest) ProtoMessage()               {}
1286
-func (*EventsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{31} }
1287
-
1288
-func (m *EventsRequest) GetTimestamp() *google_protobuf.Timestamp {
1289
-	if m != nil {
1290
-		return m.Timestamp
1291
-	}
1292
-	return nil
1293
-}
1294
-
1295
-func (m *EventsRequest) GetStoredOnly() bool {
1296
-	if m != nil {
1297
-		return m.StoredOnly
1298
-	}
1299
-	return false
1300
-}
1301
-
1302
-func (m *EventsRequest) GetId() string {
1303
-	if m != nil {
1304
-		return m.Id
1305
-	}
1306
-	return ""
1307
-}
1308
-
1309
-type Event struct {
1310
-	Type   string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"`
1311
-	Id     string `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"`
1312
-	Status uint32 `protobuf:"varint,3,opt,name=status" json:"status,omitempty"`
1313
-	Pid    string `protobuf:"bytes,4,opt,name=pid" json:"pid,omitempty"`
1314
-	// Tag 5 is deprecated (old uint64 timestamp)
1315
-	Timestamp *google_protobuf.Timestamp `protobuf:"bytes,6,opt,name=timestamp" json:"timestamp,omitempty"`
1316
-}
1317
-
1318
-func (m *Event) Reset()                    { *m = Event{} }
1319
-func (m *Event) String() string            { return proto.CompactTextString(m) }
1320
-func (*Event) ProtoMessage()               {}
1321
-func (*Event) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{32} }
1322
-
1323
-func (m *Event) GetType() string {
1324
-	if m != nil {
1325
-		return m.Type
1326
-	}
1327
-	return ""
1328
-}
1329
-
1330
-func (m *Event) GetId() string {
1331
-	if m != nil {
1332
-		return m.Id
1333
-	}
1334
-	return ""
1335
-}
1336
-
1337
-func (m *Event) GetStatus() uint32 {
1338
-	if m != nil {
1339
-		return m.Status
1340
-	}
1341
-	return 0
1342
-}
1343
-
1344
-func (m *Event) GetPid() string {
1345
-	if m != nil {
1346
-		return m.Pid
1347
-	}
1348
-	return ""
1349
-}
1350
-
1351
-func (m *Event) GetTimestamp() *google_protobuf.Timestamp {
1352
-	if m != nil {
1353
-		return m.Timestamp
1354
-	}
1355
-	return nil
1356
-}
1357
-
1358
-type NetworkStats struct {
1359
-	Name       string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
1360
-	RxBytes    uint64 `protobuf:"varint,2,opt,name=rx_bytes,json=rxBytes" json:"rx_bytes,omitempty"`
1361
-	Rx_Packets uint64 `protobuf:"varint,3,opt,name=rx_Packets,json=rxPackets" json:"rx_Packets,omitempty"`
1362
-	RxErrors   uint64 `protobuf:"varint,4,opt,name=Rx_errors,json=RxErrors" json:"Rx_errors,omitempty"`
1363
-	RxDropped  uint64 `protobuf:"varint,5,opt,name=Rx_dropped,json=RxDropped" json:"Rx_dropped,omitempty"`
1364
-	TxBytes    uint64 `protobuf:"varint,6,opt,name=Tx_bytes,json=TxBytes" json:"Tx_bytes,omitempty"`
1365
-	TxPackets  uint64 `protobuf:"varint,7,opt,name=Tx_packets,json=TxPackets" json:"Tx_packets,omitempty"`
1366
-	TxErrors   uint64 `protobuf:"varint,8,opt,name=Tx_errors,json=TxErrors" json:"Tx_errors,omitempty"`
1367
-	TxDropped  uint64 `protobuf:"varint,9,opt,name=Tx_dropped,json=TxDropped" json:"Tx_dropped,omitempty"`
1368
-}
1369
-
1370
-func (m *NetworkStats) Reset()                    { *m = NetworkStats{} }
1371
-func (m *NetworkStats) String() string            { return proto.CompactTextString(m) }
1372
-func (*NetworkStats) ProtoMessage()               {}
1373
-func (*NetworkStats) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{33} }
1374
-
1375
-func (m *NetworkStats) GetName() string {
1376
-	if m != nil {
1377
-		return m.Name
1378
-	}
1379
-	return ""
1380
-}
1381
-
1382
-func (m *NetworkStats) GetRxBytes() uint64 {
1383
-	if m != nil {
1384
-		return m.RxBytes
1385
-	}
1386
-	return 0
1387
-}
1388
-
1389
-func (m *NetworkStats) GetRx_Packets() uint64 {
1390
-	if m != nil {
1391
-		return m.Rx_Packets
1392
-	}
1393
-	return 0
1394
-}
1395
-
1396
-func (m *NetworkStats) GetRxErrors() uint64 {
1397
-	if m != nil {
1398
-		return m.RxErrors
1399
-	}
1400
-	return 0
1401
-}
1402
-
1403
-func (m *NetworkStats) GetRxDropped() uint64 {
1404
-	if m != nil {
1405
-		return m.RxDropped
1406
-	}
1407
-	return 0
1408
-}
1409
-
1410
-func (m *NetworkStats) GetTxBytes() uint64 {
1411
-	if m != nil {
1412
-		return m.TxBytes
1413
-	}
1414
-	return 0
1415
-}
1416
-
1417
-func (m *NetworkStats) GetTxPackets() uint64 {
1418
-	if m != nil {
1419
-		return m.TxPackets
1420
-	}
1421
-	return 0
1422
-}
1423
-
1424
-func (m *NetworkStats) GetTxErrors() uint64 {
1425
-	if m != nil {
1426
-		return m.TxErrors
1427
-	}
1428
-	return 0
1429
-}
1430
-
1431
-func (m *NetworkStats) GetTxDropped() uint64 {
1432
-	if m != nil {
1433
-		return m.TxDropped
1434
-	}
1435
-	return 0
1436
-}
1437
-
1438
-type CpuUsage struct {
1439
-	TotalUsage        uint64   `protobuf:"varint,1,opt,name=total_usage,json=totalUsage" json:"total_usage,omitempty"`
1440
-	PercpuUsage       []uint64 `protobuf:"varint,2,rep,packed,name=percpu_usage,json=percpuUsage" json:"percpu_usage,omitempty"`
1441
-	UsageInKernelmode uint64   `protobuf:"varint,3,opt,name=usage_in_kernelmode,json=usageInKernelmode" json:"usage_in_kernelmode,omitempty"`
1442
-	UsageInUsermode   uint64   `protobuf:"varint,4,opt,name=usage_in_usermode,json=usageInUsermode" json:"usage_in_usermode,omitempty"`
1443
-}
1444
-
1445
-func (m *CpuUsage) Reset()                    { *m = CpuUsage{} }
1446
-func (m *CpuUsage) String() string            { return proto.CompactTextString(m) }
1447
-func (*CpuUsage) ProtoMessage()               {}
1448
-func (*CpuUsage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{34} }
1449
-
1450
-func (m *CpuUsage) GetTotalUsage() uint64 {
1451
-	if m != nil {
1452
-		return m.TotalUsage
1453
-	}
1454
-	return 0
1455
-}
1456
-
1457
-func (m *CpuUsage) GetPercpuUsage() []uint64 {
1458
-	if m != nil {
1459
-		return m.PercpuUsage
1460
-	}
1461
-	return nil
1462
-}
1463
-
1464
-func (m *CpuUsage) GetUsageInKernelmode() uint64 {
1465
-	if m != nil {
1466
-		return m.UsageInKernelmode
1467
-	}
1468
-	return 0
1469
-}
1470
-
1471
-func (m *CpuUsage) GetUsageInUsermode() uint64 {
1472
-	if m != nil {
1473
-		return m.UsageInUsermode
1474
-	}
1475
-	return 0
1476
-}
1477
-
1478
-type ThrottlingData struct {
1479
-	Periods          uint64 `protobuf:"varint,1,opt,name=periods" json:"periods,omitempty"`
1480
-	ThrottledPeriods uint64 `protobuf:"varint,2,opt,name=throttled_periods,json=throttledPeriods" json:"throttled_periods,omitempty"`
1481
-	ThrottledTime    uint64 `protobuf:"varint,3,opt,name=throttled_time,json=throttledTime" json:"throttled_time,omitempty"`
1482
-}
1483
-
1484
-func (m *ThrottlingData) Reset()                    { *m = ThrottlingData{} }
1485
-func (m *ThrottlingData) String() string            { return proto.CompactTextString(m) }
1486
-func (*ThrottlingData) ProtoMessage()               {}
1487
-func (*ThrottlingData) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{35} }
1488
-
1489
-func (m *ThrottlingData) GetPeriods() uint64 {
1490
-	if m != nil {
1491
-		return m.Periods
1492
-	}
1493
-	return 0
1494
-}
1495
-
1496
-func (m *ThrottlingData) GetThrottledPeriods() uint64 {
1497
-	if m != nil {
1498
-		return m.ThrottledPeriods
1499
-	}
1500
-	return 0
1501
-}
1502
-
1503
-func (m *ThrottlingData) GetThrottledTime() uint64 {
1504
-	if m != nil {
1505
-		return m.ThrottledTime
1506
-	}
1507
-	return 0
1508
-}
1509
-
1510
-type CpuStats struct {
1511
-	CpuUsage       *CpuUsage       `protobuf:"bytes,1,opt,name=cpu_usage,json=cpuUsage" json:"cpu_usage,omitempty"`
1512
-	ThrottlingData *ThrottlingData `protobuf:"bytes,2,opt,name=throttling_data,json=throttlingData" json:"throttling_data,omitempty"`
1513
-	SystemUsage    uint64          `protobuf:"varint,3,opt,name=system_usage,json=systemUsage" json:"system_usage,omitempty"`
1514
-}
1515
-
1516
-func (m *CpuStats) Reset()                    { *m = CpuStats{} }
1517
-func (m *CpuStats) String() string            { return proto.CompactTextString(m) }
1518
-func (*CpuStats) ProtoMessage()               {}
1519
-func (*CpuStats) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{36} }
1520
-
1521
-func (m *CpuStats) GetCpuUsage() *CpuUsage {
1522
-	if m != nil {
1523
-		return m.CpuUsage
1524
-	}
1525
-	return nil
1526
-}
1527
-
1528
-func (m *CpuStats) GetThrottlingData() *ThrottlingData {
1529
-	if m != nil {
1530
-		return m.ThrottlingData
1531
-	}
1532
-	return nil
1533
-}
1534
-
1535
-func (m *CpuStats) GetSystemUsage() uint64 {
1536
-	if m != nil {
1537
-		return m.SystemUsage
1538
-	}
1539
-	return 0
1540
-}
1541
-
1542
-type PidsStats struct {
1543
-	Current uint64 `protobuf:"varint,1,opt,name=current" json:"current,omitempty"`
1544
-	Limit   uint64 `protobuf:"varint,2,opt,name=limit" json:"limit,omitempty"`
1545
-}
1546
-
1547
-func (m *PidsStats) Reset()                    { *m = PidsStats{} }
1548
-func (m *PidsStats) String() string            { return proto.CompactTextString(m) }
1549
-func (*PidsStats) ProtoMessage()               {}
1550
-func (*PidsStats) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{37} }
1551
-
1552
-func (m *PidsStats) GetCurrent() uint64 {
1553
-	if m != nil {
1554
-		return m.Current
1555
-	}
1556
-	return 0
1557
-}
1558
-
1559
-func (m *PidsStats) GetLimit() uint64 {
1560
-	if m != nil {
1561
-		return m.Limit
1562
-	}
1563
-	return 0
1564
-}
1565
-
1566
-type MemoryData struct {
1567
-	Usage    uint64 `protobuf:"varint,1,opt,name=usage" json:"usage,omitempty"`
1568
-	MaxUsage uint64 `protobuf:"varint,2,opt,name=max_usage,json=maxUsage" json:"max_usage,omitempty"`
1569
-	Failcnt  uint64 `protobuf:"varint,3,opt,name=failcnt" json:"failcnt,omitempty"`
1570
-	Limit    uint64 `protobuf:"varint,4,opt,name=limit" json:"limit,omitempty"`
1571
-}
1572
-
1573
-func (m *MemoryData) Reset()                    { *m = MemoryData{} }
1574
-func (m *MemoryData) String() string            { return proto.CompactTextString(m) }
1575
-func (*MemoryData) ProtoMessage()               {}
1576
-func (*MemoryData) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{38} }
1577
-
1578
-func (m *MemoryData) GetUsage() uint64 {
1579
-	if m != nil {
1580
-		return m.Usage
1581
-	}
1582
-	return 0
1583
-}
1584
-
1585
-func (m *MemoryData) GetMaxUsage() uint64 {
1586
-	if m != nil {
1587
-		return m.MaxUsage
1588
-	}
1589
-	return 0
1590
-}
1591
-
1592
-func (m *MemoryData) GetFailcnt() uint64 {
1593
-	if m != nil {
1594
-		return m.Failcnt
1595
-	}
1596
-	return 0
1597
-}
1598
-
1599
-func (m *MemoryData) GetLimit() uint64 {
1600
-	if m != nil {
1601
-		return m.Limit
1602
-	}
1603
-	return 0
1604
-}
1605
-
1606
-type MemoryStats struct {
1607
-	Cache       uint64            `protobuf:"varint,1,opt,name=cache" json:"cache,omitempty"`
1608
-	Usage       *MemoryData       `protobuf:"bytes,2,opt,name=usage" json:"usage,omitempty"`
1609
-	SwapUsage   *MemoryData       `protobuf:"bytes,3,opt,name=swap_usage,json=swapUsage" json:"swap_usage,omitempty"`
1610
-	KernelUsage *MemoryData       `protobuf:"bytes,4,opt,name=kernel_usage,json=kernelUsage" json:"kernel_usage,omitempty"`
1611
-	Stats       map[string]uint64 `protobuf:"bytes,5,rep,name=stats" json:"stats,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
1612
-}
1613
-
1614
-func (m *MemoryStats) Reset()                    { *m = MemoryStats{} }
1615
-func (m *MemoryStats) String() string            { return proto.CompactTextString(m) }
1616
-func (*MemoryStats) ProtoMessage()               {}
1617
-func (*MemoryStats) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{39} }
1618
-
1619
-func (m *MemoryStats) GetCache() uint64 {
1620
-	if m != nil {
1621
-		return m.Cache
1622
-	}
1623
-	return 0
1624
-}
1625
-
1626
-func (m *MemoryStats) GetUsage() *MemoryData {
1627
-	if m != nil {
1628
-		return m.Usage
1629
-	}
1630
-	return nil
1631
-}
1632
-
1633
-func (m *MemoryStats) GetSwapUsage() *MemoryData {
1634
-	if m != nil {
1635
-		return m.SwapUsage
1636
-	}
1637
-	return nil
1638
-}
1639
-
1640
-func (m *MemoryStats) GetKernelUsage() *MemoryData {
1641
-	if m != nil {
1642
-		return m.KernelUsage
1643
-	}
1644
-	return nil
1645
-}
1646
-
1647
-func (m *MemoryStats) GetStats() map[string]uint64 {
1648
-	if m != nil {
1649
-		return m.Stats
1650
-	}
1651
-	return nil
1652
-}
1653
-
1654
-type BlkioStatsEntry struct {
1655
-	Major uint64 `protobuf:"varint,1,opt,name=major" json:"major,omitempty"`
1656
-	Minor uint64 `protobuf:"varint,2,opt,name=minor" json:"minor,omitempty"`
1657
-	Op    string `protobuf:"bytes,3,opt,name=op" json:"op,omitempty"`
1658
-	Value uint64 `protobuf:"varint,4,opt,name=value" json:"value,omitempty"`
1659
-}
1660
-
1661
-func (m *BlkioStatsEntry) Reset()                    { *m = BlkioStatsEntry{} }
1662
-func (m *BlkioStatsEntry) String() string            { return proto.CompactTextString(m) }
1663
-func (*BlkioStatsEntry) ProtoMessage()               {}
1664
-func (*BlkioStatsEntry) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{40} }
1665
-
1666
-func (m *BlkioStatsEntry) GetMajor() uint64 {
1667
-	if m != nil {
1668
-		return m.Major
1669
-	}
1670
-	return 0
1671
-}
1672
-
1673
-func (m *BlkioStatsEntry) GetMinor() uint64 {
1674
-	if m != nil {
1675
-		return m.Minor
1676
-	}
1677
-	return 0
1678
-}
1679
-
1680
-func (m *BlkioStatsEntry) GetOp() string {
1681
-	if m != nil {
1682
-		return m.Op
1683
-	}
1684
-	return ""
1685
-}
1686
-
1687
-func (m *BlkioStatsEntry) GetValue() uint64 {
1688
-	if m != nil {
1689
-		return m.Value
1690
-	}
1691
-	return 0
1692
-}
1693
-
1694
-type BlkioStats struct {
1695
-	IoServiceBytesRecursive []*BlkioStatsEntry `protobuf:"bytes,1,rep,name=io_service_bytes_recursive,json=ioServiceBytesRecursive" json:"io_service_bytes_recursive,omitempty"`
1696
-	IoServicedRecursive     []*BlkioStatsEntry `protobuf:"bytes,2,rep,name=io_serviced_recursive,json=ioServicedRecursive" json:"io_serviced_recursive,omitempty"`
1697
-	IoQueuedRecursive       []*BlkioStatsEntry `protobuf:"bytes,3,rep,name=io_queued_recursive,json=ioQueuedRecursive" json:"io_queued_recursive,omitempty"`
1698
-	IoServiceTimeRecursive  []*BlkioStatsEntry `protobuf:"bytes,4,rep,name=io_service_time_recursive,json=ioServiceTimeRecursive" json:"io_service_time_recursive,omitempty"`
1699
-	IoWaitTimeRecursive     []*BlkioStatsEntry `protobuf:"bytes,5,rep,name=io_wait_time_recursive,json=ioWaitTimeRecursive" json:"io_wait_time_recursive,omitempty"`
1700
-	IoMergedRecursive       []*BlkioStatsEntry `protobuf:"bytes,6,rep,name=io_merged_recursive,json=ioMergedRecursive" json:"io_merged_recursive,omitempty"`
1701
-	IoTimeRecursive         []*BlkioStatsEntry `protobuf:"bytes,7,rep,name=io_time_recursive,json=ioTimeRecursive" json:"io_time_recursive,omitempty"`
1702
-	SectorsRecursive        []*BlkioStatsEntry `protobuf:"bytes,8,rep,name=sectors_recursive,json=sectorsRecursive" json:"sectors_recursive,omitempty"`
1703
-}
1704
-
1705
-func (m *BlkioStats) Reset()                    { *m = BlkioStats{} }
1706
-func (m *BlkioStats) String() string            { return proto.CompactTextString(m) }
1707
-func (*BlkioStats) ProtoMessage()               {}
1708
-func (*BlkioStats) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{41} }
1709
-
1710
-func (m *BlkioStats) GetIoServiceBytesRecursive() []*BlkioStatsEntry {
1711
-	if m != nil {
1712
-		return m.IoServiceBytesRecursive
1713
-	}
1714
-	return nil
1715
-}
1716
-
1717
-func (m *BlkioStats) GetIoServicedRecursive() []*BlkioStatsEntry {
1718
-	if m != nil {
1719
-		return m.IoServicedRecursive
1720
-	}
1721
-	return nil
1722
-}
1723
-
1724
-func (m *BlkioStats) GetIoQueuedRecursive() []*BlkioStatsEntry {
1725
-	if m != nil {
1726
-		return m.IoQueuedRecursive
1727
-	}
1728
-	return nil
1729
-}
1730
-
1731
-func (m *BlkioStats) GetIoServiceTimeRecursive() []*BlkioStatsEntry {
1732
-	if m != nil {
1733
-		return m.IoServiceTimeRecursive
1734
-	}
1735
-	return nil
1736
-}
1737
-
1738
-func (m *BlkioStats) GetIoWaitTimeRecursive() []*BlkioStatsEntry {
1739
-	if m != nil {
1740
-		return m.IoWaitTimeRecursive
1741
-	}
1742
-	return nil
1743
-}
1744
-
1745
-func (m *BlkioStats) GetIoMergedRecursive() []*BlkioStatsEntry {
1746
-	if m != nil {
1747
-		return m.IoMergedRecursive
1748
-	}
1749
-	return nil
1750
-}
1751
-
1752
-func (m *BlkioStats) GetIoTimeRecursive() []*BlkioStatsEntry {
1753
-	if m != nil {
1754
-		return m.IoTimeRecursive
1755
-	}
1756
-	return nil
1757
-}
1758
-
1759
-func (m *BlkioStats) GetSectorsRecursive() []*BlkioStatsEntry {
1760
-	if m != nil {
1761
-		return m.SectorsRecursive
1762
-	}
1763
-	return nil
1764
-}
1765
-
1766
-type HugetlbStats struct {
1767
-	Usage    uint64 `protobuf:"varint,1,opt,name=usage" json:"usage,omitempty"`
1768
-	MaxUsage uint64 `protobuf:"varint,2,opt,name=max_usage,json=maxUsage" json:"max_usage,omitempty"`
1769
-	Failcnt  uint64 `protobuf:"varint,3,opt,name=failcnt" json:"failcnt,omitempty"`
1770
-	Limit    uint64 `protobuf:"varint,4,opt,name=limit" json:"limit,omitempty"`
1771
-}
1772
-
1773
-func (m *HugetlbStats) Reset()                    { *m = HugetlbStats{} }
1774
-func (m *HugetlbStats) String() string            { return proto.CompactTextString(m) }
1775
-func (*HugetlbStats) ProtoMessage()               {}
1776
-func (*HugetlbStats) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{42} }
1777
-
1778
-func (m *HugetlbStats) GetUsage() uint64 {
1779
-	if m != nil {
1780
-		return m.Usage
1781
-	}
1782
-	return 0
1783
-}
1784
-
1785
-func (m *HugetlbStats) GetMaxUsage() uint64 {
1786
-	if m != nil {
1787
-		return m.MaxUsage
1788
-	}
1789
-	return 0
1790
-}
1791
-
1792
-func (m *HugetlbStats) GetFailcnt() uint64 {
1793
-	if m != nil {
1794
-		return m.Failcnt
1795
-	}
1796
-	return 0
1797
-}
1798
-
1799
-func (m *HugetlbStats) GetLimit() uint64 {
1800
-	if m != nil {
1801
-		return m.Limit
1802
-	}
1803
-	return 0
1804
-}
1805
-
1806
-type CgroupStats struct {
1807
-	CpuStats     *CpuStats                `protobuf:"bytes,1,opt,name=cpu_stats,json=cpuStats" json:"cpu_stats,omitempty"`
1808
-	MemoryStats  *MemoryStats             `protobuf:"bytes,2,opt,name=memory_stats,json=memoryStats" json:"memory_stats,omitempty"`
1809
-	BlkioStats   *BlkioStats              `protobuf:"bytes,3,opt,name=blkio_stats,json=blkioStats" json:"blkio_stats,omitempty"`
1810
-	HugetlbStats map[string]*HugetlbStats `protobuf:"bytes,4,rep,name=hugetlb_stats,json=hugetlbStats" json:"hugetlb_stats,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
1811
-	PidsStats    *PidsStats               `protobuf:"bytes,5,opt,name=pids_stats,json=pidsStats" json:"pids_stats,omitempty"`
1812
-}
1813
-
1814
-func (m *CgroupStats) Reset()                    { *m = CgroupStats{} }
1815
-func (m *CgroupStats) String() string            { return proto.CompactTextString(m) }
1816
-func (*CgroupStats) ProtoMessage()               {}
1817
-func (*CgroupStats) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{43} }
1818
-
1819
-func (m *CgroupStats) GetCpuStats() *CpuStats {
1820
-	if m != nil {
1821
-		return m.CpuStats
1822
-	}
1823
-	return nil
1824
-}
1825
-
1826
-func (m *CgroupStats) GetMemoryStats() *MemoryStats {
1827
-	if m != nil {
1828
-		return m.MemoryStats
1829
-	}
1830
-	return nil
1831
-}
1832
-
1833
-func (m *CgroupStats) GetBlkioStats() *BlkioStats {
1834
-	if m != nil {
1835
-		return m.BlkioStats
1836
-	}
1837
-	return nil
1838
-}
1839
-
1840
-func (m *CgroupStats) GetHugetlbStats() map[string]*HugetlbStats {
1841
-	if m != nil {
1842
-		return m.HugetlbStats
1843
-	}
1844
-	return nil
1845
-}
1846
-
1847
-func (m *CgroupStats) GetPidsStats() *PidsStats {
1848
-	if m != nil {
1849
-		return m.PidsStats
1850
-	}
1851
-	return nil
1852
-}
1853
-
1854
-type StatsResponse struct {
1855
-	NetworkStats []*NetworkStats `protobuf:"bytes,1,rep,name=network_stats,json=networkStats" json:"network_stats,omitempty"`
1856
-	CgroupStats  *CgroupStats    `protobuf:"bytes,2,opt,name=cgroup_stats,json=cgroupStats" json:"cgroup_stats,omitempty"`
1857
-	// Tag 3 is deprecated (old uint64 timestamp)
1858
-	Timestamp *google_protobuf.Timestamp `protobuf:"bytes,4,opt,name=timestamp" json:"timestamp,omitempty"`
1859
-}
1860
-
1861
-func (m *StatsResponse) Reset()                    { *m = StatsResponse{} }
1862
-func (m *StatsResponse) String() string            { return proto.CompactTextString(m) }
1863
-func (*StatsResponse) ProtoMessage()               {}
1864
-func (*StatsResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{44} }
1865
-
1866
-func (m *StatsResponse) GetNetworkStats() []*NetworkStats {
1867
-	if m != nil {
1868
-		return m.NetworkStats
1869
-	}
1870
-	return nil
1871
-}
1872
-
1873
-func (m *StatsResponse) GetCgroupStats() *CgroupStats {
1874
-	if m != nil {
1875
-		return m.CgroupStats
1876
-	}
1877
-	return nil
1878
-}
1879
-
1880
-func (m *StatsResponse) GetTimestamp() *google_protobuf.Timestamp {
1881
-	if m != nil {
1882
-		return m.Timestamp
1883
-	}
1884
-	return nil
1885
-}
1886
-
1887
-type StatsRequest struct {
1888
-	Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
1889
-}
1890
-
1891
-func (m *StatsRequest) Reset()                    { *m = StatsRequest{} }
1892
-func (m *StatsRequest) String() string            { return proto.CompactTextString(m) }
1893
-func (*StatsRequest) ProtoMessage()               {}
1894
-func (*StatsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{45} }
1895
-
1896
-func (m *StatsRequest) GetId() string {
1897
-	if m != nil {
1898
-		return m.Id
1899
-	}
1900
-	return ""
1901
-}
1902
-
1903
-func init() {
1904
-	proto.RegisterType((*GetServerVersionRequest)(nil), "types.GetServerVersionRequest")
1905
-	proto.RegisterType((*GetServerVersionResponse)(nil), "types.GetServerVersionResponse")
1906
-	proto.RegisterType((*UpdateProcessRequest)(nil), "types.UpdateProcessRequest")
1907
-	proto.RegisterType((*UpdateProcessResponse)(nil), "types.UpdateProcessResponse")
1908
-	proto.RegisterType((*CreateContainerRequest)(nil), "types.CreateContainerRequest")
1909
-	proto.RegisterType((*CreateContainerResponse)(nil), "types.CreateContainerResponse")
1910
-	proto.RegisterType((*SignalRequest)(nil), "types.SignalRequest")
1911
-	proto.RegisterType((*SignalResponse)(nil), "types.SignalResponse")
1912
-	proto.RegisterType((*AddProcessRequest)(nil), "types.AddProcessRequest")
1913
-	proto.RegisterType((*Rlimit)(nil), "types.Rlimit")
1914
-	proto.RegisterType((*User)(nil), "types.User")
1915
-	proto.RegisterType((*AddProcessResponse)(nil), "types.AddProcessResponse")
1916
-	proto.RegisterType((*CreateCheckpointRequest)(nil), "types.CreateCheckpointRequest")
1917
-	proto.RegisterType((*CreateCheckpointResponse)(nil), "types.CreateCheckpointResponse")
1918
-	proto.RegisterType((*DeleteCheckpointRequest)(nil), "types.DeleteCheckpointRequest")
1919
-	proto.RegisterType((*DeleteCheckpointResponse)(nil), "types.DeleteCheckpointResponse")
1920
-	proto.RegisterType((*ListCheckpointRequest)(nil), "types.ListCheckpointRequest")
1921
-	proto.RegisterType((*Checkpoint)(nil), "types.Checkpoint")
1922
-	proto.RegisterType((*ListCheckpointResponse)(nil), "types.ListCheckpointResponse")
1923
-	proto.RegisterType((*StateRequest)(nil), "types.StateRequest")
1924
-	proto.RegisterType((*ContainerState)(nil), "types.ContainerState")
1925
-	proto.RegisterType((*Process)(nil), "types.Process")
1926
-	proto.RegisterType((*Container)(nil), "types.Container")
1927
-	proto.RegisterType((*Machine)(nil), "types.Machine")
1928
-	proto.RegisterType((*StateResponse)(nil), "types.StateResponse")
1929
-	proto.RegisterType((*UpdateContainerRequest)(nil), "types.UpdateContainerRequest")
1930
-	proto.RegisterType((*UpdateResource)(nil), "types.UpdateResource")
1931
-	proto.RegisterType((*BlockIODevice)(nil), "types.BlockIODevice")
1932
-	proto.RegisterType((*WeightDevice)(nil), "types.WeightDevice")
1933
-	proto.RegisterType((*ThrottleDevice)(nil), "types.ThrottleDevice")
1934
-	proto.RegisterType((*UpdateContainerResponse)(nil), "types.UpdateContainerResponse")
1935
-	proto.RegisterType((*EventsRequest)(nil), "types.EventsRequest")
1936
-	proto.RegisterType((*Event)(nil), "types.Event")
1937
-	proto.RegisterType((*NetworkStats)(nil), "types.NetworkStats")
1938
-	proto.RegisterType((*CpuUsage)(nil), "types.CpuUsage")
1939
-	proto.RegisterType((*ThrottlingData)(nil), "types.ThrottlingData")
1940
-	proto.RegisterType((*CpuStats)(nil), "types.CpuStats")
1941
-	proto.RegisterType((*PidsStats)(nil), "types.PidsStats")
1942
-	proto.RegisterType((*MemoryData)(nil), "types.MemoryData")
1943
-	proto.RegisterType((*MemoryStats)(nil), "types.MemoryStats")
1944
-	proto.RegisterType((*BlkioStatsEntry)(nil), "types.BlkioStatsEntry")
1945
-	proto.RegisterType((*BlkioStats)(nil), "types.BlkioStats")
1946
-	proto.RegisterType((*HugetlbStats)(nil), "types.HugetlbStats")
1947
-	proto.RegisterType((*CgroupStats)(nil), "types.CgroupStats")
1948
-	proto.RegisterType((*StatsResponse)(nil), "types.StatsResponse")
1949
-	proto.RegisterType((*StatsRequest)(nil), "types.StatsRequest")
1950
-}
1951
-
1952
-// Reference imports to suppress errors if they are not otherwise used.
1953
-var _ context.Context
1954
-var _ grpc.ClientConn
1955
-
1956
-// This is a compile-time assertion to ensure that this generated file
1957
-// is compatible with the grpc package it is being compiled against.
1958
-const _ = grpc.SupportPackageIsVersion4
1959
-
1960
-// Client API for API service
1961
-
1962
-type APIClient interface {
1963
-	GetServerVersion(ctx context.Context, in *GetServerVersionRequest, opts ...grpc.CallOption) (*GetServerVersionResponse, error)
1964
-	CreateContainer(ctx context.Context, in *CreateContainerRequest, opts ...grpc.CallOption) (*CreateContainerResponse, error)
1965
-	UpdateContainer(ctx context.Context, in *UpdateContainerRequest, opts ...grpc.CallOption) (*UpdateContainerResponse, error)
1966
-	Signal(ctx context.Context, in *SignalRequest, opts ...grpc.CallOption) (*SignalResponse, error)
1967
-	UpdateProcess(ctx context.Context, in *UpdateProcessRequest, opts ...grpc.CallOption) (*UpdateProcessResponse, error)
1968
-	AddProcess(ctx context.Context, in *AddProcessRequest, opts ...grpc.CallOption) (*AddProcessResponse, error)
1969
-	CreateCheckpoint(ctx context.Context, in *CreateCheckpointRequest, opts ...grpc.CallOption) (*CreateCheckpointResponse, error)
1970
-	DeleteCheckpoint(ctx context.Context, in *DeleteCheckpointRequest, opts ...grpc.CallOption) (*DeleteCheckpointResponse, error)
1971
-	ListCheckpoint(ctx context.Context, in *ListCheckpointRequest, opts ...grpc.CallOption) (*ListCheckpointResponse, error)
1972
-	State(ctx context.Context, in *StateRequest, opts ...grpc.CallOption) (*StateResponse, error)
1973
-	Events(ctx context.Context, in *EventsRequest, opts ...grpc.CallOption) (API_EventsClient, error)
1974
-	Stats(ctx context.Context, in *StatsRequest, opts ...grpc.CallOption) (*StatsResponse, error)
1975
-}
1976
-
1977
-type aPIClient struct {
1978
-	cc *grpc.ClientConn
1979
-}
1980
-
1981
-func NewAPIClient(cc *grpc.ClientConn) APIClient {
1982
-	return &aPIClient{cc}
1983
-}
1984
-
1985
-func (c *aPIClient) GetServerVersion(ctx context.Context, in *GetServerVersionRequest, opts ...grpc.CallOption) (*GetServerVersionResponse, error) {
1986
-	out := new(GetServerVersionResponse)
1987
-	err := grpc.Invoke(ctx, "/types.API/GetServerVersion", in, out, c.cc, opts...)
1988
-	if err != nil {
1989
-		return nil, err
1990
-	}
1991
-	return out, nil
1992
-}
1993
-
1994
-func (c *aPIClient) CreateContainer(ctx context.Context, in *CreateContainerRequest, opts ...grpc.CallOption) (*CreateContainerResponse, error) {
1995
-	out := new(CreateContainerResponse)
1996
-	err := grpc.Invoke(ctx, "/types.API/CreateContainer", in, out, c.cc, opts...)
1997
-	if err != nil {
1998
-		return nil, err
1999
-	}
2000
-	return out, nil
2001
-}
2002
-
2003
-func (c *aPIClient) UpdateContainer(ctx context.Context, in *UpdateContainerRequest, opts ...grpc.CallOption) (*UpdateContainerResponse, error) {
2004
-	out := new(UpdateContainerResponse)
2005
-	err := grpc.Invoke(ctx, "/types.API/UpdateContainer", in, out, c.cc, opts...)
2006
-	if err != nil {
2007
-		return nil, err
2008
-	}
2009
-	return out, nil
2010
-}
2011
-
2012
-func (c *aPIClient) Signal(ctx context.Context, in *SignalRequest, opts ...grpc.CallOption) (*SignalResponse, error) {
2013
-	out := new(SignalResponse)
2014
-	err := grpc.Invoke(ctx, "/types.API/Signal", in, out, c.cc, opts...)
2015
-	if err != nil {
2016
-		return nil, err
2017
-	}
2018
-	return out, nil
2019
-}
2020
-
2021
-func (c *aPIClient) UpdateProcess(ctx context.Context, in *UpdateProcessRequest, opts ...grpc.CallOption) (*UpdateProcessResponse, error) {
2022
-	out := new(UpdateProcessResponse)
2023
-	err := grpc.Invoke(ctx, "/types.API/UpdateProcess", in, out, c.cc, opts...)
2024
-	if err != nil {
2025
-		return nil, err
2026
-	}
2027
-	return out, nil
2028
-}
2029
-
2030
-func (c *aPIClient) AddProcess(ctx context.Context, in *AddProcessRequest, opts ...grpc.CallOption) (*AddProcessResponse, error) {
2031
-	out := new(AddProcessResponse)
2032
-	err := grpc.Invoke(ctx, "/types.API/AddProcess", in, out, c.cc, opts...)
2033
-	if err != nil {
2034
-		return nil, err
2035
-	}
2036
-	return out, nil
2037
-}
2038
-
2039
-func (c *aPIClient) CreateCheckpoint(ctx context.Context, in *CreateCheckpointRequest, opts ...grpc.CallOption) (*CreateCheckpointResponse, error) {
2040
-	out := new(CreateCheckpointResponse)
2041
-	err := grpc.Invoke(ctx, "/types.API/CreateCheckpoint", in, out, c.cc, opts...)
2042
-	if err != nil {
2043
-		return nil, err
2044
-	}
2045
-	return out, nil
2046
-}
2047
-
2048
-func (c *aPIClient) DeleteCheckpoint(ctx context.Context, in *DeleteCheckpointRequest, opts ...grpc.CallOption) (*DeleteCheckpointResponse, error) {
2049
-	out := new(DeleteCheckpointResponse)
2050
-	err := grpc.Invoke(ctx, "/types.API/DeleteCheckpoint", in, out, c.cc, opts...)
2051
-	if err != nil {
2052
-		return nil, err
2053
-	}
2054
-	return out, nil
2055
-}
2056
-
2057
-func (c *aPIClient) ListCheckpoint(ctx context.Context, in *ListCheckpointRequest, opts ...grpc.CallOption) (*ListCheckpointResponse, error) {
2058
-	out := new(ListCheckpointResponse)
2059
-	err := grpc.Invoke(ctx, "/types.API/ListCheckpoint", in, out, c.cc, opts...)
2060
-	if err != nil {
2061
-		return nil, err
2062
-	}
2063
-	return out, nil
2064
-}
2065
-
2066
-func (c *aPIClient) State(ctx context.Context, in *StateRequest, opts ...grpc.CallOption) (*StateResponse, error) {
2067
-	out := new(StateResponse)
2068
-	err := grpc.Invoke(ctx, "/types.API/State", in, out, c.cc, opts...)
2069
-	if err != nil {
2070
-		return nil, err
2071
-	}
2072
-	return out, nil
2073
-}
2074
-
2075
-func (c *aPIClient) Events(ctx context.Context, in *EventsRequest, opts ...grpc.CallOption) (API_EventsClient, error) {
2076
-	stream, err := grpc.NewClientStream(ctx, &_API_serviceDesc.Streams[0], c.cc, "/types.API/Events", opts...)
2077
-	if err != nil {
2078
-		return nil, err
2079
-	}
2080
-	x := &aPIEventsClient{stream}
2081
-	if err := x.ClientStream.SendMsg(in); err != nil {
2082
-		return nil, err
2083
-	}
2084
-	if err := x.ClientStream.CloseSend(); err != nil {
2085
-		return nil, err
2086
-	}
2087
-	return x, nil
2088
-}
2089
-
2090
-type API_EventsClient interface {
2091
-	Recv() (*Event, error)
2092
-	grpc.ClientStream
2093
-}
2094
-
2095
-type aPIEventsClient struct {
2096
-	grpc.ClientStream
2097
-}
2098
-
2099
-func (x *aPIEventsClient) Recv() (*Event, error) {
2100
-	m := new(Event)
2101
-	if err := x.ClientStream.RecvMsg(m); err != nil {
2102
-		return nil, err
2103
-	}
2104
-	return m, nil
2105
-}
2106
-
2107
-func (c *aPIClient) Stats(ctx context.Context, in *StatsRequest, opts ...grpc.CallOption) (*StatsResponse, error) {
2108
-	out := new(StatsResponse)
2109
-	err := grpc.Invoke(ctx, "/types.API/Stats", in, out, c.cc, opts...)
2110
-	if err != nil {
2111
-		return nil, err
2112
-	}
2113
-	return out, nil
2114
-}
2115
-
2116
-// Server API for API service
2117
-
2118
-type APIServer interface {
2119
-	GetServerVersion(context.Context, *GetServerVersionRequest) (*GetServerVersionResponse, error)
2120
-	CreateContainer(context.Context, *CreateContainerRequest) (*CreateContainerResponse, error)
2121
-	UpdateContainer(context.Context, *UpdateContainerRequest) (*UpdateContainerResponse, error)
2122
-	Signal(context.Context, *SignalRequest) (*SignalResponse, error)
2123
-	UpdateProcess(context.Context, *UpdateProcessRequest) (*UpdateProcessResponse, error)
2124
-	AddProcess(context.Context, *AddProcessRequest) (*AddProcessResponse, error)
2125
-	CreateCheckpoint(context.Context, *CreateCheckpointRequest) (*CreateCheckpointResponse, error)
2126
-	DeleteCheckpoint(context.Context, *DeleteCheckpointRequest) (*DeleteCheckpointResponse, error)
2127
-	ListCheckpoint(context.Context, *ListCheckpointRequest) (*ListCheckpointResponse, error)
2128
-	State(context.Context, *StateRequest) (*StateResponse, error)
2129
-	Events(*EventsRequest, API_EventsServer) error
2130
-	Stats(context.Context, *StatsRequest) (*StatsResponse, error)
2131
-}
2132
-
2133
-func RegisterAPIServer(s *grpc.Server, srv APIServer) {
2134
-	s.RegisterService(&_API_serviceDesc, srv)
2135
-}
2136
-
2137
-func _API_GetServerVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
2138
-	in := new(GetServerVersionRequest)
2139
-	if err := dec(in); err != nil {
2140
-		return nil, err
2141
-	}
2142
-	if interceptor == nil {
2143
-		return srv.(APIServer).GetServerVersion(ctx, in)
2144
-	}
2145
-	info := &grpc.UnaryServerInfo{
2146
-		Server:     srv,
2147
-		FullMethod: "/types.API/GetServerVersion",
2148
-	}
2149
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
2150
-		return srv.(APIServer).GetServerVersion(ctx, req.(*GetServerVersionRequest))
2151
-	}
2152
-	return interceptor(ctx, in, info, handler)
2153
-}
2154
-
2155
-func _API_CreateContainer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
2156
-	in := new(CreateContainerRequest)
2157
-	if err := dec(in); err != nil {
2158
-		return nil, err
2159
-	}
2160
-	if interceptor == nil {
2161
-		return srv.(APIServer).CreateContainer(ctx, in)
2162
-	}
2163
-	info := &grpc.UnaryServerInfo{
2164
-		Server:     srv,
2165
-		FullMethod: "/types.API/CreateContainer",
2166
-	}
2167
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
2168
-		return srv.(APIServer).CreateContainer(ctx, req.(*CreateContainerRequest))
2169
-	}
2170
-	return interceptor(ctx, in, info, handler)
2171
-}
2172
-
2173
-func _API_UpdateContainer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
2174
-	in := new(UpdateContainerRequest)
2175
-	if err := dec(in); err != nil {
2176
-		return nil, err
2177
-	}
2178
-	if interceptor == nil {
2179
-		return srv.(APIServer).UpdateContainer(ctx, in)
2180
-	}
2181
-	info := &grpc.UnaryServerInfo{
2182
-		Server:     srv,
2183
-		FullMethod: "/types.API/UpdateContainer",
2184
-	}
2185
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
2186
-		return srv.(APIServer).UpdateContainer(ctx, req.(*UpdateContainerRequest))
2187
-	}
2188
-	return interceptor(ctx, in, info, handler)
2189
-}
2190
-
2191
-func _API_Signal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
2192
-	in := new(SignalRequest)
2193
-	if err := dec(in); err != nil {
2194
-		return nil, err
2195
-	}
2196
-	if interceptor == nil {
2197
-		return srv.(APIServer).Signal(ctx, in)
2198
-	}
2199
-	info := &grpc.UnaryServerInfo{
2200
-		Server:     srv,
2201
-		FullMethod: "/types.API/Signal",
2202
-	}
2203
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
2204
-		return srv.(APIServer).Signal(ctx, req.(*SignalRequest))
2205
-	}
2206
-	return interceptor(ctx, in, info, handler)
2207
-}
2208
-
2209
-func _API_UpdateProcess_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
2210
-	in := new(UpdateProcessRequest)
2211
-	if err := dec(in); err != nil {
2212
-		return nil, err
2213
-	}
2214
-	if interceptor == nil {
2215
-		return srv.(APIServer).UpdateProcess(ctx, in)
2216
-	}
2217
-	info := &grpc.UnaryServerInfo{
2218
-		Server:     srv,
2219
-		FullMethod: "/types.API/UpdateProcess",
2220
-	}
2221
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
2222
-		return srv.(APIServer).UpdateProcess(ctx, req.(*UpdateProcessRequest))
2223
-	}
2224
-	return interceptor(ctx, in, info, handler)
2225
-}
2226
-
2227
-func _API_AddProcess_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
2228
-	in := new(AddProcessRequest)
2229
-	if err := dec(in); err != nil {
2230
-		return nil, err
2231
-	}
2232
-	if interceptor == nil {
2233
-		return srv.(APIServer).AddProcess(ctx, in)
2234
-	}
2235
-	info := &grpc.UnaryServerInfo{
2236
-		Server:     srv,
2237
-		FullMethod: "/types.API/AddProcess",
2238
-	}
2239
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
2240
-		return srv.(APIServer).AddProcess(ctx, req.(*AddProcessRequest))
2241
-	}
2242
-	return interceptor(ctx, in, info, handler)
2243
-}
2244
-
2245
-func _API_CreateCheckpoint_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
2246
-	in := new(CreateCheckpointRequest)
2247
-	if err := dec(in); err != nil {
2248
-		return nil, err
2249
-	}
2250
-	if interceptor == nil {
2251
-		return srv.(APIServer).CreateCheckpoint(ctx, in)
2252
-	}
2253
-	info := &grpc.UnaryServerInfo{
2254
-		Server:     srv,
2255
-		FullMethod: "/types.API/CreateCheckpoint",
2256
-	}
2257
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
2258
-		return srv.(APIServer).CreateCheckpoint(ctx, req.(*CreateCheckpointRequest))
2259
-	}
2260
-	return interceptor(ctx, in, info, handler)
2261
-}
2262
-
2263
-func _API_DeleteCheckpoint_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
2264
-	in := new(DeleteCheckpointRequest)
2265
-	if err := dec(in); err != nil {
2266
-		return nil, err
2267
-	}
2268
-	if interceptor == nil {
2269
-		return srv.(APIServer).DeleteCheckpoint(ctx, in)
2270
-	}
2271
-	info := &grpc.UnaryServerInfo{
2272
-		Server:     srv,
2273
-		FullMethod: "/types.API/DeleteCheckpoint",
2274
-	}
2275
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
2276
-		return srv.(APIServer).DeleteCheckpoint(ctx, req.(*DeleteCheckpointRequest))
2277
-	}
2278
-	return interceptor(ctx, in, info, handler)
2279
-}
2280
-
2281
-func _API_ListCheckpoint_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
2282
-	in := new(ListCheckpointRequest)
2283
-	if err := dec(in); err != nil {
2284
-		return nil, err
2285
-	}
2286
-	if interceptor == nil {
2287
-		return srv.(APIServer).ListCheckpoint(ctx, in)
2288
-	}
2289
-	info := &grpc.UnaryServerInfo{
2290
-		Server:     srv,
2291
-		FullMethod: "/types.API/ListCheckpoint",
2292
-	}
2293
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
2294
-		return srv.(APIServer).ListCheckpoint(ctx, req.(*ListCheckpointRequest))
2295
-	}
2296
-	return interceptor(ctx, in, info, handler)
2297
-}
2298
-
2299
-func _API_State_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
2300
-	in := new(StateRequest)
2301
-	if err := dec(in); err != nil {
2302
-		return nil, err
2303
-	}
2304
-	if interceptor == nil {
2305
-		return srv.(APIServer).State(ctx, in)
2306
-	}
2307
-	info := &grpc.UnaryServerInfo{
2308
-		Server:     srv,
2309
-		FullMethod: "/types.API/State",
2310
-	}
2311
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
2312
-		return srv.(APIServer).State(ctx, req.(*StateRequest))
2313
-	}
2314
-	return interceptor(ctx, in, info, handler)
2315
-}
2316
-
2317
-func _API_Events_Handler(srv interface{}, stream grpc.ServerStream) error {
2318
-	m := new(EventsRequest)
2319
-	if err := stream.RecvMsg(m); err != nil {
2320
-		return err
2321
-	}
2322
-	return srv.(APIServer).Events(m, &aPIEventsServer{stream})
2323
-}
2324
-
2325
-type API_EventsServer interface {
2326
-	Send(*Event) error
2327
-	grpc.ServerStream
2328
-}
2329
-
2330
-type aPIEventsServer struct {
2331
-	grpc.ServerStream
2332
-}
2333
-
2334
-func (x *aPIEventsServer) Send(m *Event) error {
2335
-	return x.ServerStream.SendMsg(m)
2336
-}
2337
-
2338
-func _API_Stats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
2339
-	in := new(StatsRequest)
2340
-	if err := dec(in); err != nil {
2341
-		return nil, err
2342
-	}
2343
-	if interceptor == nil {
2344
-		return srv.(APIServer).Stats(ctx, in)
2345
-	}
2346
-	info := &grpc.UnaryServerInfo{
2347
-		Server:     srv,
2348
-		FullMethod: "/types.API/Stats",
2349
-	}
2350
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
2351
-		return srv.(APIServer).Stats(ctx, req.(*StatsRequest))
2352
-	}
2353
-	return interceptor(ctx, in, info, handler)
2354
-}
2355
-
2356
-var _API_serviceDesc = grpc.ServiceDesc{
2357
-	ServiceName: "types.API",
2358
-	HandlerType: (*APIServer)(nil),
2359
-	Methods: []grpc.MethodDesc{
2360
-		{
2361
-			MethodName: "GetServerVersion",
2362
-			Handler:    _API_GetServerVersion_Handler,
2363
-		},
2364
-		{
2365
-			MethodName: "CreateContainer",
2366
-			Handler:    _API_CreateContainer_Handler,
2367
-		},
2368
-		{
2369
-			MethodName: "UpdateContainer",
2370
-			Handler:    _API_UpdateContainer_Handler,
2371
-		},
2372
-		{
2373
-			MethodName: "Signal",
2374
-			Handler:    _API_Signal_Handler,
2375
-		},
2376
-		{
2377
-			MethodName: "UpdateProcess",
2378
-			Handler:    _API_UpdateProcess_Handler,
2379
-		},
2380
-		{
2381
-			MethodName: "AddProcess",
2382
-			Handler:    _API_AddProcess_Handler,
2383
-		},
2384
-		{
2385
-			MethodName: "CreateCheckpoint",
2386
-			Handler:    _API_CreateCheckpoint_Handler,
2387
-		},
2388
-		{
2389
-			MethodName: "DeleteCheckpoint",
2390
-			Handler:    _API_DeleteCheckpoint_Handler,
2391
-		},
2392
-		{
2393
-			MethodName: "ListCheckpoint",
2394
-			Handler:    _API_ListCheckpoint_Handler,
2395
-		},
2396
-		{
2397
-			MethodName: "State",
2398
-			Handler:    _API_State_Handler,
2399
-		},
2400
-		{
2401
-			MethodName: "Stats",
2402
-			Handler:    _API_Stats_Handler,
2403
-		},
2404
-	},
2405
-	Streams: []grpc.StreamDesc{
2406
-		{
2407
-			StreamName:    "Events",
2408
-			Handler:       _API_Events_Handler,
2409
-			ServerStreams: true,
2410
-		},
2411
-	},
2412
-	Metadata: "api.proto",
2413
-}
2414
-
2415
-func init() { proto.RegisterFile("api.proto", fileDescriptor0) }
2416
-
2417
-var fileDescriptor0 = []byte{
2418
-	// 2632 bytes of a gzipped FileDescriptorProto
2419
-	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x19, 0x4d, 0x6f, 0x24, 0x47,
2420
-	0x75, 0x67, 0xa6, 0xed, 0xf1, 0xbc, 0xf9, 0xb0, 0xa7, 0xd6, 0xeb, 0xed, 0x9d, 0x24, 0xbb, 0x4e,
2421
-	0x2b, 0x10, 0x03, 0x91, 0xb3, 0x78, 0x13, 0x58, 0x11, 0x09, 0x69, 0xd7, 0x1b, 0x82, 0xc9, 0x3a,
2422
-	0x99, 0xb4, 0x6d, 0x56, 0x48, 0x48, 0xa3, 0x76, 0x77, 0xed, 0x4c, 0xe1, 0x9e, 0xae, 0x4e, 0x75,
2423
-	0xb5, 0x3d, 0xbe, 0xe4, 0xc0, 0x01, 0x0e, 0x48, 0x70, 0x45, 0xe2, 0xc8, 0x8d, 0x3b, 0x07, 0xf8,
2424
-	0x03, 0x48, 0xfc, 0x10, 0x6e, 0xdc, 0x39, 0xa2, 0xfa, 0xe8, 0xea, 0xea, 0xf9, 0xf0, 0x6e, 0x90,
2425
-	0x10, 0x17, 0x2e, 0xad, 0x7a, 0xaf, 0xde, 0x57, 0xbd, 0x7a, 0xef, 0xd5, 0xab, 0x6a, 0x68, 0x05,
2426
-	0x29, 0xd9, 0x4f, 0x19, 0xe5, 0x14, 0xad, 0xf1, 0xeb, 0x14, 0x67, 0x83, 0x07, 0x63, 0x4a, 0xc7,
2427
-	0x31, 0x7e, 0x5f, 0x22, 0xcf, 0xf3, 0x97, 0xef, 0x73, 0x32, 0xc5, 0x19, 0x0f, 0xa6, 0xa9, 0xa2,
2428
-	0xf3, 0xee, 0xc1, 0xdd, 0x4f, 0x30, 0x3f, 0xc1, 0xec, 0x12, 0xb3, 0x9f, 0x62, 0x96, 0x11, 0x9a,
2429
-	0xf8, 0xf8, 0xcb, 0x1c, 0x67, 0xdc, 0x9b, 0x81, 0xbb, 0x38, 0x95, 0xa5, 0x34, 0xc9, 0x30, 0xda,
2430
-	0x86, 0xb5, 0x69, 0xf0, 0x0b, 0xca, 0xdc, 0xda, 0x6e, 0x6d, 0xaf, 0xeb, 0x2b, 0x40, 0x62, 0x49,
2431
-	0x42, 0x99, 0x5b, 0xd7, 0x58, 0x01, 0x08, 0x6c, 0x1a, 0xf0, 0x70, 0xe2, 0x36, 0x14, 0x56, 0x02,
2432
-	0x68, 0x00, 0x1b, 0x0c, 0x5f, 0x12, 0x21, 0xd5, 0x75, 0x76, 0x6b, 0x7b, 0x2d, 0xdf, 0xc0, 0xde,
2433
-	0xaf, 0x6a, 0xb0, 0x7d, 0x96, 0x46, 0x01, 0xc7, 0x43, 0x46, 0x43, 0x9c, 0x65, 0xda, 0x24, 0xd4,
2434
-	0x83, 0x3a, 0x89, 0xa4, 0xce, 0x96, 0x5f, 0x27, 0x11, 0xda, 0x82, 0x46, 0x4a, 0x22, 0xa9, 0xae,
2435
-	0xe5, 0x8b, 0x21, 0xba, 0x0f, 0x10, 0xc6, 0x34, 0xc3, 0x27, 0x3c, 0x22, 0x89, 0xd4, 0xb8, 0xe1,
2436
-	0x5b, 0x18, 0x61, 0xcc, 0x15, 0x89, 0xf8, 0x44, 0xea, 0xec, 0xfa, 0x0a, 0x40, 0x3b, 0xb0, 0x3e,
2437
-	0xc1, 0x64, 0x3c, 0xe1, 0xee, 0x9a, 0x44, 0x6b, 0xc8, 0xbb, 0x0b, 0x77, 0xe6, 0xec, 0x50, 0xeb,
2438
-	0xf7, 0xfe, 0x5e, 0x87, 0x9d, 0x43, 0x86, 0x03, 0x8e, 0x0f, 0x69, 0xc2, 0x03, 0x92, 0x60, 0xb6,
2439
-	0xca, 0xc6, 0xfb, 0x00, 0xe7, 0x79, 0x12, 0xc5, 0x78, 0x18, 0xf0, 0x89, 0x36, 0xd5, 0xc2, 0x48,
2440
-	0x8b, 0x27, 0x38, 0xbc, 0x48, 0x29, 0x49, 0xb8, 0xb4, 0xb8, 0xe5, 0x5b, 0x18, 0x61, 0x71, 0x26,
2441
-	0x17, 0xa3, 0xbc, 0xa4, 0x00, 0x61, 0x71, 0xc6, 0x23, 0x9a, 0x2b, 0x8b, 0x5b, 0xbe, 0x86, 0x34,
2442
-	0x1e, 0x33, 0xe6, 0xae, 0x1b, 0x3c, 0x66, 0x4c, 0xe0, 0xe3, 0xe0, 0x1c, 0xc7, 0x99, 0xdb, 0xdc,
2443
-	0x6d, 0x08, 0xbc, 0x82, 0xd0, 0x2e, 0xb4, 0x13, 0x3a, 0x24, 0x97, 0x94, 0xfb, 0x94, 0x72, 0x77,
2444
-	0x43, 0x3a, 0xcc, 0x46, 0x21, 0x17, 0x9a, 0x2c, 0x4f, 0x44, 0xdc, 0xb8, 0x2d, 0x29, 0xb2, 0x00,
2445
-	0x05, 0xaf, 0x1e, 0x3e, 0x61, 0xe3, 0xcc, 0x05, 0x29, 0xd8, 0x46, 0xa1, 0x77, 0xa0, 0x5b, 0xae,
2446
-	0xe4, 0x19, 0x61, 0x6e, 0x5b, 0x4a, 0xa8, 0x22, 0xbd, 0x23, 0xb8, 0xbb, 0xe0, 0x4b, 0x1d, 0x67,
2447
-	0xfb, 0xd0, 0x0a, 0x0b, 0xa4, 0xf4, 0x69, 0xfb, 0x60, 0x6b, 0x5f, 0x86, 0xf6, 0x7e, 0x49, 0x5c,
2448
-	0x92, 0x78, 0x47, 0xd0, 0x3d, 0x21, 0xe3, 0x24, 0x88, 0x5f, 0x3f, 0x62, 0x84, 0xc7, 0x24, 0x8b,
2449
-	0x8e, 0x4f, 0x0d, 0x79, 0x5b, 0xd0, 0x2b, 0x44, 0xe9, 0x4d, 0xff, 0x73, 0x03, 0xfa, 0x4f, 0xa2,
2450
-	0xe8, 0x15, 0x31, 0x39, 0x80, 0x0d, 0x8e, 0xd9, 0x94, 0x08, 0x89, 0x75, 0xe9, 0x4e, 0x03, 0xa3,
2451
-	0x07, 0xe0, 0xe4, 0x19, 0x66, 0x52, 0x53, 0xfb, 0xa0, 0xad, 0x57, 0x72, 0x96, 0x61, 0xe6, 0xcb,
2452
-	0x09, 0x84, 0xc0, 0x09, 0x84, 0x2f, 0x1d, 0xe9, 0x4b, 0x39, 0x16, 0x26, 0xe3, 0xe4, 0xd2, 0x5d,
2453
-	0x93, 0x28, 0x31, 0x14, 0x98, 0xf0, 0x2a, 0xd2, 0x3b, 0x2c, 0x86, 0xc5, 0xb2, 0x9a, 0xe5, 0xb2,
2454
-	0x4c, 0xd8, 0x6c, 0x2c, 0x0f, 0x9b, 0xd6, 0x8a, 0xb0, 0x81, 0x4a, 0xd8, 0x78, 0xd0, 0x09, 0x83,
2455
-	0x34, 0x38, 0x27, 0x31, 0xe1, 0x04, 0x67, 0x6e, 0x5b, 0x1a, 0x51, 0xc1, 0xa1, 0x3d, 0xd8, 0x0c,
2456
-	0xd2, 0x34, 0x60, 0x53, 0xca, 0x86, 0x8c, 0xbe, 0x24, 0x31, 0x76, 0x3b, 0x52, 0xc8, 0x3c, 0x5a,
2457
-	0x48, 0xcb, 0x70, 0x4c, 0x92, 0x7c, 0xf6, 0x5c, 0x44, 0x9f, 0xdb, 0x95, 0x64, 0x15, 0x9c, 0x90,
2458
-	0x96, 0xd0, 0xcf, 0xf0, 0xd5, 0x90, 0x91, 0x4b, 0x12, 0xe3, 0x31, 0xce, 0xdc, 0x9e, 0xf4, 0xe2,
2459
-	0x3c, 0x1a, 0xbd, 0x0b, 0x4d, 0x16, 0x93, 0x29, 0xe1, 0x99, 0xbb, 0xb9, 0xdb, 0xd8, 0x6b, 0x1f,
2460
-	0x74, 0xb5, 0x3f, 0x7d, 0x89, 0xf5, 0x8b, 0x59, 0xef, 0x19, 0xac, 0x2b, 0x94, 0x70, 0xaf, 0x20,
2461
-	0xd1, 0xbb, 0x25, 0xc7, 0x02, 0x97, 0xd1, 0x97, 0x5c, 0xee, 0x95, 0xe3, 0xcb, 0xb1, 0xc0, 0x4d,
2462
-	0x02, 0x16, 0xc9, 0x7d, 0x72, 0x7c, 0x39, 0xf6, 0x7c, 0x70, 0xc4, 0x46, 0x09, 0x57, 0xe7, 0x7a,
2463
-	0xc3, 0xbb, 0xbe, 0x18, 0x0a, 0xcc, 0x58, 0xc7, 0x54, 0xd7, 0x17, 0x43, 0xf4, 0x4d, 0xe8, 0x05,
2464
-	0x51, 0x44, 0x38, 0xa1, 0x49, 0x10, 0x7f, 0x42, 0xa2, 0xcc, 0x6d, 0xec, 0x36, 0xf6, 0xba, 0xfe,
2465
-	0x1c, 0xd6, 0x3b, 0x00, 0x64, 0x07, 0x94, 0x0e, 0xfa, 0x37, 0xa1, 0x95, 0x5d, 0x67, 0x1c, 0x4f,
2466
-	0x87, 0x46, 0x4f, 0x89, 0xf0, 0x7e, 0x59, 0x33, 0xe9, 0x62, 0xb2, 0x68, 0x55, 0x2c, 0x7e, 0xb7,
2467
-	0x52, 0x5b, 0xea, 0x32, 0xea, 0xfa, 0x45, 0xfe, 0x94, 0xdc, 0x76, 0xb9, 0x59, 0x48, 0xd9, 0xc6,
2468
-	0xb2, 0x94, 0x1d, 0x80, 0xbb, 0x68, 0x83, 0x4e, 0x93, 0x10, 0xee, 0x3e, 0xc3, 0x31, 0x7e, 0x1d,
2469
-	0xfb, 0x10, 0x38, 0x49, 0x30, 0xc5, 0x3a, 0x1d, 0xe5, 0xf8, 0xf5, 0x0d, 0x58, 0x54, 0xa2, 0x0d,
2470
-	0x38, 0x86, 0x3b, 0xcf, 0x49, 0xc6, 0x5f, 0xad, 0x7e, 0x41, 0x55, 0x7d, 0x99, 0xaa, 0xdf, 0xd7,
2471
-	0x00, 0x4a, 0x59, 0xc6, 0xe6, 0x9a, 0x65, 0x33, 0x02, 0x07, 0xcf, 0x08, 0xd7, 0xf9, 0x2e, 0xc7,
2472
-	0x22, 0x2a, 0x78, 0x98, 0xea, 0x23, 0x48, 0x0c, 0x45, 0xbd, 0xcc, 0x13, 0x32, 0x3b, 0xa1, 0xe1,
2473
-	0x05, 0xe6, 0x99, 0xac, 0xe7, 0x1b, 0xbe, 0x8d, 0x92, 0x49, 0x3b, 0xc1, 0x71, 0x2c, 0x8b, 0xfa,
2474
-	0x86, 0xaf, 0x00, 0x51, 0x81, 0xf1, 0x34, 0xe5, 0xd7, 0x9f, 0x9d, 0xb8, 0xeb, 0x32, 0xff, 0x0a,
2475
-	0xd0, 0x3b, 0x86, 0x9d, 0xf9, 0x95, 0xea, 0x18, 0x7a, 0x04, 0xed, 0x72, 0x15, 0x99, 0x5b, 0x93,
2476
-	0x09, 0xb2, 0x64, 0xeb, 0x6d, 0x2a, 0xef, 0x3e, 0x74, 0x4e, 0x78, 0xc0, 0xf1, 0x0a, 0x7f, 0x79,
2477
-	0x7b, 0xd0, 0x33, 0x55, 0x57, 0x12, 0xaa, 0xba, 0x11, 0xf0, 0x3c, 0xd3, 0x54, 0x1a, 0xf2, 0xfe,
2478
-	0xd2, 0x80, 0xa6, 0x0e, 0xeb, 0xa2, 0x36, 0xd5, 0xca, 0xda, 0xf4, 0x3f, 0x29, 0x91, 0x95, 0xac,
2479
-	0x6a, 0xce, 0x65, 0xd5, 0xff, 0xcb, 0x65, 0x59, 0x2e, 0xff, 0x56, 0x83, 0x96, 0xd9, 0xe6, 0xaf,
2480
-	0xdd, 0xce, 0xbc, 0x07, 0xad, 0x54, 0x6d, 0x3c, 0x56, 0x55, 0xaf, 0x7d, 0xd0, 0xd3, 0x8a, 0x8a,
2481
-	0x3a, 0x57, 0x12, 0x58, 0xf1, 0xe3, 0xd8, 0xf1, 0x63, 0xb5, 0x2b, 0x6b, 0x95, 0x76, 0x05, 0x81,
2482
-	0x93, 0x8a, 0x72, 0xba, 0x2e, 0xcb, 0xa9, 0x1c, 0xdb, 0x0d, 0x4a, 0xb3, 0xd2, 0xa0, 0x78, 0x1f,
2483
-	0x42, 0xf3, 0x38, 0x08, 0x27, 0x24, 0x91, 0x19, 0x1a, 0xa6, 0x3a, 0x4c, 0xbb, 0xbe, 0x1c, 0x0b,
2484
-	0x25, 0x53, 0x3c, 0xa5, 0xec, 0x5a, 0xd7, 0x7e, 0x0d, 0x79, 0x17, 0xd0, 0xd5, 0x69, 0xa0, 0x93,
2485
-	0xe9, 0x21, 0x80, 0x69, 0x31, 0x8a, 0x5c, 0x5a, 0x6c, 0x43, 0x2c, 0x1a, 0xb4, 0x07, 0xcd, 0xa9,
2486
-	0xd2, 0xac, 0xab, 0x6e, 0xe1, 0x03, 0x6d, 0x8f, 0x5f, 0x4c, 0x7b, 0xbf, 0xae, 0xc1, 0x8e, 0xea,
2487
-	0x31, 0x5f, 0xd9, 0x49, 0x2e, 0xef, 0x5d, 0x94, 0xfb, 0x1a, 0x15, 0xf7, 0x3d, 0x82, 0x16, 0xc3,
2488
-	0x19, 0xcd, 0x59, 0x88, 0x95, 0x67, 0xdb, 0x07, 0x77, 0x8a, 0x4c, 0x92, 0xba, 0x7c, 0x3d, 0xeb,
2489
-	0x97, 0x74, 0xde, 0x6f, 0x9a, 0xd0, 0xab, 0xce, 0x8a, 0x8a, 0x75, 0x1e, 0x5f, 0x10, 0xfa, 0x42,
2490
-	0x35, 0xc7, 0x35, 0xe9, 0x26, 0x1b, 0x25, 0xb2, 0x2a, 0x4c, 0xf3, 0x93, 0x49, 0xc0, 0x70, 0xa6,
2491
-	0xdd, 0x58, 0x22, 0xf4, 0xec, 0x10, 0x33, 0x42, 0x8b, 0xc3, 0xb4, 0x44, 0x88, 0x32, 0x10, 0xa6,
2492
-	0xf9, 0x17, 0x39, 0xe5, 0x81, 0x34, 0xd2, 0xf1, 0x0d, 0x2c, 0xbb, 0xe2, 0x34, 0xcf, 0x30, 0x3f,
2493
-	0x14, 0xbb, 0xb6, 0xa6, 0xbb, 0x62, 0x83, 0x29, 0xe7, 0x8f, 0xf1, 0x34, 0xd3, 0x69, 0x6e, 0x61,
2494
-	0x84, 0xe5, 0x6a, 0x37, 0x9f, 0x8b, 0xa0, 0x96, 0x81, 0xe1, 0xf8, 0x36, 0x4a, 0x48, 0x50, 0xe0,
2495
-	0xc9, 0x55, 0x90, 0xca, 0xb4, 0x77, 0x7c, 0x0b, 0x83, 0xde, 0x83, 0xbe, 0x82, 0x7c, 0x9c, 0x61,
2496
-	0x76, 0x19, 0x88, 0x63, 0x5b, 0x96, 0x01, 0xc7, 0x5f, 0x9c, 0x10, 0xd4, 0x17, 0x98, 0x25, 0x38,
2497
-	0x3e, 0xb6, 0xb4, 0x82, 0xa2, 0x5e, 0x98, 0x40, 0x07, 0xb0, 0xad, 0x90, 0xa7, 0x87, 0x43, 0x9b,
2498
-	0xa1, 0x2d, 0x19, 0x96, 0xce, 0x89, 0x4c, 0x97, 0x8e, 0x7f, 0x8e, 0x83, 0x97, 0x7a, 0x3f, 0x3a,
2499
-	0x92, 0x7c, 0x1e, 0x8d, 0x9e, 0x40, 0xdf, 0xda, 0xa2, 0x67, 0xf8, 0x92, 0x84, 0xd8, 0xed, 0xca,
2500
-	0xa8, 0xbd, 0xad, 0xa3, 0xc0, 0x9e, 0xf2, 0x17, 0xa9, 0xd1, 0x19, 0x0c, 0x24, 0xf2, 0x74, 0xc2,
2501
-	0x28, 0xe7, 0x31, 0xf6, 0x71, 0x10, 0x3d, 0x4d, 0x33, 0x2d, 0xab, 0x27, 0x65, 0x15, 0x11, 0x55,
2502
-	0xd0, 0x68, 0x69, 0x37, 0x30, 0xa2, 0x17, 0xf0, 0x46, 0x65, 0xf6, 0x05, 0x23, 0x1c, 0x97, 0x72,
2503
-	0x37, 0x6f, 0x92, 0x7b, 0x13, 0xe7, 0x82, 0x60, 0xa1, 0xf6, 0x88, 0x1a, 0xc1, 0x5b, 0xaf, 0x2f,
2504
-	0xb8, 0xca, 0x89, 0x7e, 0x06, 0x6f, 0x2e, 0xea, 0xb5, 0x24, 0xf7, 0x6f, 0x92, 0x7c, 0x23, 0xab,
2505
-	0x48, 0x0e, 0x51, 0xbf, 0xd4, 0xce, 0x23, 0x95, 0x1c, 0x06, 0xe1, 0x7d, 0x04, 0xdd, 0xa7, 0x31,
2506
-	0x0d, 0x2f, 0x8e, 0x3e, 0xd7, 0xe4, 0x95, 0x2b, 0x77, 0x63, 0xe9, 0x95, 0xbb, 0xa1, 0xaf, 0xdc,
2507
-	0xde, 0x57, 0xd0, 0xa9, 0x6c, 0xe7, 0xf7, 0x64, 0x1e, 0x17, 0xa2, 0xf4, 0x45, 0x6a, 0x5b, 0x1b,
2508
-	0x5d, 0x51, 0xe3, 0xdb, 0x84, 0xa2, 0xbe, 0x5c, 0xa9, 0x50, 0x53, 0xcd, 0xad, 0x86, 0x44, 0xee,
2509
-	0xc4, 0x65, 0x18, 0xaa, 0x7b, 0x93, 0x85, 0xf1, 0x7e, 0x0e, 0xbd, 0xaa, 0x2b, 0xfe, 0x63, 0x0b,
2510
-	0x10, 0x38, 0x2c, 0xe0, 0xb8, 0xe8, 0xce, 0xc5, 0xd8, 0xbb, 0x07, 0x77, 0x17, 0x2a, 0xa6, 0x6e,
2511
-	0xfd, 0xae, 0xa1, 0xfb, 0xf1, 0x25, 0x4e, 0xb8, 0xb9, 0x9d, 0x3d, 0x86, 0x96, 0x79, 0xf2, 0xd0,
2512
-	0xa5, 0x78, 0xb0, 0xaf, 0x1e, 0x45, 0xf6, 0x8b, 0x47, 0x91, 0xfd, 0xd3, 0x82, 0xc2, 0x2f, 0x89,
2513
-	0xc5, 0x1a, 0x33, 0x4e, 0x19, 0x8e, 0x3e, 0x4f, 0xe2, 0xeb, 0xe2, 0x25, 0xa1, 0xc4, 0xe8, 0xea,
2514
-	0xec, 0x98, 0xe6, 0xe8, 0x77, 0x35, 0x58, 0x93, 0xba, 0x97, 0xde, 0x32, 0x14, 0x75, 0xdd, 0xd4,
2515
-	0xf2, 0x6a, 0xe5, 0xee, 0x9a, 0xca, 0xad, 0x6b, 0xbc, 0x53, 0xd6, 0xf8, 0xca, 0x0a, 0xd6, 0xbf,
2516
-	0xc6, 0x0a, 0xbc, 0xdf, 0xd6, 0xa1, 0xf3, 0x19, 0xe6, 0x57, 0x94, 0x5d, 0x88, 0xf3, 0x2c, 0x5b,
2517
-	0xda, 0xba, 0xde, 0x83, 0x0d, 0x36, 0x1b, 0x9d, 0x5f, 0x73, 0x53, 0xbf, 0x9b, 0x6c, 0xf6, 0x54,
2518
-	0x80, 0xe8, 0x2d, 0x00, 0x36, 0x1b, 0x0d, 0x03, 0xd5, 0xae, 0xea, 0xf2, 0xcd, 0x66, 0x1a, 0x81,
2519
-	0xde, 0x80, 0x96, 0x3f, 0x1b, 0x61, 0xc6, 0x28, 0xcb, 0x8a, 0xfa, 0xed, 0xcf, 0x3e, 0x96, 0xb0,
2520
-	0xe0, 0xf5, 0x67, 0xa3, 0x88, 0xd1, 0x34, 0xc5, 0x91, 0xac, 0xdf, 0x8e, 0xdf, 0xf2, 0x67, 0xcf,
2521
-	0x14, 0x42, 0x68, 0x3d, 0x2d, 0xb4, 0xae, 0x2b, 0xad, 0xa7, 0xa5, 0xd6, 0xd3, 0xd9, 0x28, 0xd5,
2522
-	0x5a, 0x55, 0xe1, 0x6e, 0x9d, 0xda, 0x5a, 0x4f, 0x8d, 0x56, 0x55, 0xb5, 0x37, 0x4e, 0x2d, 0xad,
2523
-	0xa7, 0xa5, 0xd6, 0x56, 0xc1, 0xab, 0xb5, 0x7a, 0x7f, 0xaa, 0xc1, 0xc6, 0x61, 0x9a, 0x9f, 0x65,
2524
-	0xc1, 0x18, 0xa3, 0x07, 0xd0, 0xe6, 0x94, 0x07, 0xf1, 0x28, 0x17, 0xa0, 0x3e, 0xdb, 0x40, 0xa2,
2525
-	0x14, 0xc1, 0xdb, 0xd0, 0x49, 0x31, 0x0b, 0xd3, 0x5c, 0x53, 0xd4, 0x77, 0x1b, 0xe2, 0x0c, 0x51,
2526
-	0x38, 0x45, 0xb2, 0x0f, 0xb7, 0xe5, 0xdc, 0x88, 0x24, 0x23, 0x55, 0xb4, 0xa7, 0x34, 0xc2, 0xda,
2527
-	0x55, 0x7d, 0x39, 0x75, 0x94, 0x7c, 0x6a, 0x26, 0xd0, 0xb7, 0xa1, 0x6f, 0xe8, 0x45, 0x33, 0x2b,
2528
-	0xa9, 0x95, 0xeb, 0x36, 0x35, 0xf5, 0x99, 0x46, 0x7b, 0x5f, 0x99, 0x1c, 0x22, 0xc9, 0xf8, 0x59,
2529
-	0xc0, 0x03, 0xd1, 0xe8, 0xa4, 0xf2, 0xe4, 0xcc, 0xb4, 0xb5, 0x05, 0x88, 0xbe, 0x03, 0x7d, 0xae,
2530
-	0xf3, 0x2d, 0x1a, 0x15, 0x34, 0x6a, 0x37, 0xb7, 0xcc, 0xc4, 0x50, 0x13, 0x7f, 0x03, 0x7a, 0x25,
2531
-	0xb1, 0x6c, 0x9b, 0x94, 0xbd, 0x5d, 0x83, 0x15, 0xd1, 0xe4, 0xfd, 0x41, 0x39, 0x4b, 0x45, 0xce,
2532
-	0x7b, 0xf2, 0x20, 0xb7, 0x5c, 0xd5, 0x3e, 0xd8, 0x2c, 0x1a, 0x20, 0xed, 0x0c, 0x79, 0x78, 0x2b,
2533
-	0xb7, 0xfc, 0x10, 0x36, 0xb9, 0x31, 0x7d, 0x14, 0x05, 0x3c, 0xd0, 0xa9, 0x37, 0x57, 0x27, 0xf5,
2534
-	0xc2, 0xfc, 0x1e, 0xaf, 0x2e, 0xf4, 0x6d, 0xe8, 0xa8, 0xce, 0x5c, 0x2b, 0x54, 0xf6, 0xb5, 0x15,
2535
-	0x4e, 0xaa, 0xf0, 0x3e, 0x82, 0xd6, 0x90, 0x44, 0x99, 0xb2, 0xce, 0x85, 0x66, 0x98, 0x33, 0x86,
2536
-	0x93, 0xa2, 0x45, 0x29, 0x40, 0x51, 0x1e, 0x65, 0x57, 0xab, 0x9d, 0xa1, 0x00, 0x8f, 0x02, 0xa8,
2537
-	0x93, 0x55, 0x6a, 0xdb, 0x86, 0x35, 0x3b, 0x04, 0x14, 0x20, 0xe2, 0x6c, 0x1a, 0xcc, 0xcc, 0xd6,
2538
-	0xcb, 0x38, 0x9b, 0x06, 0x33, 0xb5, 0x40, 0x17, 0x9a, 0x2f, 0x03, 0x12, 0x87, 0xfa, 0xc1, 0xce,
2539
-	0xf1, 0x0b, 0xb0, 0x54, 0xe8, 0xd8, 0x0a, 0xff, 0x58, 0x87, 0xb6, 0xd2, 0xa8, 0x0c, 0xde, 0x86,
2540
-	0xb5, 0x30, 0x08, 0x27, 0x46, 0xa5, 0x04, 0xd0, 0xbb, 0x85, 0x21, 0xd5, 0x8b, 0x7a, 0x69, 0x6a,
2541
-	0x61, 0xdb, 0x43, 0x80, 0xec, 0x2a, 0x48, 0x2d, 0xef, 0x2c, 0xa5, 0x6e, 0x09, 0x22, 0x65, 0xf0,
2542
-	0x07, 0xd0, 0x51, 0xf1, 0xa9, 0x79, 0x9c, 0x55, 0x3c, 0x6d, 0x45, 0xa6, 0xb8, 0x1e, 0x89, 0x4b,
2543
-	0x51, 0xc0, 0x55, 0x13, 0xde, 0x3e, 0x78, 0xab, 0x42, 0x2e, 0x57, 0xb2, 0x2f, 0xbf, 0x1f, 0x27,
2544
-	0x9c, 0x5d, 0xfb, 0x8a, 0x76, 0xf0, 0x18, 0xa0, 0x44, 0x8a, 0x7a, 0x76, 0x81, 0xaf, 0x8b, 0xcb,
2545
-	0xdf, 0x05, 0xbe, 0x16, 0x6b, 0xbf, 0x0c, 0xe2, 0xbc, 0x70, 0xaa, 0x02, 0x7e, 0x50, 0x7f, 0x5c,
2546
-	0xf3, 0x42, 0xd8, 0x7c, 0x2a, 0x0e, 0x4c, 0x8b, 0xbd, 0x72, 0xe8, 0x39, 0x4b, 0x0f, 0x3d, 0xa7,
2547
-	0x78, 0x67, 0xee, 0x41, 0x9d, 0xa6, 0xba, 0x11, 0xae, 0xd3, 0xb4, 0x54, 0xe4, 0x58, 0x8a, 0xbc,
2548
-	0x7f, 0x38, 0x00, 0xa5, 0x16, 0x74, 0x02, 0x03, 0x42, 0x47, 0xa2, 0x8f, 0x23, 0x21, 0x56, 0x05,
2549
-	0x69, 0xc4, 0x70, 0x98, 0xb3, 0x8c, 0x5c, 0x62, 0xdd, 0xea, 0xef, 0x98, 0x63, 0xaa, 0x62, 0x9c,
2550
-	0x7f, 0x97, 0xd0, 0x13, 0xc5, 0x28, 0x2b, 0x97, 0x5f, 0xb0, 0xa1, 0x9f, 0xc0, 0x9d, 0x52, 0x68,
2551
-	0x64, 0xc9, 0xab, 0xdf, 0x28, 0xef, 0xb6, 0x91, 0x17, 0x95, 0xb2, 0x7e, 0x04, 0xb7, 0x09, 0x1d,
2552
-	0x7d, 0x99, 0xe3, 0xbc, 0x22, 0xa9, 0x71, 0xa3, 0xa4, 0x3e, 0xa1, 0x5f, 0x48, 0x8e, 0x52, 0xce,
2553
-	0x17, 0x70, 0xcf, 0x5a, 0xa8, 0x48, 0x7b, 0x4b, 0x9a, 0x73, 0xa3, 0xb4, 0x1d, 0x63, 0x97, 0x28,
2554
-	0x0c, 0xa5, 0xc8, 0x4f, 0x61, 0x87, 0xd0, 0xd1, 0x55, 0x40, 0xf8, 0xbc, 0xbc, 0xb5, 0x57, 0xad,
2555
-	0xf3, 0x45, 0x40, 0x78, 0x55, 0x98, 0x5a, 0xe7, 0x14, 0xb3, 0x71, 0x65, 0x9d, 0xeb, 0xaf, 0x5a,
2556
-	0xe7, 0xb1, 0xe4, 0x28, 0xe5, 0x3c, 0x85, 0x3e, 0xa1, 0xf3, 0xf6, 0x34, 0x6f, 0x94, 0xb2, 0x49,
2557
-	0x68, 0xd5, 0x96, 0x43, 0xe8, 0x67, 0x38, 0xe4, 0x94, 0xd9, 0xb1, 0xb0, 0x71, 0xa3, 0x8c, 0x2d,
2558
-	0xcd, 0x60, 0x84, 0x78, 0x5f, 0x42, 0xe7, 0xc7, 0xf9, 0x18, 0xf3, 0xf8, 0xdc, 0xe4, 0xfc, 0x7f,
2559
-	0xbb, 0xcc, 0xfc, 0xab, 0x0e, 0xed, 0xc3, 0x31, 0xa3, 0x79, 0x5a, 0xa9, 0xda, 0x2a, 0x87, 0x17,
2560
-	0xaa, 0xb6, 0xa4, 0x91, 0x55, 0x5b, 0x51, 0x7f, 0x08, 0x1d, 0x75, 0xaf, 0xd1, 0x0c, 0xaa, 0x0a,
2561
-	0xa1, 0xc5, 0xa4, 0x2f, 0xee, 0x51, 0x8a, 0xed, 0x40, 0xdf, 0x11, 0x35, 0x57, 0xb5, 0x1a, 0x95,
2562
-	0x6e, 0xf2, 0xe1, 0xbc, 0xcc, 0xba, 0x23, 0xe8, 0x4e, 0x94, 0x6f, 0x34, 0x97, 0x0a, 0xc0, 0x77,
2563
-	0x0a, 0xe3, 0xca, 0x35, 0xec, 0xdb, 0x3e, 0x54, 0xae, 0xee, 0x4c, 0x6c, 0xb7, 0xbe, 0x0f, 0x20,
2564
-	0x9a, 0xe6, 0x51, 0x51, 0xa8, 0xec, 0x5f, 0x04, 0xe6, 0x84, 0x50, 0x8d, 0xb5, 0x1c, 0x0e, 0x4e,
2565
-	0xa1, 0xbf, 0x20, 0x73, 0x49, 0x99, 0xfa, 0x96, 0x5d, 0xa6, 0xca, 0x8b, 0x93, 0xcd, 0x6a, 0xd7,
2566
-	0xae, 0xbf, 0xd6, 0xd4, 0xa3, 0x41, 0xf9, 0x8a, 0xfb, 0x18, 0xba, 0x89, 0x6a, 0xbe, 0xcc, 0x06,
2567
-	0xd8, 0x37, 0x30, 0xbb, 0x31, 0xf3, 0x3b, 0x89, 0xdd, 0xa6, 0x7d, 0x08, 0x9d, 0x50, 0x7a, 0x60,
2568
-	0xe9, 0x46, 0x58, 0xce, 0xf1, 0xdb, 0xa1, 0xb5, 0xdb, 0x95, 0x46, 0xd1, 0xf9, 0x3a, 0x8d, 0xa2,
2569
-	0x7e, 0xf7, 0x5b, 0xf5, 0x4b, 0xe3, 0xe0, 0x9f, 0xeb, 0xd0, 0x78, 0x32, 0x3c, 0x42, 0x67, 0xb0,
2570
-	0x35, 0xff, 0x47, 0x10, 0xdd, 0xd7, 0x66, 0xad, 0xf8, 0x8b, 0x38, 0x78, 0xb0, 0x72, 0x5e, 0xb7,
2571
-	0xec, 0xb7, 0x90, 0x0f, 0x9b, 0x73, 0xff, 0x7f, 0x50, 0x71, 0xd4, 0x2c, 0xff, 0xc7, 0x36, 0xb8,
2572
-	0xbf, 0x6a, 0xda, 0x96, 0x39, 0x77, 0x47, 0x30, 0x32, 0x97, 0xbf, 0xb6, 0x18, 0x99, 0xab, 0xae,
2573
-	0x16, 0xb7, 0xd0, 0xf7, 0x61, 0x5d, 0xfd, 0x11, 0x42, 0xc5, 0xc5, 0xa5, 0xf2, 0xaf, 0x69, 0x70,
2574
-	0x67, 0x0e, 0x6b, 0x18, 0x9f, 0x43, 0xb7, 0xf2, 0x1b, 0x11, 0xbd, 0x51, 0xd1, 0x55, 0xfd, 0xa1,
2575
-	0x34, 0x78, 0x73, 0xf9, 0xa4, 0x91, 0x76, 0x08, 0x50, 0xfe, 0x34, 0x40, 0xae, 0xa6, 0x5e, 0xf8,
2576
-	0x31, 0x35, 0xb8, 0xb7, 0x64, 0xc6, 0x08, 0x39, 0x83, 0xad, 0xf9, 0x07, 0x7c, 0x34, 0xe7, 0xd5,
2577
-	0xf9, 0xe7, 0x73, 0xb3, 0x95, 0x2b, 0x5f, 0xfe, 0xa5, 0xd8, 0xf9, 0x67, 0x79, 0x23, 0x76, 0xc5,
2578
-	0x4f, 0x01, 0x23, 0x76, 0xe5, 0x7b, 0xfe, 0x2d, 0xf4, 0x39, 0xf4, 0xaa, 0xef, 0xdc, 0xa8, 0x70,
2579
-	0xd2, 0xd2, 0x87, 0xfe, 0xc1, 0x5b, 0x2b, 0x66, 0x8d, 0xc0, 0x0f, 0x60, 0x4d, 0x3d, 0x60, 0x17,
2580
-	0xe9, 0x68, 0xbf, 0x7b, 0x0f, 0xb6, 0xab, 0x48, 0xc3, 0xf5, 0x10, 0xd6, 0xd5, 0xed, 0xd2, 0x04,
2581
-	0x40, 0xe5, 0xb2, 0x39, 0xe8, 0xd8, 0x58, 0xef, 0xd6, 0xc3, 0x5a, 0xa1, 0x27, 0xab, 0xe8, 0xc9,
2582
-	0x96, 0xe9, 0xb1, 0x36, 0xe7, 0x7c, 0x5d, 0xa6, 0xeb, 0xa3, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff,
2583
-	0x4c, 0xa9, 0xa8, 0x4d, 0xd0, 0x1f, 0x00, 0x00,
2584
-}
2585 1
deleted file mode 100644
... ...
@@ -1,344 +0,0 @@
1
-syntax = "proto3";
2
-
3
-package types;
4
-
5
-import "google/protobuf/timestamp.proto";
6
-
7
-service API {
8
-	rpc GetServerVersion(GetServerVersionRequest) returns (GetServerVersionResponse) {}
9
-	rpc CreateContainer(CreateContainerRequest) returns (CreateContainerResponse) {}
10
-	rpc UpdateContainer(UpdateContainerRequest) returns (UpdateContainerResponse) {}
11
-	rpc Signal(SignalRequest) returns (SignalResponse) {}
12
-	rpc UpdateProcess(UpdateProcessRequest) returns (UpdateProcessResponse) {}
13
-	rpc AddProcess(AddProcessRequest) returns (AddProcessResponse) {}
14
-	rpc CreateCheckpoint(CreateCheckpointRequest) returns (CreateCheckpointResponse) {}
15
-	rpc DeleteCheckpoint(DeleteCheckpointRequest) returns (DeleteCheckpointResponse) {}
16
-	rpc ListCheckpoint(ListCheckpointRequest) returns (ListCheckpointResponse) {}
17
-	rpc State(StateRequest) returns (StateResponse) {}
18
-	rpc Events(EventsRequest) returns (stream Event) {}
19
-	rpc Stats(StatsRequest) returns (StatsResponse) {}
20
-}
21
-
22
-message GetServerVersionRequest {
23
-}
24
-
25
-message GetServerVersionResponse {
26
-	uint32 major = 1;
27
-	uint32 minor = 2;
28
-	uint32 patch = 3;
29
-	string revision = 4;
30
-}
31
-
32
-message UpdateProcessRequest {
33
-	string id = 1;
34
-	string pid = 2;
35
-	bool closeStdin = 3; // Close stdin of the container
36
-	uint32 width = 4;
37
-	uint32 height = 5;
38
-}
39
-
40
-message UpdateProcessResponse {
41
-}
42
-
43
-message CreateContainerRequest {
44
-	string id = 1; // ID of container
45
-	string bundlePath = 2; // path to OCI bundle
46
-	string checkpoint = 3; // checkpoint name if you want to create immediate checkpoint (optional)
47
-	string stdin = 4; // path to the file where stdin will be read (optional)
48
-	string stdout = 5; // path to file where stdout will be written (optional)
49
-	string stderr = 6; // path to file where stderr will be written (optional)
50
-	repeated string labels = 7;
51
-	bool noPivotRoot = 8;
52
-	string runtime = 9;
53
-	repeated string runtimeArgs = 10;
54
-	string checkpointDir = 11; // Directory where checkpoints are stored
55
-}
56
-
57
-message CreateContainerResponse {
58
-	Container container = 1;
59
-}
60
-
61
-message SignalRequest {
62
-	string id = 1; // ID of container
63
-	string pid = 2; // PID of process inside container
64
-	uint32 signal = 3; // Signal which will be sent, you can find value in "man 7 signal"
65
-}
66
-
67
-message SignalResponse {
68
-}
69
-
70
-message AddProcessRequest {
71
-	string id = 1; // ID of container
72
-	bool terminal = 2; // Use tty for container stdio
73
-	User user = 3; // User under which process will be run
74
-	repeated string args = 4; // Arguments for process, first is binary path itself
75
-	repeated string env = 5; // List of environment variables for process
76
-	string cwd = 6; // Working directory of process
77
-	string pid = 7; // Process ID
78
-	string stdin = 8; // path to the file where stdin will be read (optional)
79
-	string stdout = 9; // path to file where stdout will be written (optional)
80
-	string stderr = 10; // path to file where stderr will be written (optional)
81
-	repeated string capabilities = 11;
82
-	string apparmorProfile = 12;
83
-	string selinuxLabel = 13;
84
-	bool noNewPrivileges = 14;
85
-	repeated Rlimit rlimits = 15;
86
-}
87
-
88
-message Rlimit {
89
-	string type = 1;
90
-	uint64 soft = 2;
91
-	uint64 hard = 3;
92
-}
93
-
94
-message User {
95
-	uint32 uid = 1; // UID of user
96
-	uint32 gid = 2; // GID of user
97
-	repeated uint32 additionalGids = 3; // Additional groups to which user will be added
98
-}
99
-
100
-message AddProcessResponse {
101
-	uint32 systemPid = 1;
102
-}
103
-
104
-message CreateCheckpointRequest {
105
-	string id = 1; // ID of container
106
-	Checkpoint checkpoint = 2; // Checkpoint configuration
107
-	string checkpointDir = 3; // Directory where checkpoints are stored
108
-}
109
-
110
-message CreateCheckpointResponse {
111
-}
112
-
113
-message DeleteCheckpointRequest {
114
-	string id = 1; // ID of container
115
-	string name = 2; // Name of checkpoint
116
-	string checkpointDir = 3; // Directory where checkpoints are stored
117
-}
118
-
119
-message DeleteCheckpointResponse {
120
-}
121
-
122
-message ListCheckpointRequest {
123
-	string id = 1; // ID of container
124
-	string checkpointDir = 2; // Directory where checkpoints are stored
125
-}
126
-
127
-message Checkpoint {
128
-	string name = 1; // Name of checkpoint
129
-	bool exit = 2; // checkpoint configuration: should container exit on checkpoint or not
130
-	bool tcp = 3; // allow open tcp connections
131
-	bool unixSockets = 4; // allow external unix sockets
132
-	bool shell = 5; // allow shell-jobs
133
-	repeated string emptyNS = 6;
134
-}
135
-
136
-message ListCheckpointResponse {
137
-	repeated Checkpoint checkpoints = 1; // List of checkpoints
138
-}
139
-
140
-message StateRequest {
141
-	string id = 1; // container id for a single container
142
-}
143
-
144
-message ContainerState {
145
-	string status = 1;
146
-}
147
-
148
-message Process {
149
-	string pid = 1;
150
-	bool terminal = 2; // Use tty for container stdio
151
-	User user = 3; // User under which process will be run
152
-	repeated string args = 4; // Arguments for process, first is binary path itself
153
-	repeated string env = 5; // List of environment variables for process
154
-	string cwd = 6; // Working directory of process
155
-	uint32 systemPid = 7;
156
-	string stdin = 8; // path to the file where stdin will be read (optional)
157
-	string stdout = 9; // path to file where stdout will be written (optional)
158
-	string stderr = 10; // path to file where stderr will be written (optional)
159
-	repeated string capabilities = 11;
160
-	string apparmorProfile = 12;
161
-	string selinuxLabel = 13;
162
-	bool noNewPrivileges = 14;
163
-	repeated Rlimit rlimits = 15;
164
-}
165
-
166
-message Container {
167
-	string id = 1; // ID of container
168
-	string bundlePath = 2; // Path to OCI bundle
169
-	repeated Process processes = 3; // List of processes which run in container
170
-	string status = 4; // Container status ("running", "paused", etc.)
171
-	repeated string labels = 5;
172
-	repeated uint32 pids = 6;
173
-	string runtime = 7; // runtime used to execute the container
174
-}
175
-
176
-// Machine is information about machine on which containerd is run
177
-message Machine {
178
-	uint32 cpus = 1; // number of cpus
179
-	uint64 memory = 2; // amount of memory
180
-}
181
-
182
-// StateResponse is information about containerd daemon
183
-message StateResponse {
184
-	repeated Container containers = 1;
185
-	Machine machine = 2;
186
-}
187
-
188
-message UpdateContainerRequest {
189
-	string id = 1; // ID of container
190
-	string pid = 2;
191
-	string status = 3; // Status to which containerd will try to change
192
-	UpdateResource resources =4;
193
-}
194
-
195
-message UpdateResource {
196
-	uint64 blkioWeight = 1;
197
-	uint64 cpuShares = 2;
198
-	uint64 cpuPeriod = 3;
199
-	uint64 cpuQuota = 4;
200
-	string cpusetCpus = 5;
201
-	string cpusetMems = 6;
202
-	uint64 memoryLimit = 7;
203
-	uint64 memorySwap = 8;
204
-	uint64 memoryReservation = 9;
205
-	uint64 kernelMemoryLimit = 10;
206
-	uint64 kernelTCPMemoryLimit = 11;
207
-	uint64 blkioLeafWeight = 12;
208
-	repeated WeightDevice blkioWeightDevice = 13;
209
-	repeated ThrottleDevice blkioThrottleReadBpsDevice = 14;
210
-	repeated ThrottleDevice blkioThrottleWriteBpsDevice = 15;
211
-	repeated ThrottleDevice blkioThrottleReadIopsDevice = 16;
212
-	repeated ThrottleDevice blkioThrottleWriteIopsDevice = 17;
213
-	uint64 pidsLimit = 18;
214
-}
215
-
216
-message BlockIODevice {
217
-	int64 major = 1;
218
-	int64 minor = 2;
219
-}
220
-
221
-message WeightDevice {
222
-	BlockIODevice blkIODevice = 1;
223
-	uint32 weight = 2;
224
-	uint32 leafWeight = 3;
225
-}
226
-
227
-message ThrottleDevice {
228
-	BlockIODevice blkIODevice = 1;
229
-	uint64 rate = 2;
230
-}
231
-
232
-message UpdateContainerResponse {
233
-}
234
-
235
-message EventsRequest {
236
-	// Tag 1 is deprecated (old uint64 timestamp)
237
-	google.protobuf.Timestamp timestamp = 2;
238
-	bool storedOnly = 3;
239
-	string id = 4;
240
-}
241
-
242
-message Event {
243
-	string type = 1;
244
-	string id = 2;
245
-	uint32 status = 3;
246
-	string pid = 4;
247
-	// Tag 5 is deprecated (old uint64 timestamp)
248
-	google.protobuf.Timestamp timestamp = 6;
249
-}
250
-
251
-message NetworkStats {
252
-	string name = 1; // name of network interface
253
-	uint64 rx_bytes  = 2;
254
-	uint64 rx_Packets = 3;
255
-	uint64 Rx_errors  = 4;
256
-	uint64 Rx_dropped = 5;
257
-	uint64 Tx_bytes   = 6;
258
-	uint64 Tx_packets = 7;
259
-	uint64 Tx_errors  = 8;
260
-	uint64 Tx_dropped = 9;
261
-}
262
-
263
-message CpuUsage {
264
-	uint64 total_usage = 1;
265
-	repeated uint64 percpu_usage = 2;
266
-	uint64 usage_in_kernelmode = 3;
267
-	uint64 usage_in_usermode = 4;
268
-}
269
-
270
-message ThrottlingData {
271
-	uint64 periods = 1;
272
-	uint64 throttled_periods = 2;
273
-	uint64 throttled_time = 3;
274
-}
275
-
276
-message CpuStats {
277
-	CpuUsage cpu_usage = 1;
278
-	ThrottlingData throttling_data = 2;
279
-	uint64 system_usage = 3;
280
-}
281
-
282
-message PidsStats {
283
-	uint64 current = 1;
284
-	uint64 limit = 2;
285
-}
286
-
287
-message MemoryData {
288
-	uint64 usage = 1;
289
-	uint64 max_usage = 2;
290
-	uint64 failcnt = 3;
291
-	uint64 limit = 4;
292
-}
293
-
294
-message MemoryStats {
295
-	uint64 cache = 1;
296
-	MemoryData usage = 2;
297
-	MemoryData swap_usage = 3;
298
-	MemoryData kernel_usage = 4;
299
-	map<string, uint64> stats = 5;
300
-}
301
-
302
-message BlkioStatsEntry {
303
-	uint64 major = 1;
304
-	uint64 minor = 2;
305
-	string op = 3;
306
-	uint64 value = 4;
307
-}
308
-
309
-message BlkioStats {
310
-	repeated BlkioStatsEntry io_service_bytes_recursive = 1; // number of bytes transferred to and from the block device
311
-	repeated BlkioStatsEntry io_serviced_recursive = 2;
312
-	repeated BlkioStatsEntry io_queued_recursive = 3;
313
-	repeated BlkioStatsEntry io_service_time_recursive = 4;
314
-	repeated BlkioStatsEntry io_wait_time_recursive = 5;
315
-	repeated BlkioStatsEntry io_merged_recursive = 6;
316
-	repeated BlkioStatsEntry io_time_recursive = 7;
317
-	repeated BlkioStatsEntry sectors_recursive = 8;
318
-}
319
-
320
-message HugetlbStats {
321
-	uint64 usage = 1;
322
-	uint64 max_usage = 2;
323
-	uint64 failcnt = 3;
324
-	uint64 limit = 4;
325
-}
326
-
327
-message CgroupStats {
328
-	CpuStats cpu_stats = 1;
329
-	MemoryStats memory_stats  = 2;
330
-	BlkioStats blkio_stats = 3;
331
-	map<string, HugetlbStats> hugetlb_stats = 4; // the map is in the format "size of hugepage: stats of the hugepage"
332
-	PidsStats pids_stats = 5;
333
-}
334
-
335
-message StatsResponse {
336
-	repeated NetworkStats network_stats = 1;
337
-	CgroupStats cgroup_stats = 2;
338
-	// Tag 3 is deprecated (old uint64 timestamp)
339
-	google.protobuf.Timestamp timestamp = 4;
340
-};
341
-
342
-message StatsRequest {
343
-	string id = 1;
344
-}
... ...
@@ -64,12 +64,12 @@ func IsNamespaceSupported(ns NamespaceType) bool {
64 64
 
65 65
 func NamespaceTypes() []NamespaceType {
66 66
 	return []NamespaceType{
67
+		NEWUSER, // Keep user NS always first, don't move it.
68
+		NEWIPC,
69
+		NEWUTS,
67 70
 		NEWNET,
68 71
 		NEWPID,
69 72
 		NEWNS,
70
-		NEWUTS,
71
-		NEWIPC,
72
-		NEWUSER,
73 73
 	}
74 74
 }
75 75
 
76 76
deleted file mode 100644
... ...
@@ -1,27 +0,0 @@
1
-Copyright (c) 2013, Patrick Mezard
2
-All rights reserved.
3
-
4
-Redistribution and use in source and binary forms, with or without
5
-modification, are permitted provided that the following conditions are
6
-met:
7
-
8
-    Redistributions of source code must retain the above copyright
9
-notice, this list of conditions and the following disclaimer.
10
-    Redistributions in binary form must reproduce the above copyright
11
-notice, this list of conditions and the following disclaimer in the
12
-documentation and/or other materials provided with the distribution.
13
-    The names of its contributors may not be used to endorse or promote
14
-products derived from this software without specific prior written
15
-permission.
16
-
17
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
18
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
19
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
20
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21
-HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
23
-TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
24
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
25
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 1
deleted file mode 100644
... ...
@@ -1,772 +0,0 @@
1
-// Package difflib is a partial port of Python difflib module.
2
-//
3
-// It provides tools to compare sequences of strings and generate textual diffs.
4
-//
5
-// The following class and functions have been ported:
6
-//
7
-// - SequenceMatcher
8
-//
9
-// - unified_diff
10
-//
11
-// - context_diff
12
-//
13
-// Getting unified diffs was the main goal of the port. Keep in mind this code
14
-// is mostly suitable to output text differences in a human friendly way, there
15
-// are no guarantees generated diffs are consumable by patch(1).
16
-package difflib
17
-
18
-import (
19
-	"bufio"
20
-	"bytes"
21
-	"fmt"
22
-	"io"
23
-	"strings"
24
-)
25
-
26
-func min(a, b int) int {
27
-	if a < b {
28
-		return a
29
-	}
30
-	return b
31
-}
32
-
33
-func max(a, b int) int {
34
-	if a > b {
35
-		return a
36
-	}
37
-	return b
38
-}
39
-
40
-func calculateRatio(matches, length int) float64 {
41
-	if length > 0 {
42
-		return 2.0 * float64(matches) / float64(length)
43
-	}
44
-	return 1.0
45
-}
46
-
47
-type Match struct {
48
-	A    int
49
-	B    int
50
-	Size int
51
-}
52
-
53
-type OpCode struct {
54
-	Tag byte
55
-	I1  int
56
-	I2  int
57
-	J1  int
58
-	J2  int
59
-}
60
-
61
-// SequenceMatcher compares sequence of strings. The basic
62
-// algorithm predates, and is a little fancier than, an algorithm
63
-// published in the late 1980's by Ratcliff and Obershelp under the
64
-// hyperbolic name "gestalt pattern matching".  The basic idea is to find
65
-// the longest contiguous matching subsequence that contains no "junk"
66
-// elements (R-O doesn't address junk).  The same idea is then applied
67
-// recursively to the pieces of the sequences to the left and to the right
68
-// of the matching subsequence.  This does not yield minimal edit
69
-// sequences, but does tend to yield matches that "look right" to people.
70
-//
71
-// SequenceMatcher tries to compute a "human-friendly diff" between two
72
-// sequences.  Unlike e.g. UNIX(tm) diff, the fundamental notion is the
73
-// longest *contiguous* & junk-free matching subsequence.  That's what
74
-// catches peoples' eyes.  The Windows(tm) windiff has another interesting
75
-// notion, pairing up elements that appear uniquely in each sequence.
76
-// That, and the method here, appear to yield more intuitive difference
77
-// reports than does diff.  This method appears to be the least vulnerable
78
-// to synching up on blocks of "junk lines", though (like blank lines in
79
-// ordinary text files, or maybe "<P>" lines in HTML files).  That may be
80
-// because this is the only method of the 3 that has a *concept* of
81
-// "junk" <wink>.
82
-//
83
-// Timing:  Basic R-O is cubic time worst case and quadratic time expected
84
-// case.  SequenceMatcher is quadratic time for the worst case and has
85
-// expected-case behavior dependent in a complicated way on how many
86
-// elements the sequences have in common; best case time is linear.
87
-type SequenceMatcher struct {
88
-	a              []string
89
-	b              []string
90
-	b2j            map[string][]int
91
-	IsJunk         func(string) bool
92
-	autoJunk       bool
93
-	bJunk          map[string]struct{}
94
-	matchingBlocks []Match
95
-	fullBCount     map[string]int
96
-	bPopular       map[string]struct{}
97
-	opCodes        []OpCode
98
-}
99
-
100
-func NewMatcher(a, b []string) *SequenceMatcher {
101
-	m := SequenceMatcher{autoJunk: true}
102
-	m.SetSeqs(a, b)
103
-	return &m
104
-}
105
-
106
-func NewMatcherWithJunk(a, b []string, autoJunk bool,
107
-	isJunk func(string) bool) *SequenceMatcher {
108
-
109
-	m := SequenceMatcher{IsJunk: isJunk, autoJunk: autoJunk}
110
-	m.SetSeqs(a, b)
111
-	return &m
112
-}
113
-
114
-// Set two sequences to be compared.
115
-func (m *SequenceMatcher) SetSeqs(a, b []string) {
116
-	m.SetSeq1(a)
117
-	m.SetSeq2(b)
118
-}
119
-
120
-// Set the first sequence to be compared. The second sequence to be compared is
121
-// not changed.
122
-//
123
-// SequenceMatcher computes and caches detailed information about the second
124
-// sequence, so if you want to compare one sequence S against many sequences,
125
-// use .SetSeq2(s) once and call .SetSeq1(x) repeatedly for each of the other
126
-// sequences.
127
-//
128
-// See also SetSeqs() and SetSeq2().
129
-func (m *SequenceMatcher) SetSeq1(a []string) {
130
-	if &a == &m.a {
131
-		return
132
-	}
133
-	m.a = a
134
-	m.matchingBlocks = nil
135
-	m.opCodes = nil
136
-}
137
-
138
-// Set the second sequence to be compared. The first sequence to be compared is
139
-// not changed.
140
-func (m *SequenceMatcher) SetSeq2(b []string) {
141
-	if &b == &m.b {
142
-		return
143
-	}
144
-	m.b = b
145
-	m.matchingBlocks = nil
146
-	m.opCodes = nil
147
-	m.fullBCount = nil
148
-	m.chainB()
149
-}
150
-
151
-func (m *SequenceMatcher) chainB() {
152
-	// Populate line -> index mapping
153
-	b2j := map[string][]int{}
154
-	for i, s := range m.b {
155
-		indices := b2j[s]
156
-		indices = append(indices, i)
157
-		b2j[s] = indices
158
-	}
159
-
160
-	// Purge junk elements
161
-	m.bJunk = map[string]struct{}{}
162
-	if m.IsJunk != nil {
163
-		junk := m.bJunk
164
-		for s, _ := range b2j {
165
-			if m.IsJunk(s) {
166
-				junk[s] = struct{}{}
167
-			}
168
-		}
169
-		for s, _ := range junk {
170
-			delete(b2j, s)
171
-		}
172
-	}
173
-
174
-	// Purge remaining popular elements
175
-	popular := map[string]struct{}{}
176
-	n := len(m.b)
177
-	if m.autoJunk && n >= 200 {
178
-		ntest := n/100 + 1
179
-		for s, indices := range b2j {
180
-			if len(indices) > ntest {
181
-				popular[s] = struct{}{}
182
-			}
183
-		}
184
-		for s, _ := range popular {
185
-			delete(b2j, s)
186
-		}
187
-	}
188
-	m.bPopular = popular
189
-	m.b2j = b2j
190
-}
191
-
192
-func (m *SequenceMatcher) isBJunk(s string) bool {
193
-	_, ok := m.bJunk[s]
194
-	return ok
195
-}
196
-
197
-// Find longest matching block in a[alo:ahi] and b[blo:bhi].
198
-//
199
-// If IsJunk is not defined:
200
-//
201
-// Return (i,j,k) such that a[i:i+k] is equal to b[j:j+k], where
202
-//     alo <= i <= i+k <= ahi
203
-//     blo <= j <= j+k <= bhi
204
-// and for all (i',j',k') meeting those conditions,
205
-//     k >= k'
206
-//     i <= i'
207
-//     and if i == i', j <= j'
208
-//
209
-// In other words, of all maximal matching blocks, return one that
210
-// starts earliest in a, and of all those maximal matching blocks that
211
-// start earliest in a, return the one that starts earliest in b.
212
-//
213
-// If IsJunk is defined, first the longest matching block is
214
-// determined as above, but with the additional restriction that no
215
-// junk element appears in the block.  Then that block is extended as
216
-// far as possible by matching (only) junk elements on both sides.  So
217
-// the resulting block never matches on junk except as identical junk
218
-// happens to be adjacent to an "interesting" match.
219
-//
220
-// If no blocks match, return (alo, blo, 0).
221
-func (m *SequenceMatcher) findLongestMatch(alo, ahi, blo, bhi int) Match {
222
-	// CAUTION:  stripping common prefix or suffix would be incorrect.
223
-	// E.g.,
224
-	//    ab
225
-	//    acab
226
-	// Longest matching block is "ab", but if common prefix is
227
-	// stripped, it's "a" (tied with "b").  UNIX(tm) diff does so
228
-	// strip, so ends up claiming that ab is changed to acab by
229
-	// inserting "ca" in the middle.  That's minimal but unintuitive:
230
-	// "it's obvious" that someone inserted "ac" at the front.
231
-	// Windiff ends up at the same place as diff, but by pairing up
232
-	// the unique 'b's and then matching the first two 'a's.
233
-	besti, bestj, bestsize := alo, blo, 0
234
-
235
-	// find longest junk-free match
236
-	// during an iteration of the loop, j2len[j] = length of longest
237
-	// junk-free match ending with a[i-1] and b[j]
238
-	j2len := map[int]int{}
239
-	for i := alo; i != ahi; i++ {
240
-		// look at all instances of a[i] in b; note that because
241
-		// b2j has no junk keys, the loop is skipped if a[i] is junk
242
-		newj2len := map[int]int{}
243
-		for _, j := range m.b2j[m.a[i]] {
244
-			// a[i] matches b[j]
245
-			if j < blo {
246
-				continue
247
-			}
248
-			if j >= bhi {
249
-				break
250
-			}
251
-			k := j2len[j-1] + 1
252
-			newj2len[j] = k
253
-			if k > bestsize {
254
-				besti, bestj, bestsize = i-k+1, j-k+1, k
255
-			}
256
-		}
257
-		j2len = newj2len
258
-	}
259
-
260
-	// Extend the best by non-junk elements on each end.  In particular,
261
-	// "popular" non-junk elements aren't in b2j, which greatly speeds
262
-	// the inner loop above, but also means "the best" match so far
263
-	// doesn't contain any junk *or* popular non-junk elements.
264
-	for besti > alo && bestj > blo && !m.isBJunk(m.b[bestj-1]) &&
265
-		m.a[besti-1] == m.b[bestj-1] {
266
-		besti, bestj, bestsize = besti-1, bestj-1, bestsize+1
267
-	}
268
-	for besti+bestsize < ahi && bestj+bestsize < bhi &&
269
-		!m.isBJunk(m.b[bestj+bestsize]) &&
270
-		m.a[besti+bestsize] == m.b[bestj+bestsize] {
271
-		bestsize += 1
272
-	}
273
-
274
-	// Now that we have a wholly interesting match (albeit possibly
275
-	// empty!), we may as well suck up the matching junk on each
276
-	// side of it too.  Can't think of a good reason not to, and it
277
-	// saves post-processing the (possibly considerable) expense of
278
-	// figuring out what to do with it.  In the case of an empty
279
-	// interesting match, this is clearly the right thing to do,
280
-	// because no other kind of match is possible in the regions.
281
-	for besti > alo && bestj > blo && m.isBJunk(m.b[bestj-1]) &&
282
-		m.a[besti-1] == m.b[bestj-1] {
283
-		besti, bestj, bestsize = besti-1, bestj-1, bestsize+1
284
-	}
285
-	for besti+bestsize < ahi && bestj+bestsize < bhi &&
286
-		m.isBJunk(m.b[bestj+bestsize]) &&
287
-		m.a[besti+bestsize] == m.b[bestj+bestsize] {
288
-		bestsize += 1
289
-	}
290
-
291
-	return Match{A: besti, B: bestj, Size: bestsize}
292
-}
293
-
294
-// Return list of triples describing matching subsequences.
295
-//
296
-// Each triple is of the form (i, j, n), and means that
297
-// a[i:i+n] == b[j:j+n].  The triples are monotonically increasing in
298
-// i and in j. It's also guaranteed that if (i, j, n) and (i', j', n') are
299
-// adjacent triples in the list, and the second is not the last triple in the
300
-// list, then i+n != i' or j+n != j'. IOW, adjacent triples never describe
301
-// adjacent equal blocks.
302
-//
303
-// The last triple is a dummy, (len(a), len(b), 0), and is the only
304
-// triple with n==0.
305
-func (m *SequenceMatcher) GetMatchingBlocks() []Match {
306
-	if m.matchingBlocks != nil {
307
-		return m.matchingBlocks
308
-	}
309
-
310
-	var matchBlocks func(alo, ahi, blo, bhi int, matched []Match) []Match
311
-	matchBlocks = func(alo, ahi, blo, bhi int, matched []Match) []Match {
312
-		match := m.findLongestMatch(alo, ahi, blo, bhi)
313
-		i, j, k := match.A, match.B, match.Size
314
-		if match.Size > 0 {
315
-			if alo < i && blo < j {
316
-				matched = matchBlocks(alo, i, blo, j, matched)
317
-			}
318
-			matched = append(matched, match)
319
-			if i+k < ahi && j+k < bhi {
320
-				matched = matchBlocks(i+k, ahi, j+k, bhi, matched)
321
-			}
322
-		}
323
-		return matched
324
-	}
325
-	matched := matchBlocks(0, len(m.a), 0, len(m.b), nil)
326
-
327
-	// It's possible that we have adjacent equal blocks in the
328
-	// matching_blocks list now.
329
-	nonAdjacent := []Match{}
330
-	i1, j1, k1 := 0, 0, 0
331
-	for _, b := range matched {
332
-		// Is this block adjacent to i1, j1, k1?
333
-		i2, j2, k2 := b.A, b.B, b.Size
334
-		if i1+k1 == i2 && j1+k1 == j2 {
335
-			// Yes, so collapse them -- this just increases the length of
336
-			// the first block by the length of the second, and the first
337
-			// block so lengthened remains the block to compare against.
338
-			k1 += k2
339
-		} else {
340
-			// Not adjacent.  Remember the first block (k1==0 means it's
341
-			// the dummy we started with), and make the second block the
342
-			// new block to compare against.
343
-			if k1 > 0 {
344
-				nonAdjacent = append(nonAdjacent, Match{i1, j1, k1})
345
-			}
346
-			i1, j1, k1 = i2, j2, k2
347
-		}
348
-	}
349
-	if k1 > 0 {
350
-		nonAdjacent = append(nonAdjacent, Match{i1, j1, k1})
351
-	}
352
-
353
-	nonAdjacent = append(nonAdjacent, Match{len(m.a), len(m.b), 0})
354
-	m.matchingBlocks = nonAdjacent
355
-	return m.matchingBlocks
356
-}
357
-
358
-// Return list of 5-tuples describing how to turn a into b.
359
-//
360
-// Each tuple is of the form (tag, i1, i2, j1, j2).  The first tuple
361
-// has i1 == j1 == 0, and remaining tuples have i1 == the i2 from the
362
-// tuple preceding it, and likewise for j1 == the previous j2.
363
-//
364
-// The tags are characters, with these meanings:
365
-//
366
-// 'r' (replace):  a[i1:i2] should be replaced by b[j1:j2]
367
-//
368
-// 'd' (delete):   a[i1:i2] should be deleted, j1==j2 in this case.
369
-//
370
-// 'i' (insert):   b[j1:j2] should be inserted at a[i1:i1], i1==i2 in this case.
371
-//
372
-// 'e' (equal):    a[i1:i2] == b[j1:j2]
373
-func (m *SequenceMatcher) GetOpCodes() []OpCode {
374
-	if m.opCodes != nil {
375
-		return m.opCodes
376
-	}
377
-	i, j := 0, 0
378
-	matching := m.GetMatchingBlocks()
379
-	opCodes := make([]OpCode, 0, len(matching))
380
-	for _, m := range matching {
381
-		//  invariant:  we've pumped out correct diffs to change
382
-		//  a[:i] into b[:j], and the next matching block is
383
-		//  a[ai:ai+size] == b[bj:bj+size]. So we need to pump
384
-		//  out a diff to change a[i:ai] into b[j:bj], pump out
385
-		//  the matching block, and move (i,j) beyond the match
386
-		ai, bj, size := m.A, m.B, m.Size
387
-		tag := byte(0)
388
-		if i < ai && j < bj {
389
-			tag = 'r'
390
-		} else if i < ai {
391
-			tag = 'd'
392
-		} else if j < bj {
393
-			tag = 'i'
394
-		}
395
-		if tag > 0 {
396
-			opCodes = append(opCodes, OpCode{tag, i, ai, j, bj})
397
-		}
398
-		i, j = ai+size, bj+size
399
-		// the list of matching blocks is terminated by a
400
-		// sentinel with size 0
401
-		if size > 0 {
402
-			opCodes = append(opCodes, OpCode{'e', ai, i, bj, j})
403
-		}
404
-	}
405
-	m.opCodes = opCodes
406
-	return m.opCodes
407
-}
408
-
409
-// Isolate change clusters by eliminating ranges with no changes.
410
-//
411
-// Return a generator of groups with up to n lines of context.
412
-// Each group is in the same format as returned by GetOpCodes().
413
-func (m *SequenceMatcher) GetGroupedOpCodes(n int) [][]OpCode {
414
-	if n < 0 {
415
-		n = 3
416
-	}
417
-	codes := m.GetOpCodes()
418
-	if len(codes) == 0 {
419
-		codes = []OpCode{OpCode{'e', 0, 1, 0, 1}}
420
-	}
421
-	// Fixup leading and trailing groups if they show no changes.
422
-	if codes[0].Tag == 'e' {
423
-		c := codes[0]
424
-		i1, i2, j1, j2 := c.I1, c.I2, c.J1, c.J2
425
-		codes[0] = OpCode{c.Tag, max(i1, i2-n), i2, max(j1, j2-n), j2}
426
-	}
427
-	if codes[len(codes)-1].Tag == 'e' {
428
-		c := codes[len(codes)-1]
429
-		i1, i2, j1, j2 := c.I1, c.I2, c.J1, c.J2
430
-		codes[len(codes)-1] = OpCode{c.Tag, i1, min(i2, i1+n), j1, min(j2, j1+n)}
431
-	}
432
-	nn := n + n
433
-	groups := [][]OpCode{}
434
-	group := []OpCode{}
435
-	for _, c := range codes {
436
-		i1, i2, j1, j2 := c.I1, c.I2, c.J1, c.J2
437
-		// End the current group and start a new one whenever
438
-		// there is a large range with no changes.
439
-		if c.Tag == 'e' && i2-i1 > nn {
440
-			group = append(group, OpCode{c.Tag, i1, min(i2, i1+n),
441
-				j1, min(j2, j1+n)})
442
-			groups = append(groups, group)
443
-			group = []OpCode{}
444
-			i1, j1 = max(i1, i2-n), max(j1, j2-n)
445
-		}
446
-		group = append(group, OpCode{c.Tag, i1, i2, j1, j2})
447
-	}
448
-	if len(group) > 0 && !(len(group) == 1 && group[0].Tag == 'e') {
449
-		groups = append(groups, group)
450
-	}
451
-	return groups
452
-}
453
-
454
-// Return a measure of the sequences' similarity (float in [0,1]).
455
-//
456
-// Where T is the total number of elements in both sequences, and
457
-// M is the number of matches, this is 2.0*M / T.
458
-// Note that this is 1 if the sequences are identical, and 0 if
459
-// they have nothing in common.
460
-//
461
-// .Ratio() is expensive to compute if you haven't already computed
462
-// .GetMatchingBlocks() or .GetOpCodes(), in which case you may
463
-// want to try .QuickRatio() or .RealQuickRation() first to get an
464
-// upper bound.
465
-func (m *SequenceMatcher) Ratio() float64 {
466
-	matches := 0
467
-	for _, m := range m.GetMatchingBlocks() {
468
-		matches += m.Size
469
-	}
470
-	return calculateRatio(matches, len(m.a)+len(m.b))
471
-}
472
-
473
-// Return an upper bound on ratio() relatively quickly.
474
-//
475
-// This isn't defined beyond that it is an upper bound on .Ratio(), and
476
-// is faster to compute.
477
-func (m *SequenceMatcher) QuickRatio() float64 {
478
-	// viewing a and b as multisets, set matches to the cardinality
479
-	// of their intersection; this counts the number of matches
480
-	// without regard to order, so is clearly an upper bound
481
-	if m.fullBCount == nil {
482
-		m.fullBCount = map[string]int{}
483
-		for _, s := range m.b {
484
-			m.fullBCount[s] = m.fullBCount[s] + 1
485
-		}
486
-	}
487
-
488
-	// avail[x] is the number of times x appears in 'b' less the
489
-	// number of times we've seen it in 'a' so far ... kinda
490
-	avail := map[string]int{}
491
-	matches := 0
492
-	for _, s := range m.a {
493
-		n, ok := avail[s]
494
-		if !ok {
495
-			n = m.fullBCount[s]
496
-		}
497
-		avail[s] = n - 1
498
-		if n > 0 {
499
-			matches += 1
500
-		}
501
-	}
502
-	return calculateRatio(matches, len(m.a)+len(m.b))
503
-}
504
-
505
-// Return an upper bound on ratio() very quickly.
506
-//
507
-// This isn't defined beyond that it is an upper bound on .Ratio(), and
508
-// is faster to compute than either .Ratio() or .QuickRatio().
509
-func (m *SequenceMatcher) RealQuickRatio() float64 {
510
-	la, lb := len(m.a), len(m.b)
511
-	return calculateRatio(min(la, lb), la+lb)
512
-}
513
-
514
-// Convert range to the "ed" format
515
-func formatRangeUnified(start, stop int) string {
516
-	// Per the diff spec at http://www.unix.org/single_unix_specification/
517
-	beginning := start + 1 // lines start numbering with one
518
-	length := stop - start
519
-	if length == 1 {
520
-		return fmt.Sprintf("%d", beginning)
521
-	}
522
-	if length == 0 {
523
-		beginning -= 1 // empty ranges begin at line just before the range
524
-	}
525
-	return fmt.Sprintf("%d,%d", beginning, length)
526
-}
527
-
528
-// Unified diff parameters
529
-type UnifiedDiff struct {
530
-	A        []string // First sequence lines
531
-	FromFile string   // First file name
532
-	FromDate string   // First file time
533
-	B        []string // Second sequence lines
534
-	ToFile   string   // Second file name
535
-	ToDate   string   // Second file time
536
-	Eol      string   // Headers end of line, defaults to LF
537
-	Context  int      // Number of context lines
538
-}
539
-
540
-// Compare two sequences of lines; generate the delta as a unified diff.
541
-//
542
-// Unified diffs are a compact way of showing line changes and a few
543
-// lines of context.  The number of context lines is set by 'n' which
544
-// defaults to three.
545
-//
546
-// By default, the diff control lines (those with ---, +++, or @@) are
547
-// created with a trailing newline.  This is helpful so that inputs
548
-// created from file.readlines() result in diffs that are suitable for
549
-// file.writelines() since both the inputs and outputs have trailing
550
-// newlines.
551
-//
552
-// For inputs that do not have trailing newlines, set the lineterm
553
-// argument to "" so that the output will be uniformly newline free.
554
-//
555
-// The unidiff format normally has a header for filenames and modification
556
-// times.  Any or all of these may be specified using strings for
557
-// 'fromfile', 'tofile', 'fromfiledate', and 'tofiledate'.
558
-// The modification times are normally expressed in the ISO 8601 format.
559
-func WriteUnifiedDiff(writer io.Writer, diff UnifiedDiff) error {
560
-	buf := bufio.NewWriter(writer)
561
-	defer buf.Flush()
562
-	wf := func(format string, args ...interface{}) error {
563
-		_, err := buf.WriteString(fmt.Sprintf(format, args...))
564
-		return err
565
-	}
566
-	ws := func(s string) error {
567
-		_, err := buf.WriteString(s)
568
-		return err
569
-	}
570
-
571
-	if len(diff.Eol) == 0 {
572
-		diff.Eol = "\n"
573
-	}
574
-
575
-	started := false
576
-	m := NewMatcher(diff.A, diff.B)
577
-	for _, g := range m.GetGroupedOpCodes(diff.Context) {
578
-		if !started {
579
-			started = true
580
-			fromDate := ""
581
-			if len(diff.FromDate) > 0 {
582
-				fromDate = "\t" + diff.FromDate
583
-			}
584
-			toDate := ""
585
-			if len(diff.ToDate) > 0 {
586
-				toDate = "\t" + diff.ToDate
587
-			}
588
-			if diff.FromFile != "" || diff.ToFile != "" {
589
-				err := wf("--- %s%s%s", diff.FromFile, fromDate, diff.Eol)
590
-				if err != nil {
591
-					return err
592
-				}
593
-				err = wf("+++ %s%s%s", diff.ToFile, toDate, diff.Eol)
594
-				if err != nil {
595
-					return err
596
-				}
597
-			}
598
-		}
599
-		first, last := g[0], g[len(g)-1]
600
-		range1 := formatRangeUnified(first.I1, last.I2)
601
-		range2 := formatRangeUnified(first.J1, last.J2)
602
-		if err := wf("@@ -%s +%s @@%s", range1, range2, diff.Eol); err != nil {
603
-			return err
604
-		}
605
-		for _, c := range g {
606
-			i1, i2, j1, j2 := c.I1, c.I2, c.J1, c.J2
607
-			if c.Tag == 'e' {
608
-				for _, line := range diff.A[i1:i2] {
609
-					if err := ws(" " + line); err != nil {
610
-						return err
611
-					}
612
-				}
613
-				continue
614
-			}
615
-			if c.Tag == 'r' || c.Tag == 'd' {
616
-				for _, line := range diff.A[i1:i2] {
617
-					if err := ws("-" + line); err != nil {
618
-						return err
619
-					}
620
-				}
621
-			}
622
-			if c.Tag == 'r' || c.Tag == 'i' {
623
-				for _, line := range diff.B[j1:j2] {
624
-					if err := ws("+" + line); err != nil {
625
-						return err
626
-					}
627
-				}
628
-			}
629
-		}
630
-	}
631
-	return nil
632
-}
633
-
634
-// Like WriteUnifiedDiff but returns the diff a string.
635
-func GetUnifiedDiffString(diff UnifiedDiff) (string, error) {
636
-	w := &bytes.Buffer{}
637
-	err := WriteUnifiedDiff(w, diff)
638
-	return string(w.Bytes()), err
639
-}
640
-
641
-// Convert range to the "ed" format.
642
-func formatRangeContext(start, stop int) string {
643
-	// Per the diff spec at http://www.unix.org/single_unix_specification/
644
-	beginning := start + 1 // lines start numbering with one
645
-	length := stop - start
646
-	if length == 0 {
647
-		beginning -= 1 // empty ranges begin at line just before the range
648
-	}
649
-	if length <= 1 {
650
-		return fmt.Sprintf("%d", beginning)
651
-	}
652
-	return fmt.Sprintf("%d,%d", beginning, beginning+length-1)
653
-}
654
-
655
-type ContextDiff UnifiedDiff
656
-
657
-// Compare two sequences of lines; generate the delta as a context diff.
658
-//
659
-// Context diffs are a compact way of showing line changes and a few
660
-// lines of context. The number of context lines is set by diff.Context
661
-// which defaults to three.
662
-//
663
-// By default, the diff control lines (those with *** or ---) are
664
-// created with a trailing newline.
665
-//
666
-// For inputs that do not have trailing newlines, set the diff.Eol
667
-// argument to "" so that the output will be uniformly newline free.
668
-//
669
-// The context diff format normally has a header for filenames and
670
-// modification times.  Any or all of these may be specified using
671
-// strings for diff.FromFile, diff.ToFile, diff.FromDate, diff.ToDate.
672
-// The modification times are normally expressed in the ISO 8601 format.
673
-// If not specified, the strings default to blanks.
674
-func WriteContextDiff(writer io.Writer, diff ContextDiff) error {
675
-	buf := bufio.NewWriter(writer)
676
-	defer buf.Flush()
677
-	var diffErr error
678
-	wf := func(format string, args ...interface{}) {
679
-		_, err := buf.WriteString(fmt.Sprintf(format, args...))
680
-		if diffErr == nil && err != nil {
681
-			diffErr = err
682
-		}
683
-	}
684
-	ws := func(s string) {
685
-		_, err := buf.WriteString(s)
686
-		if diffErr == nil && err != nil {
687
-			diffErr = err
688
-		}
689
-	}
690
-
691
-	if len(diff.Eol) == 0 {
692
-		diff.Eol = "\n"
693
-	}
694
-
695
-	prefix := map[byte]string{
696
-		'i': "+ ",
697
-		'd': "- ",
698
-		'r': "! ",
699
-		'e': "  ",
700
-	}
701
-
702
-	started := false
703
-	m := NewMatcher(diff.A, diff.B)
704
-	for _, g := range m.GetGroupedOpCodes(diff.Context) {
705
-		if !started {
706
-			started = true
707
-			fromDate := ""
708
-			if len(diff.FromDate) > 0 {
709
-				fromDate = "\t" + diff.FromDate
710
-			}
711
-			toDate := ""
712
-			if len(diff.ToDate) > 0 {
713
-				toDate = "\t" + diff.ToDate
714
-			}
715
-			if diff.FromFile != "" || diff.ToFile != "" {
716
-				wf("*** %s%s%s", diff.FromFile, fromDate, diff.Eol)
717
-				wf("--- %s%s%s", diff.ToFile, toDate, diff.Eol)
718
-			}
719
-		}
720
-
721
-		first, last := g[0], g[len(g)-1]
722
-		ws("***************" + diff.Eol)
723
-
724
-		range1 := formatRangeContext(first.I1, last.I2)
725
-		wf("*** %s ****%s", range1, diff.Eol)
726
-		for _, c := range g {
727
-			if c.Tag == 'r' || c.Tag == 'd' {
728
-				for _, cc := range g {
729
-					if cc.Tag == 'i' {
730
-						continue
731
-					}
732
-					for _, line := range diff.A[cc.I1:cc.I2] {
733
-						ws(prefix[cc.Tag] + line)
734
-					}
735
-				}
736
-				break
737
-			}
738
-		}
739
-
740
-		range2 := formatRangeContext(first.J1, last.J2)
741
-		wf("--- %s ----%s", range2, diff.Eol)
742
-		for _, c := range g {
743
-			if c.Tag == 'r' || c.Tag == 'i' {
744
-				for _, cc := range g {
745
-					if cc.Tag == 'd' {
746
-						continue
747
-					}
748
-					for _, line := range diff.B[cc.J1:cc.J2] {
749
-						ws(prefix[cc.Tag] + line)
750
-					}
751
-				}
752
-				break
753
-			}
754
-		}
755
-	}
756
-	return diffErr
757
-}
758
-
759
-// Like WriteContextDiff but returns the diff a string.
760
-func GetContextDiffString(diff ContextDiff) (string, error) {
761
-	w := &bytes.Buffer{}
762
-	err := WriteContextDiff(w, diff)
763
-	return string(w.Bytes()), err
764
-}
765
-
766
-// Split a string on "\n" while preserving them. The output can be used
767
-// as input for UnifiedDiff and ContextDiff structures.
768
-func SplitLines(s string) []string {
769
-	lines := strings.SplitAfter(s, "\n")
770
-	lines[len(lines)-1] += "\n"
771
-	return lines
772
-}