pax_global_header00006660000000000000000000000064132277167240014525gustar00rootroot0000000000000052 comment=9b55aab90508bd389d7654c4baf173a981477d55 docker-containerd-tags-docker-17.12.1/000077500000000000000000000000001322771672400174725ustar00rootroot00000000000000docker-containerd-tags-docker-17.12.1/.appveyor.yml000066400000000000000000000027201322771672400221410ustar00rootroot00000000000000version: "{build}" image: Visual Studio 2017 clone_folder: c:\gopath\src\github.com\containerd\containerd branches: only: - master environment: GOPATH: C:\gopath CGO_ENABLED: 1 GO_VERSION: 1.9 before_build: - choco install -y mingw # Install Go - rd C:\Go /s /q - appveyor DownloadFile https://storage.googleapis.com/golang/go%GO_VERSION%.windows-amd64.zip - 7z x go%GO_VERSION%.windows-amd64.zip -oC:\ >nul - go version - choco install codecov build_script: - bash.exe -elc "export PATH=/c/tools/mingw64/bin:/c/gopath/bin:$PATH ; mingw32-make.exe setup check" - bash.exe -elc "export PATH=/c/tools/mingw64/bin:$PATH ; mingw32-make.exe build binaries" test_script: # TODO: need an equivalent of TRAVIS_COMMIT_RANGE # - GIT_CHECK_EXCLUDE="./vendor" TRAVIS_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE/.../..}" C:\MinGW\bin\mingw32-make.exe dco - bash.exe -lc "export PATH=/c/tools/mingw64/bin:/c/gopath/src/github.com/containerd/containerd/bin:$PATH ; mingw32-make.exe coverage root-coverage" - bash.exe -elc "export PATH=/c/tools/mingw64/bin:/c/gopath/src/github.com/containerd/containerd/bin:$PATH ; mingw32-make.exe integration" # Run the integration suite a second time. See discussion in github.com/containerd/containerd/pull/1759 - bash.exe -elc "export PATH=/c/tools/mingw64/bin:/c/gopath/src/github.com/containerd/containerd/bin:$PATH; TESTFLAGS_PARALLEL=1 mingw32-make.exe integration" on_success: codecov --flag windows -f coverage.txt docker-containerd-tags-docker-17.12.1/.gitignore000066400000000000000000000000571322771672400214640ustar00rootroot00000000000000/bin/ coverage.txt profile.out containerd.test docker-containerd-tags-docker-17.12.1/.gometalinter.json000066400000000000000000000006241322771672400231370ustar00rootroot00000000000000{ "Vendor": true, "Deadline": "2m", "Sort": ["linter", "severity", "path", "line"], "Exclude": [ ".*\\.pb\\.go", "fetch\\.go:.*::error: unrecognized printf verb 'r'" ], "EnableGC": true, "WarnUnmatchedDirective": true, "Enable": [ "structcheck", "unused", "varcheck", "staticcheck", "gofmt", "goimports", "golint", "ineffassign", "vet" ] } docker-containerd-tags-docker-17.12.1/.travis.yml000066400000000000000000000062571322771672400216150ustar00rootroot00000000000000dist: trusty sudo: required # setup travis so that we can run containers for integration tests services: - docker language: go go: - 1.9.x go_import_path: github.com/containerd/containerd addons: apt: packages: - btrfs-tools - libseccomp-dev - libapparmor-dev - libnl-3-dev - libnet-dev - protobuf-c-compiler # - protobuf-compiler - python-minimal - libcap-dev - libaio-dev - libprotobuf-c0-dev - libprotobuf-dev env: - TRAVIS_GOOS=linux TRAVIS_CGO_ENABLED=1 - TRAVIS_GOOS=darwin TRAVIS_CGO_ENABLED=0 before_install: - uname -r install: - wget https://github.com/google/protobuf/releases/download/v3.5.0/protoc-3.5.0-linux-x86_64.zip -O /tmp/protoc-3.5.0-linux-x86_64.zip - sudo unzip -o -d /usr/local /tmp/protoc-3.5.0-linux-x86_64.zip - sudo chmod +x /usr/local/bin/protoc - sudo chmod og+rx /usr/local/include/google /usr/local/include/google/protobuf /usr/local/include/google/protobuf/compiler - sudo chmod -R og+r /usr/local/include/google/protobuf/ - protoc --version - go get -u github.com/vbatts/git-validation - sudo wget https://github.com/crosbymichael/runc/releases/download/ctd-8/runc -O /bin/runc; sudo chmod +x /bin/runc - wget https://github.com/xemul/criu/archive/v3.0.tar.gz -O /tmp/criu.tar.gz - tar -C /tmp/ -zxf /tmp/criu.tar.gz - cd /tmp/criu-3.0 && sudo make install-criu - cd $TRAVIS_BUILD_DIR script: - export GOOS=$TRAVIS_GOOS - export CGO_ENABLED=$TRAVIS_CGO_ENABLED - GIT_CHECK_EXCLUDE="./vendor" TRAVIS_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE/.../..}" make dco - GOOS=linux make setup - go build -i . - make check - if [ "$GOOS" = "linux" ]; then make check-protos check-api-descriptors; fi - make build - make binaries - if [ "$GOOS" = "linux" ]; then sudo make install ; fi - if [ "$GOOS" = "linux" ]; then make coverage ; fi - if [ "$GOOS" = "linux" ]; then sudo PATH=$PATH GOPATH=$GOPATH make root-coverage ; fi - if [ "$GOOS" = "linux" ]; then sudo PATH=$PATH GOPATH=$GOPATH make integration ; fi # Run the integration suite a second time. See discussion in github.com/containerd/containerd/pull/1759 - if [ "$GOOS" = "linux" ]; then sudo PATH=$PATH GOPATH=$GOPATH TESTFLAGS_PARALLEL=1 make integration ; fi after_success: - bash <(curl -s https://codecov.io/bash) -F linux before_deploy: - make release deploy: provider: releases api_key: secure: HO+WSIVVUMMsbU74x+YyFsTP3ahqnR4xjwKAziedJ5lZXKJszQBhiYTFmcTeVBoouNjTISd07GQzpoLChuGC20U3+1NbT+CkK8xWR/x1ao2D3JY3Ds6AD9ubWRNWRLptt/xOn5Vq3F8xZyUYchwvDMl4zKCuTKxQGVdHKsINb2DehKcP5cVL6MMvqzEdfj2g99vqXAqs8uuo6dOmvxmHV43bfzDaAJSabjZZs6TKlWTqCQMet8uxyx2Dmjl2lxLwdqv12oJdrszacasn41NYuEyHI2bXyef1mhWGYN4n9bU/Y5winctZ8DOSOZvYg/2ziAaUN0+CTn1IESwVesrPz23P2Sy7wdLxu8dSIZ2yUHl7OsA5T5a5rDchAGguRVNBWvoGtuepEhdRacxTQUo1cMFZsEXjgRKKjdfc1emYQPVdN8mBv8GJwndty473ZXdvFt5R0kNVFtvWuYCa6UYJD2cKrsPSAfbZCDC/LiR3FOoTaUPMZUVkR2ACEO7Dn4+KlmBajqT40Osk/A7k1XA/TzVhMIpLtE0Vk2DfPmGsjCv8bC+MFd+R2Sc8SFdE92oEWRdoPQY5SxMYQtGxA+cbKVlT1kSw6y80yEbx5JZsBnT6+NTHwmDO3kVU9ztLdawOozTElKNAK8HoAyFmzIZ3wL64oThuDrv/TUuY8Iyn814= file_glob: true file: releases/*.tar.gz skip_cleanup: true on: repo: containerd/containerd tags: true docker-containerd-tags-docker-17.12.1/BUILDING.md000066400000000000000000000217031322771672400212140ustar00rootroot00000000000000# Build containerd from source This guide is useful if you intend to contribute on containerd. Thanks for your effort. Every contribution is very appreciated. This doc includes: * [Build requirements](#build-requirements) * [Build the development environment](#build-the-development-environment) * [Build containerd](#build-containerd) * [Via docker container](#via-docker-container) * [Testing](#testing-containerd) ## Build requirements To build the `containerd` daemon, and the `ctr` simple test client, the following build system dependencies are required: * Go 1.9.x or above * Protoc 3.x compiler and headers (download at the [Google protobuf releases page](https://github.com/google/protobuf/releases)) * Btrfs headers and libraries for your distribution. Note that building the btrfs driver can be disabled via the build tag `no_btrfs`, removing this dependency. ## Build the development environment First you need to setup your Go development environment. You can follow this guideline [How to write go code](https://golang.org/doc/code.html) and at the end you need to have `GOPATH` and `GOROOT` set in your environment. At this point you can use `go` to checkout `containerd` in your `GOPATH`: ```sh go get github.com/containerd/containerd ``` For proper results, install the `protoc` release into `/usr/local` on your build system. For example, the following commands will download and install the 3.5.0 release for a 64-bit Linux host: ``` $ wget -c https://github.com/google/protobuf/releases/download/v3.5.0/protoc-3.5.0-linux-x86_64.zip $ sudo unzip protoc-3.5.0-linux-x86_64.zip -d /usr/local ``` `containerd` uses [Btrfs](https://en.wikipedia.org/wiki/Btrfs) it means that you need to satisfy this dependencies in your system: * CentOS/Fedora: `yum install btrfs-progs-devel` * Debian/Ubuntu: `apt-get install btrfs-tools` At this point you are ready to build `containerd` yourself! ## Build containerd `containerd` uses `make` to create a repeatable build flow. It means that you can run: ```sudo make ``` This is going to build all the project binaries in the `./bin/` directory. You can move them in your global path, `/usr/local/bin` with: ```sudo sudo make install ``` When making any changes to the gRPC API, you can use the installed `protoc` compiler to regenerate the API generated code packages with: ```sudo make generate ``` > *Note*: A build tag is currently available to disable building the btrfs snapshot driver. > Adding `BUILDTAGS=no_btrfs` to your environment before calling the **binaries** > Makefile target will disable the btrfs driver within the containerd Go build. Vendoring of external imports uses the [`vndr` tool](https://github.com/LK4D4/vndr) which uses a simple config file, `vendor.conf`, to provide the URL and version or hash details for each vendored import. After modifying `vendor.conf` run the `vndr` tool to update the `vendor/` directory contents. Combining the `vendor.conf` update with the changeset in `vendor/` after running `vndr` should become a single commit for a PR which relies on vendored updates. Please refer to [RUNC.md](/RUNC.md) for the currently supported version of `runc` that is used by containerd. ### Static binaries You can build static binaries by providing a few variables to `make`: ```sudo make EXTRA_FLAGS="-buildmode pie" \ EXTRA_LDFLAGS='-extldflags "-fno-PIC -static"' \ BUILDTAGS="static_build" ``` > *Note*: > - static build is discouraged > - static containerd binary does not support loading plugins # Via Docker container ## Build containerd You can build `containerd` via a Linux-based Docker container. You can build an image from this `Dockerfile`: ``` FROM golang RUN apt-get update && \ apt-get install btrfs-tools ``` Let's suppose that you built an image called `containerd/build`. From the containerd source root directory you can run the following command: ```sh docker run -it \ -v ${PWD}:/go/src/github.com/containerd/containerd \ -e GOPATH=/go \ -w /go/src/github.com/containerd/containerd containerd/build sh ``` This mounts `containerd` repository You are now ready to [build](#build-containerd): ```sh make && make install ``` ## Build containerd and runc To have complete core container runtime, you will both `containerd` and `runc`. It is possible to build both of these via Docker container. You can use `go` to checkout `runc` in your `GOPATH`: ```sh go get github.com/opencontainers/runc ``` We can build an image from this `Dockerfile`: ```sh FROM golang RUN apt-get update && \ apt-get install -y btrfs-tools libapparmor-dev libseccomp-dev ``` In our Docker container we will use a specific `runc` build which includes [seccomp](https://en.wikipedia.org/wiki/seccomp) and [apparmor](https://en.wikipedia.org/wiki/AppArmor) support. Hence why our Dockerfile includes these dependencies: `libapparmor-dev` `libseccomp-dev`. Please refer to [RUNC.md](/RUNC.md) for the currently supported version of `runc` that is used by containerd. Let's suppose you build an image called `containerd/build` from the above Dockerfile. You can run the following command: ```sh docker run -it --privileged \ -v /var/lib/containerd \ -v ${GOPATH}/src/github.com/opencontainers/runc:/go/src/github.com/opencontainers/runc \ -v ${GOPATH}/src/github.com/containerd/containerd:/go/src/github.com/containerd/containerd \ -e GOPATH=/go \ -w /go/src/github.com/containerd/containerd containerd/build sh ``` This mounts both `runc` and `containerd` repositories in our Docker container. From within our Docker container let's build `containerd`: ```sh cd /go/src/github.com/containerd/containerd make && make install ``` These binaries can be found in the `./bin` directory in your host. `make install` will move the binaries in your `$PATH`. Next, let's build `runc`: ```sh cd /go/src/github.com/opencontainers/runc make BUILDTAGS='seccomp apparmor' && make install ``` When working with `ctr`, the simple test client we just built, don't forget to start the daemon! ```sh containerd --config config.toml ``` # Testing containerd During the automated CI the unit tests and integration tests are run as part of the PR validation. As a developer you can run these tests locally by using any of the following `Makefile` targets: - `make test`: run all non-integration tests that do not require `root` privileges - `make root-test`: run all non-integration tests which require `root` - `make integration`: run all tests, including integration tests and those which require `root` - `make integration-parallel`: run all tests (integration and root-required included) in parallel mode To execute a specific test or set of tests you can use the `go test` capabilities without using the `Makefile` targets. The following examples show how to specify a test name and also how to use the flag directly against `go test` to run root-requiring tests. ```sh # run the test : go test -v -run "" . # enable the root-requiring tests: go test -v -run . -test.root ``` Example output from directly running `go test` to execute the `TestContainerList` test: ```sh sudo go test -v -run "TestContainerList" . -test.root INFO[0000] running tests against containerd revision=f2ae8a020a985a8d9862c9eb5ab66902c2888361 version=v1.0.0-beta.2-49-gf2ae8a0 === RUN TestContainerList --- PASS: TestContainerList (0.00s) PASS ok github.com/containerd/containerd 4.778s ``` ## Additional tools ### containerd-stress In addition to `go test`-based testing executed via the `Makefile` targets, the `containerd-stress` tool is available and built with the `all` or `binaries` targets and installed during `make install`. With this tool you can stress a running containerd daemon for a specified period of time, selecting a concurrency level to generate stress against the daemon. The following command is an example of having five workers running for two hours against a default containerd gRPC socket address: ```sh containerd-stress -c 5 -t 120 ``` For more information on this tool's options please run `containerd-stress --help`. ### bucketbench [Bucketbench](https://github.com/estesp/bucketbench) is an external tool which can be used to drive load against a container runtime, specifying a particular set of lifecycle operations to run with a specified amount of concurrency. Bucketbench is more focused on generating performance details than simply inducing load against containerd. Bucketbench differs from the `containerd-stress` tool in a few ways: - Bucketbench has support for testing the Docker engine, the `runc` binary, and containerd 0.2.x (via `ctr`) and 1.0 (via the client library) branches. - Bucketbench is driven via configuration file that allows specifying a list of lifecycle operations to execute. This can be used to generate detailed statistics per-command (e.g. start, stop, pause, delete). - Bucketbench generates detailed reports and timing data at the end of the configured test run. More details on how to install and run `bucketbench` are available at the [GitHub project page](https://github.com/estesp/bucketbench). docker-containerd-tags-docker-17.12.1/CONTRIBUTING.md000066400000000000000000000120541322771672400217250ustar00rootroot00000000000000# Contributing Contributions should be made via pull requests. Pull requests will be reviewed by one or more maintainers and merged when acceptable. This project is in an early state, making the impact of contributions much greater than at other stages. In this respect, it is important to consider any changes or additions for their future impact more so than their current impact. ## Successful Changes We ask that before contributing, please make the effort to coordinate with the maintainers of the project before submitting large or high impact PRs. This will prevent you from doing extra work that may or may not be merged. PRs that are just submitted without any prior communication will likely be summarily closed. While pull requests are the methodology for submitting changes to code, changes are much more likely to be accepted if they are accompanied by additional engineering work. While we don't define this explicitly, most of these goals are accomplished through communication of the design goals and subsequent solutions. Often times, it helps to first state the problem before presenting solutions. Typically, the best methods of accomplishing this are to submit an issue, stating the problem. This issue can include a problem statement and a checklist with requirements. If solutions are proposed, alternatives should be listed and eliminated. Even if the criteria for elimination of a solution is frivolous, say so. Larger changes typically work best with design documents, similar to those found in `design/`. These are focused on providing context to the design at the time the feature was conceived and can inform future documentation contributions. Make sure that new tests are added for bugs in order to catch regressions and tests with new features to exercise the new functionality that is added. ## Commit Messages There are times for one line commit messages and this is not one of them. Commit messages should follow best practices, including explaining the context of the problem and how it was solved, including in caveats or follow up changes required. They should tell the story of the change and provide readers understanding of what led to it. If you're lost about what this even means, please see [How to Write a Git Commit Message](http://chris.beams.io/posts/git-commit/) for a start. In practice, the best approach to maintaining a nice commit message is to leverage a `git add -p` and `git commit --amend` to formulate a solid changeset. This allows one to piece together a change, as information becomes available. If you squash a series of commits, don't just submit that. Re-write the commit message, as if the series of commits was a single stroke of brilliance. That said, there is no requirement to have a single commit for a PR, as long as each commit tells the story. For example, if there is a feature that requires a package, it might make sense to have the package in a separate commit then have a subsequent commit that uses it. Remember, you're telling part of the story with the commit message. Don't make your chapter weird. ## Sign your work The sign-off is a simple line at the end of the explanation for the patch. Your signature certifies that you wrote the patch or otherwise have the right to pass it on as an open-source patch. The rules are pretty simple: if you can certify the below (from [developercertificate.org](http://developercertificate.org/)): ``` Developer Certificate of Origin Version 1.1 Copyright (C) 2004, 2006 The Linux Foundation and its contributors. 660 York Street, Suite 102, San Francisco, CA 94110 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. ``` Then you just add a line to every git commit message: Signed-off-by: Joe Smith Use your real name (sorry, no pseudonyms or anonymous contributions.) If you set your `user.name` and `user.email` git configs, you can sign your commit automatically with `git commit -s`. docker-containerd-tags-docker-17.12.1/LICENSE.code000066400000000000000000000250151322771672400214130ustar00rootroot00000000000000 Apache License Version 2.0, January 2004 https://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS Copyright 2013-2016 Docker, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. docker-containerd-tags-docker-17.12.1/LICENSE.docs000066400000000000000000000443321322771672400214340ustar00rootroot00000000000000Attribution 4.0 International ======================================================================= Creative Commons Corporation ("Creative Commons") is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an "as-is" basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible. Using Creative Commons Public Licenses Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses. Considerations for licensors: Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC- licensed material, or material used under an exception or limitation to copyright. More considerations for licensors: wiki.creativecommons.org/Considerations_for_licensors Considerations for the public: By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor's permission is not necessary for any reason--for example, because of any applicable exception or limitation to copyright--then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. More_considerations for the public: wiki.creativecommons.org/Considerations_for_licensees ======================================================================= Creative Commons Attribution 4.0 International Public License By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. Section 1 -- Definitions. a. Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. b. Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License. c. Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. d. Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. e. Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. f. Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License. g. Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. h. Licensor means the individual(s) or entity(ies) granting rights under this Public License. i. Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. j. Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. k. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. Section 2 -- Scope. a. License grant. 1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: a. reproduce and Share the Licensed Material, in whole or in part; and b. produce, reproduce, and Share Adapted Material. 2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. 3. Term. The term of this Public License is specified in Section 6(a). 4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a) (4) never produces Adapted Material. 5. Downstream recipients. a. Offer from the Licensor -- Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. b. No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. 6. No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). b. Other rights. 1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. 2. Patent and trademark rights are not licensed under this Public License. 3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties. Section 3 -- License Conditions. Your exercise of the Licensed Rights is expressly made subject to the following conditions. a. Attribution. 1. If You Share the Licensed Material (including in modified form), You must: a. retain the following if it is supplied by the Licensor with the Licensed Material: i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); ii. a copyright notice; iii. a notice that refers to this Public License; iv. a notice that refers to the disclaimer of warranties; v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; b. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and c. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. 3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable. 4. If You Share Adapted Material You produce, the Adapter's License You apply must not prevent recipients of the Adapted Material from complying with this Public License. Section 4 -- Sui Generis Database Rights. Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database; b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database. For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights. Section 5 -- Disclaimer of Warranties and Limitation of Liability. a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. Section 6 -- Term and Termination. a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically. b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: 1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or 2. upon express reinstatement by the Licensor. For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. c. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. Section 7 -- Other Terms and Conditions. a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed. b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License. Section 8 -- Interpretation. a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License. b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions. c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. ======================================================================= Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” The text of the Creative Commons public licenses is dedicated to the public domain under the CC0 Public Domain Dedication. Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark "Creative Commons" or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses. Creative Commons may be contacted at creativecommons.org. docker-containerd-tags-docker-17.12.1/MAINTAINERS000066400000000000000000000205331322771672400211720ustar00rootroot00000000000000# containerd project maintainers file # # This file describes who runs the containerd project and how. # This is a living document - if you see something out of date or missing, # speak up! # # It is structured to be consumable by both humans and programs. # To extract its contents programmatically, use any TOML-compliant # parser. [Rules] [Rules.maintainers] title = "What is a maintainer?" text = """ There are different types of maintainers, with different responsibilities, but all maintainers have 3 things in common: 1) They share responsibility in the project's success. 2) They have made a long-term, recurring time investment to improve the project. 3) They spend that time doing whatever needs to be done, not necessarily what is the most interesting or fun. Maintainers are often under-appreciated, because their work is harder to appreciate. It's easy to appreciate a really cool and technically advanced feature. It's harder to appreciate the absence of bugs, the slow but steady improvement in stability, or the reliability of a release process. But those things distinguish a good project from a great one. """ [Rules.adding-maintainers] title = "How are maintainers added?" text = """ Maintainers are first and foremost contributors that have shown they are committed to the long term success of a project. Contributors wanting to become maintainers are expected to be deeply involved in contributing code, pull request review, and triage of issues in the project for more than three months. Just contributing does not make you a maintainer, it is about building trust with the current maintainers of the project and being a person that they can depend on and trust to make decisions in the best interest of the project. Periodically, the existing maintainers curate a list of contributors that have shown regular activity on the project over the prior months. From this list, maintainer candidates are selected and proposed on the maintainers mailing list. After a candidate has been announced on the maintainers mailing list, the existing maintainers are given five business days to discuss the candidate, raise objections and cast their vote. Candidates must be approved by at least 66% of the current maintainers by adding their vote on the mailing list. Only maintainers of the repository that the candidate is proposed for are allowed to vote. If a candidate is approved, a maintainer will contact the candidate to invite the candidate to open a pull request that adds the contributor to the MAINTAINERS file. The candidate becomes a maintainer once the pull request is merged. """ [Rules.adding-sub-projects] title = "How are sub projects added?" text = """ Similar to adding maintainers, new sub projects can be added to containerd GitHub organization as long as they adhere to the CNCF [charter](https://www.cncf.io/about/charter/) and mission. After a project proposal has been announced on a public forum (GitHub issue or mailing list), the existing maintainers are given five business days to discuss the new project, raise objections and cast their vote. Projects must be approved by at least 66% of the current maintainers by adding their vote. If a project is approved, a maintainer will add the project to the containerd GitHub organization, and make an announcement on a public forum. """ [Rules.stepping-down-policy] title = "Stepping down policy" text = """ Life priorities, interests, and passions can change. If you're a maintainer but feel you must remove yourself from the list, inform other maintainers that you intend to step down, and if possible, help find someone to pick up your work. At the very least, ensure your work can be continued where you left off. After you've informed other maintainers, create a pull request to remove yourself from the MAINTAINERS file. """ [Rules.inactive-maintainers] title = "Removal of inactive maintainers" text = """ Similar to the procedure for adding new maintainers, existing maintainers can be removed from the list if they do not show significant activity on the project. Periodically, the maintainers review the list of maintainers and their activity over the last three months. If a maintainer has shown insufficient activity over this period, a neutral person will contact the maintainer to ask if they want to continue being a maintainer. If the maintainer decides to step down as a maintainer, they open a pull request to be removed from the MAINTAINERS file. If the maintainer wants to remain a maintainer, but is unable to perform the required duties they can be removed with a vote of at least 66% of the current maintainers. An e-mail is sent to the mailing list, inviting maintainers of the project to vote. The voting period is five business days. Issues related to a maintainer's performance should be discussed with them among the other maintainers so that they are not surprised by a pull request removing them. """ [Rules.decisions] title = "How are decisions made?" text = """ Short answer: EVERYTHING IS A PULL REQUEST. containerd is an open-source project with an open design philosophy. This means that the repository is the source of truth for EVERY aspect of the project, including its philosophy, design, road map, and APIs. *If it's part of the project, it's in the repo. If it's in the repo, it's part of the project.* As a result, all decisions can be expressed as changes to the repository. An implementation change is a change to the source code. An API change is a change to the API specification. A philosophy change is a change to the philosophy manifesto, and so on. All decisions affecting containerd, big and small, follow the same 3 steps: * Step 1: Open a pull request. Anyone can do this. * Step 2: Discuss the pull request. Anyone can do this. * Step 3: Merge or refuse the pull request. Who does this depends on the nature of the pull request and which areas of the project it affects. """ [Rules.DCO] title = "Helping contributors with the DCO" text = """ The [DCO or `Sign your work`]( https://github.com/containerd/containerd/blob/master/CONTRIBUTING.md#sign-your-work) requirement is not intended as a roadblock or speed bump. Some containerd contributors are not as familiar with `git`, or have used a web based editor, and thus asking them to `git commit --amend -s` is not the best way forward. In this case, maintainers can update the commits based on clause (c) of the DCO. The most trivial way for a contributor to allow the maintainer to do this, is to add a DCO signature in a pull requests's comment, or a maintainer can simply note that the change is sufficiently trivial that it does not substantially change the existing contribution - i.e., a spelling change. When you add someone's DCO, please also add your own to keep a log. """ [Rules."no direct push"] title = "I'm a maintainer. Should I make pull requests too?" text = """ Yes. Nobody should ever push to master directly. All changes should be made through a pull request. """ [Rules.tsc] title = "Conflict Resolution and technical disputes" text = """ containerd defers to the [Technical Steering Committee](https://github.com/moby/tsc) for escalations and resolution on disputes for technical matters." """ [Rules.meta] title = "How is this process changed?" text = "Just like everything else: by making a pull request :)" # Current project organization [Org] [Org.Maintainers] people = [ "akihirosuda", "crosbymichael", "dqminh", "dmcgowan", "estesp", "hqhq", "jhowardmsft", "mlaventure", "stevvooe", ] [People] [people.akihirosuda] Name = "Akihiro Suda" Email = "suda.akihiro@lab.ntt.co.jp" GitHub = "AkihiroSuda" [People.crosbymichael] Name = "Michael Crosby" Email = "crosbymichael@gmail.com" GitHub = "crosbymichael" [People.dqminh] Name = "Daniel, Dao Quang Minh" Email = "dqminh89@gmail.com" GitHub = "dqminh" [people.dmcgowan] Name = "Derek McGowan" Email = "derek@mcgstyle.net" GitHub = "dmcgowan" [People.estesp] Name = "Phil Estes" Email = "estesp@gmail.com" GitHub = "estesp" [People.hqhq] Name = "Qiang Huang" Email = "h.huangqiang@huawei.com" GitHub = "hqhq" [People.jhowardmsft] Name = "John Howard" Email = "jhoward@microsoft.com" GitHub = "jhowardmsft" [People.mlaventure] Name = "Kenfe-Mickaël Laventure" Email = "mickael.laventure@gmail.com" GitHub = "mlaventure" [People.stevvooe] Name = "Stephen Day" Email = "stephen.day@docker.com" GitHub = "stevvooe" docker-containerd-tags-docker-17.12.1/Makefile000066400000000000000000000160211322771672400211320ustar00rootroot00000000000000# Root directory of the project (absolute path). ROOTDIR=$(dir $(abspath $(lastword $(MAKEFILE_LIST)))) # Base path used to install. DESTDIR=/usr/local # Used to populate variables in version package. VERSION=$(shell git describe --match 'v[0-9]*' --dirty='.m' --always) REVISION=$(shell git rev-parse HEAD)$(shell if ! git diff --no-ext-diff --quiet --exit-code; then echo .m; fi) ifneq "$(strip $(shell command -v go 2>/dev/null))" "" GOOS ?= $(shell go env GOOS) GOARCH ?= $(shell go env GOARCH) else GOOS ?= $$GOOS GOARCH ?= $$GOARCH endif WHALE = "🇩" ONI = "👹" RELEASE=containerd-$(VERSION:v%=%).${GOOS}-${GOARCH} PKG=github.com/containerd/containerd # Project packages. PACKAGES=$(shell go list ./... | grep -v /vendor/) INTEGRATION_PACKAGE=${PKG} TEST_REQUIRES_ROOT_PACKAGES=$(filter \ ${PACKAGES}, \ $(shell \ for f in $$(git grep -l testutil.RequiresRoot | grep -v Makefile); do \ d="$$(dirname $$f)"; \ [ "$$d" = "." ] && echo "${PKG}" && continue; \ echo "${PKG}/$$d"; \ done | sort -u) \ ) # Project binaries. COMMANDS=ctr containerd containerd-stress containerd-release BINARIES=$(addprefix bin/,$(COMMANDS)) GO_TAGS=$(if $(BUILDTAGS),-tags "$(BUILDTAGS)",) GO_LDFLAGS=-ldflags '-s -w -X $(PKG)/version.Version=$(VERSION) -X $(PKG)/version.Revision=$(REVISION) -X $(PKG)/version.Package=$(PKG) $(EXTRA_LDFLAGS)' SHIM_GO_LDFLAGS=-ldflags '-s -w -X $(PKG)/version.Version=$(VERSION) -X $(PKG)/version.Revision=$(REVISION) -X $(PKG)/version.Package=$(PKG) -extldflags "-static"' TESTFLAGS_RACE= GO_GCFLAGS= #Detect the target os include Makefile.OS #include platform specific makefile include Makefile.$(target_os) # Flags passed to `go test` TESTFLAGS ?= -v $(TESTFLAGS_RACE) TESTFLAGS_PARALLEL ?= 8 .PHONY: clean all AUTHORS fmt vet lint dco build binaries test integration setup generate protos checkprotos coverage ci check help install uninstall vendor release .DEFAULT: default all: binaries check: proto-fmt ## run all linters @echo "$(WHALE) $@" gometalinter --config .gometalinter.json ./... ci: check binaries checkprotos coverage coverage-integration ## to be used by the CI AUTHORS: .mailmap .git/HEAD git log --format='%aN <%aE>' | sort -fu > $@ setup: ## install dependencies @echo "$(WHALE) $@" # TODO(stevvooe): Install these from the vendor directory @go get -u github.com/alecthomas/gometalinter @gometalinter --install > /dev/null @go get -u github.com/stevvooe/protobuild generate: protos @echo "$(WHALE) $@" @PATH=${ROOTDIR}/bin:${PATH} go generate -x ${PACKAGES} protos: bin/protoc-gen-gogoctrd ## generate protobuf @echo "$(WHALE) $@" @PATH=${ROOTDIR}/bin:${PATH} protobuild --quiet ${PACKAGES} check-protos: protos ## check if protobufs needs to be generated again @echo "$(WHALE) $@" @test -z "$$(git status --short | grep ".pb.go" | tee /dev/stderr)" || \ ((git diff | cat) && \ (echo "$(ONI) please run 'make protos' when making changes to proto files" && false)) check-api-descriptors: protos ## check that protobuf changes aren't present. @echo "$(WHALE) $@" @test -z "$$(git status --short | grep ".pb.txt" | tee /dev/stderr)" || \ ((git diff $$(find . -name '*.pb.txt') | cat) && \ (echo "$(ONI) please run 'make protos' when making changes to proto files and check-in the generated descriptor file changes" && false)) proto-fmt: ## check format of proto files @echo "$(WHALE) $@" @test -z "$$(find . -path ./vendor -prune -o -path ./protobuf/google/rpc -prune -o -name '*.proto' -type f -exec grep -Hn -e "^ " {} \; | tee /dev/stderr)" || \ (echo "$(ONI) please indent proto files with tabs only" && false) @test -z "$$(find . -path ./vendor -prune -o -name '*.proto' -type f -exec grep -Hn "Meta meta = " {} \; | grep -v '(gogoproto.nullable) = false' | tee /dev/stderr)" || \ (echo "$(ONI) meta fields in proto files must have option (gogoproto.nullable) = false" && false) dco: ## dco check @which git-validation > /dev/null 2>/dev/null || (echo "ERROR: git-validation not found" && false) ifdef TRAVIS_COMMIT_RANGE git-validation -q -run DCO,short-subject,dangling-whitespace else git-validation -v -run DCO,short-subject,dangling-whitespace -range $(EPOCH_TEST_COMMIT)..HEAD endif build: ## build the go packages @echo "$(WHALE) $@" @go build ${EXTRA_FLAGS} ${GO_LDFLAGS} ${GO_GCFLAGS} ${PACKAGES} test: ## run tests, except integration tests and tests that require root @echo "$(WHALE) $@" @go test ${TESTFLAGS} $(filter-out ${INTEGRATION_PACKAGE},${PACKAGES}) root-test: ## run tests, except integration tests @echo "$(WHALE) $@" @go test ${TESTFLAGS} $(filter-out ${INTEGRATION_PACKAGE},${TEST_REQUIRES_ROOT_PACKAGES}) -test.root integration: ## run integration tests @echo "$(WHALE) $@" @go test ${TESTFLAGS} -test.root -parallel ${TESTFLAGS_PARALLEL} benchmark: ## run benchmarks tests @echo "$(WHALE) $@" @go test ${TESTFLAGS} -bench . -run Benchmark -test.root FORCE: # Build a binary from a cmd. bin/%: cmd/% FORCE @echo "$(WHALE) $@${BINARY_SUFFIX}" @go build -o $@${BINARY_SUFFIX} ${GO_LDFLAGS} ${GO_TAGS} ${GO_GCFLAGS} ./$< bin/containerd-shim: cmd/containerd-shim FORCE # set !cgo and omit pie for a static shim build: https://github.com/golang/go/issues/17789#issuecomment-258542220 @echo "$(WHALE) bin/containerd-shim" @CGO_ENABLED=0 go build -o bin/containerd-shim ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim binaries: $(BINARIES) ## build binaries @echo "$(WHALE) $@" release: $(BINARIES) @echo "$(WHALE) $@" @rm -rf releases/$(RELEASE) releases/$(RELEASE).tar.gz @install -d releases/$(RELEASE)/bin @install $(BINARIES) releases/$(RELEASE)/bin @cd releases/$(RELEASE) && tar -czf ../$(RELEASE).tar.gz * clean: ## clean up binaries @echo "$(WHALE) $@" @rm -f $(BINARIES) install: ## install binaries @echo "$(WHALE) $@ $(BINARIES)" @mkdir -p $(DESTDIR)/bin @install $(BINARIES) $(DESTDIR)/bin uninstall: @echo "$(WHALE) $@" @rm -f $(addprefix $(DESTDIR)/bin/,$(notdir $(BINARIES))) coverage: ## generate coverprofiles from the unit tests, except tests that require root @echo "$(WHALE) $@" @rm -f coverage.txt @go test -i ${TESTFLAGS} $(filter-out ${INTEGRATION_PACKAGE},${PACKAGES}) 2> /dev/null @( for pkg in $(filter-out ${INTEGRATION_PACKAGE},${PACKAGES}); do \ go test ${TESTFLAGS} \ -cover \ -coverprofile=profile.out \ -covermode=atomic $$pkg || exit; \ if [ -f profile.out ]; then \ cat profile.out >> coverage.txt; \ rm profile.out; \ fi; \ done ) root-coverage: ## generate coverage profiles for unit tests that require root @echo "$(WHALE) $@" @go test -i ${TESTFLAGS} $(filter-out ${INTEGRATION_PACKAGE},${TEST_REQUIRES_ROOT_PACKAGES}) 2> /dev/null @( for pkg in $(filter-out ${INTEGRATION_PACKAGE},${TEST_REQUIRES_ROOT_PACKAGES}); do \ go test ${TESTFLAGS} \ -cover \ -coverprofile=profile.out \ -covermode=atomic $$pkg -test.root || exit; \ if [ -f profile.out ]; then \ cat profile.out >> coverage.txt; \ rm profile.out; \ fi; \ done ) vendor: @echo "$(WHALE) $@" @vndr help: ## this help @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) | sort docker-containerd-tags-docker-17.12.1/Makefile.OS000066400000000000000000000005461322771672400214570ustar00rootroot00000000000000#Detect the OS, and return installos value same as GOOS target_os = ifeq ($(OS),Windows_NT) target_os = windows else UNAME_S := $(shell uname -s) ifeq ($(UNAME_S),Linux) target_os = linux endif ifeq ($(UNAME_S),Darwin) target_os = darwin endif ifeq ($(UNAME_S),FreeBSD) target_os = freebsd endif endif docker-containerd-tags-docker-17.12.1/Makefile.darwin000066400000000000000000000002121322771672400224100ustar00rootroot00000000000000#darwin specific settings COMMANDS += containerd-shim # amd64 supports go test -race ifeq ($(GOARCH),amd64) TESTFLAGS_RACE= -race endif docker-containerd-tags-docker-17.12.1/Makefile.freebsd000066400000000000000000000002131322771672400225370ustar00rootroot00000000000000#freebsd specific settings COMMANDS += containerd-shim # amd64 supports go test -race ifeq ($(GOARCH),amd64) TESTFLAGS_RACE= -race endif docker-containerd-tags-docker-17.12.1/Makefile.linux000066400000000000000000000003471322771672400222740ustar00rootroot00000000000000#linux specific settings COMMANDS += containerd-shim # check GOOS for cross compile builds ifeq ($(GOOS),linux) GO_GCFLAGS= -buildmode=pie endif # amd64 supports go test -race ifeq ($(GOARCH),amd64) TESTFLAGS_RACE= -race endif docker-containerd-tags-docker-17.12.1/Makefile.windows000066400000000000000000000002341322771672400226220ustar00rootroot00000000000000#Windows specific settings. WHALE = "+" ONI = "-" BINARY_SUFFIX=".exe" # amd64 supports go test -race ifeq ($(GOARCH),amd64) TESTFLAGS_RACE= -race endif docker-containerd-tags-docker-17.12.1/NOTICE000066400000000000000000000010071322771672400203740ustar00rootroot00000000000000Docker Copyright 2012-2015 Docker, Inc. This product includes software developed at Docker, Inc. (https://www.docker.com). The following is courtesy of our legal counsel: Use and transfer of Docker may be subject to certain restrictions by the United States and other governments. It is your responsibility to ensure that your use and/or transfer does not violate applicable laws. For more information, please see https://www.bis.doc.gov See also https://www.apache.org/dev/crypto.html and/or seek legal counsel. docker-containerd-tags-docker-17.12.1/Protobuild.toml000066400000000000000000000047171322771672400225230ustar00rootroot00000000000000version = "unstable" generator = "gogoctrd" plugins = ["grpc", "fieldpath"] # Control protoc include paths. Below are usually some good defaults, but feel # free to try it without them if it works for your project. [includes] # Include paths that will be added before all others. Typically, you want to # treat the root of the project as an include, but this may not be necessary. before = ["./protobuf"] # Paths that should be treated as include roots in relation to the vendor # directory. These will be calculated with the vendor directory nearest the # target package. packages = ["github.com/gogo/protobuf"] # Paths that will be added untouched to the end of the includes. We use # `/usr/local/include` to pickup the common install location of protobuf. # This is the default. after = ["/usr/local/include"] # This section maps protobuf imports to Go packages. These will become # `-M` directives in the call to the go protobuf generator. [packages] "gogoproto/gogo.proto" = "github.com/gogo/protobuf/gogoproto" "google/protobuf/any.proto" = "github.com/gogo/protobuf/types" "google/protobuf/empty.proto" = "github.com/gogo/protobuf/types" "google/protobuf/descriptor.proto" = "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" "google/protobuf/field_mask.proto" = "github.com/gogo/protobuf/types" "google/protobuf/timestamp.proto" = "github.com/gogo/protobuf/types" "google/protobuf/duration.proto" = "github.com/gogo/protobuf/types" "google/rpc/status.proto" = "github.com/containerd/containerd/protobuf/google/rpc" [[overrides]] prefixes = ["github.com/containerd/containerd/api/events"] plugins = ["fieldpath"] # disable grpc for this package [[overrides]] # enable ttrpc and disable fieldpath and grpc for the shim prefixes = ["github.com/containerd/containerd/linux/shim/v1"] plugins = ["ttrpc"] # Aggregrate the API descriptors to lock down API changes. [[descriptors]] prefix = "github.com/containerd/containerd/api" target = "api/next.pb.txt" ignore_files = [ "google/protobuf/descriptor.proto", "gogoproto/gogo.proto" ] # Lock down runc config [[descriptors]] prefix = "github.com/containerd/containerd/linux/runctypes" target = "linux/runctypes/next.pb.txt" ignore_files = [ "google/protobuf/descriptor.proto", "gogoproto/gogo.proto" ] [[descriptors]] prefix = "github.com/containerd/containerd/windows/hcsshimtypes" target = "windows/hcsshimtypes/next.pb.txt" ignore_files = [ "google/protobuf/descriptor.proto", "gogoproto/gogo.proto" ] docker-containerd-tags-docker-17.12.1/README.md000066400000000000000000000200111322771672400207430ustar00rootroot00000000000000![banner](/docs/images/containerd-dark.png?raw=true) [![GoDoc](https://godoc.org/github.com/containerd/containerd?status.svg)](https://godoc.org/github.com/containerd/containerd) [![Build Status](https://travis-ci.org/containerd/containerd.svg?branch=master)](https://travis-ci.org/containerd/containerd) [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fcontainerd%2Fcontainerd.svg?type=shield)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fcontainerd%2Fcontainerd?ref=badge_shield) [![Go Report Card](https://goreportcard.com/badge/github.com/containerd/containerd)](https://goreportcard.com/report/github.com/containerd/containerd) containerd is an industry-standard container runtime with an emphasis on simplicity, robustness and portability. It is available as a daemon for Linux and Windows, which can manage the complete container lifecycle of its host system: image transfer and storage, container execution and supervision, low-level storage and network attachments, etc. containerd is designed to be embedded into a larger system, rather than being used directly by developers or end-users. ![architecture](design/architecture.png) ## Getting Started See our documentation on [containerd.io](containerd.io): * [for ops and admins](docs/ops.md) * [namespaces](docs/namespaces.md) * [client options](docs/client-opts.md) See how to build containerd from source at [BUILDING](BUILDING.md). If you are interested in trying out containerd see our example at [Getting Started](docs/getting-started.md). ## Runtime Requirements Runtime requirements for containerd are very minimal. Most interactions with the Linux and Windows container feature sets are handled via [runc](https://github.com/opencontainers/runc) and/or OS-specific libraries (e.g. [hcsshim](https://github.com/Microsoft/hcsshim) for Microsoft). The current required version of `runc` is always listed in [RUNC.md](/RUNC.md). There are specific features used by containerd core code and snapshotters that will require a minimum kernel version on Linux. With the understood caveat of distro kernel versioning, a reasonable starting point for Linux is a minimum 4.x kernel version. The overlay filesystem snapshotter, used by default, uses features that were finalized in the 4.x kernel series. If you choose to use btrfs, there may be more flexibility in kernel version (minimum recommended is 3.18), but will require the btrfs kernel module and btrfs tools to be installed on your Linux distribution. To use Linux checkpoint and restore features, you will need `criu` installed on your system. See more details in [Checkpoint and Restore](#checkpoint-and-restore). Build requirements for developers are listed in [BUILDING](BUILDING.md). ## Features ### Client containerd offers a full client package to help you integrate containerd into your platform. ```go import ( "github.com/containerd/containerd" "github.com/containerd/containerd/cio" ) func main() { client, err := containerd.New("/run/containerd/containerd.sock") defer client.Close() } ``` ### Namespaces Namespaces allow multiple consumers to use the same containerd without conflicting with each other. It has the benefit of sharing content but still having separation with containers and images. To set a namespace for requests to the API: ```go context = context.Background() // create a context for docker docker = namespaces.WithNamespace(context, "docker") containerd, err := client.NewContainer(docker, "id") ``` To set a default namespace on the client: ```go client, err := containerd.New(address, containerd.WithDefaultNamespace("docker")) ``` ### Distribution ```go // pull an image image, err := client.Pull(context, "docker.io/library/redis:latest") // push an image err := client.Push(context, "docker.io/library/redis:latest", image.Target()) ``` ### Containers In containerd, a container is a metadata object. Resources such as an OCI runtime specification, image, root filesystem, and other metadata can be attached to a container. ```go redis, err := client.NewContainer(context, "redis-master") defer redis.Delete(context) ``` ### OCI Runtime Specification containerd fully supports the OCI runtime specification for running containers. We have built in functions to help you generate runtime specifications based on images as well as custom parameters. You can specify options when creating a container about how to modify the specification. ```go redis, err := client.NewContainer(context, "redis-master", containerd.WithNewSpec(oci.WithImageConfig(image))) ``` ### Root Filesystems containerd allows you to use overlay or snapshot filesystems with your containers. It comes with builtin support for overlayfs and btrfs. ```go // pull an image and unpack it into the configured snapshotter image, err := client.Pull(context, "docker.io/library/redis:latest", containerd.WithPullUnpack) // allocate a new RW root filesystem for a container based on the image redis, err := client.NewContainer(context, "redis-master", containerd.WithNewSnapshot("redis-rootfs", image), containerd.WithNewSpec(oci.WithImageConfig(image)), ) // use a readonly filesystem with multiple containers for i := 0; i < 10; i++ { id := fmt.Sprintf("id-%s", i) container, err := client.NewContainer(ctx, id, containerd.WithNewSnapshotView(id, image), containerd.WithNewSpec(oci.WithImageConfig(image)), ) } ``` ### Tasks Taking a container object and turning it into a runnable process on a system is done by creating a new `Task` from the container. A task represents the runnable object within containerd. ```go // create a new task task, err := redis.NewTask(context, cio.Stdio) defer task.Delete(context) // the task is now running and has a pid that can be use to setup networking // or other runtime settings outside of containerd pid := task.Pid() // start the redis-server process inside the container err := task.Start(context) // wait for the task to exit and get the exit status status, err := task.Wait(context) ``` ### Checkpoint and Restore If you have [criu](https://criu.org/Main_Page) installed on your machine you can checkpoint and restore containers and their tasks. This allow you to clone and/or live migrate containers to other machines. ```go // checkpoint the task then push it to a registry checkpoint, err := task.Checkpoint(context, containerd.WithExit) err := client.Push(context, "myregistry/checkpoints/redis:master", checkpoint) // on a new machine pull the checkpoint and restore the redis container image, err := client.Pull(context, "myregistry/checkpoints/redis:master") checkpoint := image.Target() redis, err = client.NewContainer(context, "redis-master", containerd.WithCheckpoint(checkpoint, "redis-rootfs")) defer container.Delete(context) task, err = redis.NewTask(context, cio.Stdio, containerd.WithTaskCheckpoint(checkpoint)) defer task.Delete(context) err := task.Start(context) ``` ### Releases and API Stability Please see [RELEASES.md](RELEASES.md) for details on versioning and stability of containerd components. ### Development reports. Weekly summary on the progress and what is being worked on. https://github.com/containerd/containerd/tree/master/reports ### Communication For async communication and long running discussions please use issues and pull requests on the github repo. This will be the best place to discuss design and implementation. For sync communication we have a community slack with a #containerd channel that everyone is welcome to join and chat about development. **Slack:** https://dockr.ly/community ### Reporting security issues __If you are reporting a security issue, please reach out discreetly at security@containerd.io__. ## Licenses The containerd codebase is released under the [Apache 2.0 license](LICENSE.code). The README.md file, and files in the "docs" folder are licensed under the Creative Commons Attribution 4.0 International License under the terms and conditions set forth in the file "[LICENSE.docs](LICENSE.docs)". You may obtain a duplicate copy of the same license, titled CC-BY-4.0, at http://creativecommons.org/licenses/by/4.0/. docker-containerd-tags-docker-17.12.1/RELEASES.md000066400000000000000000000272101322771672400212210ustar00rootroot00000000000000# Versioning and Release This document details the versioning and release plan for containerd. Stability is a top goal for this project and we hope that this document and the processes it entails will help to achieve that. It covers the release process, versioning numbering, backporting, API stability and support horizons. If you rely on containerd, it would be good to spend time understanding the areas of the API that are and are not supported and how they impact your project in the future. This document will be considered a living document. Supported timelines, backport targets and API stability guarantees will be updated here as they change. If there is something that you require or this document leaves out, please reach out by [filing an issue](https://github.com/containerd/containerd/issues). ## Releases Releases of containerd will be versioned using dotted triples, similar to [Semantic Version](http://semver.org/). For the purposes of this document, we will refer to the respective components of this triple as `..`. The version number may have additional information, such as alpha, beta and release candidate qualifications. Such releases will be considered "pre-releases". ### Major and Minor Releases Major and minor releases of containerd will be made from master. Releases of containerd will be marked with GPG signed tags and announced at https://github.com/containerd/containerd/releases. The tag will be of the format `v..` and should be made with the command `git tag -s v..`. After a minor release, a branch will be created, with the format `release/.` from the minor tag. All further patch releases will be done from that branch. For example, once we release `v1.0.0`, a branch `release/1.0` will be created from that tag. All future patch releases will be done against that branch. ### Pre-releases Pre-releases, such as alphas, betas and release candidates will be conducted from their source branch. For major and minor releases, these releases will be done from master. For patch releases, these pre-releases should be done within the corresponding release branch. While pre-releases are done to assist in the stabilization process, no guarantees are provided. ### Upgrade Path The upgrade path for containerd is such that the 0.0.x patch releases are always backward compatible with its major and minor version. Minor (0.x.0) version will always be compatible with the previous minor release. i.e. 1.2.0 is backwards compatible with 1.1.0 and 1.1.0 is compatible with 1.0.0. There is no compatibility guarantees for upgrades that span multiple, _minor_ releases. For example, 1.0.0 to 1.2.0 is not supported. One should first upgrade to 1.1, then 1.2. There are no compatibility guarantees with upgrades to _major_ versions. For example, upgrading from 1.0.0 to 2.0.0 may require resources to migrated or integrations to change. Each major version will be supported for at least 1 year with bug fixes and security patches. ### Next Release The activity for the next release will be tracked in the [milestones](https://github.com/containerd/containerd/milestones). If your issue or PR is not present in a milestone, please reach out to the maintainers to create the milestone or add an issue or PR to an existing milestone. ### Support Horizon Support horizons will be defined corresponding to a release branch, identified by `.`. Releases branches will be in one of several states: - __*Next*__: The next planned release branch. - __*Active*__: The release is currently supported and accepting patches. - __*End of Life*__: The release branch is no longer support and no new patches will be accepted. Releases will be supported up to one year after a _minor_ release. This means that we will accept bug reports and backports to release branches until the end of life date. If no new _minor_ release has been made, that release will be considered supported until the next _minor_ is released or one year, whichever is longer. The current state is available in the following table: | Release | Status | Start | End of Life | |---------|-------------|------------------|-------------------| | [0.0](https://github.com/containerd/containerd/releases/tag/0.0.5) | End of Life | Dec 4, 2015 | - | | [0.1](https://github.com/containerd/containerd/releases/tag/v0.1.0) | End of Life | Mar 21, 2016 | - | | [0.2](https://github.com/containerd/containerd/tree/v0.2.x) | End of Life | Apr 21, 2016 | December 5, 2017 | | [1.0](https://github.com/containerd/contaienrd/releases/tag/v1.0.0) | Active | December 5, 2017 | max(December 5, 2018, release of 1.1.0) | | [1.1](https://github.com/containerd/containerd/milestone/15) | Next | TBD | max(TBD+1 year, release of 1.2.0) | Note that branches and release from before 1.0 may not follow these rules. This table should be updated as part of the release preparation process. ### Backporting Backports in containerd are community driven. As maintainers, we'll try to ensure that sensible bugfixes make it into _active_ release, but our main focus will be features for the next _minor_ or _major_ release. For the most part, this process is straightforward and we are here to help make it as smooth as possible. If there are important fixes that need to be backported, please let use know in one of three ways: 1. Open an issue. 2. Open a PR with cherry-picked change from master. 3. Open a PR with a ported fix. __If you are reporting a security issue, please reach out discreetly at security@containerd.io__. Remember that backported PRs must follow the versioning guidelines from this document. Any release that is "active" can accept backports. Opening a backport PR is fairly straightforward. The steps differ depending on whether you are pulling a fix from master or need to draft a new commit specific to a particular branch. To cherry pick a straightforward commit from master, simply use the cherry pick process: 1. Pick the branch to which you want backported, usually in the format `release/.`. The following will create a branch you can use to open a PR: ```console $ git checkout -b my-backport-branch release/.. ``` 2. Find the commit you want backported. 3. Apply it to the release branch: ```console $ git cherry-pick -xsS ``` 4. Push the branch and open up a PR against the _release branch_: ``` $ git push -u stevvooe my-backport-branch ``` Make sure to replace `stevvooe` with whatever fork you are using to open the PR. When you open the PR, make sure to switch `master` with whatever release branch you are targeting with the fix. If there is no existing fix in master, you should first fix the bug in master, or ask us a maintainer or contributor to do it via an issue. Once that PR is completed, open a PR using the process above. Only when the bug is not seen in master and must be made for the specific release branch should you open a PR with new code. ## Public API Stability The following table provides an overview of the components covered by containerd versions: | Component | Status | Stablized Version | Links | |---------------|----------|-------------------|---------------| | GRPC API | Beta | 1.0 | [api/](api) | | Metrics API | Beta | 1.0 | - | Go client API | Unstable | 1.1 tentative | [godoc](https://godoc.org/github.com/containerd/containerd) | | `ctr` tool | Unstable | Out of scope | - | From the version stated in the above table, that component must adhere to the stability constraints expected in release versions. Unless explicitly stated here, components that are called out as unstable or not covered may change in a future minor version. Breaking changes to "unstable" components will be avoided in patch versions. ### GRPC API The primary product of containerd is the GRPC API. As of the 1.0.0 release, the GRPC API will not have any backwards incompatible changes without a _major_ version jump. To ensure compatibility, we have collected the entire GRPC API symbol set into a single file. At each _minor_ release of containerd, we will move the current `next.pb.txt` file to a file named for the minor version, such as `1.0.pb.txt`, enumerating the support services and messages. See [api/](api) for details. Note that new services may be added in _minor_ releases. New service methods and new fields on messages may be added if they are optional. ### Metrics API The metrics API that outputs prometheus style metrics will be versioned independently, prefixed with the API version. i.e. `/v1/metrics`, `/v2/metrics`. The metrics API version will be incremented when breaking changes are made to the prometheus output. New metrics can be added to the output in a backwards compatible manner without bumping the API version. ### Plugins API containerd is based on a modular design where plugins are implemented to provide the core functionality. Plugins implemented in tree are supported by the containerd community unless explicitly specified as non-stable. Out of tree plugins are not supported by the containerd maintainers. Currently, the Windows runtime and snapshot plugins are not stable and not supported. Please refer to the github milestones for Windows support in a future release. #### Error Codes Error codes will not change in a patch release, unless a missing error code causes a blocking bug. Error codes of type "unknown" may change to more specific types in the future. Any error code that is not "unknown" that is currently returned by a service will not change without a _major_ release or a new version of the service. If you find that an error code that is required by your application is not well-documented in the protobuf service description or tested explicitly, please file and issue and we will clarify. #### Opaque Fields Unless explicitly stated, the formats of certain fields may not be covered by this guarantee and should be treated opaquely. For example, don't rely on the format details of a URL field unless we explicitly say that the field will follow that format. ### Go client API The Go client API, documented in [godoc](https://godoc.org/github.com/containerd/containerd), is currently considered unstable. It is recommended to vendor the necessary components to stabilize your project build. Note that because the Go API interfaces with the GRPC API, clients written against a 1.0 Go API should remain compatible with future 1.x series releases. We intend to stabilize the API in a future release when more integrations have been carried out. Any changes to the API should be detectable at compile time, so upgrading will be a matter of fixing compilation errors and moving from there. ### `ctr` tool The `ctr` tool provides the ability to introspect and understand the containerd API. At this time, it is not considered a primary offering of the project. It may be completely refactored or have breaking changes in _minor_ releases. We will try not break the tool in _patch_ releases. ### Not Covered As a general rule, anything not mentioned in this document is not covered by the stability guidelines and may change in any release. Explicitly, this pertains to this non-exhaustive list of components: - File System layout - Storage formats - Snapshot formats Between upgrades of subsequent, _minor_ versions, we may migrate these formats. Any outside processes relying on details of these file system layouts may break in that process. Container root file systems will be maintained on upgrade. ### Exceptions We may make exceptions in the interest of __security patches__. If a break is required, it will be communicated clearly and the solution will be considered against total impact. docker-containerd-tags-docker-17.12.1/ROADMAP.md000066400000000000000000000002451322771672400211000ustar00rootroot00000000000000# containerd Roadmap Please review the milestones on [github](https://github.com/containerd/containerd/milestones) for the updated roadmap and release information. docker-containerd-tags-docker-17.12.1/RUNC.md000066400000000000000000000023751322771672400205720ustar00rootroot00000000000000containerd is built with OCI support and with support for advanced features provided by [runc](https://github.com/opencontainers/runc). We depend on a specific `runc` version when dealing with advanced features. You should have a specific runc build for development. The current supported runc commit is: RUNC_COMMIT = 7f24b40cc5423969b4554ef04ba0b00e2b4ba010 For more information on how to clone and build runc see the runc Building [documentation](https://github.com/opencontainers/runc#building). Note: before building you may need to install additional support, which will vary by platform. For example, you may need to install `libseccomp` and `libapparmor` e.g. `libseccomp-dev` and `libapparmor-dev` for Ubuntu. ## building From within your `opencontainers/runc` repository run: ### apparmor ```bash make BUILDTAGS='seccomp apparmor' && sudo make install ``` ### selinux ```bash make BUILDTAGS='seccomp selinux' && sudo make install ``` After an official runc release we will start pinning containerd support to a specific version but various development and testing features may require a newer runc version than the latest release. If you encounter any runtime errors, please make sure your runc is in sync with the commit/tag provided in this document. docker-containerd-tags-docker-17.12.1/SCOPE.md000066400000000000000000000110271322771672400206660ustar00rootroot00000000000000# Scope and Principles Having a clearly defined scope of a project is important for ensuring consistency and focus. These following criteria will be used when reviewing pull requests, features, and changes for the project before being accepted. ### Components Components should not have tight dependencies on each other so that they are able to be used independently. The APIs for images and containers should be designed in a way that when used together the components have a natural flow but still be useful independently. An example for this design can be seen with the overlay filesystems and the container execution layer. The execution layer and overlay filesystems can be used independently but if you were to use both, they share a common `Mount` struct that the filesystems produce and the execution layer consumes. ### Primitives containerd should expose primitives to solve problems instead of building high level abstractions in the API. A common example of this is how build would be implemented. Instead of having a build API in containerd we should expose the lower level primitives that allow things required in build to work. Breaking up the filesystem APIs to allow snapshots, copy functionality, and mounts allow people implementing build at the higher levels with more flexibility. ### Extensibility and Defaults For the various components in containerd there should be defined extension points where implementations can be swapped for alternatives. The best example of this is that containerd will use `runc` from OCI as the default runtime in the execution layer but other runtimes conforming to the OCI Runtime specification can be easily added to containerd. containerd will come with a default implementation for the various components. These defaults will be chosen by the maintainers of the project and should not change unless better tech for that component comes out. Additional implementations will not be accepted into the core repository and should be developed in a separate repository not maintained by the containerd maintainers. ## Scope The following table specifies the various components of containerd and general features of container runtimes. The table specifies whether or not the feature/component is in or out of scope. | Name | Description | In/Out | Reason | |------------------------------|--------------------------------------------------------------------------------------------------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | execution | Provide an extensible execution layer for executing a container | in | Create,start, stop pause, resume exec, signal, delete | | cow filesystem | Built in functionality for overlay, aufs, and other copy on write filesystems for containers | in | | | distribution | Having the ability to push and pull images as well as operations on images as a first class API object | in | containerd will fully support the management and retrieval of images | | metrics | container-level metrics, cgroup stats, and OOM events | in | | networking | creation and management of network interfaces | out | Networking will be handled and provided to containerd via higher level systems. | | build | Building images as a first class API | out | Build is a higher level tooling feature and can be implemented in many different ways on top of containerd | | volumes | Volume management for external data | out | The API supports mounts, binds, etc where all volumes type systems can be built on top of containerd. | | logging | Persisting container logs | out | Logging can be build on top of containerd because the container’s STDIO will be provided to the clients and they can persist any way they see fit. There is no io copying of container STDIO in containerd. | containerd is scoped to a single host and makes assumptions based on that fact. It can be used to build things like a node agent that launches containers but does not have any concepts of a distributed system. containerd is designed to be embedded into a larger system, hence it only includes a barebone CLI (`ctr`) specifically for development and debugging purpose, with no mandate to be human-friendly, and no guarantee of interface stability over time. ### How is the scope changed? The scope of this project is a whitelist. If it's not mentioned as being in scope, it is out of scope. For the scope of this project to change it requires a 100% vote from all maintainers of the project. docker-containerd-tags-docker-17.12.1/api/000077500000000000000000000000001322771672400202435ustar00rootroot00000000000000docker-containerd-tags-docker-17.12.1/api/README.md000066400000000000000000000015721322771672400215270ustar00rootroot00000000000000This directory contains the GRPC API definitions for containerd. All defined services and messages have been aggregated into `*.pb.txt` descriptors files in this directory. Definitions present here are considered frozen after the release. At release time, the current `next.pb.txt` file will be moved into place to freeze the API changes for the minor version. For example, when 1.0.0 is released, `next.pb.txt` should be moved to `1.0.txt`. Notice that we leave off the patch number, since the API will be completely locked down for a given patch series. We may find that by default, protobuf descriptors are too noisy to lock down API changes. In that case, we may filter out certain fields in the descriptors, possibly regenerating for old versions. This process is similar to the [process used to ensure backwards compatibility in Go](https://github.com/golang/go/tree/master/api). docker-containerd-tags-docker-17.12.1/api/events/000077500000000000000000000000001322771672400215475ustar00rootroot00000000000000docker-containerd-tags-docker-17.12.1/api/events/container.pb.go000066400000000000000000000756621322771672400245000ustar00rootroot00000000000000// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/containerd/containerd/api/events/container.proto /* Package events is a generated protocol buffer package. It is generated from these files: github.com/containerd/containerd/api/events/container.proto github.com/containerd/containerd/api/events/content.proto github.com/containerd/containerd/api/events/image.proto github.com/containerd/containerd/api/events/namespace.proto github.com/containerd/containerd/api/events/snapshot.proto github.com/containerd/containerd/api/events/task.proto It has these top-level messages: ContainerCreate ContainerUpdate ContainerDelete ContentDelete ImageCreate ImageUpdate ImageDelete NamespaceCreate NamespaceUpdate NamespaceDelete SnapshotPrepare SnapshotCommit SnapshotRemove TaskCreate TaskStart TaskDelete TaskIO TaskExit TaskOOM TaskExecAdded TaskExecStarted TaskPaused TaskResumed TaskCheckpointed */ package events import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" import google_protobuf "github.com/gogo/protobuf/types" // skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto" // skipping weak import containerd_plugin "github.com/containerd/containerd/protobuf/plugin" import github_com_containerd_typeurl "github.com/containerd/typeurl" import strings "strings" import reflect "reflect" import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" import io "io" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package type ContainerCreate struct { ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Image string `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"` Runtime *ContainerCreate_Runtime `protobuf:"bytes,3,opt,name=runtime" json:"runtime,omitempty"` } func (m *ContainerCreate) Reset() { *m = ContainerCreate{} } func (*ContainerCreate) ProtoMessage() {} func (*ContainerCreate) Descriptor() ([]byte, []int) { return fileDescriptorContainer, []int{0} } type ContainerCreate_Runtime struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Options *google_protobuf.Any `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"` } func (m *ContainerCreate_Runtime) Reset() { *m = ContainerCreate_Runtime{} } func (*ContainerCreate_Runtime) ProtoMessage() {} func (*ContainerCreate_Runtime) Descriptor() ([]byte, []int) { return fileDescriptorContainer, []int{0, 0} } type ContainerUpdate struct { ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Image string `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"` Labels map[string]string `protobuf:"bytes,3,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` SnapshotKey string `protobuf:"bytes,4,opt,name=snapshot_key,json=snapshotKey,proto3" json:"snapshot_key,omitempty"` } func (m *ContainerUpdate) Reset() { *m = ContainerUpdate{} } func (*ContainerUpdate) ProtoMessage() {} func (*ContainerUpdate) Descriptor() ([]byte, []int) { return fileDescriptorContainer, []int{1} } type ContainerDelete struct { ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } func (m *ContainerDelete) Reset() { *m = ContainerDelete{} } func (*ContainerDelete) ProtoMessage() {} func (*ContainerDelete) Descriptor() ([]byte, []int) { return fileDescriptorContainer, []int{2} } func init() { proto.RegisterType((*ContainerCreate)(nil), "containerd.events.ContainerCreate") proto.RegisterType((*ContainerCreate_Runtime)(nil), "containerd.events.ContainerCreate.Runtime") proto.RegisterType((*ContainerUpdate)(nil), "containerd.events.ContainerUpdate") proto.RegisterType((*ContainerDelete)(nil), "containerd.events.ContainerDelete") } // Field returns the value for the given fieldpath as a string, if defined. // If the value is not defined, the second value will be false. func (m *ContainerCreate) Field(fieldpath []string) (string, bool) { if len(fieldpath) == 0 { return "", false } switch fieldpath[0] { case "id": return string(m.ID), len(m.ID) > 0 case "image": return string(m.Image), len(m.Image) > 0 case "runtime": // NOTE(stevvooe): This is probably not correct in many cases. // We assume that the target message also implements the Field // method, which isn't likely true in a lot of cases. // // If you have a broken build and have found this comment, // you may be closer to a solution. if m.Runtime == nil { return "", false } return m.Runtime.Field(fieldpath[1:]) } return "", false } // Field returns the value for the given fieldpath as a string, if defined. // If the value is not defined, the second value will be false. func (m *ContainerCreate_Runtime) Field(fieldpath []string) (string, bool) { if len(fieldpath) == 0 { return "", false } switch fieldpath[0] { case "name": return string(m.Name), len(m.Name) > 0 case "options": decoded, err := github_com_containerd_typeurl.UnmarshalAny(m.Options) if err != nil { return "", false } adaptor, ok := decoded.(interface { Field([]string) (string, bool) }) if !ok { return "", false } return adaptor.Field(fieldpath[1:]) } return "", false } // Field returns the value for the given fieldpath as a string, if defined. // If the value is not defined, the second value will be false. func (m *ContainerUpdate) Field(fieldpath []string) (string, bool) { if len(fieldpath) == 0 { return "", false } switch fieldpath[0] { case "id": return string(m.ID), len(m.ID) > 0 case "image": return string(m.Image), len(m.Image) > 0 case "labels": // Labels fields have been special-cased by name. If this breaks, // add better special casing to fieldpath plugin. if len(m.Labels) == 0 { return "", false } value, ok := m.Labels[strings.Join(fieldpath[1:], ".")] return value, ok case "snapshot_key": return string(m.SnapshotKey), len(m.SnapshotKey) > 0 } return "", false } // Field returns the value for the given fieldpath as a string, if defined. // If the value is not defined, the second value will be false. func (m *ContainerDelete) Field(fieldpath []string) (string, bool) { if len(fieldpath) == 0 { return "", false } switch fieldpath[0] { case "id": return string(m.ID), len(m.ID) > 0 } return "", false } func (m *ContainerCreate) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ContainerCreate) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.ID) > 0 { dAtA[i] = 0xa i++ i = encodeVarintContainer(dAtA, i, uint64(len(m.ID))) i += copy(dAtA[i:], m.ID) } if len(m.Image) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintContainer(dAtA, i, uint64(len(m.Image))) i += copy(dAtA[i:], m.Image) } if m.Runtime != nil { dAtA[i] = 0x1a i++ i = encodeVarintContainer(dAtA, i, uint64(m.Runtime.Size())) n1, err := m.Runtime.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n1 } return i, nil } func (m *ContainerCreate_Runtime) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ContainerCreate_Runtime) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Name) > 0 { dAtA[i] = 0xa i++ i = encodeVarintContainer(dAtA, i, uint64(len(m.Name))) i += copy(dAtA[i:], m.Name) } if m.Options != nil { dAtA[i] = 0x12 i++ i = encodeVarintContainer(dAtA, i, uint64(m.Options.Size())) n2, err := m.Options.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n2 } return i, nil } func (m *ContainerUpdate) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ContainerUpdate) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.ID) > 0 { dAtA[i] = 0xa i++ i = encodeVarintContainer(dAtA, i, uint64(len(m.ID))) i += copy(dAtA[i:], m.ID) } if len(m.Image) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintContainer(dAtA, i, uint64(len(m.Image))) i += copy(dAtA[i:], m.Image) } if len(m.Labels) > 0 { for k, _ := range m.Labels { dAtA[i] = 0x1a i++ v := m.Labels[k] mapSize := 1 + len(k) + sovContainer(uint64(len(k))) + 1 + len(v) + sovContainer(uint64(len(v))) i = encodeVarintContainer(dAtA, i, uint64(mapSize)) dAtA[i] = 0xa i++ i = encodeVarintContainer(dAtA, i, uint64(len(k))) i += copy(dAtA[i:], k) dAtA[i] = 0x12 i++ i = encodeVarintContainer(dAtA, i, uint64(len(v))) i += copy(dAtA[i:], v) } } if len(m.SnapshotKey) > 0 { dAtA[i] = 0x22 i++ i = encodeVarintContainer(dAtA, i, uint64(len(m.SnapshotKey))) i += copy(dAtA[i:], m.SnapshotKey) } return i, nil } func (m *ContainerDelete) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ContainerDelete) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.ID) > 0 { dAtA[i] = 0xa i++ i = encodeVarintContainer(dAtA, i, uint64(len(m.ID))) i += copy(dAtA[i:], m.ID) } return i, nil } func encodeVarintContainer(dAtA []byte, offset int, v uint64) int { for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return offset + 1 } func (m *ContainerCreate) Size() (n int) { var l int _ = l l = len(m.ID) if l > 0 { n += 1 + l + sovContainer(uint64(l)) } l = len(m.Image) if l > 0 { n += 1 + l + sovContainer(uint64(l)) } if m.Runtime != nil { l = m.Runtime.Size() n += 1 + l + sovContainer(uint64(l)) } return n } func (m *ContainerCreate_Runtime) Size() (n int) { var l int _ = l l = len(m.Name) if l > 0 { n += 1 + l + sovContainer(uint64(l)) } if m.Options != nil { l = m.Options.Size() n += 1 + l + sovContainer(uint64(l)) } return n } func (m *ContainerUpdate) Size() (n int) { var l int _ = l l = len(m.ID) if l > 0 { n += 1 + l + sovContainer(uint64(l)) } l = len(m.Image) if l > 0 { n += 1 + l + sovContainer(uint64(l)) } if len(m.Labels) > 0 { for k, v := range m.Labels { _ = k _ = v mapEntrySize := 1 + len(k) + sovContainer(uint64(len(k))) + 1 + len(v) + sovContainer(uint64(len(v))) n += mapEntrySize + 1 + sovContainer(uint64(mapEntrySize)) } } l = len(m.SnapshotKey) if l > 0 { n += 1 + l + sovContainer(uint64(l)) } return n } func (m *ContainerDelete) Size() (n int) { var l int _ = l l = len(m.ID) if l > 0 { n += 1 + l + sovContainer(uint64(l)) } return n } func sovContainer(x uint64) (n int) { for { n++ x >>= 7 if x == 0 { break } } return n } func sozContainer(x uint64) (n int) { return sovContainer(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (this *ContainerCreate) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&ContainerCreate{`, `ID:` + fmt.Sprintf("%v", this.ID) + `,`, `Image:` + fmt.Sprintf("%v", this.Image) + `,`, `Runtime:` + strings.Replace(fmt.Sprintf("%v", this.Runtime), "ContainerCreate_Runtime", "ContainerCreate_Runtime", 1) + `,`, `}`, }, "") return s } func (this *ContainerCreate_Runtime) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&ContainerCreate_Runtime{`, `Name:` + fmt.Sprintf("%v", this.Name) + `,`, `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Any", "google_protobuf.Any", 1) + `,`, `}`, }, "") return s } func (this *ContainerUpdate) String() string { if this == nil { return "nil" } keysForLabels := make([]string, 0, len(this.Labels)) for k, _ := range this.Labels { keysForLabels = append(keysForLabels, k) } github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) mapStringForLabels := "map[string]string{" for _, k := range keysForLabels { mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) } mapStringForLabels += "}" s := strings.Join([]string{`&ContainerUpdate{`, `ID:` + fmt.Sprintf("%v", this.ID) + `,`, `Image:` + fmt.Sprintf("%v", this.Image) + `,`, `Labels:` + mapStringForLabels + `,`, `SnapshotKey:` + fmt.Sprintf("%v", this.SnapshotKey) + `,`, `}`, }, "") return s } func (this *ContainerDelete) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&ContainerDelete{`, `ID:` + fmt.Sprintf("%v", this.ID) + `,`, `}`, }, "") return s } func valueToStringContainer(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { return "nil" } pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } func (m *ContainerCreate) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainer } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ContainerCreate: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ContainerCreate: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainer } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthContainer } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainer } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthContainer } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Image = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Runtime", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainer } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthContainer } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Runtime == nil { m.Runtime = &ContainerCreate_Runtime{} } if err := m.Runtime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipContainer(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthContainer } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ContainerCreate_Runtime) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainer } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Runtime: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Runtime: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainer } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthContainer } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainer } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthContainer } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Options == nil { m.Options = &google_protobuf.Any{} } if err := m.Options.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipContainer(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthContainer } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ContainerUpdate) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainer } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ContainerUpdate: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ContainerUpdate: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainer } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthContainer } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainer } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthContainer } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Image = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainer } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthContainer } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Labels == nil { m.Labels = make(map[string]string) } var mapkey string var mapvalue string for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainer } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainer } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapkey |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { return ErrInvalidLengthContainer } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var stringLenmapvalue uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainer } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapvalue |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLenmapvalue := int(stringLenmapvalue) if intStringLenmapvalue < 0 { return ErrInvalidLengthContainer } postStringIndexmapvalue := iNdEx + intStringLenmapvalue if postStringIndexmapvalue > l { return io.ErrUnexpectedEOF } mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) iNdEx = postStringIndexmapvalue } else { iNdEx = entryPreIndex skippy, err := skipContainer(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthContainer } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.Labels[mapkey] = mapvalue iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field SnapshotKey", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainer } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthContainer } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.SnapshotKey = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipContainer(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthContainer } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ContainerDelete) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainer } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ContainerDelete: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ContainerDelete: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainer } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthContainer } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipContainer(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthContainer } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipContainer(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowContainer } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } wireType := int(wire & 0x7) switch wireType { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowContainer } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } iNdEx++ if dAtA[iNdEx-1] < 0x80 { break } } return iNdEx, nil case 1: iNdEx += 8 return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowContainer } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ length |= (int(b) & 0x7F) << shift if b < 0x80 { break } } iNdEx += length if length < 0 { return 0, ErrInvalidLengthContainer } return iNdEx, nil case 3: for { var innerWire uint64 var start int = iNdEx for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowContainer } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ innerWire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } innerWireType := int(innerWire & 0x7) if innerWireType == 4 { break } next, err := skipContainer(dAtA[start:]) if err != nil { return 0, err } iNdEx = start + next } return iNdEx, nil case 4: return iNdEx, nil case 5: iNdEx += 4 return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } } panic("unreachable") } var ( ErrInvalidLengthContainer = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowContainer = fmt.Errorf("proto: integer overflow") ) func init() { proto.RegisterFile("github.com/containerd/containerd/api/events/container.proto", fileDescriptorContainer) } var fileDescriptorContainer = []byte{ // 413 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xc1, 0x0a, 0xd3, 0x30, 0x18, 0xc7, 0x97, 0x76, 0x6e, 0x98, 0x0a, 0x6a, 0x18, 0x52, 0x7b, 0xa8, 0x73, 0xa7, 0xe9, 0x21, 0x85, 0x7a, 0x51, 0x77, 0xd1, 0x6d, 0x0a, 0xa2, 0x82, 0x14, 0x84, 0xe1, 0x45, 0xd2, 0x35, 0xeb, 0x82, 0x6d, 0x52, 0xda, 0x74, 0xd0, 0x9b, 0x8f, 0xe2, 0xe3, 0xec, 0xe8, 0xc1, 0x83, 0x27, 0x71, 0x05, 0xdf, 0xc0, 0x07, 0x90, 0x26, 0xeb, 0x56, 0x14, 0x95, 0x9d, 0xfa, 0xcf, 0xd7, 0xff, 0x3f, 0xdf, 0xf7, 0xfb, 0x08, 0x9c, 0xc5, 0x4c, 0x6e, 0xcb, 0x10, 0xaf, 0x45, 0xea, 0xad, 0x05, 0x97, 0x84, 0x71, 0x9a, 0x47, 0x5d, 0x49, 0x32, 0xe6, 0xd1, 0x1d, 0xe5, 0xb2, 0x38, 0x57, 0x71, 0x96, 0x0b, 0x29, 0xd0, 0xcd, 0xb3, 0x0d, 0x6b, 0x8b, 0x73, 0x3b, 0x16, 0x22, 0x4e, 0xa8, 0xa7, 0x0c, 0x61, 0xb9, 0xf1, 0x08, 0xaf, 0xb4, 0xdb, 0x19, 0xc5, 0x22, 0x16, 0x4a, 0x7a, 0x8d, 0x3a, 0x56, 0x9f, 0xfc, 0x77, 0x80, 0xd3, 0x55, 0x59, 0x52, 0xc6, 0x8c, 0x7b, 0x1b, 0x46, 0x93, 0x28, 0x23, 0x72, 0xab, 0x6f, 0x98, 0x7c, 0x01, 0xf0, 0xfa, 0xa2, 0xb5, 0x2f, 0x72, 0x4a, 0x24, 0x45, 0xb7, 0xa0, 0xc1, 0x22, 0x1b, 0x8c, 0xc1, 0xf4, 0xea, 0x7c, 0x50, 0x7f, 0xbb, 0x63, 0xbc, 0x58, 0x06, 0x06, 0x8b, 0xd0, 0x08, 0x5e, 0x61, 0x29, 0x89, 0xa9, 0x6d, 0x34, 0xbf, 0x02, 0x7d, 0x40, 0x4b, 0x38, 0xcc, 0x4b, 0x2e, 0x59, 0x4a, 0x6d, 0x73, 0x0c, 0xa6, 0x96, 0x7f, 0x1f, 0xff, 0x41, 0x86, 0x7f, 0x6b, 0x81, 0x03, 0x9d, 0x08, 0xda, 0xa8, 0xf3, 0x1a, 0x0e, 0x8f, 0x35, 0x84, 0x60, 0x9f, 0x93, 0x94, 0xea, 0x01, 0x02, 0xa5, 0x11, 0x86, 0x43, 0x91, 0x49, 0x26, 0x78, 0xa1, 0x9a, 0x5b, 0xfe, 0x08, 0xeb, 0x5d, 0xe1, 0x16, 0x10, 0x3f, 0xe5, 0x55, 0xd0, 0x9a, 0x26, 0x3f, 0xba, 0x58, 0x6f, 0xb3, 0xe8, 0x72, 0xac, 0xe7, 0x70, 0x90, 0x90, 0x90, 0x26, 0x85, 0x6d, 0x8e, 0xcd, 0xa9, 0xe5, 0xe3, 0x7f, 0x51, 0xe9, 0x0e, 0xf8, 0x95, 0x0a, 0x3c, 0xe3, 0x32, 0xaf, 0x82, 0x63, 0x1a, 0xdd, 0x85, 0xd7, 0x0a, 0x4e, 0xb2, 0x62, 0x2b, 0xe4, 0xfb, 0x0f, 0xb4, 0xb2, 0xfb, 0xaa, 0x89, 0xd5, 0xd6, 0x5e, 0xd2, 0xca, 0x79, 0x04, 0xad, 0x4e, 0x12, 0xdd, 0x80, 0x66, 0x63, 0xd4, 0xf8, 0x8d, 0x6c, 0x26, 0xdc, 0x91, 0xa4, 0x3c, 0x4d, 0xa8, 0x0e, 0x8f, 0x8d, 0x87, 0x60, 0x72, 0xaf, 0x83, 0xb9, 0xa4, 0x09, 0xfd, 0x3b, 0xe6, 0xfc, 0xcd, 0xfe, 0xe0, 0xf6, 0xbe, 0x1e, 0xdc, 0xde, 0xc7, 0xda, 0x05, 0xfb, 0xda, 0x05, 0x9f, 0x6b, 0x17, 0x7c, 0xaf, 0x5d, 0xf0, 0xe9, 0xa7, 0x0b, 0xde, 0xf9, 0x17, 0x3c, 0xe5, 0x99, 0xfe, 0xac, 0xc0, 0xca, 0x08, 0x07, 0x6a, 0xff, 0x0f, 0x7e, 0x05, 0x00, 0x00, 0xff, 0xff, 0xf5, 0x09, 0xe0, 0xd6, 0x0b, 0x03, 0x00, 0x00, } docker-containerd-tags-docker-17.12.1/api/events/container.proto000066400000000000000000000012171322771672400246170ustar00rootroot00000000000000syntax = "proto3"; package containerd.events; import "google/protobuf/any.proto"; import weak "gogoproto/gogo.proto"; import weak "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto"; option go_package = "github.com/containerd/containerd/api/events;events"; option (containerd.plugin.fieldpath_all) = true; message ContainerCreate { string id = 1; string image = 2; message Runtime { string name = 1; google.protobuf.Any options = 2; } Runtime runtime = 3; } message ContainerUpdate { string id = 1; string image = 2; map labels = 3; string snapshot_key = 4; } message ContainerDelete { string id = 1; } docker-containerd-tags-docker-17.12.1/api/events/content.pb.go000066400000000000000000000202111322771672400241440ustar00rootroot00000000000000// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/containerd/containerd/api/events/content.proto package events import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" // skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto" // skipping weak import containerd_plugin "github.com/containerd/containerd/protobuf/plugin" import github_com_opencontainers_go_digest "github.com/opencontainers/go-digest" import strings "strings" import reflect "reflect" import io "io" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf type ContentDelete struct { Digest github_com_opencontainers_go_digest.Digest `protobuf:"bytes,1,opt,name=digest,proto3,customtype=github.com/opencontainers/go-digest.Digest" json:"digest"` } func (m *ContentDelete) Reset() { *m = ContentDelete{} } func (*ContentDelete) ProtoMessage() {} func (*ContentDelete) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{0} } func init() { proto.RegisterType((*ContentDelete)(nil), "containerd.events.ContentDelete") } // Field returns the value for the given fieldpath as a string, if defined. // If the value is not defined, the second value will be false. func (m *ContentDelete) Field(fieldpath []string) (string, bool) { if len(fieldpath) == 0 { return "", false } switch fieldpath[0] { case "digest": return string(m.Digest), len(m.Digest) > 0 } return "", false } func (m *ContentDelete) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ContentDelete) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Digest) > 0 { dAtA[i] = 0xa i++ i = encodeVarintContent(dAtA, i, uint64(len(m.Digest))) i += copy(dAtA[i:], m.Digest) } return i, nil } func encodeVarintContent(dAtA []byte, offset int, v uint64) int { for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return offset + 1 } func (m *ContentDelete) Size() (n int) { var l int _ = l l = len(m.Digest) if l > 0 { n += 1 + l + sovContent(uint64(l)) } return n } func sovContent(x uint64) (n int) { for { n++ x >>= 7 if x == 0 { break } } return n } func sozContent(x uint64) (n int) { return sovContent(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (this *ContentDelete) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&ContentDelete{`, `Digest:` + fmt.Sprintf("%v", this.Digest) + `,`, `}`, }, "") return s } func valueToStringContent(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { return "nil" } pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } func (m *ContentDelete) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ContentDelete: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ContentDelete: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Digest", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthContent } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Digest = github_com_opencontainers_go_digest.Digest(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipContent(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthContent } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipContent(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowContent } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } wireType := int(wire & 0x7) switch wireType { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowContent } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } iNdEx++ if dAtA[iNdEx-1] < 0x80 { break } } return iNdEx, nil case 1: iNdEx += 8 return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowContent } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ length |= (int(b) & 0x7F) << shift if b < 0x80 { break } } iNdEx += length if length < 0 { return 0, ErrInvalidLengthContent } return iNdEx, nil case 3: for { var innerWire uint64 var start int = iNdEx for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowContent } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ innerWire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } innerWireType := int(innerWire & 0x7) if innerWireType == 4 { break } next, err := skipContent(dAtA[start:]) if err != nil { return 0, err } iNdEx = start + next } return iNdEx, nil case 4: return iNdEx, nil case 5: iNdEx += 4 return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } } panic("unreachable") } var ( ErrInvalidLengthContent = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowContent = fmt.Errorf("proto: integer overflow") ) func init() { proto.RegisterFile("github.com/containerd/containerd/api/events/content.proto", fileDescriptorContent) } var fileDescriptorContent = []byte{ // 228 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xb2, 0x4c, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xcc, 0xcc, 0x4b, 0x2d, 0x4a, 0x41, 0x66, 0x26, 0x16, 0x64, 0xea, 0xa7, 0x96, 0xa5, 0xe6, 0x95, 0x14, 0x83, 0x45, 0x53, 0xf3, 0x4a, 0xf4, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0x04, 0x11, 0x8a, 0xf4, 0x20, 0x0a, 0xa4, 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0xb2, 0xfa, 0x20, 0x16, 0x44, 0xa1, 0x94, 0x03, 0x41, 0x3b, 0xc0, 0xea, 0x92, 0x4a, 0xd3, 0xf4, 0x0b, 0x72, 0x4a, 0xd3, 0x33, 0xf3, 0xf4, 0xd3, 0x32, 0x53, 0x73, 0x52, 0x0a, 0x12, 0x4b, 0x32, 0x20, 0x26, 0x28, 0x45, 0x73, 0xf1, 0x3a, 0x43, 0xec, 0x76, 0x49, 0xcd, 0x49, 0x2d, 0x49, 0x15, 0xf2, 0xe2, 0x62, 0x4b, 0xc9, 0x4c, 0x4f, 0x2d, 0x2e, 0x91, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x74, 0x32, 0x3a, 0x71, 0x4f, 0x9e, 0xe1, 0xd6, 0x3d, 0x79, 0x2d, 0x24, 0xab, 0xf2, 0x0b, 0x52, 0xf3, 0xe0, 0x76, 0x14, 0xeb, 0xa7, 0xe7, 0xeb, 0x42, 0xb4, 0xe8, 0xb9, 0x80, 0xa9, 0x20, 0xa8, 0x09, 0x4e, 0x01, 0x27, 0x1e, 0xca, 0x31, 0xdc, 0x78, 0x28, 0xc7, 0xd0, 0xf0, 0x48, 0x8e, 0xf1, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x5c, 0xf0, 0x45, 0x8e, 0x31, 0xca, 0x88, 0x84, 0x00, 0xb2, 0x86, 0x50, 0x11, 0x0c, 0x11, 0x8c, 0x49, 0x6c, 0x60, 0x97, 0x1b, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x4b, 0x78, 0x99, 0xee, 0x61, 0x01, 0x00, 0x00, } docker-containerd-tags-docker-17.12.1/api/events/content.proto000066400000000000000000000006651322771672400243150ustar00rootroot00000000000000syntax = "proto3"; package containerd.events; import weak "gogoproto/gogo.proto"; import weak "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto"; option go_package = "github.com/containerd/containerd/api/events;events"; option (containerd.plugin.fieldpath_all) = true; message ContentDelete { string digest = 1 [(gogoproto.customtype) = "github.com/opencontainers/go-digest.Digest", (gogoproto.nullable) = false]; } docker-containerd-tags-docker-17.12.1/api/events/doc.go000066400000000000000000000001471322771672400226450ustar00rootroot00000000000000// Package events has protobuf types for various events that are used in // containerd. package events docker-containerd-tags-docker-17.12.1/api/events/image.pb.go000066400000000000000000000561651322771672400235750ustar00rootroot00000000000000// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/containerd/containerd/api/events/image.proto package events import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" // skipping weak import containerd_plugin "github.com/containerd/containerd/protobuf/plugin" import strings "strings" import reflect "reflect" import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" import io "io" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf type ImageCreate struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Labels map[string]string `protobuf:"bytes,2,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (m *ImageCreate) Reset() { *m = ImageCreate{} } func (*ImageCreate) ProtoMessage() {} func (*ImageCreate) Descriptor() ([]byte, []int) { return fileDescriptorImage, []int{0} } type ImageUpdate struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Labels map[string]string `protobuf:"bytes,2,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (m *ImageUpdate) Reset() { *m = ImageUpdate{} } func (*ImageUpdate) ProtoMessage() {} func (*ImageUpdate) Descriptor() ([]byte, []int) { return fileDescriptorImage, []int{1} } type ImageDelete struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } func (m *ImageDelete) Reset() { *m = ImageDelete{} } func (*ImageDelete) ProtoMessage() {} func (*ImageDelete) Descriptor() ([]byte, []int) { return fileDescriptorImage, []int{2} } func init() { proto.RegisterType((*ImageCreate)(nil), "containerd.services.images.v1.ImageCreate") proto.RegisterType((*ImageUpdate)(nil), "containerd.services.images.v1.ImageUpdate") proto.RegisterType((*ImageDelete)(nil), "containerd.services.images.v1.ImageDelete") } // Field returns the value for the given fieldpath as a string, if defined. // If the value is not defined, the second value will be false. func (m *ImageCreate) Field(fieldpath []string) (string, bool) { if len(fieldpath) == 0 { return "", false } switch fieldpath[0] { case "name": return string(m.Name), len(m.Name) > 0 case "labels": // Labels fields have been special-cased by name. If this breaks, // add better special casing to fieldpath plugin. if len(m.Labels) == 0 { return "", false } value, ok := m.Labels[strings.Join(fieldpath[1:], ".")] return value, ok } return "", false } // Field returns the value for the given fieldpath as a string, if defined. // If the value is not defined, the second value will be false. func (m *ImageUpdate) Field(fieldpath []string) (string, bool) { if len(fieldpath) == 0 { return "", false } switch fieldpath[0] { case "name": return string(m.Name), len(m.Name) > 0 case "labels": // Labels fields have been special-cased by name. If this breaks, // add better special casing to fieldpath plugin. if len(m.Labels) == 0 { return "", false } value, ok := m.Labels[strings.Join(fieldpath[1:], ".")] return value, ok } return "", false } // Field returns the value for the given fieldpath as a string, if defined. // If the value is not defined, the second value will be false. func (m *ImageDelete) Field(fieldpath []string) (string, bool) { if len(fieldpath) == 0 { return "", false } switch fieldpath[0] { case "name": return string(m.Name), len(m.Name) > 0 } return "", false } func (m *ImageCreate) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ImageCreate) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Name) > 0 { dAtA[i] = 0xa i++ i = encodeVarintImage(dAtA, i, uint64(len(m.Name))) i += copy(dAtA[i:], m.Name) } if len(m.Labels) > 0 { for k, _ := range m.Labels { dAtA[i] = 0x12 i++ v := m.Labels[k] mapSize := 1 + len(k) + sovImage(uint64(len(k))) + 1 + len(v) + sovImage(uint64(len(v))) i = encodeVarintImage(dAtA, i, uint64(mapSize)) dAtA[i] = 0xa i++ i = encodeVarintImage(dAtA, i, uint64(len(k))) i += copy(dAtA[i:], k) dAtA[i] = 0x12 i++ i = encodeVarintImage(dAtA, i, uint64(len(v))) i += copy(dAtA[i:], v) } } return i, nil } func (m *ImageUpdate) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ImageUpdate) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Name) > 0 { dAtA[i] = 0xa i++ i = encodeVarintImage(dAtA, i, uint64(len(m.Name))) i += copy(dAtA[i:], m.Name) } if len(m.Labels) > 0 { for k, _ := range m.Labels { dAtA[i] = 0x12 i++ v := m.Labels[k] mapSize := 1 + len(k) + sovImage(uint64(len(k))) + 1 + len(v) + sovImage(uint64(len(v))) i = encodeVarintImage(dAtA, i, uint64(mapSize)) dAtA[i] = 0xa i++ i = encodeVarintImage(dAtA, i, uint64(len(k))) i += copy(dAtA[i:], k) dAtA[i] = 0x12 i++ i = encodeVarintImage(dAtA, i, uint64(len(v))) i += copy(dAtA[i:], v) } } return i, nil } func (m *ImageDelete) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ImageDelete) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Name) > 0 { dAtA[i] = 0xa i++ i = encodeVarintImage(dAtA, i, uint64(len(m.Name))) i += copy(dAtA[i:], m.Name) } return i, nil } func encodeVarintImage(dAtA []byte, offset int, v uint64) int { for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return offset + 1 } func (m *ImageCreate) Size() (n int) { var l int _ = l l = len(m.Name) if l > 0 { n += 1 + l + sovImage(uint64(l)) } if len(m.Labels) > 0 { for k, v := range m.Labels { _ = k _ = v mapEntrySize := 1 + len(k) + sovImage(uint64(len(k))) + 1 + len(v) + sovImage(uint64(len(v))) n += mapEntrySize + 1 + sovImage(uint64(mapEntrySize)) } } return n } func (m *ImageUpdate) Size() (n int) { var l int _ = l l = len(m.Name) if l > 0 { n += 1 + l + sovImage(uint64(l)) } if len(m.Labels) > 0 { for k, v := range m.Labels { _ = k _ = v mapEntrySize := 1 + len(k) + sovImage(uint64(len(k))) + 1 + len(v) + sovImage(uint64(len(v))) n += mapEntrySize + 1 + sovImage(uint64(mapEntrySize)) } } return n } func (m *ImageDelete) Size() (n int) { var l int _ = l l = len(m.Name) if l > 0 { n += 1 + l + sovImage(uint64(l)) } return n } func sovImage(x uint64) (n int) { for { n++ x >>= 7 if x == 0 { break } } return n } func sozImage(x uint64) (n int) { return sovImage(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (this *ImageCreate) String() string { if this == nil { return "nil" } keysForLabels := make([]string, 0, len(this.Labels)) for k, _ := range this.Labels { keysForLabels = append(keysForLabels, k) } github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) mapStringForLabels := "map[string]string{" for _, k := range keysForLabels { mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) } mapStringForLabels += "}" s := strings.Join([]string{`&ImageCreate{`, `Name:` + fmt.Sprintf("%v", this.Name) + `,`, `Labels:` + mapStringForLabels + `,`, `}`, }, "") return s } func (this *ImageUpdate) String() string { if this == nil { return "nil" } keysForLabels := make([]string, 0, len(this.Labels)) for k, _ := range this.Labels { keysForLabels = append(keysForLabels, k) } github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) mapStringForLabels := "map[string]string{" for _, k := range keysForLabels { mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) } mapStringForLabels += "}" s := strings.Join([]string{`&ImageUpdate{`, `Name:` + fmt.Sprintf("%v", this.Name) + `,`, `Labels:` + mapStringForLabels + `,`, `}`, }, "") return s } func (this *ImageDelete) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&ImageDelete{`, `Name:` + fmt.Sprintf("%v", this.Name) + `,`, `}`, }, "") return s } func valueToStringImage(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { return "nil" } pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } func (m *ImageCreate) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImage } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ImageCreate: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ImageCreate: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImage } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthImage } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImage } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthImage } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Labels == nil { m.Labels = make(map[string]string) } var mapkey string var mapvalue string for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImage } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImage } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapkey |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { return ErrInvalidLengthImage } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var stringLenmapvalue uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImage } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapvalue |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLenmapvalue := int(stringLenmapvalue) if intStringLenmapvalue < 0 { return ErrInvalidLengthImage } postStringIndexmapvalue := iNdEx + intStringLenmapvalue if postStringIndexmapvalue > l { return io.ErrUnexpectedEOF } mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) iNdEx = postStringIndexmapvalue } else { iNdEx = entryPreIndex skippy, err := skipImage(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthImage } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.Labels[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipImage(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthImage } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ImageUpdate) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImage } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ImageUpdate: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ImageUpdate: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImage } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthImage } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImage } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthImage } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Labels == nil { m.Labels = make(map[string]string) } var mapkey string var mapvalue string for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImage } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImage } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapkey |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { return ErrInvalidLengthImage } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var stringLenmapvalue uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImage } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapvalue |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLenmapvalue := int(stringLenmapvalue) if intStringLenmapvalue < 0 { return ErrInvalidLengthImage } postStringIndexmapvalue := iNdEx + intStringLenmapvalue if postStringIndexmapvalue > l { return io.ErrUnexpectedEOF } mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) iNdEx = postStringIndexmapvalue } else { iNdEx = entryPreIndex skippy, err := skipImage(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthImage } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.Labels[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipImage(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthImage } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ImageDelete) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImage } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ImageDelete: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ImageDelete: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImage } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthImage } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipImage(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthImage } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipImage(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowImage } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } wireType := int(wire & 0x7) switch wireType { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowImage } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } iNdEx++ if dAtA[iNdEx-1] < 0x80 { break } } return iNdEx, nil case 1: iNdEx += 8 return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowImage } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ length |= (int(b) & 0x7F) << shift if b < 0x80 { break } } iNdEx += length if length < 0 { return 0, ErrInvalidLengthImage } return iNdEx, nil case 3: for { var innerWire uint64 var start int = iNdEx for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowImage } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ innerWire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } innerWireType := int(innerWire & 0x7) if innerWireType == 4 { break } next, err := skipImage(dAtA[start:]) if err != nil { return 0, err } iNdEx = start + next } return iNdEx, nil case 4: return iNdEx, nil case 5: iNdEx += 4 return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } } panic("unreachable") } var ( ErrInvalidLengthImage = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowImage = fmt.Errorf("proto: integer overflow") ) func init() { proto.RegisterFile("github.com/containerd/containerd/api/events/image.proto", fileDescriptorImage) } var fileDescriptorImage = []byte{ // 292 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0x4f, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xcc, 0xcc, 0x4b, 0x2d, 0x4a, 0x41, 0x66, 0x26, 0x16, 0x64, 0xea, 0xa7, 0x96, 0xa5, 0xe6, 0x95, 0x14, 0xeb, 0x67, 0xe6, 0x26, 0xa6, 0xa7, 0xea, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0xc9, 0x22, 0x94, 0xe8, 0x15, 0xa7, 0x16, 0x95, 0x65, 0x26, 0xa7, 0x16, 0xeb, 0x81, 0x15, 0x14, 0xeb, 0x95, 0x19, 0x4a, 0x39, 0x10, 0x34, 0x17, 0x6c, 0x4c, 0x52, 0x69, 0x9a, 0x7e, 0x41, 0x4e, 0x69, 0x7a, 0x66, 0x9e, 0x7e, 0x5a, 0x66, 0x6a, 0x4e, 0x4a, 0x41, 0x62, 0x49, 0x06, 0xc4, 0x02, 0xa5, 0x35, 0x8c, 0x5c, 0xdc, 0x9e, 0x20, 0xf3, 0x9c, 0x8b, 0x52, 0x13, 0x4b, 0x52, 0x85, 0x84, 0xb8, 0x58, 0xf2, 0x12, 0x73, 0x53, 0x25, 0x18, 0x15, 0x18, 0x35, 0x38, 0x83, 0xc0, 0x6c, 0x21, 0x3f, 0x2e, 0xb6, 0x9c, 0xc4, 0xa4, 0xd4, 0x9c, 0x62, 0x09, 0x26, 0x05, 0x66, 0x0d, 0x6e, 0x23, 0x33, 0x3d, 0xbc, 0xae, 0xd2, 0x43, 0x32, 0x4f, 0xcf, 0x07, 0xac, 0xd1, 0x35, 0xaf, 0xa4, 0xa8, 0x32, 0x08, 0x6a, 0x8a, 0x94, 0x25, 0x17, 0x37, 0x92, 0xb0, 0x90, 0x00, 0x17, 0x73, 0x76, 0x6a, 0x25, 0xd4, 0x46, 0x10, 0x53, 0x48, 0x84, 0x8b, 0xb5, 0x2c, 0x31, 0xa7, 0x34, 0x55, 0x82, 0x09, 0x2c, 0x06, 0xe1, 0x58, 0x31, 0x59, 0x30, 0x22, 0x9c, 0x1b, 0x5a, 0x90, 0x42, 0x55, 0xe7, 0x42, 0xcc, 0xa3, 0xb6, 0x73, 0x15, 0xa1, 0xae, 0x75, 0x49, 0xcd, 0x49, 0xc5, 0xee, 0x5a, 0xa7, 0x80, 0x13, 0x0f, 0xe5, 0x18, 0x6e, 0x3c, 0x94, 0x63, 0x68, 0x78, 0x24, 0xc7, 0x78, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x2e, 0xf8, 0x22, 0xc7, 0x18, 0x65, 0x44, 0x42, 0xc2, 0xb1, 0x86, 0x50, 0x11, 0x0c, 0x49, 0x6c, 0xe0, 0xb8, 0x35, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x41, 0x80, 0x92, 0x17, 0x77, 0x02, 0x00, 0x00, } docker-containerd-tags-docker-17.12.1/api/events/image.proto000066400000000000000000000007131322771672400237170ustar00rootroot00000000000000syntax = "proto3"; package containerd.services.images.v1; import weak "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto"; option go_package = "github.com/containerd/containerd/api/events;events"; option (containerd.plugin.fieldpath_all) = true; message ImageCreate { string name = 1; map labels = 2; } message ImageUpdate { string name = 1; map labels = 2; } message ImageDelete { string name = 1; } docker-containerd-tags-docker-17.12.1/api/events/namespace.pb.go000066400000000000000000000572401322771672400244420ustar00rootroot00000000000000// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/containerd/containerd/api/events/namespace.proto package events import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" // skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto" // skipping weak import containerd_plugin "github.com/containerd/containerd/protobuf/plugin" import strings "strings" import reflect "reflect" import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" import io "io" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf type NamespaceCreate struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Labels map[string]string `protobuf:"bytes,2,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (m *NamespaceCreate) Reset() { *m = NamespaceCreate{} } func (*NamespaceCreate) ProtoMessage() {} func (*NamespaceCreate) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{0} } type NamespaceUpdate struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Labels map[string]string `protobuf:"bytes,2,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (m *NamespaceUpdate) Reset() { *m = NamespaceUpdate{} } func (*NamespaceUpdate) ProtoMessage() {} func (*NamespaceUpdate) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{1} } type NamespaceDelete struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } func (m *NamespaceDelete) Reset() { *m = NamespaceDelete{} } func (*NamespaceDelete) ProtoMessage() {} func (*NamespaceDelete) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{2} } func init() { proto.RegisterType((*NamespaceCreate)(nil), "containerd.events.NamespaceCreate") proto.RegisterType((*NamespaceUpdate)(nil), "containerd.events.NamespaceUpdate") proto.RegisterType((*NamespaceDelete)(nil), "containerd.events.NamespaceDelete") } // Field returns the value for the given fieldpath as a string, if defined. // If the value is not defined, the second value will be false. func (m *NamespaceCreate) Field(fieldpath []string) (string, bool) { if len(fieldpath) == 0 { return "", false } switch fieldpath[0] { case "name": return string(m.Name), len(m.Name) > 0 case "labels": // Labels fields have been special-cased by name. If this breaks, // add better special casing to fieldpath plugin. if len(m.Labels) == 0 { return "", false } value, ok := m.Labels[strings.Join(fieldpath[1:], ".")] return value, ok } return "", false } // Field returns the value for the given fieldpath as a string, if defined. // If the value is not defined, the second value will be false. func (m *NamespaceUpdate) Field(fieldpath []string) (string, bool) { if len(fieldpath) == 0 { return "", false } switch fieldpath[0] { case "name": return string(m.Name), len(m.Name) > 0 case "labels": // Labels fields have been special-cased by name. If this breaks, // add better special casing to fieldpath plugin. if len(m.Labels) == 0 { return "", false } value, ok := m.Labels[strings.Join(fieldpath[1:], ".")] return value, ok } return "", false } // Field returns the value for the given fieldpath as a string, if defined. // If the value is not defined, the second value will be false. func (m *NamespaceDelete) Field(fieldpath []string) (string, bool) { if len(fieldpath) == 0 { return "", false } switch fieldpath[0] { case "name": return string(m.Name), len(m.Name) > 0 } return "", false } func (m *NamespaceCreate) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *NamespaceCreate) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Name) > 0 { dAtA[i] = 0xa i++ i = encodeVarintNamespace(dAtA, i, uint64(len(m.Name))) i += copy(dAtA[i:], m.Name) } if len(m.Labels) > 0 { for k, _ := range m.Labels { dAtA[i] = 0x12 i++ v := m.Labels[k] mapSize := 1 + len(k) + sovNamespace(uint64(len(k))) + 1 + len(v) + sovNamespace(uint64(len(v))) i = encodeVarintNamespace(dAtA, i, uint64(mapSize)) dAtA[i] = 0xa i++ i = encodeVarintNamespace(dAtA, i, uint64(len(k))) i += copy(dAtA[i:], k) dAtA[i] = 0x12 i++ i = encodeVarintNamespace(dAtA, i, uint64(len(v))) i += copy(dAtA[i:], v) } } return i, nil } func (m *NamespaceUpdate) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *NamespaceUpdate) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Name) > 0 { dAtA[i] = 0xa i++ i = encodeVarintNamespace(dAtA, i, uint64(len(m.Name))) i += copy(dAtA[i:], m.Name) } if len(m.Labels) > 0 { for k, _ := range m.Labels { dAtA[i] = 0x12 i++ v := m.Labels[k] mapSize := 1 + len(k) + sovNamespace(uint64(len(k))) + 1 + len(v) + sovNamespace(uint64(len(v))) i = encodeVarintNamespace(dAtA, i, uint64(mapSize)) dAtA[i] = 0xa i++ i = encodeVarintNamespace(dAtA, i, uint64(len(k))) i += copy(dAtA[i:], k) dAtA[i] = 0x12 i++ i = encodeVarintNamespace(dAtA, i, uint64(len(v))) i += copy(dAtA[i:], v) } } return i, nil } func (m *NamespaceDelete) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *NamespaceDelete) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Name) > 0 { dAtA[i] = 0xa i++ i = encodeVarintNamespace(dAtA, i, uint64(len(m.Name))) i += copy(dAtA[i:], m.Name) } return i, nil } func encodeVarintNamespace(dAtA []byte, offset int, v uint64) int { for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return offset + 1 } func (m *NamespaceCreate) Size() (n int) { var l int _ = l l = len(m.Name) if l > 0 { n += 1 + l + sovNamespace(uint64(l)) } if len(m.Labels) > 0 { for k, v := range m.Labels { _ = k _ = v mapEntrySize := 1 + len(k) + sovNamespace(uint64(len(k))) + 1 + len(v) + sovNamespace(uint64(len(v))) n += mapEntrySize + 1 + sovNamespace(uint64(mapEntrySize)) } } return n } func (m *NamespaceUpdate) Size() (n int) { var l int _ = l l = len(m.Name) if l > 0 { n += 1 + l + sovNamespace(uint64(l)) } if len(m.Labels) > 0 { for k, v := range m.Labels { _ = k _ = v mapEntrySize := 1 + len(k) + sovNamespace(uint64(len(k))) + 1 + len(v) + sovNamespace(uint64(len(v))) n += mapEntrySize + 1 + sovNamespace(uint64(mapEntrySize)) } } return n } func (m *NamespaceDelete) Size() (n int) { var l int _ = l l = len(m.Name) if l > 0 { n += 1 + l + sovNamespace(uint64(l)) } return n } func sovNamespace(x uint64) (n int) { for { n++ x >>= 7 if x == 0 { break } } return n } func sozNamespace(x uint64) (n int) { return sovNamespace(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (this *NamespaceCreate) String() string { if this == nil { return "nil" } keysForLabels := make([]string, 0, len(this.Labels)) for k, _ := range this.Labels { keysForLabels = append(keysForLabels, k) } github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) mapStringForLabels := "map[string]string{" for _, k := range keysForLabels { mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) } mapStringForLabels += "}" s := strings.Join([]string{`&NamespaceCreate{`, `Name:` + fmt.Sprintf("%v", this.Name) + `,`, `Labels:` + mapStringForLabels + `,`, `}`, }, "") return s } func (this *NamespaceUpdate) String() string { if this == nil { return "nil" } keysForLabels := make([]string, 0, len(this.Labels)) for k, _ := range this.Labels { keysForLabels = append(keysForLabels, k) } github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) mapStringForLabels := "map[string]string{" for _, k := range keysForLabels { mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) } mapStringForLabels += "}" s := strings.Join([]string{`&NamespaceUpdate{`, `Name:` + fmt.Sprintf("%v", this.Name) + `,`, `Labels:` + mapStringForLabels + `,`, `}`, }, "") return s } func (this *NamespaceDelete) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&NamespaceDelete{`, `Name:` + fmt.Sprintf("%v", this.Name) + `,`, `}`, }, "") return s } func valueToStringNamespace(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { return "nil" } pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } func (m *NamespaceCreate) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNamespace } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: NamespaceCreate: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: NamespaceCreate: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNamespace } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthNamespace } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNamespace } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthNamespace } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Labels == nil { m.Labels = make(map[string]string) } var mapkey string var mapvalue string for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNamespace } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNamespace } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapkey |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { return ErrInvalidLengthNamespace } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var stringLenmapvalue uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNamespace } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapvalue |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLenmapvalue := int(stringLenmapvalue) if intStringLenmapvalue < 0 { return ErrInvalidLengthNamespace } postStringIndexmapvalue := iNdEx + intStringLenmapvalue if postStringIndexmapvalue > l { return io.ErrUnexpectedEOF } mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) iNdEx = postStringIndexmapvalue } else { iNdEx = entryPreIndex skippy, err := skipNamespace(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthNamespace } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.Labels[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipNamespace(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthNamespace } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *NamespaceUpdate) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNamespace } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: NamespaceUpdate: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: NamespaceUpdate: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNamespace } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthNamespace } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNamespace } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthNamespace } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Labels == nil { m.Labels = make(map[string]string) } var mapkey string var mapvalue string for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNamespace } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNamespace } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapkey |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { return ErrInvalidLengthNamespace } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var stringLenmapvalue uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNamespace } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapvalue |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLenmapvalue := int(stringLenmapvalue) if intStringLenmapvalue < 0 { return ErrInvalidLengthNamespace } postStringIndexmapvalue := iNdEx + intStringLenmapvalue if postStringIndexmapvalue > l { return io.ErrUnexpectedEOF } mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) iNdEx = postStringIndexmapvalue } else { iNdEx = entryPreIndex skippy, err := skipNamespace(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthNamespace } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.Labels[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipNamespace(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthNamespace } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *NamespaceDelete) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNamespace } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: NamespaceDelete: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: NamespaceDelete: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNamespace } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthNamespace } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipNamespace(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthNamespace } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipNamespace(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowNamespace } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } wireType := int(wire & 0x7) switch wireType { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowNamespace } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } iNdEx++ if dAtA[iNdEx-1] < 0x80 { break } } return iNdEx, nil case 1: iNdEx += 8 return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowNamespace } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ length |= (int(b) & 0x7F) << shift if b < 0x80 { break } } iNdEx += length if length < 0 { return 0, ErrInvalidLengthNamespace } return iNdEx, nil case 3: for { var innerWire uint64 var start int = iNdEx for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowNamespace } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ innerWire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } innerWireType := int(innerWire & 0x7) if innerWireType == 4 { break } next, err := skipNamespace(dAtA[start:]) if err != nil { return 0, err } iNdEx = start + next } return iNdEx, nil case 4: return iNdEx, nil case 5: iNdEx += 4 return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } } panic("unreachable") } var ( ErrInvalidLengthNamespace = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowNamespace = fmt.Errorf("proto: integer overflow") ) func init() { proto.RegisterFile("github.com/containerd/containerd/api/events/namespace.proto", fileDescriptorNamespace) } var fileDescriptorNamespace = []byte{ // 296 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xb2, 0x4e, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xcc, 0xcc, 0x4b, 0x2d, 0x4a, 0x41, 0x66, 0x26, 0x16, 0x64, 0xea, 0xa7, 0x96, 0xa5, 0xe6, 0x95, 0x14, 0xeb, 0xe7, 0x25, 0xe6, 0xa6, 0x16, 0x17, 0x24, 0x26, 0xa7, 0xea, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x09, 0x22, 0x94, 0xe9, 0x41, 0x94, 0x48, 0x89, 0xa4, 0xe7, 0xa7, 0xe7, 0x83, 0x65, 0xf5, 0x41, 0x2c, 0x88, 0x42, 0x29, 0x07, 0x82, 0xb6, 0x80, 0xd5, 0x25, 0x95, 0xa6, 0xe9, 0x17, 0xe4, 0x94, 0xa6, 0x67, 0xe6, 0xe9, 0xa7, 0x65, 0xa6, 0xe6, 0xa4, 0x14, 0x24, 0x96, 0x64, 0x40, 0x4c, 0x50, 0x5a, 0xc1, 0xc8, 0xc5, 0xef, 0x07, 0xb3, 0xde, 0xb9, 0x28, 0x35, 0xb1, 0x24, 0x55, 0x48, 0x88, 0x8b, 0x05, 0xe4, 0x22, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, 0x30, 0x5b, 0xc8, 0x8d, 0x8b, 0x2d, 0x27, 0x31, 0x29, 0x35, 0xa7, 0x58, 0x82, 0x49, 0x81, 0x59, 0x83, 0xdb, 0x48, 0x4f, 0x0f, 0xc3, 0x8d, 0x7a, 0x68, 0xe6, 0xe8, 0xf9, 0x80, 0x35, 0xb8, 0xe6, 0x95, 0x14, 0x55, 0x06, 0x41, 0x75, 0x4b, 0x59, 0x72, 0x71, 0x23, 0x09, 0x0b, 0x09, 0x70, 0x31, 0x67, 0xa7, 0x56, 0x42, 0x6d, 0x02, 0x31, 0x85, 0x44, 0xb8, 0x58, 0xcb, 0x12, 0x73, 0x4a, 0x53, 0x25, 0x98, 0xc0, 0x62, 0x10, 0x8e, 0x15, 0x93, 0x05, 0x23, 0xaa, 0x53, 0x43, 0x0b, 0x52, 0xa8, 0xe2, 0x54, 0x88, 0x39, 0xd4, 0x76, 0xaa, 0x2a, 0x92, 0x4b, 0x5d, 0x52, 0x73, 0x52, 0xb1, 0xbb, 0xd4, 0x29, 0xe0, 0xc4, 0x43, 0x39, 0x86, 0x1b, 0x0f, 0xe5, 0x18, 0x1a, 0x1e, 0xc9, 0x31, 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x0b, 0xbe, 0xc8, 0x31, 0x46, 0x19, 0x91, 0x90, 0x84, 0xac, 0x21, 0x54, 0x04, 0x43, 0x04, 0x63, 0x12, 0x1b, 0x38, 0x66, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x00, 0x50, 0x87, 0x59, 0x83, 0x02, 0x00, 0x00, } docker-containerd-tags-docker-17.12.1/api/events/namespace.proto000066400000000000000000000007611322771672400245740ustar00rootroot00000000000000syntax = "proto3"; package containerd.events; import weak "gogoproto/gogo.proto"; import weak "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto"; option go_package = "github.com/containerd/containerd/api/events;events"; option (containerd.plugin.fieldpath_all) = true; message NamespaceCreate { string name = 1; map labels = 2; } message NamespaceUpdate { string name = 1; map labels = 2; } message NamespaceDelete { string name = 1; } docker-containerd-tags-docker-17.12.1/api/events/snapshot.pb.go000066400000000000000000000406421322771672400243430ustar00rootroot00000000000000// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/containerd/containerd/api/events/snapshot.proto package events import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" // skipping weak import containerd_plugin "github.com/containerd/containerd/protobuf/plugin" import strings "strings" import reflect "reflect" import io "io" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf type SnapshotPrepare struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Parent string `protobuf:"bytes,2,opt,name=parent,proto3" json:"parent,omitempty"` } func (m *SnapshotPrepare) Reset() { *m = SnapshotPrepare{} } func (*SnapshotPrepare) ProtoMessage() {} func (*SnapshotPrepare) Descriptor() ([]byte, []int) { return fileDescriptorSnapshot, []int{0} } type SnapshotCommit struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` } func (m *SnapshotCommit) Reset() { *m = SnapshotCommit{} } func (*SnapshotCommit) ProtoMessage() {} func (*SnapshotCommit) Descriptor() ([]byte, []int) { return fileDescriptorSnapshot, []int{1} } type SnapshotRemove struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` } func (m *SnapshotRemove) Reset() { *m = SnapshotRemove{} } func (*SnapshotRemove) ProtoMessage() {} func (*SnapshotRemove) Descriptor() ([]byte, []int) { return fileDescriptorSnapshot, []int{2} } func init() { proto.RegisterType((*SnapshotPrepare)(nil), "containerd.events.SnapshotPrepare") proto.RegisterType((*SnapshotCommit)(nil), "containerd.events.SnapshotCommit") proto.RegisterType((*SnapshotRemove)(nil), "containerd.events.SnapshotRemove") } // Field returns the value for the given fieldpath as a string, if defined. // If the value is not defined, the second value will be false. func (m *SnapshotPrepare) Field(fieldpath []string) (string, bool) { if len(fieldpath) == 0 { return "", false } switch fieldpath[0] { case "key": return string(m.Key), len(m.Key) > 0 case "parent": return string(m.Parent), len(m.Parent) > 0 } return "", false } // Field returns the value for the given fieldpath as a string, if defined. // If the value is not defined, the second value will be false. func (m *SnapshotCommit) Field(fieldpath []string) (string, bool) { if len(fieldpath) == 0 { return "", false } switch fieldpath[0] { case "key": return string(m.Key), len(m.Key) > 0 case "name": return string(m.Name), len(m.Name) > 0 } return "", false } // Field returns the value for the given fieldpath as a string, if defined. // If the value is not defined, the second value will be false. func (m *SnapshotRemove) Field(fieldpath []string) (string, bool) { if len(fieldpath) == 0 { return "", false } switch fieldpath[0] { case "key": return string(m.Key), len(m.Key) > 0 } return "", false } func (m *SnapshotPrepare) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *SnapshotPrepare) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Key) > 0 { dAtA[i] = 0xa i++ i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Key))) i += copy(dAtA[i:], m.Key) } if len(m.Parent) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Parent))) i += copy(dAtA[i:], m.Parent) } return i, nil } func (m *SnapshotCommit) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *SnapshotCommit) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Key) > 0 { dAtA[i] = 0xa i++ i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Key))) i += copy(dAtA[i:], m.Key) } if len(m.Name) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Name))) i += copy(dAtA[i:], m.Name) } return i, nil } func (m *SnapshotRemove) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *SnapshotRemove) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Key) > 0 { dAtA[i] = 0xa i++ i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Key))) i += copy(dAtA[i:], m.Key) } return i, nil } func encodeVarintSnapshot(dAtA []byte, offset int, v uint64) int { for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return offset + 1 } func (m *SnapshotPrepare) Size() (n int) { var l int _ = l l = len(m.Key) if l > 0 { n += 1 + l + sovSnapshot(uint64(l)) } l = len(m.Parent) if l > 0 { n += 1 + l + sovSnapshot(uint64(l)) } return n } func (m *SnapshotCommit) Size() (n int) { var l int _ = l l = len(m.Key) if l > 0 { n += 1 + l + sovSnapshot(uint64(l)) } l = len(m.Name) if l > 0 { n += 1 + l + sovSnapshot(uint64(l)) } return n } func (m *SnapshotRemove) Size() (n int) { var l int _ = l l = len(m.Key) if l > 0 { n += 1 + l + sovSnapshot(uint64(l)) } return n } func sovSnapshot(x uint64) (n int) { for { n++ x >>= 7 if x == 0 { break } } return n } func sozSnapshot(x uint64) (n int) { return sovSnapshot(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (this *SnapshotPrepare) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&SnapshotPrepare{`, `Key:` + fmt.Sprintf("%v", this.Key) + `,`, `Parent:` + fmt.Sprintf("%v", this.Parent) + `,`, `}`, }, "") return s } func (this *SnapshotCommit) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&SnapshotCommit{`, `Key:` + fmt.Sprintf("%v", this.Key) + `,`, `Name:` + fmt.Sprintf("%v", this.Name) + `,`, `}`, }, "") return s } func (this *SnapshotRemove) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&SnapshotRemove{`, `Key:` + fmt.Sprintf("%v", this.Key) + `,`, `}`, }, "") return s } func valueToStringSnapshot(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { return "nil" } pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } func (m *SnapshotPrepare) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshot } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: SnapshotPrepare: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: SnapshotPrepare: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshot } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthSnapshot } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Key = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Parent", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshot } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthSnapshot } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Parent = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSnapshot(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthSnapshot } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *SnapshotCommit) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshot } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: SnapshotCommit: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: SnapshotCommit: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshot } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthSnapshot } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Key = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshot } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthSnapshot } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSnapshot(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthSnapshot } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *SnapshotRemove) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshot } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: SnapshotRemove: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: SnapshotRemove: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshot } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthSnapshot } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Key = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSnapshot(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthSnapshot } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipSnapshot(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowSnapshot } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } wireType := int(wire & 0x7) switch wireType { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowSnapshot } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } iNdEx++ if dAtA[iNdEx-1] < 0x80 { break } } return iNdEx, nil case 1: iNdEx += 8 return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowSnapshot } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ length |= (int(b) & 0x7F) << shift if b < 0x80 { break } } iNdEx += length if length < 0 { return 0, ErrInvalidLengthSnapshot } return iNdEx, nil case 3: for { var innerWire uint64 var start int = iNdEx for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowSnapshot } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ innerWire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } innerWireType := int(innerWire & 0x7) if innerWireType == 4 { break } next, err := skipSnapshot(dAtA[start:]) if err != nil { return 0, err } iNdEx = start + next } return iNdEx, nil case 4: return iNdEx, nil case 5: iNdEx += 4 return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } } panic("unreachable") } var ( ErrInvalidLengthSnapshot = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowSnapshot = fmt.Errorf("proto: integer overflow") ) func init() { proto.RegisterFile("github.com/containerd/containerd/api/events/snapshot.proto", fileDescriptorSnapshot) } var fileDescriptorSnapshot = []byte{ // 235 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xb2, 0x4a, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xcc, 0xcc, 0x4b, 0x2d, 0x4a, 0x41, 0x66, 0x26, 0x16, 0x64, 0xea, 0xa7, 0x96, 0xa5, 0xe6, 0x95, 0x14, 0xeb, 0x17, 0xe7, 0x25, 0x16, 0x14, 0x67, 0xe4, 0x97, 0xe8, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x09, 0x22, 0x54, 0xe9, 0x41, 0x54, 0x48, 0x39, 0x10, 0x34, 0x0e, 0xac, 0x35, 0xa9, 0x34, 0x4d, 0xbf, 0x20, 0xa7, 0x34, 0x3d, 0x33, 0x4f, 0x3f, 0x2d, 0x33, 0x35, 0x27, 0xa5, 0x20, 0xb1, 0x24, 0x03, 0x62, 0xa8, 0x92, 0x35, 0x17, 0x7f, 0x30, 0xd4, 0x9a, 0x80, 0xa2, 0xd4, 0x82, 0xc4, 0xa2, 0x54, 0x21, 0x01, 0x2e, 0xe6, 0xec, 0xd4, 0x4a, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, 0x10, 0x53, 0x48, 0x8c, 0x8b, 0x0d, 0x24, 0x93, 0x57, 0x22, 0xc1, 0x04, 0x16, 0x84, 0xf2, 0x94, 0xcc, 0xb8, 0xf8, 0x60, 0x9a, 0x9d, 0xf3, 0x73, 0x73, 0x33, 0x4b, 0xb0, 0xe8, 0x15, 0xe2, 0x62, 0xc9, 0x4b, 0xcc, 0x4d, 0x85, 0xea, 0x04, 0xb3, 0x95, 0x94, 0x10, 0xfa, 0x82, 0x52, 0x73, 0xf3, 0xcb, 0xb0, 0xd8, 0xe9, 0x14, 0x70, 0xe2, 0xa1, 0x1c, 0xc3, 0x8d, 0x87, 0x72, 0x0c, 0x0d, 0x8f, 0xe4, 0x18, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x05, 0x5f, 0xe4, 0x18, 0xa3, 0x8c, 0x48, 0x08, 0x47, 0x6b, 0x08, 0x15, 0xc1, 0x90, 0xc4, 0x06, 0xf6, 0xb3, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x69, 0x66, 0xa9, 0x2a, 0x86, 0x01, 0x00, 0x00, } docker-containerd-tags-docker-17.12.1/api/events/snapshot.proto000066400000000000000000000006521322771672400244760ustar00rootroot00000000000000syntax = "proto3"; package containerd.events; import weak "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto"; option go_package = "github.com/containerd/containerd/api/events;events"; option (containerd.plugin.fieldpath_all) = true; message SnapshotPrepare { string key = 1; string parent = 2; } message SnapshotCommit { string key = 1; string name = 2; } message SnapshotRemove { string key = 1; } docker-containerd-tags-docker-17.12.1/api/events/task.pb.go000066400000000000000000001744741322771672400234610ustar00rootroot00000000000000// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/containerd/containerd/api/events/task.proto package events import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" // skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto" import _ "github.com/gogo/protobuf/types" import containerd_types "github.com/containerd/containerd/api/types" // skipping weak import containerd_plugin "github.com/containerd/containerd/protobuf/plugin" import time "time" import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" import strings "strings" import reflect "reflect" import io "io" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf var _ = time.Kitchen type TaskCreate struct { ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` Bundle string `protobuf:"bytes,2,opt,name=bundle,proto3" json:"bundle,omitempty"` Rootfs []*containerd_types.Mount `protobuf:"bytes,3,rep,name=rootfs" json:"rootfs,omitempty"` IO *TaskIO `protobuf:"bytes,4,opt,name=io" json:"io,omitempty"` Checkpoint string `protobuf:"bytes,5,opt,name=checkpoint,proto3" json:"checkpoint,omitempty"` Pid uint32 `protobuf:"varint,6,opt,name=pid,proto3" json:"pid,omitempty"` } func (m *TaskCreate) Reset() { *m = TaskCreate{} } func (*TaskCreate) ProtoMessage() {} func (*TaskCreate) Descriptor() ([]byte, []int) { return fileDescriptorTask, []int{0} } type TaskStart struct { ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` Pid uint32 `protobuf:"varint,2,opt,name=pid,proto3" json:"pid,omitempty"` } func (m *TaskStart) Reset() { *m = TaskStart{} } func (*TaskStart) ProtoMessage() {} func (*TaskStart) Descriptor() ([]byte, []int) { return fileDescriptorTask, []int{1} } type TaskDelete struct { ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` Pid uint32 `protobuf:"varint,2,opt,name=pid,proto3" json:"pid,omitempty"` ExitStatus uint32 `protobuf:"varint,3,opt,name=exit_status,json=exitStatus,proto3" json:"exit_status,omitempty"` ExitedAt time.Time `protobuf:"bytes,4,opt,name=exited_at,json=exitedAt,stdtime" json:"exited_at"` } func (m *TaskDelete) Reset() { *m = TaskDelete{} } func (*TaskDelete) ProtoMessage() {} func (*TaskDelete) Descriptor() ([]byte, []int) { return fileDescriptorTask, []int{2} } type TaskIO struct { Stdin string `protobuf:"bytes,1,opt,name=stdin,proto3" json:"stdin,omitempty"` Stdout string `protobuf:"bytes,2,opt,name=stdout,proto3" json:"stdout,omitempty"` Stderr string `protobuf:"bytes,3,opt,name=stderr,proto3" json:"stderr,omitempty"` Terminal bool `protobuf:"varint,4,opt,name=terminal,proto3" json:"terminal,omitempty"` } func (m *TaskIO) Reset() { *m = TaskIO{} } func (*TaskIO) ProtoMessage() {} func (*TaskIO) Descriptor() ([]byte, []int) { return fileDescriptorTask, []int{3} } type TaskExit struct { ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` ID string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` Pid uint32 `protobuf:"varint,3,opt,name=pid,proto3" json:"pid,omitempty"` ExitStatus uint32 `protobuf:"varint,4,opt,name=exit_status,json=exitStatus,proto3" json:"exit_status,omitempty"` ExitedAt time.Time `protobuf:"bytes,5,opt,name=exited_at,json=exitedAt,stdtime" json:"exited_at"` } func (m *TaskExit) Reset() { *m = TaskExit{} } func (*TaskExit) ProtoMessage() {} func (*TaskExit) Descriptor() ([]byte, []int) { return fileDescriptorTask, []int{4} } type TaskOOM struct { ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` } func (m *TaskOOM) Reset() { *m = TaskOOM{} } func (*TaskOOM) ProtoMessage() {} func (*TaskOOM) Descriptor() ([]byte, []int) { return fileDescriptorTask, []int{5} } type TaskExecAdded struct { ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` ExecID string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"` } func (m *TaskExecAdded) Reset() { *m = TaskExecAdded{} } func (*TaskExecAdded) ProtoMessage() {} func (*TaskExecAdded) Descriptor() ([]byte, []int) { return fileDescriptorTask, []int{6} } type TaskExecStarted struct { ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` ExecID string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"` Pid uint32 `protobuf:"varint,3,opt,name=pid,proto3" json:"pid,omitempty"` } func (m *TaskExecStarted) Reset() { *m = TaskExecStarted{} } func (*TaskExecStarted) ProtoMessage() {} func (*TaskExecStarted) Descriptor() ([]byte, []int) { return fileDescriptorTask, []int{7} } type TaskPaused struct { ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` } func (m *TaskPaused) Reset() { *m = TaskPaused{} } func (*TaskPaused) ProtoMessage() {} func (*TaskPaused) Descriptor() ([]byte, []int) { return fileDescriptorTask, []int{8} } type TaskResumed struct { ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` } func (m *TaskResumed) Reset() { *m = TaskResumed{} } func (*TaskResumed) ProtoMessage() {} func (*TaskResumed) Descriptor() ([]byte, []int) { return fileDescriptorTask, []int{9} } type TaskCheckpointed struct { ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` Checkpoint string `protobuf:"bytes,2,opt,name=checkpoint,proto3" json:"checkpoint,omitempty"` } func (m *TaskCheckpointed) Reset() { *m = TaskCheckpointed{} } func (*TaskCheckpointed) ProtoMessage() {} func (*TaskCheckpointed) Descriptor() ([]byte, []int) { return fileDescriptorTask, []int{10} } func init() { proto.RegisterType((*TaskCreate)(nil), "containerd.events.TaskCreate") proto.RegisterType((*TaskStart)(nil), "containerd.events.TaskStart") proto.RegisterType((*TaskDelete)(nil), "containerd.events.TaskDelete") proto.RegisterType((*TaskIO)(nil), "containerd.events.TaskIO") proto.RegisterType((*TaskExit)(nil), "containerd.events.TaskExit") proto.RegisterType((*TaskOOM)(nil), "containerd.events.TaskOOM") proto.RegisterType((*TaskExecAdded)(nil), "containerd.events.TaskExecAdded") proto.RegisterType((*TaskExecStarted)(nil), "containerd.events.TaskExecStarted") proto.RegisterType((*TaskPaused)(nil), "containerd.events.TaskPaused") proto.RegisterType((*TaskResumed)(nil), "containerd.events.TaskResumed") proto.RegisterType((*TaskCheckpointed)(nil), "containerd.events.TaskCheckpointed") } // Field returns the value for the given fieldpath as a string, if defined. // If the value is not defined, the second value will be false. func (m *TaskCreate) Field(fieldpath []string) (string, bool) { if len(fieldpath) == 0 { return "", false } switch fieldpath[0] { // unhandled: rootfs // unhandled: pid case "container_id": return string(m.ContainerID), len(m.ContainerID) > 0 case "bundle": return string(m.Bundle), len(m.Bundle) > 0 case "io": // NOTE(stevvooe): This is probably not correct in many cases. // We assume that the target message also implements the Field // method, which isn't likely true in a lot of cases. // // If you have a broken build and have found this comment, // you may be closer to a solution. if m.IO == nil { return "", false } return m.IO.Field(fieldpath[1:]) case "checkpoint": return string(m.Checkpoint), len(m.Checkpoint) > 0 } return "", false } // Field returns the value for the given fieldpath as a string, if defined. // If the value is not defined, the second value will be false. func (m *TaskStart) Field(fieldpath []string) (string, bool) { if len(fieldpath) == 0 { return "", false } switch fieldpath[0] { // unhandled: pid case "container_id": return string(m.ContainerID), len(m.ContainerID) > 0 } return "", false } // Field returns the value for the given fieldpath as a string, if defined. // If the value is not defined, the second value will be false. func (m *TaskDelete) Field(fieldpath []string) (string, bool) { if len(fieldpath) == 0 { return "", false } switch fieldpath[0] { // unhandled: pid // unhandled: exit_status // unhandled: exited_at case "container_id": return string(m.ContainerID), len(m.ContainerID) > 0 } return "", false } // Field returns the value for the given fieldpath as a string, if defined. // If the value is not defined, the second value will be false. func (m *TaskIO) Field(fieldpath []string) (string, bool) { if len(fieldpath) == 0 { return "", false } switch fieldpath[0] { case "stdin": return string(m.Stdin), len(m.Stdin) > 0 case "stdout": return string(m.Stdout), len(m.Stdout) > 0 case "stderr": return string(m.Stderr), len(m.Stderr) > 0 case "terminal": return fmt.Sprint(m.Terminal), true } return "", false } // Field returns the value for the given fieldpath as a string, if defined. // If the value is not defined, the second value will be false. func (m *TaskExit) Field(fieldpath []string) (string, bool) { if len(fieldpath) == 0 { return "", false } switch fieldpath[0] { // unhandled: pid // unhandled: exit_status // unhandled: exited_at case "container_id": return string(m.ContainerID), len(m.ContainerID) > 0 case "id": return string(m.ID), len(m.ID) > 0 } return "", false } // Field returns the value for the given fieldpath as a string, if defined. // If the value is not defined, the second value will be false. func (m *TaskOOM) Field(fieldpath []string) (string, bool) { if len(fieldpath) == 0 { return "", false } switch fieldpath[0] { case "container_id": return string(m.ContainerID), len(m.ContainerID) > 0 } return "", false } // Field returns the value for the given fieldpath as a string, if defined. // If the value is not defined, the second value will be false. func (m *TaskExecAdded) Field(fieldpath []string) (string, bool) { if len(fieldpath) == 0 { return "", false } switch fieldpath[0] { case "container_id": return string(m.ContainerID), len(m.ContainerID) > 0 case "exec_id": return string(m.ExecID), len(m.ExecID) > 0 } return "", false } // Field returns the value for the given fieldpath as a string, if defined. // If the value is not defined, the second value will be false. func (m *TaskExecStarted) Field(fieldpath []string) (string, bool) { if len(fieldpath) == 0 { return "", false } switch fieldpath[0] { // unhandled: pid case "container_id": return string(m.ContainerID), len(m.ContainerID) > 0 case "exec_id": return string(m.ExecID), len(m.ExecID) > 0 } return "", false } // Field returns the value for the given fieldpath as a string, if defined. // If the value is not defined, the second value will be false. func (m *TaskPaused) Field(fieldpath []string) (string, bool) { if len(fieldpath) == 0 { return "", false } switch fieldpath[0] { case "container_id": return string(m.ContainerID), len(m.ContainerID) > 0 } return "", false } // Field returns the value for the given fieldpath as a string, if defined. // If the value is not defined, the second value will be false. func (m *TaskResumed) Field(fieldpath []string) (string, bool) { if len(fieldpath) == 0 { return "", false } switch fieldpath[0] { case "container_id": return string(m.ContainerID), len(m.ContainerID) > 0 } return "", false } // Field returns the value for the given fieldpath as a string, if defined. // If the value is not defined, the second value will be false. func (m *TaskCheckpointed) Field(fieldpath []string) (string, bool) { if len(fieldpath) == 0 { return "", false } switch fieldpath[0] { case "container_id": return string(m.ContainerID), len(m.ContainerID) > 0 case "checkpoint": return string(m.Checkpoint), len(m.Checkpoint) > 0 } return "", false } func (m *TaskCreate) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *TaskCreate) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.ContainerID) > 0 { dAtA[i] = 0xa i++ i = encodeVarintTask(dAtA, i, uint64(len(m.ContainerID))) i += copy(dAtA[i:], m.ContainerID) } if len(m.Bundle) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintTask(dAtA, i, uint64(len(m.Bundle))) i += copy(dAtA[i:], m.Bundle) } if len(m.Rootfs) > 0 { for _, msg := range m.Rootfs { dAtA[i] = 0x1a i++ i = encodeVarintTask(dAtA, i, uint64(msg.Size())) n, err := msg.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n } } if m.IO != nil { dAtA[i] = 0x22 i++ i = encodeVarintTask(dAtA, i, uint64(m.IO.Size())) n1, err := m.IO.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n1 } if len(m.Checkpoint) > 0 { dAtA[i] = 0x2a i++ i = encodeVarintTask(dAtA, i, uint64(len(m.Checkpoint))) i += copy(dAtA[i:], m.Checkpoint) } if m.Pid != 0 { dAtA[i] = 0x30 i++ i = encodeVarintTask(dAtA, i, uint64(m.Pid)) } return i, nil } func (m *TaskStart) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *TaskStart) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.ContainerID) > 0 { dAtA[i] = 0xa i++ i = encodeVarintTask(dAtA, i, uint64(len(m.ContainerID))) i += copy(dAtA[i:], m.ContainerID) } if m.Pid != 0 { dAtA[i] = 0x10 i++ i = encodeVarintTask(dAtA, i, uint64(m.Pid)) } return i, nil } func (m *TaskDelete) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *TaskDelete) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.ContainerID) > 0 { dAtA[i] = 0xa i++ i = encodeVarintTask(dAtA, i, uint64(len(m.ContainerID))) i += copy(dAtA[i:], m.ContainerID) } if m.Pid != 0 { dAtA[i] = 0x10 i++ i = encodeVarintTask(dAtA, i, uint64(m.Pid)) } if m.ExitStatus != 0 { dAtA[i] = 0x18 i++ i = encodeVarintTask(dAtA, i, uint64(m.ExitStatus)) } dAtA[i] = 0x22 i++ i = encodeVarintTask(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt))) n2, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:]) if err != nil { return 0, err } i += n2 return i, nil } func (m *TaskIO) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *TaskIO) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Stdin) > 0 { dAtA[i] = 0xa i++ i = encodeVarintTask(dAtA, i, uint64(len(m.Stdin))) i += copy(dAtA[i:], m.Stdin) } if len(m.Stdout) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintTask(dAtA, i, uint64(len(m.Stdout))) i += copy(dAtA[i:], m.Stdout) } if len(m.Stderr) > 0 { dAtA[i] = 0x1a i++ i = encodeVarintTask(dAtA, i, uint64(len(m.Stderr))) i += copy(dAtA[i:], m.Stderr) } if m.Terminal { dAtA[i] = 0x20 i++ if m.Terminal { dAtA[i] = 1 } else { dAtA[i] = 0 } i++ } return i, nil } func (m *TaskExit) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *TaskExit) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.ContainerID) > 0 { dAtA[i] = 0xa i++ i = encodeVarintTask(dAtA, i, uint64(len(m.ContainerID))) i += copy(dAtA[i:], m.ContainerID) } if len(m.ID) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintTask(dAtA, i, uint64(len(m.ID))) i += copy(dAtA[i:], m.ID) } if m.Pid != 0 { dAtA[i] = 0x18 i++ i = encodeVarintTask(dAtA, i, uint64(m.Pid)) } if m.ExitStatus != 0 { dAtA[i] = 0x20 i++ i = encodeVarintTask(dAtA, i, uint64(m.ExitStatus)) } dAtA[i] = 0x2a i++ i = encodeVarintTask(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt))) n3, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:]) if err != nil { return 0, err } i += n3 return i, nil } func (m *TaskOOM) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *TaskOOM) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.ContainerID) > 0 { dAtA[i] = 0xa i++ i = encodeVarintTask(dAtA, i, uint64(len(m.ContainerID))) i += copy(dAtA[i:], m.ContainerID) } return i, nil } func (m *TaskExecAdded) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *TaskExecAdded) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.ContainerID) > 0 { dAtA[i] = 0xa i++ i = encodeVarintTask(dAtA, i, uint64(len(m.ContainerID))) i += copy(dAtA[i:], m.ContainerID) } if len(m.ExecID) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintTask(dAtA, i, uint64(len(m.ExecID))) i += copy(dAtA[i:], m.ExecID) } return i, nil } func (m *TaskExecStarted) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *TaskExecStarted) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.ContainerID) > 0 { dAtA[i] = 0xa i++ i = encodeVarintTask(dAtA, i, uint64(len(m.ContainerID))) i += copy(dAtA[i:], m.ContainerID) } if len(m.ExecID) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintTask(dAtA, i, uint64(len(m.ExecID))) i += copy(dAtA[i:], m.ExecID) } if m.Pid != 0 { dAtA[i] = 0x18 i++ i = encodeVarintTask(dAtA, i, uint64(m.Pid)) } return i, nil } func (m *TaskPaused) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *TaskPaused) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.ContainerID) > 0 { dAtA[i] = 0xa i++ i = encodeVarintTask(dAtA, i, uint64(len(m.ContainerID))) i += copy(dAtA[i:], m.ContainerID) } return i, nil } func (m *TaskResumed) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *TaskResumed) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.ContainerID) > 0 { dAtA[i] = 0xa i++ i = encodeVarintTask(dAtA, i, uint64(len(m.ContainerID))) i += copy(dAtA[i:], m.ContainerID) } return i, nil } func (m *TaskCheckpointed) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *TaskCheckpointed) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.ContainerID) > 0 { dAtA[i] = 0xa i++ i = encodeVarintTask(dAtA, i, uint64(len(m.ContainerID))) i += copy(dAtA[i:], m.ContainerID) } if len(m.Checkpoint) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintTask(dAtA, i, uint64(len(m.Checkpoint))) i += copy(dAtA[i:], m.Checkpoint) } return i, nil } func encodeVarintTask(dAtA []byte, offset int, v uint64) int { for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return offset + 1 } func (m *TaskCreate) Size() (n int) { var l int _ = l l = len(m.ContainerID) if l > 0 { n += 1 + l + sovTask(uint64(l)) } l = len(m.Bundle) if l > 0 { n += 1 + l + sovTask(uint64(l)) } if len(m.Rootfs) > 0 { for _, e := range m.Rootfs { l = e.Size() n += 1 + l + sovTask(uint64(l)) } } if m.IO != nil { l = m.IO.Size() n += 1 + l + sovTask(uint64(l)) } l = len(m.Checkpoint) if l > 0 { n += 1 + l + sovTask(uint64(l)) } if m.Pid != 0 { n += 1 + sovTask(uint64(m.Pid)) } return n } func (m *TaskStart) Size() (n int) { var l int _ = l l = len(m.ContainerID) if l > 0 { n += 1 + l + sovTask(uint64(l)) } if m.Pid != 0 { n += 1 + sovTask(uint64(m.Pid)) } return n } func (m *TaskDelete) Size() (n int) { var l int _ = l l = len(m.ContainerID) if l > 0 { n += 1 + l + sovTask(uint64(l)) } if m.Pid != 0 { n += 1 + sovTask(uint64(m.Pid)) } if m.ExitStatus != 0 { n += 1 + sovTask(uint64(m.ExitStatus)) } l = github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt) n += 1 + l + sovTask(uint64(l)) return n } func (m *TaskIO) Size() (n int) { var l int _ = l l = len(m.Stdin) if l > 0 { n += 1 + l + sovTask(uint64(l)) } l = len(m.Stdout) if l > 0 { n += 1 + l + sovTask(uint64(l)) } l = len(m.Stderr) if l > 0 { n += 1 + l + sovTask(uint64(l)) } if m.Terminal { n += 2 } return n } func (m *TaskExit) Size() (n int) { var l int _ = l l = len(m.ContainerID) if l > 0 { n += 1 + l + sovTask(uint64(l)) } l = len(m.ID) if l > 0 { n += 1 + l + sovTask(uint64(l)) } if m.Pid != 0 { n += 1 + sovTask(uint64(m.Pid)) } if m.ExitStatus != 0 { n += 1 + sovTask(uint64(m.ExitStatus)) } l = github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt) n += 1 + l + sovTask(uint64(l)) return n } func (m *TaskOOM) Size() (n int) { var l int _ = l l = len(m.ContainerID) if l > 0 { n += 1 + l + sovTask(uint64(l)) } return n } func (m *TaskExecAdded) Size() (n int) { var l int _ = l l = len(m.ContainerID) if l > 0 { n += 1 + l + sovTask(uint64(l)) } l = len(m.ExecID) if l > 0 { n += 1 + l + sovTask(uint64(l)) } return n } func (m *TaskExecStarted) Size() (n int) { var l int _ = l l = len(m.ContainerID) if l > 0 { n += 1 + l + sovTask(uint64(l)) } l = len(m.ExecID) if l > 0 { n += 1 + l + sovTask(uint64(l)) } if m.Pid != 0 { n += 1 + sovTask(uint64(m.Pid)) } return n } func (m *TaskPaused) Size() (n int) { var l int _ = l l = len(m.ContainerID) if l > 0 { n += 1 + l + sovTask(uint64(l)) } return n } func (m *TaskResumed) Size() (n int) { var l int _ = l l = len(m.ContainerID) if l > 0 { n += 1 + l + sovTask(uint64(l)) } return n } func (m *TaskCheckpointed) Size() (n int) { var l int _ = l l = len(m.ContainerID) if l > 0 { n += 1 + l + sovTask(uint64(l)) } l = len(m.Checkpoint) if l > 0 { n += 1 + l + sovTask(uint64(l)) } return n } func sovTask(x uint64) (n int) { for { n++ x >>= 7 if x == 0 { break } } return n } func sozTask(x uint64) (n int) { return sovTask(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (this *TaskCreate) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&TaskCreate{`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, `Bundle:` + fmt.Sprintf("%v", this.Bundle) + `,`, `Rootfs:` + strings.Replace(fmt.Sprintf("%v", this.Rootfs), "Mount", "containerd_types.Mount", 1) + `,`, `IO:` + strings.Replace(fmt.Sprintf("%v", this.IO), "TaskIO", "TaskIO", 1) + `,`, `Checkpoint:` + fmt.Sprintf("%v", this.Checkpoint) + `,`, `Pid:` + fmt.Sprintf("%v", this.Pid) + `,`, `}`, }, "") return s } func (this *TaskStart) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&TaskStart{`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, `Pid:` + fmt.Sprintf("%v", this.Pid) + `,`, `}`, }, "") return s } func (this *TaskDelete) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&TaskDelete{`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, `Pid:` + fmt.Sprintf("%v", this.Pid) + `,`, `ExitStatus:` + fmt.Sprintf("%v", this.ExitStatus) + `,`, `ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "google_protobuf2.Timestamp", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } func (this *TaskIO) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&TaskIO{`, `Stdin:` + fmt.Sprintf("%v", this.Stdin) + `,`, `Stdout:` + fmt.Sprintf("%v", this.Stdout) + `,`, `Stderr:` + fmt.Sprintf("%v", this.Stderr) + `,`, `Terminal:` + fmt.Sprintf("%v", this.Terminal) + `,`, `}`, }, "") return s } func (this *TaskExit) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&TaskExit{`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, `ID:` + fmt.Sprintf("%v", this.ID) + `,`, `Pid:` + fmt.Sprintf("%v", this.Pid) + `,`, `ExitStatus:` + fmt.Sprintf("%v", this.ExitStatus) + `,`, `ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "google_protobuf2.Timestamp", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } func (this *TaskOOM) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&TaskOOM{`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, `}`, }, "") return s } func (this *TaskExecAdded) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&TaskExecAdded{`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, `ExecID:` + fmt.Sprintf("%v", this.ExecID) + `,`, `}`, }, "") return s } func (this *TaskExecStarted) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&TaskExecStarted{`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, `ExecID:` + fmt.Sprintf("%v", this.ExecID) + `,`, `Pid:` + fmt.Sprintf("%v", this.Pid) + `,`, `}`, }, "") return s } func (this *TaskPaused) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&TaskPaused{`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, `}`, }, "") return s } func (this *TaskResumed) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&TaskResumed{`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, `}`, }, "") return s } func (this *TaskCheckpointed) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&TaskCheckpointed{`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, `Checkpoint:` + fmt.Sprintf("%v", this.Checkpoint) + `,`, `}`, }, "") return s } func valueToStringTask(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { return "nil" } pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } func (m *TaskCreate) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: TaskCreate: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: TaskCreate: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTask } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ContainerID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Bundle", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTask } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Bundle = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Rootfs", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTask } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } m.Rootfs = append(m.Rootfs, &containerd_types.Mount{}) if err := m.Rootfs[len(m.Rootfs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field IO", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTask } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.IO == nil { m.IO = &TaskIO{} } if err := m.IO.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Checkpoint", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTask } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Checkpoint = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Pid", wireType) } m.Pid = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Pid |= (uint32(b) & 0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := skipTask(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTask } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *TaskStart) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: TaskStart: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: TaskStart: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTask } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ContainerID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Pid", wireType) } m.Pid = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Pid |= (uint32(b) & 0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := skipTask(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTask } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *TaskDelete) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: TaskDelete: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: TaskDelete: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTask } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ContainerID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Pid", wireType) } m.Pid = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Pid |= (uint32(b) & 0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field ExitStatus", wireType) } m.ExitStatus = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.ExitStatus |= (uint32(b) & 0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ExitedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTask } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.ExitedAt, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTask(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTask } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *TaskIO) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: TaskIO: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: TaskIO: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Stdin", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTask } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Stdin = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Stdout", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTask } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Stdout = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Stderr", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTask } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Stderr = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Terminal", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= (int(b) & 0x7F) << shift if b < 0x80 { break } } m.Terminal = bool(v != 0) default: iNdEx = preIndex skippy, err := skipTask(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTask } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *TaskExit) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: TaskExit: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: TaskExit: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTask } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ContainerID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTask } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Pid", wireType) } m.Pid = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Pid |= (uint32(b) & 0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field ExitStatus", wireType) } m.ExitStatus = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.ExitStatus |= (uint32(b) & 0x7F) << shift if b < 0x80 { break } } case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ExitedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTask } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.ExitedAt, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTask(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTask } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *TaskOOM) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: TaskOOM: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: TaskOOM: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTask } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ContainerID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTask(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTask } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *TaskExecAdded) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: TaskExecAdded: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: TaskExecAdded: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTask } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ContainerID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ExecID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTask } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ExecID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTask(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTask } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *TaskExecStarted) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: TaskExecStarted: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: TaskExecStarted: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTask } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ContainerID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ExecID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTask } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ExecID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Pid", wireType) } m.Pid = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Pid |= (uint32(b) & 0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := skipTask(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTask } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *TaskPaused) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: TaskPaused: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: TaskPaused: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTask } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ContainerID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTask(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTask } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *TaskResumed) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: TaskResumed: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: TaskResumed: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTask } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ContainerID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTask(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTask } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *TaskCheckpointed) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: TaskCheckpointed: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: TaskCheckpointed: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTask } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ContainerID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Checkpoint", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTask } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Checkpoint = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTask(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTask } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipTask(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowTask } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } wireType := int(wire & 0x7) switch wireType { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowTask } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } iNdEx++ if dAtA[iNdEx-1] < 0x80 { break } } return iNdEx, nil case 1: iNdEx += 8 return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowTask } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ length |= (int(b) & 0x7F) << shift if b < 0x80 { break } } iNdEx += length if length < 0 { return 0, ErrInvalidLengthTask } return iNdEx, nil case 3: for { var innerWire uint64 var start int = iNdEx for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowTask } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ innerWire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } innerWireType := int(innerWire & 0x7) if innerWireType == 4 { break } next, err := skipTask(dAtA[start:]) if err != nil { return 0, err } iNdEx = start + next } return iNdEx, nil case 4: return iNdEx, nil case 5: iNdEx += 4 return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } } panic("unreachable") } var ( ErrInvalidLengthTask = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTask = fmt.Errorf("proto: integer overflow") ) func init() { proto.RegisterFile("github.com/containerd/containerd/api/events/task.proto", fileDescriptorTask) } var fileDescriptorTask = []byte{ // 637 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x95, 0xcd, 0x6e, 0xd3, 0x40, 0x10, 0xc7, 0x63, 0xa7, 0x75, 0x93, 0x09, 0x55, 0x8b, 0x55, 0x41, 0xc8, 0xc1, 0x8e, 0xcc, 0x25, 0x27, 0x5b, 0x04, 0x89, 0x0b, 0x42, 0x6a, 0xd2, 0x70, 0xc8, 0xa1, 0x4a, 0x71, 0x7b, 0xa8, 0xb8, 0x44, 0x4e, 0x76, 0x93, 0x2c, 0x8d, 0xbd, 0x96, 0x3d, 0x46, 0x45, 0xe2, 0xc0, 0x23, 0xf0, 0x08, 0x3c, 0x05, 0xcf, 0xd0, 0x03, 0x07, 0x8e, 0x9c, 0x02, 0xf5, 0x03, 0x70, 0xe2, 0x01, 0xd0, 0x7a, 0x1d, 0xb7, 0x50, 0xf1, 0x65, 0x89, 0x53, 0x76, 0x66, 0x67, 0xff, 0x33, 0xf3, 0xdb, 0xc9, 0x1a, 0x1e, 0xcd, 0x19, 0x2e, 0x92, 0x89, 0x3d, 0xe5, 0xbe, 0x33, 0xe5, 0x01, 0x7a, 0x2c, 0xa0, 0x11, 0xb9, 0xbe, 0xf4, 0x42, 0xe6, 0xd0, 0x97, 0x34, 0xc0, 0xd8, 0x41, 0x2f, 0x3e, 0xb3, 0xc3, 0x88, 0x23, 0xd7, 0x6f, 0x5f, 0x45, 0xd8, 0x72, 0xb7, 0xb5, 0x37, 0xe7, 0x73, 0x9e, 0xed, 0x3a, 0x62, 0x25, 0x03, 0x5b, 0xe6, 0x9c, 0xf3, 0xf9, 0x92, 0x3a, 0x99, 0x35, 0x49, 0x66, 0x0e, 0x32, 0x9f, 0xc6, 0xe8, 0xf9, 0x61, 0x1e, 0xf0, 0x77, 0x15, 0xe0, 0xab, 0x90, 0xc6, 0x8e, 0xcf, 0x93, 0x00, 0xf3, 0x73, 0xfb, 0x7f, 0x3c, 0x57, 0xa4, 0x0c, 0x97, 0xc9, 0x9c, 0x05, 0xce, 0x8c, 0xd1, 0x25, 0x09, 0x3d, 0x5c, 0x48, 0x05, 0xeb, 0xab, 0x02, 0x70, 0xe2, 0xc5, 0x67, 0x07, 0x11, 0xf5, 0x90, 0xea, 0x5d, 0xb8, 0x55, 0x1c, 0x1e, 0x33, 0xd2, 0x54, 0xda, 0x4a, 0xa7, 0xde, 0xdf, 0x49, 0x57, 0x66, 0xe3, 0x60, 0xed, 0x1f, 0x0e, 0xdc, 0x46, 0x11, 0x34, 0x24, 0xfa, 0x1d, 0xd0, 0x26, 0x49, 0x40, 0x96, 0xb4, 0xa9, 0x8a, 0x68, 0x37, 0xb7, 0x74, 0x07, 0xb4, 0x88, 0x73, 0x9c, 0xc5, 0xcd, 0x6a, 0xbb, 0xda, 0x69, 0x74, 0xef, 0xda, 0xd7, 0x78, 0x65, 0xbd, 0xd8, 0x87, 0xa2, 0x17, 0x37, 0x0f, 0xd3, 0x1f, 0x80, 0xca, 0x78, 0x73, 0xa3, 0xad, 0x74, 0x1a, 0xdd, 0x7b, 0xf6, 0x0d, 0xb8, 0xb6, 0xa8, 0x73, 0x38, 0xea, 0x6b, 0xe9, 0xca, 0x54, 0x87, 0x23, 0x57, 0x65, 0x5c, 0x37, 0x00, 0xa6, 0x0b, 0x3a, 0x3d, 0x0b, 0x39, 0x0b, 0xb0, 0xb9, 0x99, 0xe5, 0xbf, 0xe6, 0xd1, 0x77, 0xa1, 0x1a, 0x32, 0xd2, 0xd4, 0xda, 0x4a, 0x67, 0xdb, 0x15, 0x4b, 0xeb, 0x19, 0xd4, 0x85, 0xce, 0x31, 0x7a, 0x11, 0x96, 0x6a, 0x37, 0x97, 0x54, 0xaf, 0x24, 0xdf, 0xe7, 0x0c, 0x07, 0x74, 0x49, 0x4b, 0x32, 0xbc, 0x21, 0xaa, 0x9b, 0xd0, 0xa0, 0xe7, 0x0c, 0xc7, 0x31, 0x7a, 0x98, 0x08, 0x84, 0x62, 0x07, 0x84, 0xeb, 0x38, 0xf3, 0xe8, 0x3d, 0xa8, 0x0b, 0x8b, 0x92, 0xb1, 0x87, 0x39, 0xb4, 0x96, 0x2d, 0x07, 0xcd, 0x5e, 0xdf, 0xba, 0x7d, 0xb2, 0x1e, 0xb4, 0x7e, 0xed, 0x62, 0x65, 0x56, 0xde, 0x7e, 0x36, 0x15, 0xb7, 0x26, 0x8f, 0xf5, 0xd0, 0x7a, 0x01, 0x9a, 0x64, 0xaa, 0xef, 0xc1, 0x66, 0x8c, 0x84, 0x05, 0xb2, 0x58, 0x57, 0x1a, 0xe2, 0x66, 0x63, 0x24, 0x3c, 0xc1, 0xf5, 0xcd, 0x4a, 0x2b, 0xf7, 0xd3, 0x28, 0xca, 0xca, 0x92, 0x7e, 0x1a, 0x45, 0x7a, 0x0b, 0x6a, 0x48, 0x23, 0x9f, 0x05, 0xde, 0x32, 0xab, 0xa8, 0xe6, 0x16, 0xb6, 0xf5, 0x41, 0x81, 0x9a, 0x48, 0xf6, 0xf4, 0x9c, 0x61, 0xc9, 0x31, 0x53, 0x73, 0x42, 0xf5, 0x7c, 0x04, 0x06, 0xae, 0xca, 0x0a, 0x74, 0xd5, 0x5f, 0xa2, 0xdb, 0xf8, 0x3d, 0xba, 0xcd, 0x52, 0xe8, 0x9e, 0xc0, 0x96, 0xe8, 0x66, 0x34, 0x3a, 0x2c, 0xd3, 0x8c, 0xb5, 0x80, 0x6d, 0x09, 0x83, 0x4e, 0x7b, 0x84, 0x50, 0x52, 0x8a, 0xc8, 0x7d, 0xd8, 0xa2, 0xe7, 0x74, 0x3a, 0x2e, 0xb0, 0x40, 0xba, 0x32, 0x35, 0xa1, 0x39, 0x1c, 0xb8, 0x9a, 0xd8, 0x1a, 0x12, 0xeb, 0x35, 0xec, 0xac, 0x33, 0x65, 0x33, 0xff, 0x1f, 0x73, 0xdd, 0xbc, 0x0a, 0x6b, 0x5f, 0xfe, 0x33, 0x8e, 0xbc, 0x24, 0x2e, 0x97, 0xd8, 0xea, 0x41, 0x43, 0x28, 0xb8, 0x34, 0x4e, 0xfc, 0x92, 0x12, 0x33, 0xd8, 0xcd, 0x9e, 0xb8, 0xe2, 0x59, 0x28, 0xc9, 0xe0, 0xc7, 0xc7, 0x46, 0xfd, 0xf9, 0xb1, 0xe9, 0x1f, 0x5d, 0x5c, 0x1a, 0x95, 0x4f, 0x97, 0x46, 0xe5, 0x4d, 0x6a, 0x28, 0x17, 0xa9, 0xa1, 0x7c, 0x4c, 0x0d, 0xe5, 0x4b, 0x6a, 0x28, 0xef, 0xbe, 0x19, 0xca, 0xf3, 0xee, 0x3f, 0x7c, 0x65, 0x1e, 0xcb, 0x9f, 0xd3, 0xca, 0x69, 0x75, 0xa2, 0x65, 0x13, 0xf9, 0xf0, 0x7b, 0x00, 0x00, 0x00, 0xff, 0xff, 0x07, 0x69, 0x62, 0x9d, 0xa6, 0x06, 0x00, 0x00, } docker-containerd-tags-docker-17.12.1/api/events/task.proto000066400000000000000000000030271322771672400236000ustar00rootroot00000000000000syntax = "proto3"; package containerd.events; import weak "gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; import "github.com/containerd/containerd/api/types/mount.proto"; import weak "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto"; option go_package = "github.com/containerd/containerd/api/events;events"; option (containerd.plugin.fieldpath_all) = true; message TaskCreate { string container_id = 1; string bundle = 2; repeated containerd.types.Mount rootfs = 3; TaskIO io = 4 [(gogoproto.customname) = "IO"]; string checkpoint = 5; uint32 pid = 6; } message TaskStart { string container_id = 1; uint32 pid = 2; } message TaskDelete { string container_id = 1; uint32 pid = 2; uint32 exit_status = 3; google.protobuf.Timestamp exited_at = 4 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; } message TaskIO { string stdin = 1; string stdout = 2; string stderr = 3; bool terminal = 4; } message TaskExit { string container_id = 1; string id = 2; uint32 pid = 3; uint32 exit_status = 4; google.protobuf.Timestamp exited_at = 5 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; } message TaskOOM { string container_id = 1; } message TaskExecAdded { string container_id = 1; string exec_id = 2; } message TaskExecStarted { string container_id = 1; string exec_id = 2; uint32 pid = 3; } message TaskPaused { string container_id = 1; } message TaskResumed { string container_id = 1; } message TaskCheckpointed { string container_id = 1; string checkpoint = 2; } docker-containerd-tags-docker-17.12.1/api/next.pb.txt000077500000000000000000002620061322771672400223730ustar00rootroot00000000000000file { name: "google/protobuf/any.proto" package: "google.protobuf" message_type { name: "Any" field { name: "type_url" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "typeUrl" } field { name: "value" number: 2 label: LABEL_OPTIONAL type: TYPE_BYTES json_name: "value" } } options { java_package: "com.google.protobuf" java_outer_classname: "AnyProto" java_multiple_files: true go_package: "github.com/golang/protobuf/ptypes/any" objc_class_prefix: "GPB" csharp_namespace: "Google.Protobuf.WellKnownTypes" } syntax: "proto3" } file { name: "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto" package: "containerd.plugin" dependency: "google/protobuf/descriptor.proto" extension { name: "fieldpath_all" extendee: ".google.protobuf.FileOptions" number: 63300 label: LABEL_OPTIONAL type: TYPE_BOOL json_name: "fieldpathAll" } extension { name: "fieldpath" extendee: ".google.protobuf.MessageOptions" number: 64400 label: LABEL_OPTIONAL type: TYPE_BOOL json_name: "fieldpath" } } file { name: "github.com/containerd/containerd/api/events/container.proto" package: "containerd.events" dependency: "google/protobuf/any.proto" dependency: "gogoproto/gogo.proto" dependency: "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto" message_type { name: "ContainerCreate" field { name: "id" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "id" } field { name: "image" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "image" } field { name: "runtime" number: 3 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".containerd.events.ContainerCreate.Runtime" json_name: "runtime" } nested_type { name: "Runtime" field { name: "name" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "name" } field { name: "options" number: 2 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".google.protobuf.Any" json_name: "options" } } } message_type { name: "ContainerUpdate" field { name: "id" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "id" } field { name: "image" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "image" } field { name: "labels" number: 3 label: LABEL_REPEATED type: TYPE_MESSAGE type_name: ".containerd.events.ContainerUpdate.LabelsEntry" json_name: "labels" } field { name: "snapshot_key" number: 4 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "snapshotKey" } nested_type { name: "LabelsEntry" field { name: "key" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "key" } field { name: "value" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "value" } options { map_entry: true } } } message_type { name: "ContainerDelete" field { name: "id" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "id" } } options { go_package: "github.com/containerd/containerd/api/events;events" 63300: 1 } weak_dependency: 1 weak_dependency: 2 syntax: "proto3" } file { name: "github.com/containerd/containerd/api/events/content.proto" package: "containerd.events" dependency: "gogoproto/gogo.proto" dependency: "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto" message_type { name: "ContentDelete" field { name: "digest" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING options { 65003: "github.com/opencontainers/go-digest.Digest" 65001: 0 } json_name: "digest" } } options { go_package: "github.com/containerd/containerd/api/events;events" 63300: 1 } weak_dependency: 0 weak_dependency: 1 syntax: "proto3" } file { name: "github.com/containerd/containerd/api/events/image.proto" package: "containerd.services.images.v1" dependency: "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto" message_type { name: "ImageCreate" field { name: "name" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "name" } field { name: "labels" number: 2 label: LABEL_REPEATED type: TYPE_MESSAGE type_name: ".containerd.services.images.v1.ImageCreate.LabelsEntry" json_name: "labels" } nested_type { name: "LabelsEntry" field { name: "key" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "key" } field { name: "value" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "value" } options { map_entry: true } } } message_type { name: "ImageUpdate" field { name: "name" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "name" } field { name: "labels" number: 2 label: LABEL_REPEATED type: TYPE_MESSAGE type_name: ".containerd.services.images.v1.ImageUpdate.LabelsEntry" json_name: "labels" } nested_type { name: "LabelsEntry" field { name: "key" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "key" } field { name: "value" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "value" } options { map_entry: true } } } message_type { name: "ImageDelete" field { name: "name" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "name" } } options { go_package: "github.com/containerd/containerd/api/events;events" 63300: 1 } weak_dependency: 0 syntax: "proto3" } file { name: "github.com/containerd/containerd/api/events/namespace.proto" package: "containerd.events" dependency: "gogoproto/gogo.proto" dependency: "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto" message_type { name: "NamespaceCreate" field { name: "name" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "name" } field { name: "labels" number: 2 label: LABEL_REPEATED type: TYPE_MESSAGE type_name: ".containerd.events.NamespaceCreate.LabelsEntry" json_name: "labels" } nested_type { name: "LabelsEntry" field { name: "key" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "key" } field { name: "value" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "value" } options { map_entry: true } } } message_type { name: "NamespaceUpdate" field { name: "name" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "name" } field { name: "labels" number: 2 label: LABEL_REPEATED type: TYPE_MESSAGE type_name: ".containerd.events.NamespaceUpdate.LabelsEntry" json_name: "labels" } nested_type { name: "LabelsEntry" field { name: "key" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "key" } field { name: "value" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "value" } options { map_entry: true } } } message_type { name: "NamespaceDelete" field { name: "name" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "name" } } options { go_package: "github.com/containerd/containerd/api/events;events" 63300: 1 } weak_dependency: 0 weak_dependency: 1 syntax: "proto3" } file { name: "github.com/containerd/containerd/api/events/snapshot.proto" package: "containerd.events" dependency: "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto" message_type { name: "SnapshotPrepare" field { name: "key" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "key" } field { name: "parent" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "parent" } } message_type { name: "SnapshotCommit" field { name: "key" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "key" } field { name: "name" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "name" } } message_type { name: "SnapshotRemove" field { name: "key" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "key" } } options { go_package: "github.com/containerd/containerd/api/events;events" 63300: 1 } weak_dependency: 0 syntax: "proto3" } file { name: "google/protobuf/timestamp.proto" package: "google.protobuf" message_type { name: "Timestamp" field { name: "seconds" number: 1 label: LABEL_OPTIONAL type: TYPE_INT64 json_name: "seconds" } field { name: "nanos" number: 2 label: LABEL_OPTIONAL type: TYPE_INT32 json_name: "nanos" } } options { java_package: "com.google.protobuf" java_outer_classname: "TimestampProto" java_multiple_files: true go_package: "github.com/golang/protobuf/ptypes/timestamp" cc_enable_arenas: true objc_class_prefix: "GPB" csharp_namespace: "Google.Protobuf.WellKnownTypes" } syntax: "proto3" } file { name: "github.com/containerd/containerd/api/types/mount.proto" package: "containerd.types" dependency: "gogoproto/gogo.proto" message_type { name: "Mount" field { name: "type" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "type" } field { name: "source" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "source" } field { name: "target" number: 3 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "target" } field { name: "options" number: 4 label: LABEL_REPEATED type: TYPE_STRING json_name: "options" } } options { go_package: "github.com/containerd/containerd/api/types;types" } weak_dependency: 0 syntax: "proto3" } file { name: "github.com/containerd/containerd/api/events/task.proto" package: "containerd.events" dependency: "gogoproto/gogo.proto" dependency: "google/protobuf/timestamp.proto" dependency: "github.com/containerd/containerd/api/types/mount.proto" dependency: "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto" message_type { name: "TaskCreate" field { name: "container_id" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "containerId" } field { name: "bundle" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "bundle" } field { name: "rootfs" number: 3 label: LABEL_REPEATED type: TYPE_MESSAGE type_name: ".containerd.types.Mount" json_name: "rootfs" } field { name: "io" number: 4 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".containerd.events.TaskIO" options { 65004: "IO" } json_name: "io" } field { name: "checkpoint" number: 5 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "checkpoint" } field { name: "pid" number: 6 label: LABEL_OPTIONAL type: TYPE_UINT32 json_name: "pid" } } message_type { name: "TaskStart" field { name: "container_id" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "containerId" } field { name: "pid" number: 2 label: LABEL_OPTIONAL type: TYPE_UINT32 json_name: "pid" } } message_type { name: "TaskDelete" field { name: "container_id" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "containerId" } field { name: "pid" number: 2 label: LABEL_OPTIONAL type: TYPE_UINT32 json_name: "pid" } field { name: "exit_status" number: 3 label: LABEL_OPTIONAL type: TYPE_UINT32 json_name: "exitStatus" } field { name: "exited_at" number: 4 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".google.protobuf.Timestamp" options { 65010: 1 65001: 0 } json_name: "exitedAt" } } message_type { name: "TaskIO" field { name: "stdin" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "stdin" } field { name: "stdout" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "stdout" } field { name: "stderr" number: 3 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "stderr" } field { name: "terminal" number: 4 label: LABEL_OPTIONAL type: TYPE_BOOL json_name: "terminal" } } message_type { name: "TaskExit" field { name: "container_id" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "containerId" } field { name: "id" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "id" } field { name: "pid" number: 3 label: LABEL_OPTIONAL type: TYPE_UINT32 json_name: "pid" } field { name: "exit_status" number: 4 label: LABEL_OPTIONAL type: TYPE_UINT32 json_name: "exitStatus" } field { name: "exited_at" number: 5 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".google.protobuf.Timestamp" options { 65010: 1 65001: 0 } json_name: "exitedAt" } } message_type { name: "TaskOOM" field { name: "container_id" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "containerId" } } message_type { name: "TaskExecAdded" field { name: "container_id" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "containerId" } field { name: "exec_id" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "execId" } } message_type { name: "TaskExecStarted" field { name: "container_id" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "containerId" } field { name: "exec_id" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "execId" } field { name: "pid" number: 3 label: LABEL_OPTIONAL type: TYPE_UINT32 json_name: "pid" } } message_type { name: "TaskPaused" field { name: "container_id" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "containerId" } } message_type { name: "TaskResumed" field { name: "container_id" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "containerId" } } message_type { name: "TaskCheckpointed" field { name: "container_id" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "containerId" } field { name: "checkpoint" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "checkpoint" } } options { go_package: "github.com/containerd/containerd/api/events;events" 63300: 1 } weak_dependency: 0 weak_dependency: 3 syntax: "proto3" } file { name: "google/protobuf/empty.proto" package: "google.protobuf" message_type { name: "Empty" } options { java_package: "com.google.protobuf" java_outer_classname: "EmptyProto" java_multiple_files: true go_package: "github.com/golang/protobuf/ptypes/empty" cc_enable_arenas: true objc_class_prefix: "GPB" csharp_namespace: "Google.Protobuf.WellKnownTypes" } syntax: "proto3" } file { name: "google/protobuf/field_mask.proto" package: "google.protobuf" message_type { name: "FieldMask" field { name: "paths" number: 1 label: LABEL_REPEATED type: TYPE_STRING json_name: "paths" } } options { java_package: "com.google.protobuf" java_outer_classname: "FieldMaskProto" java_multiple_files: true go_package: "google.golang.org/genproto/protobuf/field_mask;field_mask" objc_class_prefix: "GPB" csharp_namespace: "Google.Protobuf.WellKnownTypes" } syntax: "proto3" } file { name: "github.com/containerd/containerd/api/services/containers/v1/containers.proto" package: "containerd.services.containers.v1" dependency: "gogoproto/gogo.proto" dependency: "google/protobuf/any.proto" dependency: "google/protobuf/empty.proto" dependency: "google/protobuf/field_mask.proto" dependency: "google/protobuf/timestamp.proto" message_type { name: "Container" field { name: "id" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "id" } field { name: "labels" number: 2 label: LABEL_REPEATED type: TYPE_MESSAGE type_name: ".containerd.services.containers.v1.Container.LabelsEntry" json_name: "labels" } field { name: "image" number: 3 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "image" } field { name: "runtime" number: 4 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".containerd.services.containers.v1.Container.Runtime" json_name: "runtime" } field { name: "spec" number: 5 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".google.protobuf.Any" json_name: "spec" } field { name: "snapshotter" number: 6 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "snapshotter" } field { name: "snapshot_key" number: 7 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "snapshotKey" } field { name: "created_at" number: 8 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".google.protobuf.Timestamp" options { 65010: 1 65001: 0 } json_name: "createdAt" } field { name: "updated_at" number: 9 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".google.protobuf.Timestamp" options { 65010: 1 65001: 0 } json_name: "updatedAt" } field { name: "extensions" number: 10 label: LABEL_REPEATED type: TYPE_MESSAGE type_name: ".containerd.services.containers.v1.Container.ExtensionsEntry" options { 65001: 0 } json_name: "extensions" } nested_type { name: "LabelsEntry" field { name: "key" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "key" } field { name: "value" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "value" } options { map_entry: true } } nested_type { name: "Runtime" field { name: "name" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "name" } field { name: "options" number: 2 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".google.protobuf.Any" json_name: "options" } } nested_type { name: "ExtensionsEntry" field { name: "key" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "key" } field { name: "value" number: 2 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".google.protobuf.Any" json_name: "value" } options { map_entry: true } } } message_type { name: "GetContainerRequest" field { name: "id" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "id" } } message_type { name: "GetContainerResponse" field { name: "container" number: 1 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".containerd.services.containers.v1.Container" options { 65001: 0 } json_name: "container" } } message_type { name: "ListContainersRequest" field { name: "filters" number: 1 label: LABEL_REPEATED type: TYPE_STRING json_name: "filters" } } message_type { name: "ListContainersResponse" field { name: "containers" number: 1 label: LABEL_REPEATED type: TYPE_MESSAGE type_name: ".containerd.services.containers.v1.Container" options { 65001: 0 } json_name: "containers" } } message_type { name: "CreateContainerRequest" field { name: "container" number: 1 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".containerd.services.containers.v1.Container" options { 65001: 0 } json_name: "container" } } message_type { name: "CreateContainerResponse" field { name: "container" number: 1 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".containerd.services.containers.v1.Container" options { 65001: 0 } json_name: "container" } } message_type { name: "UpdateContainerRequest" field { name: "container" number: 1 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".containerd.services.containers.v1.Container" options { 65001: 0 } json_name: "container" } field { name: "update_mask" number: 2 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".google.protobuf.FieldMask" json_name: "updateMask" } } message_type { name: "UpdateContainerResponse" field { name: "container" number: 1 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".containerd.services.containers.v1.Container" options { 65001: 0 } json_name: "container" } } message_type { name: "DeleteContainerRequest" field { name: "id" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "id" } } service { name: "Containers" method { name: "Get" input_type: ".containerd.services.containers.v1.GetContainerRequest" output_type: ".containerd.services.containers.v1.GetContainerResponse" } method { name: "List" input_type: ".containerd.services.containers.v1.ListContainersRequest" output_type: ".containerd.services.containers.v1.ListContainersResponse" } method { name: "Create" input_type: ".containerd.services.containers.v1.CreateContainerRequest" output_type: ".containerd.services.containers.v1.CreateContainerResponse" } method { name: "Update" input_type: ".containerd.services.containers.v1.UpdateContainerRequest" output_type: ".containerd.services.containers.v1.UpdateContainerResponse" } method { name: "Delete" input_type: ".containerd.services.containers.v1.DeleteContainerRequest" output_type: ".google.protobuf.Empty" } } options { go_package: "github.com/containerd/containerd/api/services/containers/v1;containers" } weak_dependency: 0 syntax: "proto3" } file { name: "github.com/containerd/containerd/api/services/content/v1/content.proto" package: "containerd.services.content.v1" dependency: "gogoproto/gogo.proto" dependency: "google/protobuf/field_mask.proto" dependency: "google/protobuf/timestamp.proto" dependency: "google/protobuf/empty.proto" message_type { name: "Info" field { name: "digest" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING options { 65003: "github.com/opencontainers/go-digest.Digest" 65001: 0 } json_name: "digest" } field { name: "size" number: 2 label: LABEL_OPTIONAL type: TYPE_INT64 json_name: "size" } field { name: "created_at" number: 3 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".google.protobuf.Timestamp" options { 65010: 1 65001: 0 } json_name: "createdAt" } field { name: "updated_at" number: 4 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".google.protobuf.Timestamp" options { 65010: 1 65001: 0 } json_name: "updatedAt" } field { name: "labels" number: 5 label: LABEL_REPEATED type: TYPE_MESSAGE type_name: ".containerd.services.content.v1.Info.LabelsEntry" json_name: "labels" } nested_type { name: "LabelsEntry" field { name: "key" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "key" } field { name: "value" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "value" } options { map_entry: true } } } message_type { name: "InfoRequest" field { name: "digest" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING options { 65003: "github.com/opencontainers/go-digest.Digest" 65001: 0 } json_name: "digest" } } message_type { name: "InfoResponse" field { name: "info" number: 1 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".containerd.services.content.v1.Info" options { 65001: 0 } json_name: "info" } } message_type { name: "UpdateRequest" field { name: "info" number: 1 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".containerd.services.content.v1.Info" options { 65001: 0 } json_name: "info" } field { name: "update_mask" number: 2 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".google.protobuf.FieldMask" json_name: "updateMask" } } message_type { name: "UpdateResponse" field { name: "info" number: 1 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".containerd.services.content.v1.Info" options { 65001: 0 } json_name: "info" } } message_type { name: "ListContentRequest" field { name: "filters" number: 1 label: LABEL_REPEATED type: TYPE_STRING json_name: "filters" } } message_type { name: "ListContentResponse" field { name: "info" number: 1 label: LABEL_REPEATED type: TYPE_MESSAGE type_name: ".containerd.services.content.v1.Info" options { 65001: 0 } json_name: "info" } } message_type { name: "DeleteContentRequest" field { name: "digest" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING options { 65003: "github.com/opencontainers/go-digest.Digest" 65001: 0 } json_name: "digest" } } message_type { name: "ReadContentRequest" field { name: "digest" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING options { 65003: "github.com/opencontainers/go-digest.Digest" 65001: 0 } json_name: "digest" } field { name: "offset" number: 2 label: LABEL_OPTIONAL type: TYPE_INT64 json_name: "offset" } field { name: "size" number: 3 label: LABEL_OPTIONAL type: TYPE_INT64 json_name: "size" } } message_type { name: "ReadContentResponse" field { name: "offset" number: 1 label: LABEL_OPTIONAL type: TYPE_INT64 json_name: "offset" } field { name: "data" number: 2 label: LABEL_OPTIONAL type: TYPE_BYTES json_name: "data" } } message_type { name: "Status" field { name: "started_at" number: 1 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".google.protobuf.Timestamp" options { 65010: 1 65001: 0 } json_name: "startedAt" } field { name: "updated_at" number: 2 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".google.protobuf.Timestamp" options { 65010: 1 65001: 0 } json_name: "updatedAt" } field { name: "ref" number: 3 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "ref" } field { name: "offset" number: 4 label: LABEL_OPTIONAL type: TYPE_INT64 json_name: "offset" } field { name: "total" number: 5 label: LABEL_OPTIONAL type: TYPE_INT64 json_name: "total" } field { name: "expected" number: 6 label: LABEL_OPTIONAL type: TYPE_STRING options { 65003: "github.com/opencontainers/go-digest.Digest" 65001: 0 } json_name: "expected" } } message_type { name: "StatusRequest" field { name: "ref" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "ref" } } message_type { name: "StatusResponse" field { name: "status" number: 1 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".containerd.services.content.v1.Status" json_name: "status" } } message_type { name: "ListStatusesRequest" field { name: "filters" number: 1 label: LABEL_REPEATED type: TYPE_STRING json_name: "filters" } } message_type { name: "ListStatusesResponse" field { name: "statuses" number: 1 label: LABEL_REPEATED type: TYPE_MESSAGE type_name: ".containerd.services.content.v1.Status" options { 65001: 0 } json_name: "statuses" } } message_type { name: "WriteContentRequest" field { name: "action" number: 1 label: LABEL_OPTIONAL type: TYPE_ENUM type_name: ".containerd.services.content.v1.WriteAction" json_name: "action" } field { name: "ref" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "ref" } field { name: "total" number: 3 label: LABEL_OPTIONAL type: TYPE_INT64 json_name: "total" } field { name: "expected" number: 4 label: LABEL_OPTIONAL type: TYPE_STRING options { 65003: "github.com/opencontainers/go-digest.Digest" 65001: 0 } json_name: "expected" } field { name: "offset" number: 5 label: LABEL_OPTIONAL type: TYPE_INT64 json_name: "offset" } field { name: "data" number: 6 label: LABEL_OPTIONAL type: TYPE_BYTES json_name: "data" } field { name: "labels" number: 7 label: LABEL_REPEATED type: TYPE_MESSAGE type_name: ".containerd.services.content.v1.WriteContentRequest.LabelsEntry" json_name: "labels" } nested_type { name: "LabelsEntry" field { name: "key" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "key" } field { name: "value" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "value" } options { map_entry: true } } } message_type { name: "WriteContentResponse" field { name: "action" number: 1 label: LABEL_OPTIONAL type: TYPE_ENUM type_name: ".containerd.services.content.v1.WriteAction" json_name: "action" } field { name: "started_at" number: 2 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".google.protobuf.Timestamp" options { 65010: 1 65001: 0 } json_name: "startedAt" } field { name: "updated_at" number: 3 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".google.protobuf.Timestamp" options { 65010: 1 65001: 0 } json_name: "updatedAt" } field { name: "offset" number: 4 label: LABEL_OPTIONAL type: TYPE_INT64 json_name: "offset" } field { name: "total" number: 5 label: LABEL_OPTIONAL type: TYPE_INT64 json_name: "total" } field { name: "digest" number: 6 label: LABEL_OPTIONAL type: TYPE_STRING options { 65003: "github.com/opencontainers/go-digest.Digest" 65001: 0 } json_name: "digest" } } message_type { name: "AbortRequest" field { name: "ref" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "ref" } } enum_type { name: "WriteAction" value { name: "STAT" number: 0 options { 66001: "WriteActionStat" } } value { name: "WRITE" number: 1 options { 66001: "WriteActionWrite" } } value { name: "COMMIT" number: 2 options { 66001: "WriteActionCommit" } } options { 62001: 0 62023: "WriteAction" } } service { name: "Content" method { name: "Info" input_type: ".containerd.services.content.v1.InfoRequest" output_type: ".containerd.services.content.v1.InfoResponse" } method { name: "Update" input_type: ".containerd.services.content.v1.UpdateRequest" output_type: ".containerd.services.content.v1.UpdateResponse" } method { name: "List" input_type: ".containerd.services.content.v1.ListContentRequest" output_type: ".containerd.services.content.v1.ListContentResponse" server_streaming: true } method { name: "Delete" input_type: ".containerd.services.content.v1.DeleteContentRequest" output_type: ".google.protobuf.Empty" } method { name: "Read" input_type: ".containerd.services.content.v1.ReadContentRequest" output_type: ".containerd.services.content.v1.ReadContentResponse" server_streaming: true } method { name: "Status" input_type: ".containerd.services.content.v1.StatusRequest" output_type: ".containerd.services.content.v1.StatusResponse" } method { name: "ListStatuses" input_type: ".containerd.services.content.v1.ListStatusesRequest" output_type: ".containerd.services.content.v1.ListStatusesResponse" } method { name: "Write" input_type: ".containerd.services.content.v1.WriteContentRequest" output_type: ".containerd.services.content.v1.WriteContentResponse" client_streaming: true server_streaming: true } method { name: "Abort" input_type: ".containerd.services.content.v1.AbortRequest" output_type: ".google.protobuf.Empty" } } options { go_package: "github.com/containerd/containerd/api/services/content/v1;content" } weak_dependency: 0 syntax: "proto3" } file { name: "github.com/containerd/containerd/api/types/descriptor.proto" package: "containerd.types" dependency: "gogoproto/gogo.proto" message_type { name: "Descriptor" field { name: "media_type" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "mediaType" } field { name: "digest" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING options { 65003: "github.com/opencontainers/go-digest.Digest" 65001: 0 } json_name: "digest" } field { name: "size" number: 3 label: LABEL_OPTIONAL type: TYPE_INT64 json_name: "size" } } options { go_package: "github.com/containerd/containerd/api/types;types" } weak_dependency: 0 syntax: "proto3" } file { name: "github.com/containerd/containerd/api/services/diff/v1/diff.proto" package: "containerd.services.diff.v1" dependency: "gogoproto/gogo.proto" dependency: "github.com/containerd/containerd/api/types/mount.proto" dependency: "github.com/containerd/containerd/api/types/descriptor.proto" message_type { name: "ApplyRequest" field { name: "diff" number: 1 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".containerd.types.Descriptor" json_name: "diff" } field { name: "mounts" number: 2 label: LABEL_REPEATED type: TYPE_MESSAGE type_name: ".containerd.types.Mount" json_name: "mounts" } } message_type { name: "ApplyResponse" field { name: "applied" number: 1 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".containerd.types.Descriptor" json_name: "applied" } } message_type { name: "DiffRequest" field { name: "left" number: 1 label: LABEL_REPEATED type: TYPE_MESSAGE type_name: ".containerd.types.Mount" json_name: "left" } field { name: "right" number: 2 label: LABEL_REPEATED type: TYPE_MESSAGE type_name: ".containerd.types.Mount" json_name: "right" } field { name: "media_type" number: 3 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "mediaType" } field { name: "ref" number: 4 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "ref" } field { name: "labels" number: 5 label: LABEL_REPEATED type: TYPE_MESSAGE type_name: ".containerd.services.diff.v1.DiffRequest.LabelsEntry" json_name: "labels" } nested_type { name: "LabelsEntry" field { name: "key" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "key" } field { name: "value" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "value" } options { map_entry: true } } } message_type { name: "DiffResponse" field { name: "diff" number: 3 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".containerd.types.Descriptor" json_name: "diff" } } service { name: "Diff" method { name: "Apply" input_type: ".containerd.services.diff.v1.ApplyRequest" output_type: ".containerd.services.diff.v1.ApplyResponse" } method { name: "Diff" input_type: ".containerd.services.diff.v1.DiffRequest" output_type: ".containerd.services.diff.v1.DiffResponse" } } options { go_package: "github.com/containerd/containerd/api/services/diff/v1;diff" } weak_dependency: 0 syntax: "proto3" } file { name: "github.com/containerd/containerd/api/services/events/v1/events.proto" package: "containerd.services.events.v1" dependency: "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto" dependency: "gogoproto/gogo.proto" dependency: "google/protobuf/any.proto" dependency: "google/protobuf/empty.proto" dependency: "google/protobuf/timestamp.proto" message_type { name: "PublishRequest" field { name: "topic" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "topic" } field { name: "event" number: 2 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".google.protobuf.Any" json_name: "event" } } message_type { name: "ForwardRequest" field { name: "envelope" number: 1 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".containerd.services.events.v1.Envelope" json_name: "envelope" } } message_type { name: "SubscribeRequest" field { name: "filters" number: 1 label: LABEL_REPEATED type: TYPE_STRING json_name: "filters" } } message_type { name: "Envelope" field { name: "timestamp" number: 1 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".google.protobuf.Timestamp" options { 65010: 1 65001: 0 } json_name: "timestamp" } field { name: "namespace" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "namespace" } field { name: "topic" number: 3 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "topic" } field { name: "event" number: 4 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".google.protobuf.Any" json_name: "event" } options { 64400: 1 } } service { name: "Events" method { name: "Publish" input_type: ".containerd.services.events.v1.PublishRequest" output_type: ".google.protobuf.Empty" } method { name: "Forward" input_type: ".containerd.services.events.v1.ForwardRequest" output_type: ".google.protobuf.Empty" } method { name: "Subscribe" input_type: ".containerd.services.events.v1.SubscribeRequest" output_type: ".containerd.services.events.v1.Envelope" server_streaming: true } } options { go_package: "github.com/containerd/containerd/api/services/events/v1;events" } weak_dependency: 0 weak_dependency: 1 syntax: "proto3" } file { name: "github.com/containerd/containerd/api/services/images/v1/images.proto" package: "containerd.services.images.v1" dependency: "gogoproto/gogo.proto" dependency: "google/protobuf/empty.proto" dependency: "google/protobuf/field_mask.proto" dependency: "google/protobuf/timestamp.proto" dependency: "github.com/containerd/containerd/api/types/descriptor.proto" message_type { name: "Image" field { name: "name" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "name" } field { name: "labels" number: 2 label: LABEL_REPEATED type: TYPE_MESSAGE type_name: ".containerd.services.images.v1.Image.LabelsEntry" json_name: "labels" } field { name: "target" number: 3 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".containerd.types.Descriptor" options { 65001: 0 } json_name: "target" } field { name: "created_at" number: 7 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".google.protobuf.Timestamp" options { 65010: 1 65001: 0 } json_name: "createdAt" } field { name: "updated_at" number: 8 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".google.protobuf.Timestamp" options { 65010: 1 65001: 0 } json_name: "updatedAt" } nested_type { name: "LabelsEntry" field { name: "key" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "key" } field { name: "value" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "value" } options { map_entry: true } } } message_type { name: "GetImageRequest" field { name: "name" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "name" } } message_type { name: "GetImageResponse" field { name: "image" number: 1 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".containerd.services.images.v1.Image" json_name: "image" } } message_type { name: "CreateImageRequest" field { name: "image" number: 1 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".containerd.services.images.v1.Image" options { 65001: 0 } json_name: "image" } } message_type { name: "CreateImageResponse" field { name: "image" number: 1 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".containerd.services.images.v1.Image" options { 65001: 0 } json_name: "image" } } message_type { name: "UpdateImageRequest" field { name: "image" number: 1 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".containerd.services.images.v1.Image" options { 65001: 0 } json_name: "image" } field { name: "update_mask" number: 2 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".google.protobuf.FieldMask" json_name: "updateMask" } } message_type { name: "UpdateImageResponse" field { name: "image" number: 1 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".containerd.services.images.v1.Image" options { 65001: 0 } json_name: "image" } } message_type { name: "ListImagesRequest" field { name: "filters" number: 1 label: LABEL_REPEATED type: TYPE_STRING json_name: "filters" } } message_type { name: "ListImagesResponse" field { name: "images" number: 1 label: LABEL_REPEATED type: TYPE_MESSAGE type_name: ".containerd.services.images.v1.Image" options { 65001: 0 } json_name: "images" } } message_type { name: "DeleteImageRequest" field { name: "name" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "name" } field { name: "sync" number: 2 label: LABEL_OPTIONAL type: TYPE_BOOL json_name: "sync" } } service { name: "Images" method { name: "Get" input_type: ".containerd.services.images.v1.GetImageRequest" output_type: ".containerd.services.images.v1.GetImageResponse" } method { name: "List" input_type: ".containerd.services.images.v1.ListImagesRequest" output_type: ".containerd.services.images.v1.ListImagesResponse" } method { name: "Create" input_type: ".containerd.services.images.v1.CreateImageRequest" output_type: ".containerd.services.images.v1.CreateImageResponse" } method { name: "Update" input_type: ".containerd.services.images.v1.UpdateImageRequest" output_type: ".containerd.services.images.v1.UpdateImageResponse" } method { name: "Delete" input_type: ".containerd.services.images.v1.DeleteImageRequest" output_type: ".google.protobuf.Empty" } } options { go_package: "github.com/containerd/containerd/api/services/images/v1;images" } weak_dependency: 0 syntax: "proto3" } file { name: "github.com/containerd/containerd/api/types/platform.proto" package: "containerd.types" dependency: "gogoproto/gogo.proto" message_type { name: "Platform" field { name: "os" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING options { 65004: "OS" } json_name: "os" } field { name: "architecture" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "architecture" } field { name: "variant" number: 3 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "variant" } } options { go_package: "github.com/containerd/containerd/api/types;types" } weak_dependency: 0 syntax: "proto3" } file { name: "google/rpc/status.proto" package: "google.rpc" dependency: "google/protobuf/any.proto" message_type { name: "Status" field { name: "code" number: 1 label: LABEL_OPTIONAL type: TYPE_INT32 json_name: "code" } field { name: "message" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "message" } field { name: "details" number: 3 label: LABEL_REPEATED type: TYPE_MESSAGE type_name: ".google.protobuf.Any" json_name: "details" } } options { java_package: "com.google.rpc" java_outer_classname: "StatusProto" java_multiple_files: true go_package: "github.com/containerd/containerd/protobuf/google/rpc;rpc" objc_class_prefix: "RPC" } syntax: "proto3" } file { name: "github.com/containerd/containerd/api/services/introspection/v1/introspection.proto" package: "containerd.services.introspection.v1" dependency: "github.com/containerd/containerd/api/types/platform.proto" dependency: "google/rpc/status.proto" dependency: "gogoproto/gogo.proto" message_type { name: "Plugin" field { name: "type" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "type" } field { name: "id" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "id" } field { name: "requires" number: 3 label: LABEL_REPEATED type: TYPE_STRING json_name: "requires" } field { name: "platforms" number: 4 label: LABEL_REPEATED type: TYPE_MESSAGE type_name: ".containerd.types.Platform" options { 65001: 0 } json_name: "platforms" } field { name: "exports" number: 5 label: LABEL_REPEATED type: TYPE_MESSAGE type_name: ".containerd.services.introspection.v1.Plugin.ExportsEntry" json_name: "exports" } field { name: "capabilities" number: 6 label: LABEL_REPEATED type: TYPE_STRING json_name: "capabilities" } field { name: "init_err" number: 7 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".google.rpc.Status" json_name: "initErr" } nested_type { name: "ExportsEntry" field { name: "key" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "key" } field { name: "value" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "value" } options { map_entry: true } } } message_type { name: "PluginsRequest" field { name: "filters" number: 1 label: LABEL_REPEATED type: TYPE_STRING json_name: "filters" } } message_type { name: "PluginsResponse" field { name: "plugins" number: 1 label: LABEL_REPEATED type: TYPE_MESSAGE type_name: ".containerd.services.introspection.v1.Plugin" options { 65001: 0 } json_name: "plugins" } } service { name: "Introspection" method { name: "Plugins" input_type: ".containerd.services.introspection.v1.PluginsRequest" output_type: ".containerd.services.introspection.v1.PluginsResponse" } } options { go_package: "github.com/containerd/containerd/api/services/introspection/v1;introspection" } weak_dependency: 2 syntax: "proto3" } file { name: "github.com/containerd/containerd/api/services/leases/v1/leases.proto" package: "containerd.services.leases.v1" dependency: "gogoproto/gogo.proto" dependency: "google/protobuf/empty.proto" dependency: "google/protobuf/timestamp.proto" message_type { name: "Lease" field { name: "id" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "id" } field { name: "created_at" number: 2 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".google.protobuf.Timestamp" options { 65010: 1 65001: 0 } json_name: "createdAt" } field { name: "labels" number: 3 label: LABEL_REPEATED type: TYPE_MESSAGE type_name: ".containerd.services.leases.v1.Lease.LabelsEntry" json_name: "labels" } nested_type { name: "LabelsEntry" field { name: "key" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "key" } field { name: "value" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "value" } options { map_entry: true } } } message_type { name: "CreateRequest" field { name: "id" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "id" } field { name: "labels" number: 3 label: LABEL_REPEATED type: TYPE_MESSAGE type_name: ".containerd.services.leases.v1.CreateRequest.LabelsEntry" json_name: "labels" } nested_type { name: "LabelsEntry" field { name: "key" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "key" } field { name: "value" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "value" } options { map_entry: true } } } message_type { name: "CreateResponse" field { name: "lease" number: 1 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".containerd.services.leases.v1.Lease" json_name: "lease" } } message_type { name: "DeleteRequest" field { name: "id" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "id" } } message_type { name: "ListRequest" field { name: "filters" number: 1 label: LABEL_REPEATED type: TYPE_STRING json_name: "filters" } } message_type { name: "ListResponse" field { name: "leases" number: 1 label: LABEL_REPEATED type: TYPE_MESSAGE type_name: ".containerd.services.leases.v1.Lease" json_name: "leases" } } service { name: "Leases" method { name: "Create" input_type: ".containerd.services.leases.v1.CreateRequest" output_type: ".containerd.services.leases.v1.CreateResponse" } method { name: "Delete" input_type: ".containerd.services.leases.v1.DeleteRequest" output_type: ".google.protobuf.Empty" } method { name: "List" input_type: ".containerd.services.leases.v1.ListRequest" output_type: ".containerd.services.leases.v1.ListResponse" } } options { go_package: "github.com/containerd/containerd/api/services/leases/v1;leases" } weak_dependency: 0 syntax: "proto3" } file { name: "github.com/containerd/containerd/api/services/namespaces/v1/namespace.proto" package: "containerd.services.namespaces.v1" dependency: "gogoproto/gogo.proto" dependency: "google/protobuf/empty.proto" dependency: "google/protobuf/field_mask.proto" message_type { name: "Namespace" field { name: "name" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "name" } field { name: "labels" number: 2 label: LABEL_REPEATED type: TYPE_MESSAGE type_name: ".containerd.services.namespaces.v1.Namespace.LabelsEntry" json_name: "labels" } nested_type { name: "LabelsEntry" field { name: "key" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "key" } field { name: "value" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "value" } options { map_entry: true } } } message_type { name: "GetNamespaceRequest" field { name: "name" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "name" } } message_type { name: "GetNamespaceResponse" field { name: "namespace" number: 1 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".containerd.services.namespaces.v1.Namespace" options { 65001: 0 } json_name: "namespace" } } message_type { name: "ListNamespacesRequest" field { name: "filter" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "filter" } } message_type { name: "ListNamespacesResponse" field { name: "namespaces" number: 1 label: LABEL_REPEATED type: TYPE_MESSAGE type_name: ".containerd.services.namespaces.v1.Namespace" options { 65001: 0 } json_name: "namespaces" } } message_type { name: "CreateNamespaceRequest" field { name: "namespace" number: 1 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".containerd.services.namespaces.v1.Namespace" options { 65001: 0 } json_name: "namespace" } } message_type { name: "CreateNamespaceResponse" field { name: "namespace" number: 1 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".containerd.services.namespaces.v1.Namespace" options { 65001: 0 } json_name: "namespace" } } message_type { name: "UpdateNamespaceRequest" field { name: "namespace" number: 1 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".containerd.services.namespaces.v1.Namespace" options { 65001: 0 } json_name: "namespace" } field { name: "update_mask" number: 2 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".google.protobuf.FieldMask" json_name: "updateMask" } } message_type { name: "UpdateNamespaceResponse" field { name: "namespace" number: 1 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".containerd.services.namespaces.v1.Namespace" options { 65001: 0 } json_name: "namespace" } } message_type { name: "DeleteNamespaceRequest" field { name: "name" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "name" } } service { name: "Namespaces" method { name: "Get" input_type: ".containerd.services.namespaces.v1.GetNamespaceRequest" output_type: ".containerd.services.namespaces.v1.GetNamespaceResponse" } method { name: "List" input_type: ".containerd.services.namespaces.v1.ListNamespacesRequest" output_type: ".containerd.services.namespaces.v1.ListNamespacesResponse" } method { name: "Create" input_type: ".containerd.services.namespaces.v1.CreateNamespaceRequest" output_type: ".containerd.services.namespaces.v1.CreateNamespaceResponse" } method { name: "Update" input_type: ".containerd.services.namespaces.v1.UpdateNamespaceRequest" output_type: ".containerd.services.namespaces.v1.UpdateNamespaceResponse" } method { name: "Delete" input_type: ".containerd.services.namespaces.v1.DeleteNamespaceRequest" output_type: ".google.protobuf.Empty" } } options { go_package: "github.com/containerd/containerd/api/services/namespaces/v1;namespaces" } weak_dependency: 0 syntax: "proto3" } file { name: "github.com/containerd/containerd/api/services/snapshots/v1/snapshots.proto" package: "containerd.services.snapshots.v1" dependency: "gogoproto/gogo.proto" dependency: "google/protobuf/empty.proto" dependency: "google/protobuf/field_mask.proto" dependency: "google/protobuf/timestamp.proto" dependency: "github.com/containerd/containerd/api/types/mount.proto" message_type { name: "PrepareSnapshotRequest" field { name: "snapshotter" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "snapshotter" } field { name: "key" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "key" } field { name: "parent" number: 3 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "parent" } field { name: "labels" number: 4 label: LABEL_REPEATED type: TYPE_MESSAGE type_name: ".containerd.services.snapshots.v1.PrepareSnapshotRequest.LabelsEntry" json_name: "labels" } nested_type { name: "LabelsEntry" field { name: "key" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "key" } field { name: "value" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "value" } options { map_entry: true } } } message_type { name: "PrepareSnapshotResponse" field { name: "mounts" number: 1 label: LABEL_REPEATED type: TYPE_MESSAGE type_name: ".containerd.types.Mount" json_name: "mounts" } } message_type { name: "ViewSnapshotRequest" field { name: "snapshotter" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "snapshotter" } field { name: "key" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "key" } field { name: "parent" number: 3 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "parent" } field { name: "labels" number: 4 label: LABEL_REPEATED type: TYPE_MESSAGE type_name: ".containerd.services.snapshots.v1.ViewSnapshotRequest.LabelsEntry" json_name: "labels" } nested_type { name: "LabelsEntry" field { name: "key" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "key" } field { name: "value" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "value" } options { map_entry: true } } } message_type { name: "ViewSnapshotResponse" field { name: "mounts" number: 1 label: LABEL_REPEATED type: TYPE_MESSAGE type_name: ".containerd.types.Mount" json_name: "mounts" } } message_type { name: "MountsRequest" field { name: "snapshotter" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "snapshotter" } field { name: "key" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "key" } } message_type { name: "MountsResponse" field { name: "mounts" number: 1 label: LABEL_REPEATED type: TYPE_MESSAGE type_name: ".containerd.types.Mount" json_name: "mounts" } } message_type { name: "RemoveSnapshotRequest" field { name: "snapshotter" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "snapshotter" } field { name: "key" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "key" } } message_type { name: "CommitSnapshotRequest" field { name: "snapshotter" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "snapshotter" } field { name: "name" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "name" } field { name: "key" number: 3 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "key" } field { name: "labels" number: 4 label: LABEL_REPEATED type: TYPE_MESSAGE type_name: ".containerd.services.snapshots.v1.CommitSnapshotRequest.LabelsEntry" json_name: "labels" } nested_type { name: "LabelsEntry" field { name: "key" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "key" } field { name: "value" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "value" } options { map_entry: true } } } message_type { name: "StatSnapshotRequest" field { name: "snapshotter" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "snapshotter" } field { name: "key" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "key" } } message_type { name: "Info" field { name: "name" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "name" } field { name: "parent" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "parent" } field { name: "kind" number: 3 label: LABEL_OPTIONAL type: TYPE_ENUM type_name: ".containerd.services.snapshots.v1.Kind" json_name: "kind" } field { name: "created_at" number: 4 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".google.protobuf.Timestamp" options { 65010: 1 65001: 0 } json_name: "createdAt" } field { name: "updated_at" number: 5 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".google.protobuf.Timestamp" options { 65010: 1 65001: 0 } json_name: "updatedAt" } field { name: "labels" number: 6 label: LABEL_REPEATED type: TYPE_MESSAGE type_name: ".containerd.services.snapshots.v1.Info.LabelsEntry" json_name: "labels" } nested_type { name: "LabelsEntry" field { name: "key" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "key" } field { name: "value" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "value" } options { map_entry: true } } } message_type { name: "StatSnapshotResponse" field { name: "info" number: 1 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".containerd.services.snapshots.v1.Info" options { 65001: 0 } json_name: "info" } } message_type { name: "UpdateSnapshotRequest" field { name: "snapshotter" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "snapshotter" } field { name: "info" number: 2 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".containerd.services.snapshots.v1.Info" options { 65001: 0 } json_name: "info" } field { name: "update_mask" number: 3 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".google.protobuf.FieldMask" json_name: "updateMask" } } message_type { name: "UpdateSnapshotResponse" field { name: "info" number: 1 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".containerd.services.snapshots.v1.Info" options { 65001: 0 } json_name: "info" } } message_type { name: "ListSnapshotsRequest" field { name: "snapshotter" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "snapshotter" } } message_type { name: "ListSnapshotsResponse" field { name: "info" number: 1 label: LABEL_REPEATED type: TYPE_MESSAGE type_name: ".containerd.services.snapshots.v1.Info" options { 65001: 0 } json_name: "info" } } message_type { name: "UsageRequest" field { name: "snapshotter" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "snapshotter" } field { name: "key" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "key" } } message_type { name: "UsageResponse" field { name: "size" number: 1 label: LABEL_OPTIONAL type: TYPE_INT64 json_name: "size" } field { name: "inodes" number: 2 label: LABEL_OPTIONAL type: TYPE_INT64 json_name: "inodes" } } enum_type { name: "Kind" value { name: "UNKNOWN" number: 0 options { 66001: "KindUnknown" } } value { name: "VIEW" number: 1 options { 66001: "KindView" } } value { name: "ACTIVE" number: 2 options { 66001: "KindActive" } } value { name: "COMMITTED" number: 3 options { 66001: "KindCommitted" } } options { 62001: 0 62023: "Kind" } } service { name: "Snapshots" method { name: "Prepare" input_type: ".containerd.services.snapshots.v1.PrepareSnapshotRequest" output_type: ".containerd.services.snapshots.v1.PrepareSnapshotResponse" } method { name: "View" input_type: ".containerd.services.snapshots.v1.ViewSnapshotRequest" output_type: ".containerd.services.snapshots.v1.ViewSnapshotResponse" } method { name: "Mounts" input_type: ".containerd.services.snapshots.v1.MountsRequest" output_type: ".containerd.services.snapshots.v1.MountsResponse" } method { name: "Commit" input_type: ".containerd.services.snapshots.v1.CommitSnapshotRequest" output_type: ".google.protobuf.Empty" } method { name: "Remove" input_type: ".containerd.services.snapshots.v1.RemoveSnapshotRequest" output_type: ".google.protobuf.Empty" } method { name: "Stat" input_type: ".containerd.services.snapshots.v1.StatSnapshotRequest" output_type: ".containerd.services.snapshots.v1.StatSnapshotResponse" } method { name: "Update" input_type: ".containerd.services.snapshots.v1.UpdateSnapshotRequest" output_type: ".containerd.services.snapshots.v1.UpdateSnapshotResponse" } method { name: "List" input_type: ".containerd.services.snapshots.v1.ListSnapshotsRequest" output_type: ".containerd.services.snapshots.v1.ListSnapshotsResponse" server_streaming: true } method { name: "Usage" input_type: ".containerd.services.snapshots.v1.UsageRequest" output_type: ".containerd.services.snapshots.v1.UsageResponse" } } options { go_package: "github.com/containerd/containerd/api/services/snapshots/v1;snapshots" } weak_dependency: 0 syntax: "proto3" } file { name: "github.com/containerd/containerd/api/types/metrics.proto" package: "containerd.types" dependency: "gogoproto/gogo.proto" dependency: "google/protobuf/any.proto" dependency: "google/protobuf/timestamp.proto" message_type { name: "Metric" field { name: "timestamp" number: 1 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".google.protobuf.Timestamp" options { 65010: 1 65001: 0 } json_name: "timestamp" } field { name: "id" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "id" } field { name: "data" number: 3 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".google.protobuf.Any" json_name: "data" } } options { go_package: "github.com/containerd/containerd/api/types;types" } weak_dependency: 0 syntax: "proto3" } file { name: "github.com/containerd/containerd/api/types/task/task.proto" package: "containerd.v1.types" dependency: "gogoproto/gogo.proto" dependency: "google/protobuf/timestamp.proto" dependency: "google/protobuf/any.proto" message_type { name: "Process" field { name: "container_id" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "containerId" } field { name: "id" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "id" } field { name: "pid" number: 3 label: LABEL_OPTIONAL type: TYPE_UINT32 json_name: "pid" } field { name: "status" number: 4 label: LABEL_OPTIONAL type: TYPE_ENUM type_name: ".containerd.v1.types.Status" json_name: "status" } field { name: "stdin" number: 5 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "stdin" } field { name: "stdout" number: 6 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "stdout" } field { name: "stderr" number: 7 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "stderr" } field { name: "terminal" number: 8 label: LABEL_OPTIONAL type: TYPE_BOOL json_name: "terminal" } field { name: "exit_status" number: 9 label: LABEL_OPTIONAL type: TYPE_UINT32 json_name: "exitStatus" } field { name: "exited_at" number: 10 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".google.protobuf.Timestamp" options { 65010: 1 65001: 0 } json_name: "exitedAt" } } message_type { name: "ProcessInfo" field { name: "pid" number: 1 label: LABEL_OPTIONAL type: TYPE_UINT32 json_name: "pid" } field { name: "info" number: 2 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".google.protobuf.Any" json_name: "info" } } enum_type { name: "Status" value { name: "UNKNOWN" number: 0 options { 66001: "StatusUnknown" } } value { name: "CREATED" number: 1 options { 66001: "StatusCreated" } } value { name: "RUNNING" number: 2 options { 66001: "StatusRunning" } } value { name: "STOPPED" number: 3 options { 66001: "StatusStopped" } } value { name: "PAUSED" number: 4 options { 66001: "StatusPaused" } } value { name: "PAUSING" number: 5 options { 66001: "StatusPausing" } } options { 62001: 0 62023: "Status" } } weak_dependency: 0 syntax: "proto3" } file { name: "github.com/containerd/containerd/api/services/tasks/v1/tasks.proto" package: "containerd.services.tasks.v1" dependency: "google/protobuf/empty.proto" dependency: "google/protobuf/any.proto" dependency: "gogoproto/gogo.proto" dependency: "github.com/containerd/containerd/api/types/mount.proto" dependency: "github.com/containerd/containerd/api/types/metrics.proto" dependency: "github.com/containerd/containerd/api/types/descriptor.proto" dependency: "github.com/containerd/containerd/api/types/task/task.proto" dependency: "google/protobuf/timestamp.proto" message_type { name: "CreateTaskRequest" field { name: "container_id" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "containerId" } field { name: "rootfs" number: 3 label: LABEL_REPEATED type: TYPE_MESSAGE type_name: ".containerd.types.Mount" json_name: "rootfs" } field { name: "stdin" number: 4 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "stdin" } field { name: "stdout" number: 5 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "stdout" } field { name: "stderr" number: 6 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "stderr" } field { name: "terminal" number: 7 label: LABEL_OPTIONAL type: TYPE_BOOL json_name: "terminal" } field { name: "checkpoint" number: 8 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".containerd.types.Descriptor" json_name: "checkpoint" } field { name: "options" number: 9 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".google.protobuf.Any" json_name: "options" } } message_type { name: "CreateTaskResponse" field { name: "container_id" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "containerId" } field { name: "pid" number: 2 label: LABEL_OPTIONAL type: TYPE_UINT32 json_name: "pid" } } message_type { name: "StartRequest" field { name: "container_id" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "containerId" } field { name: "exec_id" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "execId" } } message_type { name: "StartResponse" field { name: "pid" number: 1 label: LABEL_OPTIONAL type: TYPE_UINT32 json_name: "pid" } } message_type { name: "DeleteTaskRequest" field { name: "container_id" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "containerId" } } message_type { name: "DeleteResponse" field { name: "id" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "id" } field { name: "pid" number: 2 label: LABEL_OPTIONAL type: TYPE_UINT32 json_name: "pid" } field { name: "exit_status" number: 3 label: LABEL_OPTIONAL type: TYPE_UINT32 json_name: "exitStatus" } field { name: "exited_at" number: 4 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".google.protobuf.Timestamp" options { 65010: 1 65001: 0 } json_name: "exitedAt" } } message_type { name: "DeleteProcessRequest" field { name: "container_id" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "containerId" } field { name: "exec_id" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "execId" } } message_type { name: "GetRequest" field { name: "container_id" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "containerId" } field { name: "exec_id" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "execId" } } message_type { name: "GetResponse" field { name: "process" number: 1 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".containerd.v1.types.Process" json_name: "process" } } message_type { name: "ListTasksRequest" field { name: "filter" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "filter" } } message_type { name: "ListTasksResponse" field { name: "tasks" number: 1 label: LABEL_REPEATED type: TYPE_MESSAGE type_name: ".containerd.v1.types.Process" json_name: "tasks" } } message_type { name: "KillRequest" field { name: "container_id" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "containerId" } field { name: "exec_id" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "execId" } field { name: "signal" number: 3 label: LABEL_OPTIONAL type: TYPE_UINT32 json_name: "signal" } field { name: "all" number: 4 label: LABEL_OPTIONAL type: TYPE_BOOL json_name: "all" } } message_type { name: "ExecProcessRequest" field { name: "container_id" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "containerId" } field { name: "stdin" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "stdin" } field { name: "stdout" number: 3 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "stdout" } field { name: "stderr" number: 4 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "stderr" } field { name: "terminal" number: 5 label: LABEL_OPTIONAL type: TYPE_BOOL json_name: "terminal" } field { name: "spec" number: 6 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".google.protobuf.Any" json_name: "spec" } field { name: "exec_id" number: 7 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "execId" } } message_type { name: "ExecProcessResponse" } message_type { name: "ResizePtyRequest" field { name: "container_id" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "containerId" } field { name: "exec_id" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "execId" } field { name: "width" number: 3 label: LABEL_OPTIONAL type: TYPE_UINT32 json_name: "width" } field { name: "height" number: 4 label: LABEL_OPTIONAL type: TYPE_UINT32 json_name: "height" } } message_type { name: "CloseIORequest" field { name: "container_id" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "containerId" } field { name: "exec_id" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "execId" } field { name: "stdin" number: 3 label: LABEL_OPTIONAL type: TYPE_BOOL json_name: "stdin" } } message_type { name: "PauseTaskRequest" field { name: "container_id" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "containerId" } } message_type { name: "ResumeTaskRequest" field { name: "container_id" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "containerId" } } message_type { name: "ListPidsRequest" field { name: "container_id" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "containerId" } } message_type { name: "ListPidsResponse" field { name: "processes" number: 1 label: LABEL_REPEATED type: TYPE_MESSAGE type_name: ".containerd.v1.types.ProcessInfo" json_name: "processes" } } message_type { name: "CheckpointTaskRequest" field { name: "container_id" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "containerId" } field { name: "parent_checkpoint" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING options { 65003: "github.com/opencontainers/go-digest.Digest" 65001: 0 } json_name: "parentCheckpoint" } field { name: "options" number: 3 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".google.protobuf.Any" json_name: "options" } } message_type { name: "CheckpointTaskResponse" field { name: "descriptors" number: 1 label: LABEL_REPEATED type: TYPE_MESSAGE type_name: ".containerd.types.Descriptor" json_name: "descriptors" } } message_type { name: "UpdateTaskRequest" field { name: "container_id" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "containerId" } field { name: "resources" number: 2 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".google.protobuf.Any" json_name: "resources" } } message_type { name: "MetricsRequest" field { name: "filters" number: 1 label: LABEL_REPEATED type: TYPE_STRING json_name: "filters" } } message_type { name: "MetricsResponse" field { name: "metrics" number: 1 label: LABEL_REPEATED type: TYPE_MESSAGE type_name: ".containerd.types.Metric" json_name: "metrics" } } message_type { name: "WaitRequest" field { name: "container_id" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "containerId" } field { name: "exec_id" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "execId" } } message_type { name: "WaitResponse" field { name: "exit_status" number: 1 label: LABEL_OPTIONAL type: TYPE_UINT32 json_name: "exitStatus" } field { name: "exited_at" number: 2 label: LABEL_OPTIONAL type: TYPE_MESSAGE type_name: ".google.protobuf.Timestamp" options { 65010: 1 65001: 0 } json_name: "exitedAt" } } service { name: "Tasks" method { name: "Create" input_type: ".containerd.services.tasks.v1.CreateTaskRequest" output_type: ".containerd.services.tasks.v1.CreateTaskResponse" } method { name: "Start" input_type: ".containerd.services.tasks.v1.StartRequest" output_type: ".containerd.services.tasks.v1.StartResponse" } method { name: "Delete" input_type: ".containerd.services.tasks.v1.DeleteTaskRequest" output_type: ".containerd.services.tasks.v1.DeleteResponse" } method { name: "DeleteProcess" input_type: ".containerd.services.tasks.v1.DeleteProcessRequest" output_type: ".containerd.services.tasks.v1.DeleteResponse" } method { name: "Get" input_type: ".containerd.services.tasks.v1.GetRequest" output_type: ".containerd.services.tasks.v1.GetResponse" } method { name: "List" input_type: ".containerd.services.tasks.v1.ListTasksRequest" output_type: ".containerd.services.tasks.v1.ListTasksResponse" } method { name: "Kill" input_type: ".containerd.services.tasks.v1.KillRequest" output_type: ".google.protobuf.Empty" } method { name: "Exec" input_type: ".containerd.services.tasks.v1.ExecProcessRequest" output_type: ".google.protobuf.Empty" } method { name: "ResizePty" input_type: ".containerd.services.tasks.v1.ResizePtyRequest" output_type: ".google.protobuf.Empty" } method { name: "CloseIO" input_type: ".containerd.services.tasks.v1.CloseIORequest" output_type: ".google.protobuf.Empty" } method { name: "Pause" input_type: ".containerd.services.tasks.v1.PauseTaskRequest" output_type: ".google.protobuf.Empty" } method { name: "Resume" input_type: ".containerd.services.tasks.v1.ResumeTaskRequest" output_type: ".google.protobuf.Empty" } method { name: "ListPids" input_type: ".containerd.services.tasks.v1.ListPidsRequest" output_type: ".containerd.services.tasks.v1.ListPidsResponse" } method { name: "Checkpoint" input_type: ".containerd.services.tasks.v1.CheckpointTaskRequest" output_type: ".containerd.services.tasks.v1.CheckpointTaskResponse" } method { name: "Update" input_type: ".containerd.services.tasks.v1.UpdateTaskRequest" output_type: ".google.protobuf.Empty" } method { name: "Metrics" input_type: ".containerd.services.tasks.v1.MetricsRequest" output_type: ".containerd.services.tasks.v1.MetricsResponse" } method { name: "Wait" input_type: ".containerd.services.tasks.v1.WaitRequest" output_type: ".containerd.services.tasks.v1.WaitResponse" } } options { go_package: "github.com/containerd/containerd/api/services/tasks/v1;tasks" } weak_dependency: 2 syntax: "proto3" } file { name: "github.com/containerd/containerd/api/services/version/v1/version.proto" package: "containerd.services.version.v1" dependency: "google/protobuf/empty.proto" dependency: "gogoproto/gogo.proto" message_type { name: "VersionResponse" field { name: "version" number: 1 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "version" } field { name: "revision" number: 2 label: LABEL_OPTIONAL type: TYPE_STRING json_name: "revision" } } service { name: "Version" method { name: "Version" input_type: ".google.protobuf.Empty" output_type: ".containerd.services.version.v1.VersionResponse" } } options { go_package: "github.com/containerd/containerd/api/services/version/v1;version" } weak_dependency: 1 syntax: "proto3" } docker-containerd-tags-docker-17.12.1/api/services/000077500000000000000000000000001322771672400220665ustar00rootroot00000000000000docker-containerd-tags-docker-17.12.1/api/services/containers/000077500000000000000000000000001322771672400242335ustar00rootroot00000000000000docker-containerd-tags-docker-17.12.1/api/services/containers/v1/000077500000000000000000000000001322771672400245615ustar00rootroot00000000000000docker-containerd-tags-docker-17.12.1/api/services/containers/v1/containers.pb.go000066400000000000000000002175711322771672400276720ustar00rootroot00000000000000// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/containerd/containerd/api/services/containers/v1/containers.proto /* Package containers is a generated protocol buffer package. It is generated from these files: github.com/containerd/containerd/api/services/containers/v1/containers.proto It has these top-level messages: Container GetContainerRequest GetContainerResponse ListContainersRequest ListContainersResponse CreateContainerRequest CreateContainerResponse UpdateContainerRequest UpdateContainerResponse DeleteContainerRequest */ package containers import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" // skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto" import google_protobuf1 "github.com/gogo/protobuf/types" import google_protobuf2 "github.com/gogo/protobuf/types" import google_protobuf3 "github.com/gogo/protobuf/types" import _ "github.com/gogo/protobuf/types" import time "time" import ( context "golang.org/x/net/context" grpc "google.golang.org/grpc" ) import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" import strings "strings" import reflect "reflect" import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" import io "io" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf var _ = time.Kitchen // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package type Container struct { // ID is the user-specified identifier. // // This field may not be updated. ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Labels provides an area to include arbitrary data on containers. // // The combined size of a key/value pair cannot exceed 4096 bytes. // // Note that to add a new value to this field, read the existing set and // include the entire result in the update call. Labels map[string]string `protobuf:"bytes,2,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Image contains the reference of the image used to build the // specification and snapshots for running this container. // // If this field is updated, the spec and rootfs needed to updated, as well. Image string `protobuf:"bytes,3,opt,name=image,proto3" json:"image,omitempty"` // Runtime specifies which runtime to use for executing this container. Runtime *Container_Runtime `protobuf:"bytes,4,opt,name=runtime" json:"runtime,omitempty"` // Spec to be used when creating the container. This is runtime specific. Spec *google_protobuf1.Any `protobuf:"bytes,5,opt,name=spec" json:"spec,omitempty"` // Snapshotter specifies the snapshotter name used for rootfs Snapshotter string `protobuf:"bytes,6,opt,name=snapshotter,proto3" json:"snapshotter,omitempty"` // SnapshotKey specifies the snapshot key to use for the container's root // filesystem. When starting a task from this container, a caller should // look up the mounts from the snapshot service and include those on the // task create request. // // Snapshots referenced in this field will not be garbage collected. // // This field is set to empty when the rootfs is not a snapshot. // // This field may be updated. SnapshotKey string `protobuf:"bytes,7,opt,name=snapshot_key,json=snapshotKey,proto3" json:"snapshot_key,omitempty"` // CreatedAt is the time the container was first created. CreatedAt time.Time `protobuf:"bytes,8,opt,name=created_at,json=createdAt,stdtime" json:"created_at"` // UpdatedAt is the last time the container was mutated. UpdatedAt time.Time `protobuf:"bytes,9,opt,name=updated_at,json=updatedAt,stdtime" json:"updated_at"` // Extensions allow clients to provide zero or more blobs that are directly // associated with the container. One may provide protobuf, json, or other // encoding formats. The primary use of this is to further decorate the // container object with fields that may be specific to a client integration. // // The key portion of this map should identify a "name" for the extension // that should be unique against other extensions. When updating extension // data, one should only update the specified extension using field paths // to select a specific map key. Extensions map[string]google_protobuf1.Any `protobuf:"bytes,10,rep,name=extensions" json:"extensions" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` } func (m *Container) Reset() { *m = Container{} } func (*Container) ProtoMessage() {} func (*Container) Descriptor() ([]byte, []int) { return fileDescriptorContainers, []int{0} } type Container_Runtime struct { // Name is the name of the runtime. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Options specify additional runtime initialization options. Options *google_protobuf1.Any `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"` } func (m *Container_Runtime) Reset() { *m = Container_Runtime{} } func (*Container_Runtime) ProtoMessage() {} func (*Container_Runtime) Descriptor() ([]byte, []int) { return fileDescriptorContainers, []int{0, 1} } type GetContainerRequest struct { ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } func (m *GetContainerRequest) Reset() { *m = GetContainerRequest{} } func (*GetContainerRequest) ProtoMessage() {} func (*GetContainerRequest) Descriptor() ([]byte, []int) { return fileDescriptorContainers, []int{1} } type GetContainerResponse struct { Container Container `protobuf:"bytes,1,opt,name=container" json:"container"` } func (m *GetContainerResponse) Reset() { *m = GetContainerResponse{} } func (*GetContainerResponse) ProtoMessage() {} func (*GetContainerResponse) Descriptor() ([]byte, []int) { return fileDescriptorContainers, []int{2} } type ListContainersRequest struct { // Filters contains one or more filters using the syntax defined in the // containerd filter package. // // The returned result will be those that match any of the provided // filters. Expanded, containers that match the following will be // returned: // // filters[0] or filters[1] or ... or filters[n-1] or filters[n] // // If filters is zero-length or nil, all items will be returned. Filters []string `protobuf:"bytes,1,rep,name=filters" json:"filters,omitempty"` } func (m *ListContainersRequest) Reset() { *m = ListContainersRequest{} } func (*ListContainersRequest) ProtoMessage() {} func (*ListContainersRequest) Descriptor() ([]byte, []int) { return fileDescriptorContainers, []int{3} } type ListContainersResponse struct { Containers []Container `protobuf:"bytes,1,rep,name=containers" json:"containers"` } func (m *ListContainersResponse) Reset() { *m = ListContainersResponse{} } func (*ListContainersResponse) ProtoMessage() {} func (*ListContainersResponse) Descriptor() ([]byte, []int) { return fileDescriptorContainers, []int{4} } type CreateContainerRequest struct { Container Container `protobuf:"bytes,1,opt,name=container" json:"container"` } func (m *CreateContainerRequest) Reset() { *m = CreateContainerRequest{} } func (*CreateContainerRequest) ProtoMessage() {} func (*CreateContainerRequest) Descriptor() ([]byte, []int) { return fileDescriptorContainers, []int{5} } type CreateContainerResponse struct { Container Container `protobuf:"bytes,1,opt,name=container" json:"container"` } func (m *CreateContainerResponse) Reset() { *m = CreateContainerResponse{} } func (*CreateContainerResponse) ProtoMessage() {} func (*CreateContainerResponse) Descriptor() ([]byte, []int) { return fileDescriptorContainers, []int{6} } // UpdateContainerRequest updates the metadata on one or more container. // // The operation should follow semantics described in // https://developers.google.com/protocol-buffers/docs/reference/csharp/class/google/protobuf/well-known-types/field-mask, // unless otherwise qualified. type UpdateContainerRequest struct { // Container provides the target values, as declared by the mask, for the update. // // The ID field must be set. Container Container `protobuf:"bytes,1,opt,name=container" json:"container"` // UpdateMask specifies which fields to perform the update on. If empty, // the operation applies to all fields. UpdateMask *google_protobuf3.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask" json:"update_mask,omitempty"` } func (m *UpdateContainerRequest) Reset() { *m = UpdateContainerRequest{} } func (*UpdateContainerRequest) ProtoMessage() {} func (*UpdateContainerRequest) Descriptor() ([]byte, []int) { return fileDescriptorContainers, []int{7} } type UpdateContainerResponse struct { Container Container `protobuf:"bytes,1,opt,name=container" json:"container"` } func (m *UpdateContainerResponse) Reset() { *m = UpdateContainerResponse{} } func (*UpdateContainerResponse) ProtoMessage() {} func (*UpdateContainerResponse) Descriptor() ([]byte, []int) { return fileDescriptorContainers, []int{8} } type DeleteContainerRequest struct { ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } func (m *DeleteContainerRequest) Reset() { *m = DeleteContainerRequest{} } func (*DeleteContainerRequest) ProtoMessage() {} func (*DeleteContainerRequest) Descriptor() ([]byte, []int) { return fileDescriptorContainers, []int{9} } func init() { proto.RegisterType((*Container)(nil), "containerd.services.containers.v1.Container") proto.RegisterType((*Container_Runtime)(nil), "containerd.services.containers.v1.Container.Runtime") proto.RegisterType((*GetContainerRequest)(nil), "containerd.services.containers.v1.GetContainerRequest") proto.RegisterType((*GetContainerResponse)(nil), "containerd.services.containers.v1.GetContainerResponse") proto.RegisterType((*ListContainersRequest)(nil), "containerd.services.containers.v1.ListContainersRequest") proto.RegisterType((*ListContainersResponse)(nil), "containerd.services.containers.v1.ListContainersResponse") proto.RegisterType((*CreateContainerRequest)(nil), "containerd.services.containers.v1.CreateContainerRequest") proto.RegisterType((*CreateContainerResponse)(nil), "containerd.services.containers.v1.CreateContainerResponse") proto.RegisterType((*UpdateContainerRequest)(nil), "containerd.services.containers.v1.UpdateContainerRequest") proto.RegisterType((*UpdateContainerResponse)(nil), "containerd.services.containers.v1.UpdateContainerResponse") proto.RegisterType((*DeleteContainerRequest)(nil), "containerd.services.containers.v1.DeleteContainerRequest") } // Reference imports to suppress errors if they are not otherwise used. var _ context.Context var _ grpc.ClientConn // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 // Client API for Containers service type ContainersClient interface { Get(ctx context.Context, in *GetContainerRequest, opts ...grpc.CallOption) (*GetContainerResponse, error) List(ctx context.Context, in *ListContainersRequest, opts ...grpc.CallOption) (*ListContainersResponse, error) Create(ctx context.Context, in *CreateContainerRequest, opts ...grpc.CallOption) (*CreateContainerResponse, error) Update(ctx context.Context, in *UpdateContainerRequest, opts ...grpc.CallOption) (*UpdateContainerResponse, error) Delete(ctx context.Context, in *DeleteContainerRequest, opts ...grpc.CallOption) (*google_protobuf2.Empty, error) } type containersClient struct { cc *grpc.ClientConn } func NewContainersClient(cc *grpc.ClientConn) ContainersClient { return &containersClient{cc} } func (c *containersClient) Get(ctx context.Context, in *GetContainerRequest, opts ...grpc.CallOption) (*GetContainerResponse, error) { out := new(GetContainerResponse) err := grpc.Invoke(ctx, "/containerd.services.containers.v1.Containers/Get", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *containersClient) List(ctx context.Context, in *ListContainersRequest, opts ...grpc.CallOption) (*ListContainersResponse, error) { out := new(ListContainersResponse) err := grpc.Invoke(ctx, "/containerd.services.containers.v1.Containers/List", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *containersClient) Create(ctx context.Context, in *CreateContainerRequest, opts ...grpc.CallOption) (*CreateContainerResponse, error) { out := new(CreateContainerResponse) err := grpc.Invoke(ctx, "/containerd.services.containers.v1.Containers/Create", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *containersClient) Update(ctx context.Context, in *UpdateContainerRequest, opts ...grpc.CallOption) (*UpdateContainerResponse, error) { out := new(UpdateContainerResponse) err := grpc.Invoke(ctx, "/containerd.services.containers.v1.Containers/Update", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *containersClient) Delete(ctx context.Context, in *DeleteContainerRequest, opts ...grpc.CallOption) (*google_protobuf2.Empty, error) { out := new(google_protobuf2.Empty) err := grpc.Invoke(ctx, "/containerd.services.containers.v1.Containers/Delete", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } // Server API for Containers service type ContainersServer interface { Get(context.Context, *GetContainerRequest) (*GetContainerResponse, error) List(context.Context, *ListContainersRequest) (*ListContainersResponse, error) Create(context.Context, *CreateContainerRequest) (*CreateContainerResponse, error) Update(context.Context, *UpdateContainerRequest) (*UpdateContainerResponse, error) Delete(context.Context, *DeleteContainerRequest) (*google_protobuf2.Empty, error) } func RegisterContainersServer(s *grpc.Server, srv ContainersServer) { s.RegisterService(&_Containers_serviceDesc, srv) } func _Containers_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetContainerRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ContainersServer).Get(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.containers.v1.Containers/Get", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ContainersServer).Get(ctx, req.(*GetContainerRequest)) } return interceptor(ctx, in, info, handler) } func _Containers_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListContainersRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ContainersServer).List(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.containers.v1.Containers/List", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ContainersServer).List(ctx, req.(*ListContainersRequest)) } return interceptor(ctx, in, info, handler) } func _Containers_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CreateContainerRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ContainersServer).Create(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.containers.v1.Containers/Create", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ContainersServer).Create(ctx, req.(*CreateContainerRequest)) } return interceptor(ctx, in, info, handler) } func _Containers_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateContainerRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ContainersServer).Update(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.containers.v1.Containers/Update", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ContainersServer).Update(ctx, req.(*UpdateContainerRequest)) } return interceptor(ctx, in, info, handler) } func _Containers_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DeleteContainerRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ContainersServer).Delete(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.containers.v1.Containers/Delete", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ContainersServer).Delete(ctx, req.(*DeleteContainerRequest)) } return interceptor(ctx, in, info, handler) } var _Containers_serviceDesc = grpc.ServiceDesc{ ServiceName: "containerd.services.containers.v1.Containers", HandlerType: (*ContainersServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Get", Handler: _Containers_Get_Handler, }, { MethodName: "List", Handler: _Containers_List_Handler, }, { MethodName: "Create", Handler: _Containers_Create_Handler, }, { MethodName: "Update", Handler: _Containers_Update_Handler, }, { MethodName: "Delete", Handler: _Containers_Delete_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "github.com/containerd/containerd/api/services/containers/v1/containers.proto", } func (m *Container) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Container) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.ID) > 0 { dAtA[i] = 0xa i++ i = encodeVarintContainers(dAtA, i, uint64(len(m.ID))) i += copy(dAtA[i:], m.ID) } if len(m.Labels) > 0 { for k, _ := range m.Labels { dAtA[i] = 0x12 i++ v := m.Labels[k] mapSize := 1 + len(k) + sovContainers(uint64(len(k))) + 1 + len(v) + sovContainers(uint64(len(v))) i = encodeVarintContainers(dAtA, i, uint64(mapSize)) dAtA[i] = 0xa i++ i = encodeVarintContainers(dAtA, i, uint64(len(k))) i += copy(dAtA[i:], k) dAtA[i] = 0x12 i++ i = encodeVarintContainers(dAtA, i, uint64(len(v))) i += copy(dAtA[i:], v) } } if len(m.Image) > 0 { dAtA[i] = 0x1a i++ i = encodeVarintContainers(dAtA, i, uint64(len(m.Image))) i += copy(dAtA[i:], m.Image) } if m.Runtime != nil { dAtA[i] = 0x22 i++ i = encodeVarintContainers(dAtA, i, uint64(m.Runtime.Size())) n1, err := m.Runtime.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n1 } if m.Spec != nil { dAtA[i] = 0x2a i++ i = encodeVarintContainers(dAtA, i, uint64(m.Spec.Size())) n2, err := m.Spec.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n2 } if len(m.Snapshotter) > 0 { dAtA[i] = 0x32 i++ i = encodeVarintContainers(dAtA, i, uint64(len(m.Snapshotter))) i += copy(dAtA[i:], m.Snapshotter) } if len(m.SnapshotKey) > 0 { dAtA[i] = 0x3a i++ i = encodeVarintContainers(dAtA, i, uint64(len(m.SnapshotKey))) i += copy(dAtA[i:], m.SnapshotKey) } dAtA[i] = 0x42 i++ i = encodeVarintContainers(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt))) n3, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i:]) if err != nil { return 0, err } i += n3 dAtA[i] = 0x4a i++ i = encodeVarintContainers(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdatedAt))) n4, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.UpdatedAt, dAtA[i:]) if err != nil { return 0, err } i += n4 if len(m.Extensions) > 0 { for k, _ := range m.Extensions { dAtA[i] = 0x52 i++ v := m.Extensions[k] msgSize := 0 if (&v) != nil { msgSize = (&v).Size() msgSize += 1 + sovContainers(uint64(msgSize)) } mapSize := 1 + len(k) + sovContainers(uint64(len(k))) + msgSize i = encodeVarintContainers(dAtA, i, uint64(mapSize)) dAtA[i] = 0xa i++ i = encodeVarintContainers(dAtA, i, uint64(len(k))) i += copy(dAtA[i:], k) dAtA[i] = 0x12 i++ i = encodeVarintContainers(dAtA, i, uint64((&v).Size())) n5, err := (&v).MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n5 } } return i, nil } func (m *Container_Runtime) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Container_Runtime) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Name) > 0 { dAtA[i] = 0xa i++ i = encodeVarintContainers(dAtA, i, uint64(len(m.Name))) i += copy(dAtA[i:], m.Name) } if m.Options != nil { dAtA[i] = 0x12 i++ i = encodeVarintContainers(dAtA, i, uint64(m.Options.Size())) n6, err := m.Options.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n6 } return i, nil } func (m *GetContainerRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *GetContainerRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.ID) > 0 { dAtA[i] = 0xa i++ i = encodeVarintContainers(dAtA, i, uint64(len(m.ID))) i += copy(dAtA[i:], m.ID) } return i, nil } func (m *GetContainerResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *GetContainerResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l dAtA[i] = 0xa i++ i = encodeVarintContainers(dAtA, i, uint64(m.Container.Size())) n7, err := m.Container.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n7 return i, nil } func (m *ListContainersRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ListContainersRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Filters) > 0 { for _, s := range m.Filters { dAtA[i] = 0xa i++ l = len(s) for l >= 1<<7 { dAtA[i] = uint8(uint64(l)&0x7f | 0x80) l >>= 7 i++ } dAtA[i] = uint8(l) i++ i += copy(dAtA[i:], s) } } return i, nil } func (m *ListContainersResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ListContainersResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Containers) > 0 { for _, msg := range m.Containers { dAtA[i] = 0xa i++ i = encodeVarintContainers(dAtA, i, uint64(msg.Size())) n, err := msg.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n } } return i, nil } func (m *CreateContainerRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *CreateContainerRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l dAtA[i] = 0xa i++ i = encodeVarintContainers(dAtA, i, uint64(m.Container.Size())) n8, err := m.Container.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n8 return i, nil } func (m *CreateContainerResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *CreateContainerResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l dAtA[i] = 0xa i++ i = encodeVarintContainers(dAtA, i, uint64(m.Container.Size())) n9, err := m.Container.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n9 return i, nil } func (m *UpdateContainerRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *UpdateContainerRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l dAtA[i] = 0xa i++ i = encodeVarintContainers(dAtA, i, uint64(m.Container.Size())) n10, err := m.Container.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n10 if m.UpdateMask != nil { dAtA[i] = 0x12 i++ i = encodeVarintContainers(dAtA, i, uint64(m.UpdateMask.Size())) n11, err := m.UpdateMask.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n11 } return i, nil } func (m *UpdateContainerResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *UpdateContainerResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l dAtA[i] = 0xa i++ i = encodeVarintContainers(dAtA, i, uint64(m.Container.Size())) n12, err := m.Container.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n12 return i, nil } func (m *DeleteContainerRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *DeleteContainerRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.ID) > 0 { dAtA[i] = 0xa i++ i = encodeVarintContainers(dAtA, i, uint64(len(m.ID))) i += copy(dAtA[i:], m.ID) } return i, nil } func encodeVarintContainers(dAtA []byte, offset int, v uint64) int { for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return offset + 1 } func (m *Container) Size() (n int) { var l int _ = l l = len(m.ID) if l > 0 { n += 1 + l + sovContainers(uint64(l)) } if len(m.Labels) > 0 { for k, v := range m.Labels { _ = k _ = v mapEntrySize := 1 + len(k) + sovContainers(uint64(len(k))) + 1 + len(v) + sovContainers(uint64(len(v))) n += mapEntrySize + 1 + sovContainers(uint64(mapEntrySize)) } } l = len(m.Image) if l > 0 { n += 1 + l + sovContainers(uint64(l)) } if m.Runtime != nil { l = m.Runtime.Size() n += 1 + l + sovContainers(uint64(l)) } if m.Spec != nil { l = m.Spec.Size() n += 1 + l + sovContainers(uint64(l)) } l = len(m.Snapshotter) if l > 0 { n += 1 + l + sovContainers(uint64(l)) } l = len(m.SnapshotKey) if l > 0 { n += 1 + l + sovContainers(uint64(l)) } l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt) n += 1 + l + sovContainers(uint64(l)) l = github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdatedAt) n += 1 + l + sovContainers(uint64(l)) if len(m.Extensions) > 0 { for k, v := range m.Extensions { _ = k _ = v l = v.Size() mapEntrySize := 1 + len(k) + sovContainers(uint64(len(k))) + 1 + l + sovContainers(uint64(l)) n += mapEntrySize + 1 + sovContainers(uint64(mapEntrySize)) } } return n } func (m *Container_Runtime) Size() (n int) { var l int _ = l l = len(m.Name) if l > 0 { n += 1 + l + sovContainers(uint64(l)) } if m.Options != nil { l = m.Options.Size() n += 1 + l + sovContainers(uint64(l)) } return n } func (m *GetContainerRequest) Size() (n int) { var l int _ = l l = len(m.ID) if l > 0 { n += 1 + l + sovContainers(uint64(l)) } return n } func (m *GetContainerResponse) Size() (n int) { var l int _ = l l = m.Container.Size() n += 1 + l + sovContainers(uint64(l)) return n } func (m *ListContainersRequest) Size() (n int) { var l int _ = l if len(m.Filters) > 0 { for _, s := range m.Filters { l = len(s) n += 1 + l + sovContainers(uint64(l)) } } return n } func (m *ListContainersResponse) Size() (n int) { var l int _ = l if len(m.Containers) > 0 { for _, e := range m.Containers { l = e.Size() n += 1 + l + sovContainers(uint64(l)) } } return n } func (m *CreateContainerRequest) Size() (n int) { var l int _ = l l = m.Container.Size() n += 1 + l + sovContainers(uint64(l)) return n } func (m *CreateContainerResponse) Size() (n int) { var l int _ = l l = m.Container.Size() n += 1 + l + sovContainers(uint64(l)) return n } func (m *UpdateContainerRequest) Size() (n int) { var l int _ = l l = m.Container.Size() n += 1 + l + sovContainers(uint64(l)) if m.UpdateMask != nil { l = m.UpdateMask.Size() n += 1 + l + sovContainers(uint64(l)) } return n } func (m *UpdateContainerResponse) Size() (n int) { var l int _ = l l = m.Container.Size() n += 1 + l + sovContainers(uint64(l)) return n } func (m *DeleteContainerRequest) Size() (n int) { var l int _ = l l = len(m.ID) if l > 0 { n += 1 + l + sovContainers(uint64(l)) } return n } func sovContainers(x uint64) (n int) { for { n++ x >>= 7 if x == 0 { break } } return n } func sozContainers(x uint64) (n int) { return sovContainers(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (this *Container) String() string { if this == nil { return "nil" } keysForLabels := make([]string, 0, len(this.Labels)) for k, _ := range this.Labels { keysForLabels = append(keysForLabels, k) } github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) mapStringForLabels := "map[string]string{" for _, k := range keysForLabels { mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) } mapStringForLabels += "}" keysForExtensions := make([]string, 0, len(this.Extensions)) for k, _ := range this.Extensions { keysForExtensions = append(keysForExtensions, k) } github_com_gogo_protobuf_sortkeys.Strings(keysForExtensions) mapStringForExtensions := "map[string]google_protobuf1.Any{" for _, k := range keysForExtensions { mapStringForExtensions += fmt.Sprintf("%v: %v,", k, this.Extensions[k]) } mapStringForExtensions += "}" s := strings.Join([]string{`&Container{`, `ID:` + fmt.Sprintf("%v", this.ID) + `,`, `Labels:` + mapStringForLabels + `,`, `Image:` + fmt.Sprintf("%v", this.Image) + `,`, `Runtime:` + strings.Replace(fmt.Sprintf("%v", this.Runtime), "Container_Runtime", "Container_Runtime", 1) + `,`, `Spec:` + strings.Replace(fmt.Sprintf("%v", this.Spec), "Any", "google_protobuf1.Any", 1) + `,`, `Snapshotter:` + fmt.Sprintf("%v", this.Snapshotter) + `,`, `SnapshotKey:` + fmt.Sprintf("%v", this.SnapshotKey) + `,`, `CreatedAt:` + strings.Replace(strings.Replace(this.CreatedAt.String(), "Timestamp", "google_protobuf4.Timestamp", 1), `&`, ``, 1) + `,`, `UpdatedAt:` + strings.Replace(strings.Replace(this.UpdatedAt.String(), "Timestamp", "google_protobuf4.Timestamp", 1), `&`, ``, 1) + `,`, `Extensions:` + mapStringForExtensions + `,`, `}`, }, "") return s } func (this *Container_Runtime) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&Container_Runtime{`, `Name:` + fmt.Sprintf("%v", this.Name) + `,`, `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Any", "google_protobuf1.Any", 1) + `,`, `}`, }, "") return s } func (this *GetContainerRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&GetContainerRequest{`, `ID:` + fmt.Sprintf("%v", this.ID) + `,`, `}`, }, "") return s } func (this *GetContainerResponse) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&GetContainerResponse{`, `Container:` + strings.Replace(strings.Replace(this.Container.String(), "Container", "Container", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } func (this *ListContainersRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&ListContainersRequest{`, `Filters:` + fmt.Sprintf("%v", this.Filters) + `,`, `}`, }, "") return s } func (this *ListContainersResponse) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&ListContainersResponse{`, `Containers:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Containers), "Container", "Container", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } func (this *CreateContainerRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&CreateContainerRequest{`, `Container:` + strings.Replace(strings.Replace(this.Container.String(), "Container", "Container", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } func (this *CreateContainerResponse) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&CreateContainerResponse{`, `Container:` + strings.Replace(strings.Replace(this.Container.String(), "Container", "Container", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } func (this *UpdateContainerRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&UpdateContainerRequest{`, `Container:` + strings.Replace(strings.Replace(this.Container.String(), "Container", "Container", 1), `&`, ``, 1) + `,`, `UpdateMask:` + strings.Replace(fmt.Sprintf("%v", this.UpdateMask), "FieldMask", "google_protobuf3.FieldMask", 1) + `,`, `}`, }, "") return s } func (this *UpdateContainerResponse) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&UpdateContainerResponse{`, `Container:` + strings.Replace(strings.Replace(this.Container.String(), "Container", "Container", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } func (this *DeleteContainerRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&DeleteContainerRequest{`, `ID:` + fmt.Sprintf("%v", this.ID) + `,`, `}`, }, "") return s } func valueToStringContainers(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { return "nil" } pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } func (m *Container) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainers } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Container: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Container: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainers } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthContainers } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainers } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthContainers } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Labels == nil { m.Labels = make(map[string]string) } var mapkey string var mapvalue string for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainers } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainers } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapkey |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { return ErrInvalidLengthContainers } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var stringLenmapvalue uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainers } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapvalue |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLenmapvalue := int(stringLenmapvalue) if intStringLenmapvalue < 0 { return ErrInvalidLengthContainers } postStringIndexmapvalue := iNdEx + intStringLenmapvalue if postStringIndexmapvalue > l { return io.ErrUnexpectedEOF } mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) iNdEx = postStringIndexmapvalue } else { iNdEx = entryPreIndex skippy, err := skipContainers(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthContainers } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.Labels[mapkey] = mapvalue iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainers } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthContainers } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Image = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Runtime", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainers } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthContainers } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Runtime == nil { m.Runtime = &Container_Runtime{} } if err := m.Runtime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainers } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthContainers } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Spec == nil { m.Spec = &google_protobuf1.Any{} } if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Snapshotter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainers } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthContainers } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Snapshotter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field SnapshotKey", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainers } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthContainers } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.SnapshotKey = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainers } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthContainers } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 9: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field UpdatedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainers } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthContainers } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.UpdatedAt, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 10: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Extensions", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainers } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthContainers } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Extensions == nil { m.Extensions = make(map[string]google_protobuf1.Any) } var mapkey string mapvalue := &google_protobuf1.Any{} for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainers } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainers } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapkey |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { return ErrInvalidLengthContainers } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var mapmsglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainers } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapmsglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if mapmsglen < 0 { return ErrInvalidLengthContainers } postmsgIndex := iNdEx + mapmsglen if mapmsglen < 0 { return ErrInvalidLengthContainers } if postmsgIndex > l { return io.ErrUnexpectedEOF } mapvalue = &google_protobuf1.Any{} if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { return err } iNdEx = postmsgIndex } else { iNdEx = entryPreIndex skippy, err := skipContainers(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthContainers } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.Extensions[mapkey] = *mapvalue iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipContainers(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthContainers } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Container_Runtime) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainers } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Runtime: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Runtime: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainers } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthContainers } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainers } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthContainers } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Options == nil { m.Options = &google_protobuf1.Any{} } if err := m.Options.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipContainers(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthContainers } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *GetContainerRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainers } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: GetContainerRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: GetContainerRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainers } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthContainers } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipContainers(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthContainers } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *GetContainerResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainers } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: GetContainerResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: GetContainerResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Container", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainers } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthContainers } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Container.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipContainers(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthContainers } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ListContainersRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainers } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ListContainersRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ListContainersRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Filters", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainers } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthContainers } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Filters = append(m.Filters, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipContainers(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthContainers } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ListContainersResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainers } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ListContainersResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ListContainersResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Containers", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainers } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthContainers } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } m.Containers = append(m.Containers, Container{}) if err := m.Containers[len(m.Containers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipContainers(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthContainers } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *CreateContainerRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainers } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: CreateContainerRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: CreateContainerRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Container", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainers } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthContainers } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Container.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipContainers(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthContainers } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *CreateContainerResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainers } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: CreateContainerResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: CreateContainerResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Container", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainers } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthContainers } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Container.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipContainers(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthContainers } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *UpdateContainerRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainers } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: UpdateContainerRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UpdateContainerRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Container", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainers } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthContainers } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Container.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field UpdateMask", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainers } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthContainers } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.UpdateMask == nil { m.UpdateMask = &google_protobuf3.FieldMask{} } if err := m.UpdateMask.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipContainers(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthContainers } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *UpdateContainerResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainers } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: UpdateContainerResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UpdateContainerResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Container", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainers } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthContainers } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Container.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipContainers(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthContainers } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *DeleteContainerRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainers } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: DeleteContainerRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: DeleteContainerRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainers } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthContainers } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipContainers(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthContainers } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipContainers(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowContainers } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } wireType := int(wire & 0x7) switch wireType { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowContainers } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } iNdEx++ if dAtA[iNdEx-1] < 0x80 { break } } return iNdEx, nil case 1: iNdEx += 8 return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowContainers } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ length |= (int(b) & 0x7F) << shift if b < 0x80 { break } } iNdEx += length if length < 0 { return 0, ErrInvalidLengthContainers } return iNdEx, nil case 3: for { var innerWire uint64 var start int = iNdEx for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowContainers } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ innerWire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } innerWireType := int(innerWire & 0x7) if innerWireType == 4 { break } next, err := skipContainers(dAtA[start:]) if err != nil { return 0, err } iNdEx = start + next } return iNdEx, nil case 4: return iNdEx, nil case 5: iNdEx += 4 return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } } panic("unreachable") } var ( ErrInvalidLengthContainers = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowContainers = fmt.Errorf("proto: integer overflow") ) func init() { proto.RegisterFile("github.com/containerd/containerd/api/services/containers/v1/containers.proto", fileDescriptorContainers) } var fileDescriptorContainers = []byte{ // 776 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcd, 0x72, 0xd2, 0x50, 0x14, 0x26, 0x81, 0x86, 0x72, 0x70, 0x46, 0xe7, 0x8a, 0x18, 0xe3, 0x0c, 0x50, 0x56, 0x8c, 0xa3, 0xc1, 0xa2, 0xa3, 0xfd, 0x71, 0x53, 0xfa, 0x37, 0x8e, 0xad, 0xd3, 0x89, 0x3a, 0xe3, 0xe8, 0xa2, 0x06, 0xb8, 0xa5, 0x91, 0xfc, 0x99, 0x7b, 0x61, 0x64, 0x5c, 0xe8, 0x23, 0xb8, 0xf3, 0x11, 0x7c, 0x95, 0x2e, 0x5d, 0xba, 0xaa, 0x2d, 0x4f, 0xe2, 0xe4, 0x26, 0x21, 0x29, 0x04, 0x85, 0x2a, 0xbb, 0x7b, 0xb8, 0xe7, 0xfb, 0xce, 0xc7, 0x77, 0xce, 0xb9, 0x00, 0x7b, 0x6d, 0x8d, 0x1e, 0x77, 0x1b, 0x72, 0xd3, 0x32, 0xaa, 0x4d, 0xcb, 0xa4, 0xaa, 0x66, 0x62, 0xa7, 0x15, 0x3d, 0xaa, 0xb6, 0x56, 0x25, 0xd8, 0xe9, 0x69, 0x4d, 0x4c, 0xc2, 0xcf, 0x49, 0xb5, 0xb7, 0x1c, 0x89, 0x64, 0xdb, 0xb1, 0xa8, 0x85, 0x96, 0x42, 0x9c, 0x1c, 0x60, 0xe4, 0x48, 0x56, 0x6f, 0x59, 0xca, 0xb5, 0xad, 0xb6, 0xc5, 0xb2, 0xab, 0xee, 0xc9, 0x03, 0x4a, 0xb7, 0xda, 0x96, 0xd5, 0xd6, 0x71, 0x95, 0x45, 0x8d, 0xee, 0x51, 0x55, 0x35, 0xfb, 0xfe, 0xd5, 0xed, 0xd1, 0x2b, 0x6c, 0xd8, 0x34, 0xb8, 0x2c, 0x8d, 0x5e, 0x1e, 0x69, 0x58, 0x6f, 0x1d, 0x1a, 0x2a, 0xe9, 0xf8, 0x19, 0xc5, 0xd1, 0x0c, 0xaa, 0x19, 0x98, 0x50, 0xd5, 0xb0, 0xbd, 0x84, 0xf2, 0x37, 0x01, 0x32, 0x9b, 0x81, 0x44, 0x94, 0x07, 0x5e, 0x6b, 0x89, 0x5c, 0x89, 0xab, 0x64, 0xea, 0xc2, 0xe0, 0xb4, 0xc8, 0x3f, 0xdd, 0x52, 0x78, 0xad, 0x85, 0x0e, 0x40, 0xd0, 0xd5, 0x06, 0xd6, 0x89, 0xc8, 0x97, 0x92, 0x95, 0x6c, 0x6d, 0x45, 0xfe, 0xeb, 0x57, 0x95, 0x87, 0xac, 0xf2, 0x1e, 0x83, 0x6e, 0x9b, 0xd4, 0xe9, 0x2b, 0x3e, 0x0f, 0xca, 0xc1, 0x82, 0x66, 0xa8, 0x6d, 0x2c, 0x26, 0xdd, 0x62, 0x8a, 0x17, 0xa0, 0xe7, 0x90, 0x76, 0xba, 0xa6, 0xab, 0x51, 0x4c, 0x95, 0xb8, 0x4a, 0xb6, 0xf6, 0x70, 0xa6, 0x42, 0x8a, 0x87, 0x55, 0x02, 0x12, 0x54, 0x81, 0x14, 0xb1, 0x71, 0x53, 0x5c, 0x60, 0x64, 0x39, 0xd9, 0x73, 0x43, 0x0e, 0xdc, 0x90, 0x37, 0xcc, 0xbe, 0xc2, 0x32, 0x50, 0x09, 0xb2, 0xc4, 0x54, 0x6d, 0x72, 0x6c, 0x51, 0x8a, 0x1d, 0x51, 0x60, 0xaa, 0xa2, 0x1f, 0xa1, 0x25, 0xb8, 0x12, 0x84, 0x87, 0x1d, 0xdc, 0x17, 0xd3, 0x17, 0x53, 0x9e, 0xe1, 0x3e, 0xda, 0x04, 0x68, 0x3a, 0x58, 0xa5, 0xb8, 0x75, 0xa8, 0x52, 0x71, 0x91, 0x15, 0x95, 0xc6, 0x8a, 0xbe, 0x0c, 0x5a, 0x50, 0x5f, 0x3c, 0x39, 0x2d, 0x26, 0xbe, 0xfe, 0x2a, 0x72, 0x4a, 0xc6, 0xc7, 0x6d, 0x50, 0x97, 0xa4, 0x6b, 0xb7, 0x02, 0x92, 0xcc, 0x2c, 0x24, 0x3e, 0x6e, 0x83, 0xa2, 0x06, 0x00, 0xfe, 0x48, 0xb1, 0x49, 0x34, 0xcb, 0x24, 0x22, 0xb0, 0xa6, 0x3d, 0x99, 0xc9, 0xcb, 0xed, 0x21, 0x9c, 0x35, 0xae, 0x9e, 0x72, 0xcb, 0x28, 0x11, 0x56, 0x69, 0x15, 0xb2, 0x91, 0xce, 0xa2, 0x6b, 0x90, 0x74, 0x6d, 0x61, 0xc3, 0xa3, 0xb8, 0x47, 0xb7, 0xc7, 0x3d, 0x55, 0xef, 0x62, 0x91, 0xf7, 0x7a, 0xcc, 0x82, 0x35, 0x7e, 0x85, 0x93, 0xf6, 0x21, 0xed, 0xf7, 0x0a, 0x21, 0x48, 0x99, 0xaa, 0x81, 0x7d, 0x1c, 0x3b, 0x23, 0x19, 0xd2, 0x96, 0x4d, 0x99, 0x74, 0xfe, 0x0f, 0x9d, 0x0b, 0x92, 0xa4, 0x17, 0x70, 0x75, 0x44, 0x6e, 0x8c, 0x9a, 0x3b, 0x51, 0x35, 0x93, 0x28, 0x43, 0x8d, 0xe5, 0x7b, 0x70, 0x7d, 0x17, 0xd3, 0xa1, 0x21, 0x0a, 0xfe, 0xd0, 0xc5, 0x84, 0x4e, 0x5a, 0x91, 0xf2, 0x31, 0xe4, 0x2e, 0xa6, 0x13, 0xdb, 0x32, 0x09, 0x46, 0x07, 0x90, 0x19, 0x5a, 0xcc, 0x60, 0xd9, 0xda, 0xdd, 0x59, 0x1a, 0xe1, 0x1b, 0x1f, 0x92, 0x94, 0x97, 0xe1, 0xc6, 0x9e, 0x46, 0xc2, 0x52, 0x24, 0x90, 0x26, 0x42, 0xfa, 0x48, 0xd3, 0x29, 0x76, 0x88, 0xc8, 0x95, 0x92, 0x95, 0x8c, 0x12, 0x84, 0x65, 0x1d, 0xf2, 0xa3, 0x10, 0x5f, 0x9e, 0x02, 0x10, 0x16, 0x66, 0xb0, 0xcb, 0xe9, 0x8b, 0xb0, 0x94, 0xdf, 0x43, 0x7e, 0x93, 0x8d, 0xf3, 0x98, 0x79, 0xff, 0xdf, 0x8c, 0x0e, 0xdc, 0x1c, 0xab, 0x35, 0x37, 0xe7, 0xbf, 0x73, 0x90, 0x7f, 0xc5, 0x76, 0x6c, 0xfe, 0xdf, 0x0c, 0xad, 0x43, 0xd6, 0xdb, 0x67, 0xf6, 0x9e, 0xfb, 0x53, 0x3b, 0xfe, 0x10, 0xec, 0xb8, 0x4f, 0xfe, 0xbe, 0x4a, 0x3a, 0x8a, 0xff, 0x6c, 0xb8, 0x67, 0xd7, 0x96, 0x31, 0xa1, 0x73, 0xb3, 0xe5, 0x3e, 0xe4, 0xb7, 0xb0, 0x8e, 0x63, 0x5c, 0x99, 0xb0, 0x2c, 0xb5, 0xb3, 0x14, 0x40, 0x38, 0x8c, 0xa8, 0x07, 0xc9, 0x5d, 0x4c, 0xd1, 0xa3, 0x29, 0x64, 0xc4, 0xac, 0xa4, 0xf4, 0x78, 0x66, 0x9c, 0x6f, 0xc5, 0x27, 0x48, 0xb9, 0x6b, 0x81, 0xa6, 0xf9, 0x39, 0x8b, 0x5d, 0x39, 0x69, 0xf5, 0x12, 0x48, 0xbf, 0xf8, 0x67, 0x10, 0xbc, 0xc9, 0x45, 0xd3, 0x90, 0xc4, 0x2f, 0x94, 0xb4, 0x76, 0x19, 0x68, 0x28, 0xc0, 0x9b, 0x91, 0xa9, 0x04, 0xc4, 0xcf, 0xfd, 0x54, 0x02, 0x26, 0x4d, 0xe2, 0x5b, 0x10, 0xbc, 0xb9, 0x99, 0x4a, 0x40, 0xfc, 0x88, 0x49, 0xf9, 0xb1, 0x8d, 0xd8, 0x76, 0xff, 0x21, 0xd5, 0xdf, 0x9d, 0x9c, 0x17, 0x12, 0x3f, 0xcf, 0x0b, 0x89, 0x2f, 0x83, 0x02, 0x77, 0x32, 0x28, 0x70, 0x3f, 0x06, 0x05, 0xee, 0x6c, 0x50, 0xe0, 0xde, 0xec, 0xfc, 0xc3, 0x9f, 0xbe, 0xf5, 0x30, 0x7a, 0x9d, 0x68, 0x08, 0xac, 0xe6, 0x83, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x95, 0x94, 0x84, 0xf2, 0x47, 0x0a, 0x00, 0x00, } docker-containerd-tags-docker-17.12.1/api/services/containers/v1/containers.proto000066400000000000000000000132461322771672400300210ustar00rootroot00000000000000syntax = "proto3"; package containerd.services.containers.v1; import weak "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; option go_package = "github.com/containerd/containerd/api/services/containers/v1;containers"; // Containers provides metadata storage for containers used in the execution // service. // // The objects here provide an state-independent view of containers for use in // management and resource pinning. From that perspective, containers do not // have a "state" but rather this is the set of resources that will be // considered in use by the container. // // From the perspective of the execution service, these objects represent the // base parameters for creating a container process. // // In general, when looking to add fields for this type, first ask yourself // whether or not the function of the field has to do with runtime execution or // is invariant of the runtime state of the container. If it has to do with // runtime, or changes as the "container" is started and stops, it probably // doesn't belong on this object. service Containers { rpc Get(GetContainerRequest) returns (GetContainerResponse); rpc List(ListContainersRequest) returns (ListContainersResponse); rpc Create(CreateContainerRequest) returns (CreateContainerResponse); rpc Update(UpdateContainerRequest) returns (UpdateContainerResponse); rpc Delete(DeleteContainerRequest) returns (google.protobuf.Empty); } message Container { // ID is the user-specified identifier. // // This field may not be updated. string id = 1; // Labels provides an area to include arbitrary data on containers. // // The combined size of a key/value pair cannot exceed 4096 bytes. // // Note that to add a new value to this field, read the existing set and // include the entire result in the update call. map labels = 2; // Image contains the reference of the image used to build the // specification and snapshots for running this container. // // If this field is updated, the spec and rootfs needed to updated, as well. string image = 3; message Runtime { // Name is the name of the runtime. string name = 1; // Options specify additional runtime initialization options. google.protobuf.Any options = 2; } // Runtime specifies which runtime to use for executing this container. Runtime runtime = 4; // Spec to be used when creating the container. This is runtime specific. google.protobuf.Any spec = 5; // Snapshotter specifies the snapshotter name used for rootfs string snapshotter = 6; // SnapshotKey specifies the snapshot key to use for the container's root // filesystem. When starting a task from this container, a caller should // look up the mounts from the snapshot service and include those on the // task create request. // // Snapshots referenced in this field will not be garbage collected. // // This field is set to empty when the rootfs is not a snapshot. // // This field may be updated. string snapshot_key = 7; // CreatedAt is the time the container was first created. google.protobuf.Timestamp created_at = 8 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; // UpdatedAt is the last time the container was mutated. google.protobuf.Timestamp updated_at = 9 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; // Extensions allow clients to provide zero or more blobs that are directly // associated with the container. One may provide protobuf, json, or other // encoding formats. The primary use of this is to further decorate the // container object with fields that may be specific to a client integration. // // The key portion of this map should identify a "name" for the extension // that should be unique against other extensions. When updating extension // data, one should only update the specified extension using field paths // to select a specific map key. map extensions = 10 [(gogoproto.nullable) = false]; } message GetContainerRequest { string id = 1; } message GetContainerResponse { Container container = 1 [(gogoproto.nullable) = false]; } message ListContainersRequest { // Filters contains one or more filters using the syntax defined in the // containerd filter package. // // The returned result will be those that match any of the provided // filters. Expanded, containers that match the following will be // returned: // // filters[0] or filters[1] or ... or filters[n-1] or filters[n] // // If filters is zero-length or nil, all items will be returned. repeated string filters = 1; } message ListContainersResponse { repeated Container containers = 1 [(gogoproto.nullable) = false]; } message CreateContainerRequest { Container container = 1 [(gogoproto.nullable) = false]; } message CreateContainerResponse { Container container = 1 [(gogoproto.nullable) = false]; } // UpdateContainerRequest updates the metadata on one or more container. // // The operation should follow semantics described in // https://developers.google.com/protocol-buffers/docs/reference/csharp/class/google/protobuf/well-known-types/field-mask, // unless otherwise qualified. message UpdateContainerRequest { // Container provides the target values, as declared by the mask, for the update. // // The ID field must be set. Container container = 1 [(gogoproto.nullable) = false]; // UpdateMask specifies which fields to perform the update on. If empty, // the operation applies to all fields. google.protobuf.FieldMask update_mask = 2; } message UpdateContainerResponse { Container container = 1 [(gogoproto.nullable) = false]; } message DeleteContainerRequest { string id = 1; } docker-containerd-tags-docker-17.12.1/api/services/content/000077500000000000000000000000001322771672400235405ustar00rootroot00000000000000docker-containerd-tags-docker-17.12.1/api/services/content/v1/000077500000000000000000000000001322771672400240665ustar00rootroot00000000000000docker-containerd-tags-docker-17.12.1/api/services/content/v1/content.pb.go000066400000000000000000003476171322771672400265110ustar00rootroot00000000000000// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/containerd/containerd/api/services/content/v1/content.proto /* Package content is a generated protocol buffer package. It is generated from these files: github.com/containerd/containerd/api/services/content/v1/content.proto It has these top-level messages: Info InfoRequest InfoResponse UpdateRequest UpdateResponse ListContentRequest ListContentResponse DeleteContentRequest ReadContentRequest ReadContentResponse Status StatusRequest StatusResponse ListStatusesRequest ListStatusesResponse WriteContentRequest WriteContentResponse AbortRequest */ package content import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" // skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto" import google_protobuf1 "github.com/gogo/protobuf/types" import _ "github.com/gogo/protobuf/types" import google_protobuf3 "github.com/gogo/protobuf/types" import github_com_opencontainers_go_digest "github.com/opencontainers/go-digest" import time "time" import ( context "golang.org/x/net/context" grpc "google.golang.org/grpc" ) import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" import strings "strings" import reflect "reflect" import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" import io "io" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf var _ = time.Kitchen // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package // WriteAction defines the behavior of a WriteRequest. type WriteAction int32 const ( // WriteActionStat instructs the writer to return the current status while // holding the lock on the write. WriteActionStat WriteAction = 0 // WriteActionWrite sets the action for the write request to write data. // // Any data included will be written at the provided offset. The // transaction will be left open for further writes. // // This is the default. WriteActionWrite WriteAction = 1 // WriteActionCommit will write any outstanding data in the message and // commit the write, storing it under the digest. // // This can be used in a single message to send the data, verify it and // commit it. // // This action will always terminate the write. WriteActionCommit WriteAction = 2 ) var WriteAction_name = map[int32]string{ 0: "STAT", 1: "WRITE", 2: "COMMIT", } var WriteAction_value = map[string]int32{ "STAT": 0, "WRITE": 1, "COMMIT": 2, } func (x WriteAction) String() string { return proto.EnumName(WriteAction_name, int32(x)) } func (WriteAction) EnumDescriptor() ([]byte, []int) { return fileDescriptorContent, []int{0} } type Info struct { // Digest is the hash identity of the blob. Digest github_com_opencontainers_go_digest.Digest `protobuf:"bytes,1,opt,name=digest,proto3,customtype=github.com/opencontainers/go-digest.Digest" json:"digest"` // Size is the total number of bytes in the blob. Size_ int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` // CreatedAt provides the time at which the blob was committed. CreatedAt time.Time `protobuf:"bytes,3,opt,name=created_at,json=createdAt,stdtime" json:"created_at"` // UpdatedAt provides the time the info was last updated. UpdatedAt time.Time `protobuf:"bytes,4,opt,name=updated_at,json=updatedAt,stdtime" json:"updated_at"` // Labels are arbitrary data on snapshots. // // The combined size of a key/value pair cannot exceed 4096 bytes. Labels map[string]string `protobuf:"bytes,5,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (m *Info) Reset() { *m = Info{} } func (*Info) ProtoMessage() {} func (*Info) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{0} } type InfoRequest struct { Digest github_com_opencontainers_go_digest.Digest `protobuf:"bytes,1,opt,name=digest,proto3,customtype=github.com/opencontainers/go-digest.Digest" json:"digest"` } func (m *InfoRequest) Reset() { *m = InfoRequest{} } func (*InfoRequest) ProtoMessage() {} func (*InfoRequest) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{1} } type InfoResponse struct { Info Info `protobuf:"bytes,1,opt,name=info" json:"info"` } func (m *InfoResponse) Reset() { *m = InfoResponse{} } func (*InfoResponse) ProtoMessage() {} func (*InfoResponse) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{2} } type UpdateRequest struct { Info Info `protobuf:"bytes,1,opt,name=info" json:"info"` // UpdateMask specifies which fields to perform the update on. If empty, // the operation applies to all fields. // // In info, Digest, Size, and CreatedAt are immutable, // other field may be updated using this mask. // If no mask is provided, all mutable field are updated. UpdateMask *google_protobuf1.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask" json:"update_mask,omitempty"` } func (m *UpdateRequest) Reset() { *m = UpdateRequest{} } func (*UpdateRequest) ProtoMessage() {} func (*UpdateRequest) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{3} } type UpdateResponse struct { Info Info `protobuf:"bytes,1,opt,name=info" json:"info"` } func (m *UpdateResponse) Reset() { *m = UpdateResponse{} } func (*UpdateResponse) ProtoMessage() {} func (*UpdateResponse) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{4} } type ListContentRequest struct { // Filters contains one or more filters using the syntax defined in the // containerd filter package. // // The returned result will be those that match any of the provided // filters. Expanded, containers that match the following will be // returned: // // filters[0] or filters[1] or ... or filters[n-1] or filters[n] // // If filters is zero-length or nil, all items will be returned. Filters []string `protobuf:"bytes,1,rep,name=filters" json:"filters,omitempty"` } func (m *ListContentRequest) Reset() { *m = ListContentRequest{} } func (*ListContentRequest) ProtoMessage() {} func (*ListContentRequest) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{5} } type ListContentResponse struct { Info []Info `protobuf:"bytes,1,rep,name=info" json:"info"` } func (m *ListContentResponse) Reset() { *m = ListContentResponse{} } func (*ListContentResponse) ProtoMessage() {} func (*ListContentResponse) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{6} } type DeleteContentRequest struct { // Digest specifies which content to delete. Digest github_com_opencontainers_go_digest.Digest `protobuf:"bytes,1,opt,name=digest,proto3,customtype=github.com/opencontainers/go-digest.Digest" json:"digest"` } func (m *DeleteContentRequest) Reset() { *m = DeleteContentRequest{} } func (*DeleteContentRequest) ProtoMessage() {} func (*DeleteContentRequest) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{7} } // ReadContentRequest defines the fields that make up a request to read a portion of // data from a stored object. type ReadContentRequest struct { // Digest is the hash identity to read. Digest github_com_opencontainers_go_digest.Digest `protobuf:"bytes,1,opt,name=digest,proto3,customtype=github.com/opencontainers/go-digest.Digest" json:"digest"` // Offset specifies the number of bytes from the start at which to begin // the read. If zero or less, the read will be from the start. This uses // standard zero-indexed semantics. Offset int64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"` // size is the total size of the read. If zero, the entire blob will be // returned by the service. Size_ int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"` } func (m *ReadContentRequest) Reset() { *m = ReadContentRequest{} } func (*ReadContentRequest) ProtoMessage() {} func (*ReadContentRequest) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{8} } // ReadContentResponse carries byte data for a read request. type ReadContentResponse struct { Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` } func (m *ReadContentResponse) Reset() { *m = ReadContentResponse{} } func (*ReadContentResponse) ProtoMessage() {} func (*ReadContentResponse) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{9} } type Status struct { StartedAt time.Time `protobuf:"bytes,1,opt,name=started_at,json=startedAt,stdtime" json:"started_at"` UpdatedAt time.Time `protobuf:"bytes,2,opt,name=updated_at,json=updatedAt,stdtime" json:"updated_at"` Ref string `protobuf:"bytes,3,opt,name=ref,proto3" json:"ref,omitempty"` Offset int64 `protobuf:"varint,4,opt,name=offset,proto3" json:"offset,omitempty"` Total int64 `protobuf:"varint,5,opt,name=total,proto3" json:"total,omitempty"` Expected github_com_opencontainers_go_digest.Digest `protobuf:"bytes,6,opt,name=expected,proto3,customtype=github.com/opencontainers/go-digest.Digest" json:"expected"` } func (m *Status) Reset() { *m = Status{} } func (*Status) ProtoMessage() {} func (*Status) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{10} } type StatusRequest struct { Ref string `protobuf:"bytes,1,opt,name=ref,proto3" json:"ref,omitempty"` } func (m *StatusRequest) Reset() { *m = StatusRequest{} } func (*StatusRequest) ProtoMessage() {} func (*StatusRequest) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{11} } type StatusResponse struct { Status *Status `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"` } func (m *StatusResponse) Reset() { *m = StatusResponse{} } func (*StatusResponse) ProtoMessage() {} func (*StatusResponse) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{12} } type ListStatusesRequest struct { Filters []string `protobuf:"bytes,1,rep,name=filters" json:"filters,omitempty"` } func (m *ListStatusesRequest) Reset() { *m = ListStatusesRequest{} } func (*ListStatusesRequest) ProtoMessage() {} func (*ListStatusesRequest) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{13} } type ListStatusesResponse struct { Statuses []Status `protobuf:"bytes,1,rep,name=statuses" json:"statuses"` } func (m *ListStatusesResponse) Reset() { *m = ListStatusesResponse{} } func (*ListStatusesResponse) ProtoMessage() {} func (*ListStatusesResponse) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{14} } // WriteContentRequest writes data to the request ref at offset. type WriteContentRequest struct { // Action sets the behavior of the write. // // When this is a write and the ref is not yet allocated, the ref will be // allocated and the data will be written at offset. // // If the action is write and the ref is allocated, it will accept data to // an offset that has not yet been written. // // If the action is write and there is no data, the current write status // will be returned. This works differently from status because the stream // holds a lock. Action WriteAction `protobuf:"varint,1,opt,name=action,proto3,enum=containerd.services.content.v1.WriteAction" json:"action,omitempty"` // Ref identifies the pre-commit object to write to. Ref string `protobuf:"bytes,2,opt,name=ref,proto3" json:"ref,omitempty"` // Total can be set to have the service validate the total size of the // committed content. // // The latest value before or with the commit action message will be use to // validate the content. If the offset overflows total, the service may // report an error. It is only required on one message for the write. // // If the value is zero or less, no validation of the final content will be // performed. Total int64 `protobuf:"varint,3,opt,name=total,proto3" json:"total,omitempty"` // Expected can be set to have the service validate the final content against // the provided digest. // // If the digest is already present in the object store, an AlreadyExists // error will be returned. // // Only the latest version will be used to check the content against the // digest. It is only required to include it on a single message, before or // with the commit action message. Expected github_com_opencontainers_go_digest.Digest `protobuf:"bytes,4,opt,name=expected,proto3,customtype=github.com/opencontainers/go-digest.Digest" json:"expected"` // Offset specifies the number of bytes from the start at which to begin // the write. For most implementations, this means from the start of the // file. This uses standard, zero-indexed semantics. // // If the action is write, the remote may remove all previously written // data after the offset. Implementations may support arbitrary offsets but // MUST support reseting this value to zero with a write. If an // implementation does not support a write at a particular offset, an // OutOfRange error must be returned. Offset int64 `protobuf:"varint,5,opt,name=offset,proto3" json:"offset,omitempty"` // Data is the actual bytes to be written. // // If this is empty and the message is not a commit, a response will be // returned with the current write state. Data []byte `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"` // Labels are arbitrary data on snapshots. // // The combined size of a key/value pair cannot exceed 4096 bytes. Labels map[string]string `protobuf:"bytes,7,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (m *WriteContentRequest) Reset() { *m = WriteContentRequest{} } func (*WriteContentRequest) ProtoMessage() {} func (*WriteContentRequest) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{15} } // WriteContentResponse is returned on the culmination of a write call. type WriteContentResponse struct { // Action contains the action for the final message of the stream. A writer // should confirm that they match the intended result. Action WriteAction `protobuf:"varint,1,opt,name=action,proto3,enum=containerd.services.content.v1.WriteAction" json:"action,omitempty"` // StartedAt provides the time at which the write began. // // This must be set for stat and commit write actions. All other write // actions may omit this. StartedAt time.Time `protobuf:"bytes,2,opt,name=started_at,json=startedAt,stdtime" json:"started_at"` // UpdatedAt provides the last time of a successful write. // // This must be set for stat and commit write actions. All other write // actions may omit this. UpdatedAt time.Time `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt,stdtime" json:"updated_at"` // Offset is the current committed size for the write. Offset int64 `protobuf:"varint,4,opt,name=offset,proto3" json:"offset,omitempty"` // Total provides the current, expected total size of the write. // // We include this to provide consistency with the Status structure on the // client writer. // // This is only valid on the Stat and Commit response. Total int64 `protobuf:"varint,5,opt,name=total,proto3" json:"total,omitempty"` // Digest, if present, includes the digest up to the currently committed // bytes. If action is commit, this field will be set. It is implementation // defined if this is set for other actions. Digest github_com_opencontainers_go_digest.Digest `protobuf:"bytes,6,opt,name=digest,proto3,customtype=github.com/opencontainers/go-digest.Digest" json:"digest"` } func (m *WriteContentResponse) Reset() { *m = WriteContentResponse{} } func (*WriteContentResponse) ProtoMessage() {} func (*WriteContentResponse) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{16} } type AbortRequest struct { Ref string `protobuf:"bytes,1,opt,name=ref,proto3" json:"ref,omitempty"` } func (m *AbortRequest) Reset() { *m = AbortRequest{} } func (*AbortRequest) ProtoMessage() {} func (*AbortRequest) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{17} } func init() { proto.RegisterType((*Info)(nil), "containerd.services.content.v1.Info") proto.RegisterType((*InfoRequest)(nil), "containerd.services.content.v1.InfoRequest") proto.RegisterType((*InfoResponse)(nil), "containerd.services.content.v1.InfoResponse") proto.RegisterType((*UpdateRequest)(nil), "containerd.services.content.v1.UpdateRequest") proto.RegisterType((*UpdateResponse)(nil), "containerd.services.content.v1.UpdateResponse") proto.RegisterType((*ListContentRequest)(nil), "containerd.services.content.v1.ListContentRequest") proto.RegisterType((*ListContentResponse)(nil), "containerd.services.content.v1.ListContentResponse") proto.RegisterType((*DeleteContentRequest)(nil), "containerd.services.content.v1.DeleteContentRequest") proto.RegisterType((*ReadContentRequest)(nil), "containerd.services.content.v1.ReadContentRequest") proto.RegisterType((*ReadContentResponse)(nil), "containerd.services.content.v1.ReadContentResponse") proto.RegisterType((*Status)(nil), "containerd.services.content.v1.Status") proto.RegisterType((*StatusRequest)(nil), "containerd.services.content.v1.StatusRequest") proto.RegisterType((*StatusResponse)(nil), "containerd.services.content.v1.StatusResponse") proto.RegisterType((*ListStatusesRequest)(nil), "containerd.services.content.v1.ListStatusesRequest") proto.RegisterType((*ListStatusesResponse)(nil), "containerd.services.content.v1.ListStatusesResponse") proto.RegisterType((*WriteContentRequest)(nil), "containerd.services.content.v1.WriteContentRequest") proto.RegisterType((*WriteContentResponse)(nil), "containerd.services.content.v1.WriteContentResponse") proto.RegisterType((*AbortRequest)(nil), "containerd.services.content.v1.AbortRequest") proto.RegisterEnum("containerd.services.content.v1.WriteAction", WriteAction_name, WriteAction_value) } // Reference imports to suppress errors if they are not otherwise used. var _ context.Context var _ grpc.ClientConn // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 // Client API for Content service type ContentClient interface { // Info returns information about a committed object. // // This call can be used for getting the size of content and checking for // existence. Info(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*InfoResponse, error) // Update updates content metadata. // // This call can be used to manage the mutable content labels. The // immutable metadata such as digest, size, and committed at cannot // be updated. Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error) // List streams the entire set of content as Info objects and closes the // stream. // // Typically, this will yield a large response, chunked into messages. // Clients should make provisions to ensure they can handle the entire data // set. List(ctx context.Context, in *ListContentRequest, opts ...grpc.CallOption) (Content_ListClient, error) // Delete will delete the referenced object. Delete(ctx context.Context, in *DeleteContentRequest, opts ...grpc.CallOption) (*google_protobuf3.Empty, error) // Read allows one to read an object based on the offset into the content. // // The requested data may be returned in one or more messages. Read(ctx context.Context, in *ReadContentRequest, opts ...grpc.CallOption) (Content_ReadClient, error) // Status returns the status for a single reference. Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error) // ListStatuses returns the status of ongoing object ingestions, started via // Write. // // Only those matching the regular expression will be provided in the // response. If the provided regular expression is empty, all ingestions // will be provided. ListStatuses(ctx context.Context, in *ListStatusesRequest, opts ...grpc.CallOption) (*ListStatusesResponse, error) // Write begins or resumes writes to a resource identified by a unique ref. // Only one active stream may exist at a time for each ref. // // Once a write stream has started, it may only write to a single ref, thus // once a stream is started, the ref may be ommitted on subsequent writes. // // For any write transaction represented by a ref, only a single write may // be made to a given offset. If overlapping writes occur, it is an error. // Writes should be sequential and implementations may throw an error if // this is required. // // If expected_digest is set and already part of the content store, the // write will fail. // // When completed, the commit flag should be set to true. If expected size // or digest is set, the content will be validated against those values. Write(ctx context.Context, opts ...grpc.CallOption) (Content_WriteClient, error) // Abort cancels the ongoing write named in the request. Any resources // associated with the write will be collected. Abort(ctx context.Context, in *AbortRequest, opts ...grpc.CallOption) (*google_protobuf3.Empty, error) } type contentClient struct { cc *grpc.ClientConn } func NewContentClient(cc *grpc.ClientConn) ContentClient { return &contentClient{cc} } func (c *contentClient) Info(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*InfoResponse, error) { out := new(InfoResponse) err := grpc.Invoke(ctx, "/containerd.services.content.v1.Content/Info", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *contentClient) Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error) { out := new(UpdateResponse) err := grpc.Invoke(ctx, "/containerd.services.content.v1.Content/Update", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *contentClient) List(ctx context.Context, in *ListContentRequest, opts ...grpc.CallOption) (Content_ListClient, error) { stream, err := grpc.NewClientStream(ctx, &_Content_serviceDesc.Streams[0], c.cc, "/containerd.services.content.v1.Content/List", opts...) if err != nil { return nil, err } x := &contentListClient{stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } if err := x.ClientStream.CloseSend(); err != nil { return nil, err } return x, nil } type Content_ListClient interface { Recv() (*ListContentResponse, error) grpc.ClientStream } type contentListClient struct { grpc.ClientStream } func (x *contentListClient) Recv() (*ListContentResponse, error) { m := new(ListContentResponse) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func (c *contentClient) Delete(ctx context.Context, in *DeleteContentRequest, opts ...grpc.CallOption) (*google_protobuf3.Empty, error) { out := new(google_protobuf3.Empty) err := grpc.Invoke(ctx, "/containerd.services.content.v1.Content/Delete", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *contentClient) Read(ctx context.Context, in *ReadContentRequest, opts ...grpc.CallOption) (Content_ReadClient, error) { stream, err := grpc.NewClientStream(ctx, &_Content_serviceDesc.Streams[1], c.cc, "/containerd.services.content.v1.Content/Read", opts...) if err != nil { return nil, err } x := &contentReadClient{stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } if err := x.ClientStream.CloseSend(); err != nil { return nil, err } return x, nil } type Content_ReadClient interface { Recv() (*ReadContentResponse, error) grpc.ClientStream } type contentReadClient struct { grpc.ClientStream } func (x *contentReadClient) Recv() (*ReadContentResponse, error) { m := new(ReadContentResponse) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func (c *contentClient) Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error) { out := new(StatusResponse) err := grpc.Invoke(ctx, "/containerd.services.content.v1.Content/Status", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *contentClient) ListStatuses(ctx context.Context, in *ListStatusesRequest, opts ...grpc.CallOption) (*ListStatusesResponse, error) { out := new(ListStatusesResponse) err := grpc.Invoke(ctx, "/containerd.services.content.v1.Content/ListStatuses", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *contentClient) Write(ctx context.Context, opts ...grpc.CallOption) (Content_WriteClient, error) { stream, err := grpc.NewClientStream(ctx, &_Content_serviceDesc.Streams[2], c.cc, "/containerd.services.content.v1.Content/Write", opts...) if err != nil { return nil, err } x := &contentWriteClient{stream} return x, nil } type Content_WriteClient interface { Send(*WriteContentRequest) error Recv() (*WriteContentResponse, error) grpc.ClientStream } type contentWriteClient struct { grpc.ClientStream } func (x *contentWriteClient) Send(m *WriteContentRequest) error { return x.ClientStream.SendMsg(m) } func (x *contentWriteClient) Recv() (*WriteContentResponse, error) { m := new(WriteContentResponse) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func (c *contentClient) Abort(ctx context.Context, in *AbortRequest, opts ...grpc.CallOption) (*google_protobuf3.Empty, error) { out := new(google_protobuf3.Empty) err := grpc.Invoke(ctx, "/containerd.services.content.v1.Content/Abort", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } // Server API for Content service type ContentServer interface { // Info returns information about a committed object. // // This call can be used for getting the size of content and checking for // existence. Info(context.Context, *InfoRequest) (*InfoResponse, error) // Update updates content metadata. // // This call can be used to manage the mutable content labels. The // immutable metadata such as digest, size, and committed at cannot // be updated. Update(context.Context, *UpdateRequest) (*UpdateResponse, error) // List streams the entire set of content as Info objects and closes the // stream. // // Typically, this will yield a large response, chunked into messages. // Clients should make provisions to ensure they can handle the entire data // set. List(*ListContentRequest, Content_ListServer) error // Delete will delete the referenced object. Delete(context.Context, *DeleteContentRequest) (*google_protobuf3.Empty, error) // Read allows one to read an object based on the offset into the content. // // The requested data may be returned in one or more messages. Read(*ReadContentRequest, Content_ReadServer) error // Status returns the status for a single reference. Status(context.Context, *StatusRequest) (*StatusResponse, error) // ListStatuses returns the status of ongoing object ingestions, started via // Write. // // Only those matching the regular expression will be provided in the // response. If the provided regular expression is empty, all ingestions // will be provided. ListStatuses(context.Context, *ListStatusesRequest) (*ListStatusesResponse, error) // Write begins or resumes writes to a resource identified by a unique ref. // Only one active stream may exist at a time for each ref. // // Once a write stream has started, it may only write to a single ref, thus // once a stream is started, the ref may be ommitted on subsequent writes. // // For any write transaction represented by a ref, only a single write may // be made to a given offset. If overlapping writes occur, it is an error. // Writes should be sequential and implementations may throw an error if // this is required. // // If expected_digest is set and already part of the content store, the // write will fail. // // When completed, the commit flag should be set to true. If expected size // or digest is set, the content will be validated against those values. Write(Content_WriteServer) error // Abort cancels the ongoing write named in the request. Any resources // associated with the write will be collected. Abort(context.Context, *AbortRequest) (*google_protobuf3.Empty, error) } func RegisterContentServer(s *grpc.Server, srv ContentServer) { s.RegisterService(&_Content_serviceDesc, srv) } func _Content_Info_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(InfoRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ContentServer).Info(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.content.v1.Content/Info", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ContentServer).Info(ctx, req.(*InfoRequest)) } return interceptor(ctx, in, info, handler) } func _Content_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ContentServer).Update(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.content.v1.Content/Update", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ContentServer).Update(ctx, req.(*UpdateRequest)) } return interceptor(ctx, in, info, handler) } func _Content_List_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(ListContentRequest) if err := stream.RecvMsg(m); err != nil { return err } return srv.(ContentServer).List(m, &contentListServer{stream}) } type Content_ListServer interface { Send(*ListContentResponse) error grpc.ServerStream } type contentListServer struct { grpc.ServerStream } func (x *contentListServer) Send(m *ListContentResponse) error { return x.ServerStream.SendMsg(m) } func _Content_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DeleteContentRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ContentServer).Delete(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.content.v1.Content/Delete", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ContentServer).Delete(ctx, req.(*DeleteContentRequest)) } return interceptor(ctx, in, info, handler) } func _Content_Read_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(ReadContentRequest) if err := stream.RecvMsg(m); err != nil { return err } return srv.(ContentServer).Read(m, &contentReadServer{stream}) } type Content_ReadServer interface { Send(*ReadContentResponse) error grpc.ServerStream } type contentReadServer struct { grpc.ServerStream } func (x *contentReadServer) Send(m *ReadContentResponse) error { return x.ServerStream.SendMsg(m) } func _Content_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(StatusRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ContentServer).Status(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.content.v1.Content/Status", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ContentServer).Status(ctx, req.(*StatusRequest)) } return interceptor(ctx, in, info, handler) } func _Content_ListStatuses_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListStatusesRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ContentServer).ListStatuses(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.content.v1.Content/ListStatuses", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ContentServer).ListStatuses(ctx, req.(*ListStatusesRequest)) } return interceptor(ctx, in, info, handler) } func _Content_Write_Handler(srv interface{}, stream grpc.ServerStream) error { return srv.(ContentServer).Write(&contentWriteServer{stream}) } type Content_WriteServer interface { Send(*WriteContentResponse) error Recv() (*WriteContentRequest, error) grpc.ServerStream } type contentWriteServer struct { grpc.ServerStream } func (x *contentWriteServer) Send(m *WriteContentResponse) error { return x.ServerStream.SendMsg(m) } func (x *contentWriteServer) Recv() (*WriteContentRequest, error) { m := new(WriteContentRequest) if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func _Content_Abort_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(AbortRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ContentServer).Abort(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.content.v1.Content/Abort", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ContentServer).Abort(ctx, req.(*AbortRequest)) } return interceptor(ctx, in, info, handler) } var _Content_serviceDesc = grpc.ServiceDesc{ ServiceName: "containerd.services.content.v1.Content", HandlerType: (*ContentServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Info", Handler: _Content_Info_Handler, }, { MethodName: "Update", Handler: _Content_Update_Handler, }, { MethodName: "Delete", Handler: _Content_Delete_Handler, }, { MethodName: "Status", Handler: _Content_Status_Handler, }, { MethodName: "ListStatuses", Handler: _Content_ListStatuses_Handler, }, { MethodName: "Abort", Handler: _Content_Abort_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "List", Handler: _Content_List_Handler, ServerStreams: true, }, { StreamName: "Read", Handler: _Content_Read_Handler, ServerStreams: true, }, { StreamName: "Write", Handler: _Content_Write_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "github.com/containerd/containerd/api/services/content/v1/content.proto", } func (m *Info) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Info) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Digest) > 0 { dAtA[i] = 0xa i++ i = encodeVarintContent(dAtA, i, uint64(len(m.Digest))) i += copy(dAtA[i:], m.Digest) } if m.Size_ != 0 { dAtA[i] = 0x10 i++ i = encodeVarintContent(dAtA, i, uint64(m.Size_)) } dAtA[i] = 0x1a i++ i = encodeVarintContent(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt))) n1, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i:]) if err != nil { return 0, err } i += n1 dAtA[i] = 0x22 i++ i = encodeVarintContent(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdatedAt))) n2, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.UpdatedAt, dAtA[i:]) if err != nil { return 0, err } i += n2 if len(m.Labels) > 0 { for k, _ := range m.Labels { dAtA[i] = 0x2a i++ v := m.Labels[k] mapSize := 1 + len(k) + sovContent(uint64(len(k))) + 1 + len(v) + sovContent(uint64(len(v))) i = encodeVarintContent(dAtA, i, uint64(mapSize)) dAtA[i] = 0xa i++ i = encodeVarintContent(dAtA, i, uint64(len(k))) i += copy(dAtA[i:], k) dAtA[i] = 0x12 i++ i = encodeVarintContent(dAtA, i, uint64(len(v))) i += copy(dAtA[i:], v) } } return i, nil } func (m *InfoRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *InfoRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Digest) > 0 { dAtA[i] = 0xa i++ i = encodeVarintContent(dAtA, i, uint64(len(m.Digest))) i += copy(dAtA[i:], m.Digest) } return i, nil } func (m *InfoResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *InfoResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l dAtA[i] = 0xa i++ i = encodeVarintContent(dAtA, i, uint64(m.Info.Size())) n3, err := m.Info.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n3 return i, nil } func (m *UpdateRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *UpdateRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l dAtA[i] = 0xa i++ i = encodeVarintContent(dAtA, i, uint64(m.Info.Size())) n4, err := m.Info.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n4 if m.UpdateMask != nil { dAtA[i] = 0x12 i++ i = encodeVarintContent(dAtA, i, uint64(m.UpdateMask.Size())) n5, err := m.UpdateMask.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n5 } return i, nil } func (m *UpdateResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *UpdateResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l dAtA[i] = 0xa i++ i = encodeVarintContent(dAtA, i, uint64(m.Info.Size())) n6, err := m.Info.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n6 return i, nil } func (m *ListContentRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ListContentRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Filters) > 0 { for _, s := range m.Filters { dAtA[i] = 0xa i++ l = len(s) for l >= 1<<7 { dAtA[i] = uint8(uint64(l)&0x7f | 0x80) l >>= 7 i++ } dAtA[i] = uint8(l) i++ i += copy(dAtA[i:], s) } } return i, nil } func (m *ListContentResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ListContentResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Info) > 0 { for _, msg := range m.Info { dAtA[i] = 0xa i++ i = encodeVarintContent(dAtA, i, uint64(msg.Size())) n, err := msg.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n } } return i, nil } func (m *DeleteContentRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *DeleteContentRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Digest) > 0 { dAtA[i] = 0xa i++ i = encodeVarintContent(dAtA, i, uint64(len(m.Digest))) i += copy(dAtA[i:], m.Digest) } return i, nil } func (m *ReadContentRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ReadContentRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Digest) > 0 { dAtA[i] = 0xa i++ i = encodeVarintContent(dAtA, i, uint64(len(m.Digest))) i += copy(dAtA[i:], m.Digest) } if m.Offset != 0 { dAtA[i] = 0x10 i++ i = encodeVarintContent(dAtA, i, uint64(m.Offset)) } if m.Size_ != 0 { dAtA[i] = 0x18 i++ i = encodeVarintContent(dAtA, i, uint64(m.Size_)) } return i, nil } func (m *ReadContentResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ReadContentResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if m.Offset != 0 { dAtA[i] = 0x8 i++ i = encodeVarintContent(dAtA, i, uint64(m.Offset)) } if len(m.Data) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintContent(dAtA, i, uint64(len(m.Data))) i += copy(dAtA[i:], m.Data) } return i, nil } func (m *Status) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Status) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l dAtA[i] = 0xa i++ i = encodeVarintContent(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.StartedAt))) n7, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.StartedAt, dAtA[i:]) if err != nil { return 0, err } i += n7 dAtA[i] = 0x12 i++ i = encodeVarintContent(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdatedAt))) n8, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.UpdatedAt, dAtA[i:]) if err != nil { return 0, err } i += n8 if len(m.Ref) > 0 { dAtA[i] = 0x1a i++ i = encodeVarintContent(dAtA, i, uint64(len(m.Ref))) i += copy(dAtA[i:], m.Ref) } if m.Offset != 0 { dAtA[i] = 0x20 i++ i = encodeVarintContent(dAtA, i, uint64(m.Offset)) } if m.Total != 0 { dAtA[i] = 0x28 i++ i = encodeVarintContent(dAtA, i, uint64(m.Total)) } if len(m.Expected) > 0 { dAtA[i] = 0x32 i++ i = encodeVarintContent(dAtA, i, uint64(len(m.Expected))) i += copy(dAtA[i:], m.Expected) } return i, nil } func (m *StatusRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *StatusRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Ref) > 0 { dAtA[i] = 0xa i++ i = encodeVarintContent(dAtA, i, uint64(len(m.Ref))) i += copy(dAtA[i:], m.Ref) } return i, nil } func (m *StatusResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *StatusResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if m.Status != nil { dAtA[i] = 0xa i++ i = encodeVarintContent(dAtA, i, uint64(m.Status.Size())) n9, err := m.Status.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n9 } return i, nil } func (m *ListStatusesRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ListStatusesRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Filters) > 0 { for _, s := range m.Filters { dAtA[i] = 0xa i++ l = len(s) for l >= 1<<7 { dAtA[i] = uint8(uint64(l)&0x7f | 0x80) l >>= 7 i++ } dAtA[i] = uint8(l) i++ i += copy(dAtA[i:], s) } } return i, nil } func (m *ListStatusesResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ListStatusesResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Statuses) > 0 { for _, msg := range m.Statuses { dAtA[i] = 0xa i++ i = encodeVarintContent(dAtA, i, uint64(msg.Size())) n, err := msg.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n } } return i, nil } func (m *WriteContentRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *WriteContentRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if m.Action != 0 { dAtA[i] = 0x8 i++ i = encodeVarintContent(dAtA, i, uint64(m.Action)) } if len(m.Ref) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintContent(dAtA, i, uint64(len(m.Ref))) i += copy(dAtA[i:], m.Ref) } if m.Total != 0 { dAtA[i] = 0x18 i++ i = encodeVarintContent(dAtA, i, uint64(m.Total)) } if len(m.Expected) > 0 { dAtA[i] = 0x22 i++ i = encodeVarintContent(dAtA, i, uint64(len(m.Expected))) i += copy(dAtA[i:], m.Expected) } if m.Offset != 0 { dAtA[i] = 0x28 i++ i = encodeVarintContent(dAtA, i, uint64(m.Offset)) } if len(m.Data) > 0 { dAtA[i] = 0x32 i++ i = encodeVarintContent(dAtA, i, uint64(len(m.Data))) i += copy(dAtA[i:], m.Data) } if len(m.Labels) > 0 { for k, _ := range m.Labels { dAtA[i] = 0x3a i++ v := m.Labels[k] mapSize := 1 + len(k) + sovContent(uint64(len(k))) + 1 + len(v) + sovContent(uint64(len(v))) i = encodeVarintContent(dAtA, i, uint64(mapSize)) dAtA[i] = 0xa i++ i = encodeVarintContent(dAtA, i, uint64(len(k))) i += copy(dAtA[i:], k) dAtA[i] = 0x12 i++ i = encodeVarintContent(dAtA, i, uint64(len(v))) i += copy(dAtA[i:], v) } } return i, nil } func (m *WriteContentResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *WriteContentResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if m.Action != 0 { dAtA[i] = 0x8 i++ i = encodeVarintContent(dAtA, i, uint64(m.Action)) } dAtA[i] = 0x12 i++ i = encodeVarintContent(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.StartedAt))) n10, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.StartedAt, dAtA[i:]) if err != nil { return 0, err } i += n10 dAtA[i] = 0x1a i++ i = encodeVarintContent(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdatedAt))) n11, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.UpdatedAt, dAtA[i:]) if err != nil { return 0, err } i += n11 if m.Offset != 0 { dAtA[i] = 0x20 i++ i = encodeVarintContent(dAtA, i, uint64(m.Offset)) } if m.Total != 0 { dAtA[i] = 0x28 i++ i = encodeVarintContent(dAtA, i, uint64(m.Total)) } if len(m.Digest) > 0 { dAtA[i] = 0x32 i++ i = encodeVarintContent(dAtA, i, uint64(len(m.Digest))) i += copy(dAtA[i:], m.Digest) } return i, nil } func (m *AbortRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *AbortRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Ref) > 0 { dAtA[i] = 0xa i++ i = encodeVarintContent(dAtA, i, uint64(len(m.Ref))) i += copy(dAtA[i:], m.Ref) } return i, nil } func encodeVarintContent(dAtA []byte, offset int, v uint64) int { for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return offset + 1 } func (m *Info) Size() (n int) { var l int _ = l l = len(m.Digest) if l > 0 { n += 1 + l + sovContent(uint64(l)) } if m.Size_ != 0 { n += 1 + sovContent(uint64(m.Size_)) } l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt) n += 1 + l + sovContent(uint64(l)) l = github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdatedAt) n += 1 + l + sovContent(uint64(l)) if len(m.Labels) > 0 { for k, v := range m.Labels { _ = k _ = v mapEntrySize := 1 + len(k) + sovContent(uint64(len(k))) + 1 + len(v) + sovContent(uint64(len(v))) n += mapEntrySize + 1 + sovContent(uint64(mapEntrySize)) } } return n } func (m *InfoRequest) Size() (n int) { var l int _ = l l = len(m.Digest) if l > 0 { n += 1 + l + sovContent(uint64(l)) } return n } func (m *InfoResponse) Size() (n int) { var l int _ = l l = m.Info.Size() n += 1 + l + sovContent(uint64(l)) return n } func (m *UpdateRequest) Size() (n int) { var l int _ = l l = m.Info.Size() n += 1 + l + sovContent(uint64(l)) if m.UpdateMask != nil { l = m.UpdateMask.Size() n += 1 + l + sovContent(uint64(l)) } return n } func (m *UpdateResponse) Size() (n int) { var l int _ = l l = m.Info.Size() n += 1 + l + sovContent(uint64(l)) return n } func (m *ListContentRequest) Size() (n int) { var l int _ = l if len(m.Filters) > 0 { for _, s := range m.Filters { l = len(s) n += 1 + l + sovContent(uint64(l)) } } return n } func (m *ListContentResponse) Size() (n int) { var l int _ = l if len(m.Info) > 0 { for _, e := range m.Info { l = e.Size() n += 1 + l + sovContent(uint64(l)) } } return n } func (m *DeleteContentRequest) Size() (n int) { var l int _ = l l = len(m.Digest) if l > 0 { n += 1 + l + sovContent(uint64(l)) } return n } func (m *ReadContentRequest) Size() (n int) { var l int _ = l l = len(m.Digest) if l > 0 { n += 1 + l + sovContent(uint64(l)) } if m.Offset != 0 { n += 1 + sovContent(uint64(m.Offset)) } if m.Size_ != 0 { n += 1 + sovContent(uint64(m.Size_)) } return n } func (m *ReadContentResponse) Size() (n int) { var l int _ = l if m.Offset != 0 { n += 1 + sovContent(uint64(m.Offset)) } l = len(m.Data) if l > 0 { n += 1 + l + sovContent(uint64(l)) } return n } func (m *Status) Size() (n int) { var l int _ = l l = github_com_gogo_protobuf_types.SizeOfStdTime(m.StartedAt) n += 1 + l + sovContent(uint64(l)) l = github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdatedAt) n += 1 + l + sovContent(uint64(l)) l = len(m.Ref) if l > 0 { n += 1 + l + sovContent(uint64(l)) } if m.Offset != 0 { n += 1 + sovContent(uint64(m.Offset)) } if m.Total != 0 { n += 1 + sovContent(uint64(m.Total)) } l = len(m.Expected) if l > 0 { n += 1 + l + sovContent(uint64(l)) } return n } func (m *StatusRequest) Size() (n int) { var l int _ = l l = len(m.Ref) if l > 0 { n += 1 + l + sovContent(uint64(l)) } return n } func (m *StatusResponse) Size() (n int) { var l int _ = l if m.Status != nil { l = m.Status.Size() n += 1 + l + sovContent(uint64(l)) } return n } func (m *ListStatusesRequest) Size() (n int) { var l int _ = l if len(m.Filters) > 0 { for _, s := range m.Filters { l = len(s) n += 1 + l + sovContent(uint64(l)) } } return n } func (m *ListStatusesResponse) Size() (n int) { var l int _ = l if len(m.Statuses) > 0 { for _, e := range m.Statuses { l = e.Size() n += 1 + l + sovContent(uint64(l)) } } return n } func (m *WriteContentRequest) Size() (n int) { var l int _ = l if m.Action != 0 { n += 1 + sovContent(uint64(m.Action)) } l = len(m.Ref) if l > 0 { n += 1 + l + sovContent(uint64(l)) } if m.Total != 0 { n += 1 + sovContent(uint64(m.Total)) } l = len(m.Expected) if l > 0 { n += 1 + l + sovContent(uint64(l)) } if m.Offset != 0 { n += 1 + sovContent(uint64(m.Offset)) } l = len(m.Data) if l > 0 { n += 1 + l + sovContent(uint64(l)) } if len(m.Labels) > 0 { for k, v := range m.Labels { _ = k _ = v mapEntrySize := 1 + len(k) + sovContent(uint64(len(k))) + 1 + len(v) + sovContent(uint64(len(v))) n += mapEntrySize + 1 + sovContent(uint64(mapEntrySize)) } } return n } func (m *WriteContentResponse) Size() (n int) { var l int _ = l if m.Action != 0 { n += 1 + sovContent(uint64(m.Action)) } l = github_com_gogo_protobuf_types.SizeOfStdTime(m.StartedAt) n += 1 + l + sovContent(uint64(l)) l = github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdatedAt) n += 1 + l + sovContent(uint64(l)) if m.Offset != 0 { n += 1 + sovContent(uint64(m.Offset)) } if m.Total != 0 { n += 1 + sovContent(uint64(m.Total)) } l = len(m.Digest) if l > 0 { n += 1 + l + sovContent(uint64(l)) } return n } func (m *AbortRequest) Size() (n int) { var l int _ = l l = len(m.Ref) if l > 0 { n += 1 + l + sovContent(uint64(l)) } return n } func sovContent(x uint64) (n int) { for { n++ x >>= 7 if x == 0 { break } } return n } func sozContent(x uint64) (n int) { return sovContent(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (this *Info) String() string { if this == nil { return "nil" } keysForLabels := make([]string, 0, len(this.Labels)) for k, _ := range this.Labels { keysForLabels = append(keysForLabels, k) } github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) mapStringForLabels := "map[string]string{" for _, k := range keysForLabels { mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) } mapStringForLabels += "}" s := strings.Join([]string{`&Info{`, `Digest:` + fmt.Sprintf("%v", this.Digest) + `,`, `Size_:` + fmt.Sprintf("%v", this.Size_) + `,`, `CreatedAt:` + strings.Replace(strings.Replace(this.CreatedAt.String(), "Timestamp", "google_protobuf2.Timestamp", 1), `&`, ``, 1) + `,`, `UpdatedAt:` + strings.Replace(strings.Replace(this.UpdatedAt.String(), "Timestamp", "google_protobuf2.Timestamp", 1), `&`, ``, 1) + `,`, `Labels:` + mapStringForLabels + `,`, `}`, }, "") return s } func (this *InfoRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&InfoRequest{`, `Digest:` + fmt.Sprintf("%v", this.Digest) + `,`, `}`, }, "") return s } func (this *InfoResponse) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&InfoResponse{`, `Info:` + strings.Replace(strings.Replace(this.Info.String(), "Info", "Info", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } func (this *UpdateRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&UpdateRequest{`, `Info:` + strings.Replace(strings.Replace(this.Info.String(), "Info", "Info", 1), `&`, ``, 1) + `,`, `UpdateMask:` + strings.Replace(fmt.Sprintf("%v", this.UpdateMask), "FieldMask", "google_protobuf1.FieldMask", 1) + `,`, `}`, }, "") return s } func (this *UpdateResponse) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&UpdateResponse{`, `Info:` + strings.Replace(strings.Replace(this.Info.String(), "Info", "Info", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } func (this *ListContentRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&ListContentRequest{`, `Filters:` + fmt.Sprintf("%v", this.Filters) + `,`, `}`, }, "") return s } func (this *ListContentResponse) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&ListContentResponse{`, `Info:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Info), "Info", "Info", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } func (this *DeleteContentRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&DeleteContentRequest{`, `Digest:` + fmt.Sprintf("%v", this.Digest) + `,`, `}`, }, "") return s } func (this *ReadContentRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&ReadContentRequest{`, `Digest:` + fmt.Sprintf("%v", this.Digest) + `,`, `Offset:` + fmt.Sprintf("%v", this.Offset) + `,`, `Size_:` + fmt.Sprintf("%v", this.Size_) + `,`, `}`, }, "") return s } func (this *ReadContentResponse) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&ReadContentResponse{`, `Offset:` + fmt.Sprintf("%v", this.Offset) + `,`, `Data:` + fmt.Sprintf("%v", this.Data) + `,`, `}`, }, "") return s } func (this *Status) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&Status{`, `StartedAt:` + strings.Replace(strings.Replace(this.StartedAt.String(), "Timestamp", "google_protobuf2.Timestamp", 1), `&`, ``, 1) + `,`, `UpdatedAt:` + strings.Replace(strings.Replace(this.UpdatedAt.String(), "Timestamp", "google_protobuf2.Timestamp", 1), `&`, ``, 1) + `,`, `Ref:` + fmt.Sprintf("%v", this.Ref) + `,`, `Offset:` + fmt.Sprintf("%v", this.Offset) + `,`, `Total:` + fmt.Sprintf("%v", this.Total) + `,`, `Expected:` + fmt.Sprintf("%v", this.Expected) + `,`, `}`, }, "") return s } func (this *StatusRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&StatusRequest{`, `Ref:` + fmt.Sprintf("%v", this.Ref) + `,`, `}`, }, "") return s } func (this *StatusResponse) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&StatusResponse{`, `Status:` + strings.Replace(fmt.Sprintf("%v", this.Status), "Status", "Status", 1) + `,`, `}`, }, "") return s } func (this *ListStatusesRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&ListStatusesRequest{`, `Filters:` + fmt.Sprintf("%v", this.Filters) + `,`, `}`, }, "") return s } func (this *ListStatusesResponse) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&ListStatusesResponse{`, `Statuses:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Statuses), "Status", "Status", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } func (this *WriteContentRequest) String() string { if this == nil { return "nil" } keysForLabels := make([]string, 0, len(this.Labels)) for k, _ := range this.Labels { keysForLabels = append(keysForLabels, k) } github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) mapStringForLabels := "map[string]string{" for _, k := range keysForLabels { mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) } mapStringForLabels += "}" s := strings.Join([]string{`&WriteContentRequest{`, `Action:` + fmt.Sprintf("%v", this.Action) + `,`, `Ref:` + fmt.Sprintf("%v", this.Ref) + `,`, `Total:` + fmt.Sprintf("%v", this.Total) + `,`, `Expected:` + fmt.Sprintf("%v", this.Expected) + `,`, `Offset:` + fmt.Sprintf("%v", this.Offset) + `,`, `Data:` + fmt.Sprintf("%v", this.Data) + `,`, `Labels:` + mapStringForLabels + `,`, `}`, }, "") return s } func (this *WriteContentResponse) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&WriteContentResponse{`, `Action:` + fmt.Sprintf("%v", this.Action) + `,`, `StartedAt:` + strings.Replace(strings.Replace(this.StartedAt.String(), "Timestamp", "google_protobuf2.Timestamp", 1), `&`, ``, 1) + `,`, `UpdatedAt:` + strings.Replace(strings.Replace(this.UpdatedAt.String(), "Timestamp", "google_protobuf2.Timestamp", 1), `&`, ``, 1) + `,`, `Offset:` + fmt.Sprintf("%v", this.Offset) + `,`, `Total:` + fmt.Sprintf("%v", this.Total) + `,`, `Digest:` + fmt.Sprintf("%v", this.Digest) + `,`, `}`, }, "") return s } func (this *AbortRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&AbortRequest{`, `Ref:` + fmt.Sprintf("%v", this.Ref) + `,`, `}`, }, "") return s } func valueToStringContent(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { return "nil" } pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } func (m *Info) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Info: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Info: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Digest", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthContent } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Digest = github_com_opencontainers_go_digest.Digest(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Size_", wireType) } m.Size_ = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Size_ |= (int64(b) & 0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthContent } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field UpdatedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthContent } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.UpdatedAt, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthContent } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Labels == nil { m.Labels = make(map[string]string) } var mapkey string var mapvalue string for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapkey |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { return ErrInvalidLengthContent } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var stringLenmapvalue uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapvalue |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLenmapvalue := int(stringLenmapvalue) if intStringLenmapvalue < 0 { return ErrInvalidLengthContent } postStringIndexmapvalue := iNdEx + intStringLenmapvalue if postStringIndexmapvalue > l { return io.ErrUnexpectedEOF } mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) iNdEx = postStringIndexmapvalue } else { iNdEx = entryPreIndex skippy, err := skipContent(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthContent } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.Labels[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipContent(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthContent } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *InfoRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: InfoRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: InfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Digest", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthContent } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Digest = github_com_opencontainers_go_digest.Digest(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipContent(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthContent } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *InfoResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: InfoResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: InfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthContent } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Info.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipContent(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthContent } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *UpdateRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: UpdateRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UpdateRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthContent } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Info.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field UpdateMask", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthContent } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.UpdateMask == nil { m.UpdateMask = &google_protobuf1.FieldMask{} } if err := m.UpdateMask.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipContent(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthContent } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *UpdateResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: UpdateResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UpdateResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthContent } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Info.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipContent(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthContent } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ListContentRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ListContentRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ListContentRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Filters", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthContent } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Filters = append(m.Filters, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipContent(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthContent } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ListContentResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ListContentResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ListContentResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthContent } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } m.Info = append(m.Info, Info{}) if err := m.Info[len(m.Info)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipContent(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthContent } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *DeleteContentRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: DeleteContentRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: DeleteContentRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Digest", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthContent } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Digest = github_com_opencontainers_go_digest.Digest(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipContent(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthContent } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ReadContentRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ReadContentRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ReadContentRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Digest", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthContent } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Digest = github_com_opencontainers_go_digest.Digest(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) } m.Offset = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Offset |= (int64(b) & 0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Size_", wireType) } m.Size_ = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Size_ |= (int64(b) & 0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := skipContent(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthContent } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ReadContentResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ReadContentResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ReadContentResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) } m.Offset = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Offset |= (int64(b) & 0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthContent } postIndex := iNdEx + byteLen if postIndex > l { return io.ErrUnexpectedEOF } m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) if m.Data == nil { m.Data = []byte{} } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipContent(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthContent } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Status) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Status: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Status: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthContent } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.StartedAt, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field UpdatedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthContent } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.UpdatedAt, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Ref", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthContent } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Ref = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) } m.Offset = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Offset |= (int64(b) & 0x7F) << shift if b < 0x80 { break } } case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) } m.Total = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Total |= (int64(b) & 0x7F) << shift if b < 0x80 { break } } case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Expected", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthContent } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Expected = github_com_opencontainers_go_digest.Digest(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipContent(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthContent } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *StatusRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: StatusRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: StatusRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Ref", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthContent } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Ref = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipContent(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthContent } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *StatusResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: StatusResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: StatusResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthContent } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Status == nil { m.Status = &Status{} } if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipContent(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthContent } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ListStatusesRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ListStatusesRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ListStatusesRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Filters", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthContent } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Filters = append(m.Filters, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipContent(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthContent } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ListStatusesResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ListStatusesResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ListStatusesResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Statuses", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthContent } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } m.Statuses = append(m.Statuses, Status{}) if err := m.Statuses[len(m.Statuses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipContent(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthContent } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *WriteContentRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: WriteContentRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: WriteContentRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType) } m.Action = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Action |= (WriteAction(b) & 0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Ref", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthContent } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Ref = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) } m.Total = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Total |= (int64(b) & 0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Expected", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthContent } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Expected = github_com_opencontainers_go_digest.Digest(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) } m.Offset = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Offset |= (int64(b) & 0x7F) << shift if b < 0x80 { break } } case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthContent } postIndex := iNdEx + byteLen if postIndex > l { return io.ErrUnexpectedEOF } m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) if m.Data == nil { m.Data = []byte{} } iNdEx = postIndex case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthContent } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Labels == nil { m.Labels = make(map[string]string) } var mapkey string var mapvalue string for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapkey |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { return ErrInvalidLengthContent } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var stringLenmapvalue uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapvalue |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLenmapvalue := int(stringLenmapvalue) if intStringLenmapvalue < 0 { return ErrInvalidLengthContent } postStringIndexmapvalue := iNdEx + intStringLenmapvalue if postStringIndexmapvalue > l { return io.ErrUnexpectedEOF } mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) iNdEx = postStringIndexmapvalue } else { iNdEx = entryPreIndex skippy, err := skipContent(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthContent } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.Labels[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipContent(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthContent } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *WriteContentResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: WriteContentResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: WriteContentResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType) } m.Action = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Action |= (WriteAction(b) & 0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthContent } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.StartedAt, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field UpdatedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthContent } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.UpdatedAt, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) } m.Offset = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Offset |= (int64(b) & 0x7F) << shift if b < 0x80 { break } } case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) } m.Total = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Total |= (int64(b) & 0x7F) << shift if b < 0x80 { break } } case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Digest", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthContent } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Digest = github_com_opencontainers_go_digest.Digest(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipContent(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthContent } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *AbortRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: AbortRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: AbortRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Ref", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContent } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthContent } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Ref = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipContent(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthContent } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipContent(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowContent } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } wireType := int(wire & 0x7) switch wireType { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowContent } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } iNdEx++ if dAtA[iNdEx-1] < 0x80 { break } } return iNdEx, nil case 1: iNdEx += 8 return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowContent } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ length |= (int(b) & 0x7F) << shift if b < 0x80 { break } } iNdEx += length if length < 0 { return 0, ErrInvalidLengthContent } return iNdEx, nil case 3: for { var innerWire uint64 var start int = iNdEx for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowContent } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ innerWire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } innerWireType := int(innerWire & 0x7) if innerWireType == 4 { break } next, err := skipContent(dAtA[start:]) if err != nil { return 0, err } iNdEx = start + next } return iNdEx, nil case 4: return iNdEx, nil case 5: iNdEx += 4 return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } } panic("unreachable") } var ( ErrInvalidLengthContent = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowContent = fmt.Errorf("proto: integer overflow") ) func init() { proto.RegisterFile("github.com/containerd/containerd/api/services/content/v1/content.proto", fileDescriptorContent) } var fileDescriptorContent = []byte{ // 1081 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcd, 0x6f, 0x1b, 0x45, 0x14, 0xf7, 0x78, 0xed, 0x4d, 0xf2, 0x9c, 0x16, 0x33, 0x31, 0x95, 0xb5, 0x08, 0x67, 0xbb, 0x42, 0xc8, 0x6a, 0xc9, 0x3a, 0x75, 0x7a, 0x00, 0x2a, 0x01, 0x8e, 0x9b, 0xaa, 0x41, 0x4d, 0x41, 0x5b, 0x97, 0x40, 0x2f, 0x65, 0x6d, 0x8f, 0xcd, 0x2a, 0xb6, 0xd7, 0xdd, 0x19, 0x5b, 0x84, 0x13, 0x17, 0x24, 0x14, 0xf5, 0x80, 0xb8, 0xe7, 0x02, 0xfc, 0x15, 0x1c, 0x38, 0xe7, 0xc8, 0x11, 0x71, 0x68, 0x69, 0xfe, 0x07, 0xee, 0x68, 0x66, 0x67, 0xed, 0xf5, 0x47, 0x58, 0xdb, 0x31, 0x27, 0xbf, 0x99, 0x7d, 0xbf, 0xf7, 0xfd, 0x31, 0x86, 0x7b, 0x4d, 0x87, 0x7d, 0xdd, 0xab, 0x9a, 0x35, 0xb7, 0x5d, 0xa8, 0xb9, 0x1d, 0x66, 0x3b, 0x1d, 0xe2, 0xd5, 0xc3, 0xa4, 0xdd, 0x75, 0x0a, 0x94, 0x78, 0x7d, 0xa7, 0x46, 0xa8, 0xb8, 0x27, 0x1d, 0x56, 0xe8, 0xdf, 0x0a, 0x48, 0xb3, 0xeb, 0xb9, 0xcc, 0xc5, 0xb9, 0x21, 0xc2, 0x0c, 0xb8, 0xcd, 0x80, 0xa5, 0x7f, 0x4b, 0xcb, 0x34, 0xdd, 0xa6, 0x2b, 0x58, 0x0b, 0x9c, 0xf2, 0x51, 0x9a, 0xde, 0x74, 0xdd, 0x66, 0x8b, 0x14, 0xc4, 0xa9, 0xda, 0x6b, 0x14, 0x1a, 0x0e, 0x69, 0xd5, 0x9f, 0xb6, 0x6d, 0x7a, 0x24, 0x39, 0x36, 0xc7, 0x39, 0x98, 0xd3, 0x26, 0x94, 0xd9, 0xed, 0xae, 0x64, 0x78, 0x73, 0x9c, 0x81, 0xb4, 0xbb, 0xec, 0xd8, 0xff, 0x68, 0xfc, 0x13, 0x87, 0xc4, 0x7e, 0xa7, 0xe1, 0xe2, 0x4f, 0x40, 0xad, 0x3b, 0x4d, 0x42, 0x59, 0x16, 0xe9, 0x28, 0xbf, 0xb6, 0x5b, 0x3c, 0x7b, 0xb1, 0x19, 0xfb, 0xeb, 0xc5, 0xe6, 0x8d, 0x90, 0xfb, 0x6e, 0x97, 0x74, 0x06, 0x5e, 0xd0, 0x42, 0xd3, 0xdd, 0xf2, 0x21, 0xe6, 0x5d, 0xf1, 0x63, 0x49, 0x09, 0x18, 0x43, 0x82, 0x3a, 0xdf, 0x92, 0x6c, 0x5c, 0x47, 0x79, 0xc5, 0x12, 0x34, 0x2e, 0x03, 0xd4, 0x3c, 0x62, 0x33, 0x52, 0x7f, 0x6a, 0xb3, 0xac, 0xa2, 0xa3, 0x7c, 0xaa, 0xa8, 0x99, 0xbe, 0x69, 0x66, 0x60, 0x9a, 0x59, 0x09, 0x6c, 0xdf, 0x5d, 0xe5, 0xfa, 0x7f, 0x7c, 0xb9, 0x89, 0xac, 0x35, 0x89, 0x2b, 0x31, 0x2e, 0xa4, 0xd7, 0xad, 0x07, 0x42, 0x12, 0xf3, 0x08, 0x91, 0xb8, 0x12, 0xc3, 0xf7, 0x41, 0x6d, 0xd9, 0x55, 0xd2, 0xa2, 0xd9, 0xa4, 0xae, 0xe4, 0x53, 0xc5, 0x6d, 0xf3, 0xbf, 0x33, 0x63, 0xf2, 0xf8, 0x98, 0x0f, 0x04, 0x64, 0xaf, 0xc3, 0xbc, 0x63, 0x4b, 0xe2, 0xb5, 0xf7, 0x21, 0x15, 0xba, 0xc6, 0x69, 0x50, 0x8e, 0xc8, 0xb1, 0x1f, 0x3f, 0x8b, 0x93, 0x38, 0x03, 0xc9, 0xbe, 0xdd, 0xea, 0xf9, 0x91, 0x58, 0xb3, 0xfc, 0xc3, 0x07, 0xf1, 0xf7, 0x90, 0xf1, 0x25, 0xa4, 0xb8, 0x58, 0x8b, 0x3c, 0xeb, 0xf1, 0x88, 0x2d, 0x31, 0xfa, 0xc6, 0x43, 0x58, 0xf7, 0x45, 0xd3, 0xae, 0xdb, 0xa1, 0x04, 0x7f, 0x08, 0x09, 0xa7, 0xd3, 0x70, 0x85, 0xe4, 0x54, 0xf1, 0xed, 0x59, 0xbc, 0xdd, 0x4d, 0x70, 0xfd, 0x96, 0xc0, 0x19, 0xcf, 0x11, 0x5c, 0x79, 0x2c, 0xa2, 0x17, 0x58, 0x7b, 0x49, 0x89, 0xf8, 0x0e, 0xa4, 0xfc, 0x74, 0x88, 0x3a, 0x16, 0xc1, 0x99, 0x96, 0xc7, 0x7b, 0xbc, 0xd4, 0x0f, 0x6c, 0x7a, 0x64, 0xc9, 0xac, 0x73, 0xda, 0xf8, 0x0c, 0xae, 0x06, 0xd6, 0x2c, 0xc9, 0x41, 0x13, 0xf0, 0x03, 0x87, 0xb2, 0xb2, 0xcf, 0x12, 0x38, 0x99, 0x85, 0x95, 0x86, 0xd3, 0x62, 0xc4, 0xa3, 0x59, 0xa4, 0x2b, 0xf9, 0x35, 0x2b, 0x38, 0x1a, 0x8f, 0x61, 0x63, 0x84, 0x7f, 0xc2, 0x0c, 0x65, 0x21, 0x33, 0xaa, 0x90, 0xb9, 0x4b, 0x5a, 0x84, 0x91, 0x31, 0x43, 0x96, 0x59, 0x1b, 0xcf, 0x11, 0x60, 0x8b, 0xd8, 0xf5, 0xff, 0x4f, 0x05, 0xbe, 0x06, 0xaa, 0xdb, 0x68, 0x50, 0xc2, 0x64, 0xfb, 0xcb, 0xd3, 0x60, 0x28, 0x28, 0xc3, 0xa1, 0x60, 0x94, 0x60, 0x63, 0xc4, 0x1a, 0x19, 0xc9, 0xa1, 0x08, 0x34, 0x2e, 0xa2, 0x6e, 0x33, 0x5b, 0x08, 0x5e, 0xb7, 0x04, 0x6d, 0xfc, 0x1c, 0x07, 0xf5, 0x11, 0xb3, 0x59, 0x8f, 0xf2, 0xe9, 0x40, 0x99, 0xed, 0xc9, 0xe9, 0x80, 0xe6, 0x99, 0x0e, 0x12, 0x37, 0x31, 0x62, 0xe2, 0x8b, 0x8d, 0x98, 0x34, 0x28, 0x1e, 0x69, 0x08, 0x57, 0xd7, 0x2c, 0x4e, 0x86, 0x5c, 0x4a, 0x8c, 0xb8, 0x94, 0x81, 0x24, 0x73, 0x99, 0xdd, 0xca, 0x26, 0xc5, 0xb5, 0x7f, 0xc0, 0x0f, 0x61, 0x95, 0x7c, 0xd3, 0x25, 0x35, 0x46, 0xea, 0x59, 0x75, 0xe1, 0x8c, 0x0c, 0x64, 0x18, 0xd7, 0xe1, 0x8a, 0x1f, 0xa3, 0x20, 0xe1, 0xd2, 0x40, 0x34, 0x30, 0x90, 0xb7, 0x55, 0xc0, 0x32, 0xa8, 0x67, 0x95, 0x8a, 0x1b, 0x19, 0xca, 0x77, 0xa2, 0x2a, 0x5a, 0xe2, 0x25, 0xca, 0x28, 0xf8, 0x6d, 0xe2, 0xdf, 0x12, 0x1a, 0xdd, 0x57, 0x5f, 0x41, 0x66, 0x14, 0x20, 0x0d, 0xb9, 0x0f, 0xab, 0x54, 0xde, 0xc9, 0xe6, 0x9a, 0xd1, 0x14, 0xd9, 0x5e, 0x03, 0xb4, 0xf1, 0x93, 0x02, 0x1b, 0x87, 0x9e, 0x33, 0xd1, 0x62, 0x65, 0x50, 0xed, 0x1a, 0x73, 0xdc, 0x8e, 0x70, 0xf5, 0x6a, 0xf1, 0x66, 0x94, 0x7c, 0x21, 0xa4, 0x24, 0x20, 0x96, 0x84, 0x06, 0x31, 0x8d, 0x0f, 0x93, 0x3e, 0x48, 0xae, 0x72, 0x51, 0x72, 0x13, 0x97, 0x4f, 0x6e, 0xa8, 0xb4, 0x92, 0x53, 0xbb, 0x45, 0x1d, 0x76, 0x0b, 0x3e, 0x1c, 0xec, 0xbe, 0x15, 0x11, 0xc8, 0x8f, 0x66, 0x72, 0x74, 0x34, 0x5a, 0xcb, 0x5e, 0x85, 0x2f, 0xe3, 0x90, 0x19, 0x55, 0x23, 0xf3, 0xbe, 0x94, 0xac, 0x8c, 0x0e, 0x85, 0xf8, 0x32, 0x86, 0x82, 0xb2, 0xd8, 0x50, 0x98, 0x6f, 0x04, 0x0c, 0x47, 0xb2, 0x7a, 0xe9, 0xa9, 0xaf, 0xc3, 0x7a, 0xa9, 0xea, 0x7a, 0xec, 0xc2, 0xee, 0xbf, 0xf1, 0x3d, 0x82, 0x54, 0x28, 0x7a, 0xf8, 0x2d, 0x48, 0x3c, 0xaa, 0x94, 0x2a, 0xe9, 0x98, 0xb6, 0x71, 0x72, 0xaa, 0xbf, 0x16, 0xfa, 0xc4, 0x3b, 0x0b, 0x6f, 0x42, 0xf2, 0xd0, 0xda, 0xaf, 0xec, 0xa5, 0x91, 0x96, 0x39, 0x39, 0xd5, 0xd3, 0xa1, 0xef, 0x82, 0xc4, 0xd7, 0x41, 0x2d, 0x7f, 0x7a, 0x70, 0xb0, 0x5f, 0x49, 0xc7, 0xb5, 0x37, 0x4e, 0x4e, 0xf5, 0xd7, 0x43, 0x1c, 0x65, 0xb7, 0xdd, 0x76, 0x98, 0xb6, 0xf1, 0xc3, 0x2f, 0xb9, 0xd8, 0x6f, 0xbf, 0xe6, 0xc2, 0x7a, 0x8b, 0xbf, 0xaf, 0xc0, 0x8a, 0x2c, 0x03, 0x6c, 0xcb, 0x97, 0xe9, 0xcd, 0x59, 0x36, 0xa9, 0x74, 0x4d, 0x7b, 0x77, 0x36, 0x66, 0x59, 0x61, 0x4d, 0x50, 0xfd, 0xb7, 0x04, 0xde, 0x8a, 0xc2, 0x8d, 0xbc, 0x80, 0x34, 0x73, 0x56, 0x76, 0xa9, 0xe8, 0x19, 0x24, 0xf8, 0x68, 0xc3, 0xc5, 0x28, 0xdc, 0xe4, 0x43, 0x44, 0xdb, 0x99, 0x0b, 0xe3, 0x2b, 0xdc, 0x46, 0xf8, 0x73, 0x50, 0xfd, 0xe7, 0x04, 0xbe, 0x1d, 0x25, 0x60, 0xda, 0xb3, 0x43, 0xbb, 0x36, 0x51, 0xdf, 0x7b, 0xfc, 0x7f, 0x03, 0x77, 0x85, 0xef, 0xec, 0x68, 0x57, 0x26, 0xdf, 0x19, 0xd1, 0xae, 0x4c, 0x79, 0x0d, 0x6c, 0x23, 0x9e, 0x26, 0xb9, 0xe2, 0xb7, 0x66, 0xdc, 0x41, 0xb3, 0xa6, 0x69, 0x6c, 0xe5, 0x1d, 0xc3, 0x7a, 0x78, 0x03, 0xe1, 0x99, 0x42, 0x3f, 0xb6, 0xe0, 0xb4, 0xdb, 0xf3, 0x81, 0xa4, 0xea, 0x3e, 0x24, 0xfd, 0xd6, 0xd9, 0x59, 0x60, 0x24, 0x47, 0xeb, 0x9c, 0x36, 0x60, 0xf3, 0x68, 0x1b, 0xe1, 0x03, 0x48, 0x8a, 0xd9, 0x80, 0x23, 0x3b, 0x27, 0x3c, 0x42, 0x2e, 0xaa, 0x8e, 0xdd, 0x27, 0x67, 0xaf, 0x72, 0xb1, 0x3f, 0x5f, 0xe5, 0x62, 0xdf, 0x9d, 0xe7, 0xd0, 0xd9, 0x79, 0x0e, 0xfd, 0x71, 0x9e, 0x43, 0x7f, 0x9f, 0xe7, 0xd0, 0x93, 0x8f, 0x17, 0xfd, 0x1f, 0x7d, 0x47, 0x92, 0x5f, 0xc4, 0xaa, 0xaa, 0xd0, 0xb6, 0xf3, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc0, 0xc2, 0x35, 0xb1, 0x94, 0x0f, 0x00, 0x00, } docker-containerd-tags-docker-17.12.1/api/services/content/v1/content.proto000066400000000000000000000265411322771672400266350ustar00rootroot00000000000000syntax = "proto3"; package containerd.services.content.v1; import weak "gogoproto/gogo.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/empty.proto"; option go_package = "github.com/containerd/containerd/api/services/content/v1;content"; // Content provides access to a content addressable storage system. service Content { // Info returns information about a committed object. // // This call can be used for getting the size of content and checking for // existence. rpc Info(InfoRequest) returns (InfoResponse); // Update updates content metadata. // // This call can be used to manage the mutable content labels. The // immutable metadata such as digest, size, and committed at cannot // be updated. rpc Update(UpdateRequest) returns (UpdateResponse); // List streams the entire set of content as Info objects and closes the // stream. // // Typically, this will yield a large response, chunked into messages. // Clients should make provisions to ensure they can handle the entire data // set. rpc List(ListContentRequest) returns (stream ListContentResponse); // Delete will delete the referenced object. rpc Delete(DeleteContentRequest) returns (google.protobuf.Empty); // Read allows one to read an object based on the offset into the content. // // The requested data may be returned in one or more messages. rpc Read(ReadContentRequest) returns (stream ReadContentResponse); // Status returns the status for a single reference. rpc Status(StatusRequest) returns (StatusResponse); // ListStatuses returns the status of ongoing object ingestions, started via // Write. // // Only those matching the regular expression will be provided in the // response. If the provided regular expression is empty, all ingestions // will be provided. rpc ListStatuses(ListStatusesRequest) returns (ListStatusesResponse); // Write begins or resumes writes to a resource identified by a unique ref. // Only one active stream may exist at a time for each ref. // // Once a write stream has started, it may only write to a single ref, thus // once a stream is started, the ref may be ommitted on subsequent writes. // // For any write transaction represented by a ref, only a single write may // be made to a given offset. If overlapping writes occur, it is an error. // Writes should be sequential and implementations may throw an error if // this is required. // // If expected_digest is set and already part of the content store, the // write will fail. // // When completed, the commit flag should be set to true. If expected size // or digest is set, the content will be validated against those values. rpc Write(stream WriteContentRequest) returns (stream WriteContentResponse); // Abort cancels the ongoing write named in the request. Any resources // associated with the write will be collected. rpc Abort(AbortRequest) returns (google.protobuf.Empty); } message Info { // Digest is the hash identity of the blob. string digest = 1 [(gogoproto.customtype) = "github.com/opencontainers/go-digest.Digest", (gogoproto.nullable) = false]; // Size is the total number of bytes in the blob. int64 size = 2; // CreatedAt provides the time at which the blob was committed. google.protobuf.Timestamp created_at = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; // UpdatedAt provides the time the info was last updated. google.protobuf.Timestamp updated_at = 4 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; // Labels are arbitrary data on snapshots. // // The combined size of a key/value pair cannot exceed 4096 bytes. map labels = 5; } message InfoRequest { string digest = 1 [(gogoproto.customtype) = "github.com/opencontainers/go-digest.Digest", (gogoproto.nullable) = false]; } message InfoResponse { Info info = 1 [(gogoproto.nullable) = false]; } message UpdateRequest { Info info = 1 [(gogoproto.nullable) = false]; // UpdateMask specifies which fields to perform the update on. If empty, // the operation applies to all fields. // // In info, Digest, Size, and CreatedAt are immutable, // other field may be updated using this mask. // If no mask is provided, all mutable field are updated. google.protobuf.FieldMask update_mask = 2; } message UpdateResponse { Info info = 1 [(gogoproto.nullable) = false]; } message ListContentRequest { // Filters contains one or more filters using the syntax defined in the // containerd filter package. // // The returned result will be those that match any of the provided // filters. Expanded, containers that match the following will be // returned: // // filters[0] or filters[1] or ... or filters[n-1] or filters[n] // // If filters is zero-length or nil, all items will be returned. repeated string filters = 1; } message ListContentResponse { repeated Info info = 1 [(gogoproto.nullable) = false]; } message DeleteContentRequest { // Digest specifies which content to delete. string digest = 1 [(gogoproto.customtype) = "github.com/opencontainers/go-digest.Digest", (gogoproto.nullable) = false]; } // ReadContentRequest defines the fields that make up a request to read a portion of // data from a stored object. message ReadContentRequest { // Digest is the hash identity to read. string digest = 1 [(gogoproto.customtype) = "github.com/opencontainers/go-digest.Digest", (gogoproto.nullable) = false]; // Offset specifies the number of bytes from the start at which to begin // the read. If zero or less, the read will be from the start. This uses // standard zero-indexed semantics. int64 offset = 2; // size is the total size of the read. If zero, the entire blob will be // returned by the service. int64 size = 3; } // ReadContentResponse carries byte data for a read request. message ReadContentResponse { int64 offset = 1; // offset of the returned data bytes data = 2; // actual data } message Status { google.protobuf.Timestamp started_at = 1 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; google.protobuf.Timestamp updated_at = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; string ref = 3; int64 offset = 4; int64 total = 5; string expected = 6 [(gogoproto.customtype) = "github.com/opencontainers/go-digest.Digest", (gogoproto.nullable) = false]; } message StatusRequest { string ref = 1; } message StatusResponse { Status status = 1; } message ListStatusesRequest { repeated string filters = 1; } message ListStatusesResponse { repeated Status statuses = 1 [(gogoproto.nullable) = false]; } // WriteAction defines the behavior of a WriteRequest. enum WriteAction { option (gogoproto.goproto_enum_prefix) = false; option (gogoproto.enum_customname) = "WriteAction"; // WriteActionStat instructs the writer to return the current status while // holding the lock on the write. STAT = 0 [(gogoproto.enumvalue_customname) = "WriteActionStat"]; // WriteActionWrite sets the action for the write request to write data. // // Any data included will be written at the provided offset. The // transaction will be left open for further writes. // // This is the default. WRITE = 1 [(gogoproto.enumvalue_customname) = "WriteActionWrite"]; // WriteActionCommit will write any outstanding data in the message and // commit the write, storing it under the digest. // // This can be used in a single message to send the data, verify it and // commit it. // // This action will always terminate the write. COMMIT = 2 [(gogoproto.enumvalue_customname) = "WriteActionCommit"]; } // WriteContentRequest writes data to the request ref at offset. message WriteContentRequest { // Action sets the behavior of the write. // // When this is a write and the ref is not yet allocated, the ref will be // allocated and the data will be written at offset. // // If the action is write and the ref is allocated, it will accept data to // an offset that has not yet been written. // // If the action is write and there is no data, the current write status // will be returned. This works differently from status because the stream // holds a lock. WriteAction action = 1; // Ref identifies the pre-commit object to write to. string ref = 2; // Total can be set to have the service validate the total size of the // committed content. // // The latest value before or with the commit action message will be use to // validate the content. If the offset overflows total, the service may // report an error. It is only required on one message for the write. // // If the value is zero or less, no validation of the final content will be // performed. int64 total = 3; // Expected can be set to have the service validate the final content against // the provided digest. // // If the digest is already present in the object store, an AlreadyExists // error will be returned. // // Only the latest version will be used to check the content against the // digest. It is only required to include it on a single message, before or // with the commit action message. string expected = 4 [(gogoproto.customtype) = "github.com/opencontainers/go-digest.Digest", (gogoproto.nullable) = false]; // Offset specifies the number of bytes from the start at which to begin // the write. For most implementations, this means from the start of the // file. This uses standard, zero-indexed semantics. // // If the action is write, the remote may remove all previously written // data after the offset. Implementations may support arbitrary offsets but // MUST support reseting this value to zero with a write. If an // implementation does not support a write at a particular offset, an // OutOfRange error must be returned. int64 offset = 5; // Data is the actual bytes to be written. // // If this is empty and the message is not a commit, a response will be // returned with the current write state. bytes data = 6; // Labels are arbitrary data on snapshots. // // The combined size of a key/value pair cannot exceed 4096 bytes. map labels = 7; } // WriteContentResponse is returned on the culmination of a write call. message WriteContentResponse { // Action contains the action for the final message of the stream. A writer // should confirm that they match the intended result. WriteAction action = 1; // StartedAt provides the time at which the write began. // // This must be set for stat and commit write actions. All other write // actions may omit this. google.protobuf.Timestamp started_at = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; // UpdatedAt provides the last time of a successful write. // // This must be set for stat and commit write actions. All other write // actions may omit this. google.protobuf.Timestamp updated_at = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; // Offset is the current committed size for the write. int64 offset = 4; // Total provides the current, expected total size of the write. // // We include this to provide consistency with the Status structure on the // client writer. // // This is only valid on the Stat and Commit response. int64 total = 5; // Digest, if present, includes the digest up to the currently committed // bytes. If action is commit, this field will be set. It is implementation // defined if this is set for other actions. string digest = 6 [(gogoproto.customtype) = "github.com/opencontainers/go-digest.Digest", (gogoproto.nullable) = false]; } message AbortRequest { string ref = 1; } docker-containerd-tags-docker-17.12.1/api/services/diff/000077500000000000000000000000001322771672400227765ustar00rootroot00000000000000docker-containerd-tags-docker-17.12.1/api/services/diff/v1/000077500000000000000000000000001322771672400233245ustar00rootroot00000000000000docker-containerd-tags-docker-17.12.1/api/services/diff/v1/diff.pb.go000066400000000000000000000774751322771672400252070ustar00rootroot00000000000000// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/containerd/containerd/api/services/diff/v1/diff.proto /* Package diff is a generated protocol buffer package. It is generated from these files: github.com/containerd/containerd/api/services/diff/v1/diff.proto It has these top-level messages: ApplyRequest ApplyResponse DiffRequest DiffResponse */ package diff import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" // skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto" import containerd_types "github.com/containerd/containerd/api/types" import containerd_types1 "github.com/containerd/containerd/api/types" import ( context "golang.org/x/net/context" grpc "google.golang.org/grpc" ) import strings "strings" import reflect "reflect" import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" import io "io" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package type ApplyRequest struct { // Diff is the descriptor of the diff to be extracted Diff *containerd_types1.Descriptor `protobuf:"bytes,1,opt,name=diff" json:"diff,omitempty"` Mounts []*containerd_types.Mount `protobuf:"bytes,2,rep,name=mounts" json:"mounts,omitempty"` } func (m *ApplyRequest) Reset() { *m = ApplyRequest{} } func (*ApplyRequest) ProtoMessage() {} func (*ApplyRequest) Descriptor() ([]byte, []int) { return fileDescriptorDiff, []int{0} } type ApplyResponse struct { // Applied is the descriptor for the object which was applied. // If the input was a compressed blob then the result will be // the descriptor for the uncompressed blob. Applied *containerd_types1.Descriptor `protobuf:"bytes,1,opt,name=applied" json:"applied,omitempty"` } func (m *ApplyResponse) Reset() { *m = ApplyResponse{} } func (*ApplyResponse) ProtoMessage() {} func (*ApplyResponse) Descriptor() ([]byte, []int) { return fileDescriptorDiff, []int{1} } type DiffRequest struct { // Left are the mounts which represent the older copy // in which is the base of the computed changes. Left []*containerd_types.Mount `protobuf:"bytes,1,rep,name=left" json:"left,omitempty"` // Right are the mounts which represents the newer copy // in which changes from the left were made into. Right []*containerd_types.Mount `protobuf:"bytes,2,rep,name=right" json:"right,omitempty"` // MediaType is the media type descriptor for the created diff // object MediaType string `protobuf:"bytes,3,opt,name=media_type,json=mediaType,proto3" json:"media_type,omitempty"` // Ref identifies the pre-commit content store object. This // reference can be used to get the status from the content store. Ref string `protobuf:"bytes,4,opt,name=ref,proto3" json:"ref,omitempty"` // Labels are the labels to apply to the generated content // on content store commit. Labels map[string]string `protobuf:"bytes,5,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (m *DiffRequest) Reset() { *m = DiffRequest{} } func (*DiffRequest) ProtoMessage() {} func (*DiffRequest) Descriptor() ([]byte, []int) { return fileDescriptorDiff, []int{2} } type DiffResponse struct { // Diff is the descriptor of the diff which can be applied Diff *containerd_types1.Descriptor `protobuf:"bytes,3,opt,name=diff" json:"diff,omitempty"` } func (m *DiffResponse) Reset() { *m = DiffResponse{} } func (*DiffResponse) ProtoMessage() {} func (*DiffResponse) Descriptor() ([]byte, []int) { return fileDescriptorDiff, []int{3} } func init() { proto.RegisterType((*ApplyRequest)(nil), "containerd.services.diff.v1.ApplyRequest") proto.RegisterType((*ApplyResponse)(nil), "containerd.services.diff.v1.ApplyResponse") proto.RegisterType((*DiffRequest)(nil), "containerd.services.diff.v1.DiffRequest") proto.RegisterType((*DiffResponse)(nil), "containerd.services.diff.v1.DiffResponse") } // Reference imports to suppress errors if they are not otherwise used. var _ context.Context var _ grpc.ClientConn // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 // Client API for Diff service type DiffClient interface { // Apply applies the content associated with the provided digests onto // the provided mounts. Archive content will be extracted and // decompressed if necessary. Apply(ctx context.Context, in *ApplyRequest, opts ...grpc.CallOption) (*ApplyResponse, error) // Diff creates a diff between the given mounts and uploads the result // to the content store. Diff(ctx context.Context, in *DiffRequest, opts ...grpc.CallOption) (*DiffResponse, error) } type diffClient struct { cc *grpc.ClientConn } func NewDiffClient(cc *grpc.ClientConn) DiffClient { return &diffClient{cc} } func (c *diffClient) Apply(ctx context.Context, in *ApplyRequest, opts ...grpc.CallOption) (*ApplyResponse, error) { out := new(ApplyResponse) err := grpc.Invoke(ctx, "/containerd.services.diff.v1.Diff/Apply", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *diffClient) Diff(ctx context.Context, in *DiffRequest, opts ...grpc.CallOption) (*DiffResponse, error) { out := new(DiffResponse) err := grpc.Invoke(ctx, "/containerd.services.diff.v1.Diff/Diff", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } // Server API for Diff service type DiffServer interface { // Apply applies the content associated with the provided digests onto // the provided mounts. Archive content will be extracted and // decompressed if necessary. Apply(context.Context, *ApplyRequest) (*ApplyResponse, error) // Diff creates a diff between the given mounts and uploads the result // to the content store. Diff(context.Context, *DiffRequest) (*DiffResponse, error) } func RegisterDiffServer(s *grpc.Server, srv DiffServer) { s.RegisterService(&_Diff_serviceDesc, srv) } func _Diff_Apply_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ApplyRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(DiffServer).Apply(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.diff.v1.Diff/Apply", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DiffServer).Apply(ctx, req.(*ApplyRequest)) } return interceptor(ctx, in, info, handler) } func _Diff_Diff_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DiffRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(DiffServer).Diff(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.diff.v1.Diff/Diff", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DiffServer).Diff(ctx, req.(*DiffRequest)) } return interceptor(ctx, in, info, handler) } var _Diff_serviceDesc = grpc.ServiceDesc{ ServiceName: "containerd.services.diff.v1.Diff", HandlerType: (*DiffServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Apply", Handler: _Diff_Apply_Handler, }, { MethodName: "Diff", Handler: _Diff_Diff_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "github.com/containerd/containerd/api/services/diff/v1/diff.proto", } func (m *ApplyRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ApplyRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if m.Diff != nil { dAtA[i] = 0xa i++ i = encodeVarintDiff(dAtA, i, uint64(m.Diff.Size())) n1, err := m.Diff.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n1 } if len(m.Mounts) > 0 { for _, msg := range m.Mounts { dAtA[i] = 0x12 i++ i = encodeVarintDiff(dAtA, i, uint64(msg.Size())) n, err := msg.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n } } return i, nil } func (m *ApplyResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ApplyResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if m.Applied != nil { dAtA[i] = 0xa i++ i = encodeVarintDiff(dAtA, i, uint64(m.Applied.Size())) n2, err := m.Applied.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n2 } return i, nil } func (m *DiffRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *DiffRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Left) > 0 { for _, msg := range m.Left { dAtA[i] = 0xa i++ i = encodeVarintDiff(dAtA, i, uint64(msg.Size())) n, err := msg.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n } } if len(m.Right) > 0 { for _, msg := range m.Right { dAtA[i] = 0x12 i++ i = encodeVarintDiff(dAtA, i, uint64(msg.Size())) n, err := msg.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n } } if len(m.MediaType) > 0 { dAtA[i] = 0x1a i++ i = encodeVarintDiff(dAtA, i, uint64(len(m.MediaType))) i += copy(dAtA[i:], m.MediaType) } if len(m.Ref) > 0 { dAtA[i] = 0x22 i++ i = encodeVarintDiff(dAtA, i, uint64(len(m.Ref))) i += copy(dAtA[i:], m.Ref) } if len(m.Labels) > 0 { for k, _ := range m.Labels { dAtA[i] = 0x2a i++ v := m.Labels[k] mapSize := 1 + len(k) + sovDiff(uint64(len(k))) + 1 + len(v) + sovDiff(uint64(len(v))) i = encodeVarintDiff(dAtA, i, uint64(mapSize)) dAtA[i] = 0xa i++ i = encodeVarintDiff(dAtA, i, uint64(len(k))) i += copy(dAtA[i:], k) dAtA[i] = 0x12 i++ i = encodeVarintDiff(dAtA, i, uint64(len(v))) i += copy(dAtA[i:], v) } } return i, nil } func (m *DiffResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *DiffResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if m.Diff != nil { dAtA[i] = 0x1a i++ i = encodeVarintDiff(dAtA, i, uint64(m.Diff.Size())) n3, err := m.Diff.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n3 } return i, nil } func encodeVarintDiff(dAtA []byte, offset int, v uint64) int { for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return offset + 1 } func (m *ApplyRequest) Size() (n int) { var l int _ = l if m.Diff != nil { l = m.Diff.Size() n += 1 + l + sovDiff(uint64(l)) } if len(m.Mounts) > 0 { for _, e := range m.Mounts { l = e.Size() n += 1 + l + sovDiff(uint64(l)) } } return n } func (m *ApplyResponse) Size() (n int) { var l int _ = l if m.Applied != nil { l = m.Applied.Size() n += 1 + l + sovDiff(uint64(l)) } return n } func (m *DiffRequest) Size() (n int) { var l int _ = l if len(m.Left) > 0 { for _, e := range m.Left { l = e.Size() n += 1 + l + sovDiff(uint64(l)) } } if len(m.Right) > 0 { for _, e := range m.Right { l = e.Size() n += 1 + l + sovDiff(uint64(l)) } } l = len(m.MediaType) if l > 0 { n += 1 + l + sovDiff(uint64(l)) } l = len(m.Ref) if l > 0 { n += 1 + l + sovDiff(uint64(l)) } if len(m.Labels) > 0 { for k, v := range m.Labels { _ = k _ = v mapEntrySize := 1 + len(k) + sovDiff(uint64(len(k))) + 1 + len(v) + sovDiff(uint64(len(v))) n += mapEntrySize + 1 + sovDiff(uint64(mapEntrySize)) } } return n } func (m *DiffResponse) Size() (n int) { var l int _ = l if m.Diff != nil { l = m.Diff.Size() n += 1 + l + sovDiff(uint64(l)) } return n } func sovDiff(x uint64) (n int) { for { n++ x >>= 7 if x == 0 { break } } return n } func sozDiff(x uint64) (n int) { return sovDiff(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (this *ApplyRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&ApplyRequest{`, `Diff:` + strings.Replace(fmt.Sprintf("%v", this.Diff), "Descriptor", "containerd_types1.Descriptor", 1) + `,`, `Mounts:` + strings.Replace(fmt.Sprintf("%v", this.Mounts), "Mount", "containerd_types.Mount", 1) + `,`, `}`, }, "") return s } func (this *ApplyResponse) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&ApplyResponse{`, `Applied:` + strings.Replace(fmt.Sprintf("%v", this.Applied), "Descriptor", "containerd_types1.Descriptor", 1) + `,`, `}`, }, "") return s } func (this *DiffRequest) String() string { if this == nil { return "nil" } keysForLabels := make([]string, 0, len(this.Labels)) for k, _ := range this.Labels { keysForLabels = append(keysForLabels, k) } github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) mapStringForLabels := "map[string]string{" for _, k := range keysForLabels { mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) } mapStringForLabels += "}" s := strings.Join([]string{`&DiffRequest{`, `Left:` + strings.Replace(fmt.Sprintf("%v", this.Left), "Mount", "containerd_types.Mount", 1) + `,`, `Right:` + strings.Replace(fmt.Sprintf("%v", this.Right), "Mount", "containerd_types.Mount", 1) + `,`, `MediaType:` + fmt.Sprintf("%v", this.MediaType) + `,`, `Ref:` + fmt.Sprintf("%v", this.Ref) + `,`, `Labels:` + mapStringForLabels + `,`, `}`, }, "") return s } func (this *DiffResponse) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&DiffResponse{`, `Diff:` + strings.Replace(fmt.Sprintf("%v", this.Diff), "Descriptor", "containerd_types1.Descriptor", 1) + `,`, `}`, }, "") return s } func valueToStringDiff(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { return "nil" } pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } func (m *ApplyRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDiff } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ApplyRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ApplyRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Diff", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDiff } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthDiff } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Diff == nil { m.Diff = &containerd_types1.Descriptor{} } if err := m.Diff.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Mounts", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDiff } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthDiff } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } m.Mounts = append(m.Mounts, &containerd_types.Mount{}) if err := m.Mounts[len(m.Mounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipDiff(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthDiff } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ApplyResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDiff } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ApplyResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ApplyResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Applied", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDiff } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthDiff } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Applied == nil { m.Applied = &containerd_types1.Descriptor{} } if err := m.Applied.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipDiff(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthDiff } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *DiffRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDiff } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: DiffRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: DiffRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDiff } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthDiff } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } m.Left = append(m.Left, &containerd_types.Mount{}) if err := m.Left[len(m.Left)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDiff } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthDiff } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } m.Right = append(m.Right, &containerd_types.Mount{}) if err := m.Right[len(m.Right)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MediaType", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDiff } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthDiff } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.MediaType = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Ref", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDiff } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthDiff } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Ref = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDiff } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthDiff } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Labels == nil { m.Labels = make(map[string]string) } var mapkey string var mapvalue string for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDiff } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDiff } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapkey |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { return ErrInvalidLengthDiff } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var stringLenmapvalue uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDiff } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapvalue |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLenmapvalue := int(stringLenmapvalue) if intStringLenmapvalue < 0 { return ErrInvalidLengthDiff } postStringIndexmapvalue := iNdEx + intStringLenmapvalue if postStringIndexmapvalue > l { return io.ErrUnexpectedEOF } mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) iNdEx = postStringIndexmapvalue } else { iNdEx = entryPreIndex skippy, err := skipDiff(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthDiff } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.Labels[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipDiff(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthDiff } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *DiffResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDiff } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: DiffResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: DiffResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Diff", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDiff } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthDiff } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Diff == nil { m.Diff = &containerd_types1.Descriptor{} } if err := m.Diff.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipDiff(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthDiff } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipDiff(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowDiff } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } wireType := int(wire & 0x7) switch wireType { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowDiff } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } iNdEx++ if dAtA[iNdEx-1] < 0x80 { break } } return iNdEx, nil case 1: iNdEx += 8 return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowDiff } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ length |= (int(b) & 0x7F) << shift if b < 0x80 { break } } iNdEx += length if length < 0 { return 0, ErrInvalidLengthDiff } return iNdEx, nil case 3: for { var innerWire uint64 var start int = iNdEx for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowDiff } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ innerWire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } innerWireType := int(innerWire & 0x7) if innerWireType == 4 { break } next, err := skipDiff(dAtA[start:]) if err != nil { return 0, err } iNdEx = start + next } return iNdEx, nil case 4: return iNdEx, nil case 5: iNdEx += 4 return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } } panic("unreachable") } var ( ErrInvalidLengthDiff = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowDiff = fmt.Errorf("proto: integer overflow") ) func init() { proto.RegisterFile("github.com/containerd/containerd/api/services/diff/v1/diff.proto", fileDescriptorDiff) } var fileDescriptorDiff = []byte{ // 457 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x53, 0x4f, 0x6f, 0xd3, 0x30, 0x14, 0xaf, 0xfb, 0x0f, 0xf5, 0x75, 0x48, 0xc8, 0x9a, 0x44, 0x14, 0x20, 0xaa, 0x7a, 0xea, 0x40, 0x38, 0xac, 0xa0, 0x09, 0xb6, 0xcb, 0x40, 0x43, 0x5c, 0xc6, 0x25, 0xda, 0x01, 0x81, 0x04, 0x4a, 0x9b, 0x97, 0xce, 0x22, 0x8d, 0xbd, 0xd8, 0xad, 0x94, 0x1b, 0xdf, 0x85, 0x8f, 0xc2, 0x65, 0x47, 0x8e, 0x1c, 0x69, 0x3f, 0x09, 0xb2, 0x93, 0x40, 0x24, 0xa4, 0x12, 0x76, 0xca, 0xcb, 0xf3, 0xef, 0x9f, 0xfd, 0x6c, 0x38, 0x5d, 0x70, 0x7d, 0xb9, 0x9a, 0xb1, 0xb9, 0x58, 0xfa, 0x73, 0x91, 0xea, 0x90, 0xa7, 0x98, 0x45, 0xf5, 0x32, 0x94, 0xdc, 0x57, 0x98, 0xad, 0xf9, 0x1c, 0x95, 0x1f, 0xf1, 0x38, 0xf6, 0xd7, 0x87, 0xf6, 0xcb, 0x64, 0x26, 0xb4, 0xa0, 0xf7, 0xfe, 0x60, 0x59, 0x85, 0x63, 0x76, 0x7d, 0x7d, 0xe8, 0xee, 0x2f, 0xc4, 0x42, 0x58, 0x9c, 0x6f, 0xaa, 0x82, 0xe2, 0x1e, 0x35, 0x32, 0xd5, 0xb9, 0x44, 0xe5, 0x2f, 0xc5, 0x2a, 0xd5, 0x25, 0xef, 0xe4, 0x3f, 0x78, 0x11, 0xaa, 0x79, 0xc6, 0xa5, 0x16, 0x59, 0x41, 0x1e, 0x5f, 0xc1, 0xde, 0x4b, 0x29, 0x93, 0x3c, 0xc0, 0xab, 0x15, 0x2a, 0x4d, 0x9f, 0x40, 0xd7, 0xa4, 0x74, 0xc8, 0x88, 0x4c, 0x86, 0xd3, 0xfb, 0xac, 0xb6, 0x0d, 0xab, 0xc0, 0xce, 0x7e, 0x2b, 0x04, 0x16, 0x49, 0x7d, 0xe8, 0xdb, 0x34, 0xca, 0x69, 0x8f, 0x3a, 0x93, 0xe1, 0xf4, 0xee, 0xdf, 0x9c, 0xb7, 0x66, 0x3d, 0x28, 0x61, 0xe3, 0x37, 0x70, 0xbb, 0xb4, 0x54, 0x52, 0xa4, 0x0a, 0xe9, 0x11, 0xdc, 0x0a, 0xa5, 0x4c, 0x38, 0x46, 0x8d, 0x6c, 0x2b, 0xf0, 0xf8, 0x6b, 0x1b, 0x86, 0x67, 0x3c, 0x8e, 0xab, 0xec, 0x8f, 0xa0, 0x9b, 0x60, 0xac, 0x1d, 0xb2, 0x3b, 0x87, 0x05, 0xd1, 0xc7, 0xd0, 0xcb, 0xf8, 0xe2, 0x52, 0xff, 0x2b, 0x75, 0x81, 0xa2, 0x0f, 0x00, 0x96, 0x18, 0xf1, 0xf0, 0x93, 0x59, 0x73, 0x3a, 0x23, 0x32, 0x19, 0x04, 0x03, 0xdb, 0xb9, 0xc8, 0x25, 0xd2, 0x3b, 0xd0, 0xc9, 0x30, 0x76, 0xba, 0xb6, 0x6f, 0x4a, 0x7a, 0x0e, 0xfd, 0x24, 0x9c, 0x61, 0xa2, 0x9c, 0x9e, 0x35, 0x78, 0xc6, 0x76, 0xdc, 0x08, 0x56, 0xdb, 0x06, 0x3b, 0xb7, 0xb4, 0xd7, 0xa9, 0xce, 0xf2, 0xa0, 0xd4, 0x70, 0x5f, 0xc0, 0xb0, 0xd6, 0x36, 0x76, 0x9f, 0x31, 0xb7, 0xa7, 0x35, 0x08, 0x4c, 0x49, 0xf7, 0xa1, 0xb7, 0x0e, 0x93, 0x15, 0x3a, 0x6d, 0xdb, 0x2b, 0x7e, 0x8e, 0xdb, 0xcf, 0xc9, 0xf8, 0x14, 0xf6, 0x0a, 0xf5, 0xf2, 0xb4, 0xab, 0x09, 0x77, 0x9a, 0x4e, 0x78, 0xfa, 0x8d, 0x40, 0xd7, 0x48, 0xd0, 0x8f, 0xd0, 0xb3, 0x93, 0xa3, 0x07, 0x3b, 0x37, 0x53, 0xbf, 0x50, 0xee, 0xc3, 0x26, 0xd0, 0x32, 0xda, 0x87, 0xd2, 0x67, 0xd2, 0xf4, 0xac, 0xdc, 0x83, 0x06, 0xc8, 0x42, 0xfc, 0xd5, 0xc5, 0xf5, 0xc6, 0x6b, 0xfd, 0xd8, 0x78, 0xad, 0x2f, 0x5b, 0x8f, 0x5c, 0x6f, 0x3d, 0xf2, 0x7d, 0xeb, 0x91, 0x9f, 0x5b, 0x8f, 0xbc, 0x3f, 0xbe, 0xd1, 0x6b, 0x3f, 0x31, 0xdf, 0x77, 0xad, 0x59, 0xdf, 0x3e, 0xa4, 0xa7, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0x61, 0xd1, 0x6e, 0x9e, 0x34, 0x04, 0x00, 0x00, } docker-containerd-tags-docker-17.12.1/api/services/diff/v1/diff.proto000066400000000000000000000036531322771672400253300ustar00rootroot00000000000000syntax = "proto3"; package containerd.services.diff.v1; import weak "gogoproto/gogo.proto"; import "github.com/containerd/containerd/api/types/mount.proto"; import "github.com/containerd/containerd/api/types/descriptor.proto"; option go_package = "github.com/containerd/containerd/api/services/diff/v1;diff"; // Diff service creates and applies diffs service Diff { // Apply applies the content associated with the provided digests onto // the provided mounts. Archive content will be extracted and // decompressed if necessary. rpc Apply(ApplyRequest) returns (ApplyResponse); // Diff creates a diff between the given mounts and uploads the result // to the content store. rpc Diff(DiffRequest) returns (DiffResponse); } message ApplyRequest { // Diff is the descriptor of the diff to be extracted containerd.types.Descriptor diff = 1; repeated containerd.types.Mount mounts = 2; } message ApplyResponse { // Applied is the descriptor for the object which was applied. // If the input was a compressed blob then the result will be // the descriptor for the uncompressed blob. containerd.types.Descriptor applied = 1; } message DiffRequest { // Left are the mounts which represent the older copy // in which is the base of the computed changes. repeated containerd.types.Mount left = 1; // Right are the mounts which represents the newer copy // in which changes from the left were made into. repeated containerd.types.Mount right = 2; // MediaType is the media type descriptor for the created diff // object string media_type = 3; // Ref identifies the pre-commit content store object. This // reference can be used to get the status from the content store. string ref = 4; // Labels are the labels to apply to the generated content // on content store commit. map labels = 5; } message DiffResponse { // Diff is the descriptor of the diff which can be applied containerd.types.Descriptor diff = 3; } docker-containerd-tags-docker-17.12.1/api/services/events/000077500000000000000000000000001322771672400233725ustar00rootroot00000000000000docker-containerd-tags-docker-17.12.1/api/services/events/v1/000077500000000000000000000000001322771672400237205ustar00rootroot00000000000000docker-containerd-tags-docker-17.12.1/api/services/events/v1/doc.go000066400000000000000000000001251322771672400250120ustar00rootroot00000000000000// Package events defines the event pushing and subscription service. package events docker-containerd-tags-docker-17.12.1/api/services/events/v1/events.pb.go000066400000000000000000000752631322771672400261700ustar00rootroot00000000000000// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/containerd/containerd/api/services/events/v1/events.proto /* Package events is a generated protocol buffer package. It is generated from these files: github.com/containerd/containerd/api/services/events/v1/events.proto It has these top-level messages: PublishRequest ForwardRequest SubscribeRequest Envelope */ package events import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" // skipping weak import containerd_plugin "github.com/containerd/containerd/protobuf/plugin" // skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto" import google_protobuf1 "github.com/gogo/protobuf/types" import google_protobuf2 "github.com/gogo/protobuf/types" import _ "github.com/gogo/protobuf/types" import time "time" import github_com_containerd_typeurl "github.com/containerd/typeurl" import ( context "golang.org/x/net/context" grpc "google.golang.org/grpc" ) import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" import strings "strings" import reflect "reflect" import io "io" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf var _ = time.Kitchen // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package type PublishRequest struct { Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"` Event *google_protobuf1.Any `protobuf:"bytes,2,opt,name=event" json:"event,omitempty"` } func (m *PublishRequest) Reset() { *m = PublishRequest{} } func (*PublishRequest) ProtoMessage() {} func (*PublishRequest) Descriptor() ([]byte, []int) { return fileDescriptorEvents, []int{0} } type ForwardRequest struct { Envelope *Envelope `protobuf:"bytes,1,opt,name=envelope" json:"envelope,omitempty"` } func (m *ForwardRequest) Reset() { *m = ForwardRequest{} } func (*ForwardRequest) ProtoMessage() {} func (*ForwardRequest) Descriptor() ([]byte, []int) { return fileDescriptorEvents, []int{1} } type SubscribeRequest struct { Filters []string `protobuf:"bytes,1,rep,name=filters" json:"filters,omitempty"` } func (m *SubscribeRequest) Reset() { *m = SubscribeRequest{} } func (*SubscribeRequest) ProtoMessage() {} func (*SubscribeRequest) Descriptor() ([]byte, []int) { return fileDescriptorEvents, []int{2} } type Envelope struct { Timestamp time.Time `protobuf:"bytes,1,opt,name=timestamp,stdtime" json:"timestamp"` Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` Topic string `protobuf:"bytes,3,opt,name=topic,proto3" json:"topic,omitempty"` Event *google_protobuf1.Any `protobuf:"bytes,4,opt,name=event" json:"event,omitempty"` } func (m *Envelope) Reset() { *m = Envelope{} } func (*Envelope) ProtoMessage() {} func (*Envelope) Descriptor() ([]byte, []int) { return fileDescriptorEvents, []int{3} } func init() { proto.RegisterType((*PublishRequest)(nil), "containerd.services.events.v1.PublishRequest") proto.RegisterType((*ForwardRequest)(nil), "containerd.services.events.v1.ForwardRequest") proto.RegisterType((*SubscribeRequest)(nil), "containerd.services.events.v1.SubscribeRequest") proto.RegisterType((*Envelope)(nil), "containerd.services.events.v1.Envelope") } // Field returns the value for the given fieldpath as a string, if defined. // If the value is not defined, the second value will be false. func (m *Envelope) Field(fieldpath []string) (string, bool) { if len(fieldpath) == 0 { return "", false } switch fieldpath[0] { // unhandled: timestamp case "namespace": return string(m.Namespace), len(m.Namespace) > 0 case "topic": return string(m.Topic), len(m.Topic) > 0 case "event": decoded, err := github_com_containerd_typeurl.UnmarshalAny(m.Event) if err != nil { return "", false } adaptor, ok := decoded.(interface { Field([]string) (string, bool) }) if !ok { return "", false } return adaptor.Field(fieldpath[1:]) } return "", false } // Reference imports to suppress errors if they are not otherwise used. var _ context.Context var _ grpc.ClientConn // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 // Client API for Events service type EventsClient interface { // Publish an event to a topic. // // The event will be packed into a timestamp envelope with the namespace // introspected from the context. The envelope will then be dispatched. Publish(ctx context.Context, in *PublishRequest, opts ...grpc.CallOption) (*google_protobuf2.Empty, error) // Forward sends an event that has already been packaged into an envelope // with a timestamp and namespace. // // This is useful if earlier timestamping is required or when fowarding on // behalf of another component, namespace or publisher. Forward(ctx context.Context, in *ForwardRequest, opts ...grpc.CallOption) (*google_protobuf2.Empty, error) // Subscribe to a stream of events, possibly returning only that match any // of the provided filters. // // Unlike many other methods in containerd, subscribers will get messages // from all namespaces unless otherwise specified. If this is not desired, // a filter can be provided in the format 'namespace==' to // restrict the received events. Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (Events_SubscribeClient, error) } type eventsClient struct { cc *grpc.ClientConn } func NewEventsClient(cc *grpc.ClientConn) EventsClient { return &eventsClient{cc} } func (c *eventsClient) Publish(ctx context.Context, in *PublishRequest, opts ...grpc.CallOption) (*google_protobuf2.Empty, error) { out := new(google_protobuf2.Empty) err := grpc.Invoke(ctx, "/containerd.services.events.v1.Events/Publish", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *eventsClient) Forward(ctx context.Context, in *ForwardRequest, opts ...grpc.CallOption) (*google_protobuf2.Empty, error) { out := new(google_protobuf2.Empty) err := grpc.Invoke(ctx, "/containerd.services.events.v1.Events/Forward", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *eventsClient) Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (Events_SubscribeClient, error) { stream, err := grpc.NewClientStream(ctx, &_Events_serviceDesc.Streams[0], c.cc, "/containerd.services.events.v1.Events/Subscribe", opts...) if err != nil { return nil, err } x := &eventsSubscribeClient{stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } if err := x.ClientStream.CloseSend(); err != nil { return nil, err } return x, nil } type Events_SubscribeClient interface { Recv() (*Envelope, error) grpc.ClientStream } type eventsSubscribeClient struct { grpc.ClientStream } func (x *eventsSubscribeClient) Recv() (*Envelope, error) { m := new(Envelope) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } // Server API for Events service type EventsServer interface { // Publish an event to a topic. // // The event will be packed into a timestamp envelope with the namespace // introspected from the context. The envelope will then be dispatched. Publish(context.Context, *PublishRequest) (*google_protobuf2.Empty, error) // Forward sends an event that has already been packaged into an envelope // with a timestamp and namespace. // // This is useful if earlier timestamping is required or when fowarding on // behalf of another component, namespace or publisher. Forward(context.Context, *ForwardRequest) (*google_protobuf2.Empty, error) // Subscribe to a stream of events, possibly returning only that match any // of the provided filters. // // Unlike many other methods in containerd, subscribers will get messages // from all namespaces unless otherwise specified. If this is not desired, // a filter can be provided in the format 'namespace==' to // restrict the received events. Subscribe(*SubscribeRequest, Events_SubscribeServer) error } func RegisterEventsServer(s *grpc.Server, srv EventsServer) { s.RegisterService(&_Events_serviceDesc, srv) } func _Events_Publish_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(PublishRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(EventsServer).Publish(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.events.v1.Events/Publish", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EventsServer).Publish(ctx, req.(*PublishRequest)) } return interceptor(ctx, in, info, handler) } func _Events_Forward_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ForwardRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(EventsServer).Forward(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.events.v1.Events/Forward", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EventsServer).Forward(ctx, req.(*ForwardRequest)) } return interceptor(ctx, in, info, handler) } func _Events_Subscribe_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(SubscribeRequest) if err := stream.RecvMsg(m); err != nil { return err } return srv.(EventsServer).Subscribe(m, &eventsSubscribeServer{stream}) } type Events_SubscribeServer interface { Send(*Envelope) error grpc.ServerStream } type eventsSubscribeServer struct { grpc.ServerStream } func (x *eventsSubscribeServer) Send(m *Envelope) error { return x.ServerStream.SendMsg(m) } var _Events_serviceDesc = grpc.ServiceDesc{ ServiceName: "containerd.services.events.v1.Events", HandlerType: (*EventsServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Publish", Handler: _Events_Publish_Handler, }, { MethodName: "Forward", Handler: _Events_Forward_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Subscribe", Handler: _Events_Subscribe_Handler, ServerStreams: true, }, }, Metadata: "github.com/containerd/containerd/api/services/events/v1/events.proto", } func (m *PublishRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *PublishRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Topic) > 0 { dAtA[i] = 0xa i++ i = encodeVarintEvents(dAtA, i, uint64(len(m.Topic))) i += copy(dAtA[i:], m.Topic) } if m.Event != nil { dAtA[i] = 0x12 i++ i = encodeVarintEvents(dAtA, i, uint64(m.Event.Size())) n1, err := m.Event.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n1 } return i, nil } func (m *ForwardRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ForwardRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if m.Envelope != nil { dAtA[i] = 0xa i++ i = encodeVarintEvents(dAtA, i, uint64(m.Envelope.Size())) n2, err := m.Envelope.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n2 } return i, nil } func (m *SubscribeRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *SubscribeRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Filters) > 0 { for _, s := range m.Filters { dAtA[i] = 0xa i++ l = len(s) for l >= 1<<7 { dAtA[i] = uint8(uint64(l)&0x7f | 0x80) l >>= 7 i++ } dAtA[i] = uint8(l) i++ i += copy(dAtA[i:], s) } } return i, nil } func (m *Envelope) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Envelope) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l dAtA[i] = 0xa i++ i = encodeVarintEvents(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp))) n3, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i:]) if err != nil { return 0, err } i += n3 if len(m.Namespace) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintEvents(dAtA, i, uint64(len(m.Namespace))) i += copy(dAtA[i:], m.Namespace) } if len(m.Topic) > 0 { dAtA[i] = 0x1a i++ i = encodeVarintEvents(dAtA, i, uint64(len(m.Topic))) i += copy(dAtA[i:], m.Topic) } if m.Event != nil { dAtA[i] = 0x22 i++ i = encodeVarintEvents(dAtA, i, uint64(m.Event.Size())) n4, err := m.Event.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n4 } return i, nil } func encodeVarintEvents(dAtA []byte, offset int, v uint64) int { for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return offset + 1 } func (m *PublishRequest) Size() (n int) { var l int _ = l l = len(m.Topic) if l > 0 { n += 1 + l + sovEvents(uint64(l)) } if m.Event != nil { l = m.Event.Size() n += 1 + l + sovEvents(uint64(l)) } return n } func (m *ForwardRequest) Size() (n int) { var l int _ = l if m.Envelope != nil { l = m.Envelope.Size() n += 1 + l + sovEvents(uint64(l)) } return n } func (m *SubscribeRequest) Size() (n int) { var l int _ = l if len(m.Filters) > 0 { for _, s := range m.Filters { l = len(s) n += 1 + l + sovEvents(uint64(l)) } } return n } func (m *Envelope) Size() (n int) { var l int _ = l l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) n += 1 + l + sovEvents(uint64(l)) l = len(m.Namespace) if l > 0 { n += 1 + l + sovEvents(uint64(l)) } l = len(m.Topic) if l > 0 { n += 1 + l + sovEvents(uint64(l)) } if m.Event != nil { l = m.Event.Size() n += 1 + l + sovEvents(uint64(l)) } return n } func sovEvents(x uint64) (n int) { for { n++ x >>= 7 if x == 0 { break } } return n } func sozEvents(x uint64) (n int) { return sovEvents(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (this *PublishRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&PublishRequest{`, `Topic:` + fmt.Sprintf("%v", this.Topic) + `,`, `Event:` + strings.Replace(fmt.Sprintf("%v", this.Event), "Any", "google_protobuf1.Any", 1) + `,`, `}`, }, "") return s } func (this *ForwardRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&ForwardRequest{`, `Envelope:` + strings.Replace(fmt.Sprintf("%v", this.Envelope), "Envelope", "Envelope", 1) + `,`, `}`, }, "") return s } func (this *SubscribeRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&SubscribeRequest{`, `Filters:` + fmt.Sprintf("%v", this.Filters) + `,`, `}`, }, "") return s } func (this *Envelope) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&Envelope{`, `Timestamp:` + strings.Replace(strings.Replace(this.Timestamp.String(), "Timestamp", "google_protobuf3.Timestamp", 1), `&`, ``, 1) + `,`, `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, `Topic:` + fmt.Sprintf("%v", this.Topic) + `,`, `Event:` + strings.Replace(fmt.Sprintf("%v", this.Event), "Any", "google_protobuf1.Any", 1) + `,`, `}`, }, "") return s } func valueToStringEvents(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { return "nil" } pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } func (m *PublishRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: PublishRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: PublishRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Topic", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Topic = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Event", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthEvents } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Event == nil { m.Event = &google_protobuf1.Any{} } if err := m.Event.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvents(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthEvents } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ForwardRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ForwardRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ForwardRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Envelope", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthEvents } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Envelope == nil { m.Envelope = &Envelope{} } if err := m.Envelope.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvents(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthEvents } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *SubscribeRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: SubscribeRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: SubscribeRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Filters", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Filters = append(m.Filters, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvents(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthEvents } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Envelope) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Envelope: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Envelope: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthEvents } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Namespace = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Topic", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthEvents } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Topic = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Event", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowEvents } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthEvents } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Event == nil { m.Event = &google_protobuf1.Any{} } if err := m.Event.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvents(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthEvents } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipEvents(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowEvents } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } wireType := int(wire & 0x7) switch wireType { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowEvents } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } iNdEx++ if dAtA[iNdEx-1] < 0x80 { break } } return iNdEx, nil case 1: iNdEx += 8 return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowEvents } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ length |= (int(b) & 0x7F) << shift if b < 0x80 { break } } iNdEx += length if length < 0 { return 0, ErrInvalidLengthEvents } return iNdEx, nil case 3: for { var innerWire uint64 var start int = iNdEx for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowEvents } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ innerWire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } innerWireType := int(innerWire & 0x7) if innerWireType == 4 { break } next, err := skipEvents(dAtA[start:]) if err != nil { return 0, err } iNdEx = start + next } return iNdEx, nil case 4: return iNdEx, nil case 5: iNdEx += 4 return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } } panic("unreachable") } var ( ErrInvalidLengthEvents = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowEvents = fmt.Errorf("proto: integer overflow") ) func init() { proto.RegisterFile("github.com/containerd/containerd/api/services/events/v1/events.proto", fileDescriptorEvents) } var fileDescriptorEvents = []byte{ // 466 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x93, 0xcd, 0x8e, 0xd3, 0x30, 0x14, 0x85, 0xeb, 0xf9, 0x6d, 0x3c, 0xd2, 0x08, 0x45, 0x15, 0x2a, 0x01, 0xd2, 0xaa, 0x1b, 0x2a, 0x04, 0x0e, 0x53, 0x76, 0x20, 0x21, 0x28, 0x94, 0xf5, 0x28, 0x80, 0x54, 0xb1, 0x4b, 0xd2, 0xdb, 0xd4, 0x52, 0x62, 0x9b, 0xd8, 0x09, 0x9a, 0xdd, 0x3c, 0x02, 0x1b, 0xde, 0x84, 0x0d, 0x6f, 0xd0, 0x25, 0x4b, 0x56, 0xc0, 0xf4, 0x49, 0x50, 0x13, 0xbb, 0x61, 0x3a, 0x40, 0x10, 0xbb, 0x6b, 0xdf, 0xe3, 0xcf, 0xb9, 0xe7, 0x38, 0xf8, 0x45, 0x4c, 0xd5, 0x22, 0x0f, 0x49, 0xc4, 0x53, 0x2f, 0xe2, 0x4c, 0x05, 0x94, 0x41, 0x36, 0xfb, 0xb5, 0x0c, 0x04, 0xf5, 0x24, 0x64, 0x05, 0x8d, 0x40, 0x7a, 0x50, 0x00, 0x53, 0xd2, 0x2b, 0x4e, 0x74, 0x45, 0x44, 0xc6, 0x15, 0xb7, 0x6f, 0xd7, 0x7a, 0x62, 0xb4, 0x44, 0x2b, 0x8a, 0x13, 0xe7, 0x69, 0xe3, 0x25, 0x25, 0x26, 0xcc, 0xe7, 0x9e, 0x48, 0xf2, 0x98, 0x32, 0x6f, 0x4e, 0x21, 0x99, 0x89, 0x40, 0x2d, 0xaa, 0x0b, 0x9c, 0x4e, 0xcc, 0x63, 0x5e, 0x96, 0xde, 0xba, 0xd2, 0xbb, 0x37, 0x62, 0xce, 0xe3, 0x04, 0xea, 0xd3, 0x01, 0x3b, 0xd3, 0xad, 0x9b, 0xdb, 0x2d, 0x48, 0x85, 0x32, 0xcd, 0xde, 0x76, 0x53, 0xd1, 0x14, 0xa4, 0x0a, 0x52, 0x51, 0x09, 0x06, 0x3e, 0x3e, 0x3e, 0xcd, 0xc3, 0x84, 0xca, 0x85, 0x0f, 0xef, 0x72, 0x90, 0xca, 0xee, 0xe0, 0x7d, 0xc5, 0x05, 0x8d, 0xba, 0xa8, 0x8f, 0x86, 0x96, 0x5f, 0x2d, 0xec, 0xbb, 0x78, 0xbf, 0x9c, 0xb2, 0xbb, 0xd3, 0x47, 0xc3, 0xa3, 0x51, 0x87, 0x54, 0x60, 0x62, 0xc0, 0xe4, 0x19, 0x3b, 0xf3, 0x2b, 0xc9, 0xe0, 0x0d, 0x3e, 0x7e, 0xc9, 0xb3, 0xf7, 0x41, 0x36, 0x33, 0xcc, 0xe7, 0xb8, 0x0d, 0xac, 0x80, 0x84, 0x0b, 0x28, 0xb1, 0x47, 0xa3, 0x3b, 0xe4, 0xaf, 0x46, 0x92, 0x89, 0x96, 0xfb, 0x9b, 0x83, 0x83, 0x7b, 0xf8, 0xda, 0xab, 0x3c, 0x94, 0x51, 0x46, 0x43, 0x30, 0xe0, 0x2e, 0x3e, 0x9c, 0xd3, 0x44, 0x41, 0x26, 0xbb, 0xa8, 0xbf, 0x3b, 0xb4, 0x7c, 0xb3, 0x1c, 0x7c, 0x42, 0xb8, 0x6d, 0x20, 0xf6, 0x18, 0x5b, 0x9b, 0xc1, 0xf5, 0x07, 0x38, 0x57, 0x26, 0x78, 0x6d, 0x14, 0xe3, 0xf6, 0xf2, 0x5b, 0xaf, 0xf5, 0xe1, 0x7b, 0x0f, 0xf9, 0xf5, 0x31, 0xfb, 0x16, 0xb6, 0x58, 0x90, 0x82, 0x14, 0x41, 0x04, 0xa5, 0x0b, 0x96, 0x5f, 0x6f, 0xd4, 0xae, 0xed, 0xfe, 0xd6, 0xb5, 0xbd, 0x46, 0xd7, 0x1e, 0xed, 0x9d, 0x7f, 0xee, 0xa1, 0xd1, 0xc7, 0x1d, 0x7c, 0x30, 0x29, 0x5d, 0xb0, 0x4f, 0xf1, 0xa1, 0x8e, 0xc6, 0xbe, 0xdf, 0xe0, 0xd6, 0xe5, 0x08, 0x9d, 0xeb, 0x57, 0xee, 0x99, 0xac, 0xdf, 0xc4, 0x9a, 0xa8, 0x83, 0x69, 0x24, 0x5e, 0x0e, 0xf0, 0x8f, 0xc4, 0x18, 0x5b, 0x9b, 0x4c, 0x6c, 0xaf, 0x81, 0xb9, 0x9d, 0x9e, 0xf3, 0xaf, 0x8f, 0xe0, 0x01, 0x1a, 0x4f, 0x97, 0x17, 0x6e, 0xeb, 0xeb, 0x85, 0xdb, 0x3a, 0x5f, 0xb9, 0x68, 0xb9, 0x72, 0xd1, 0x97, 0x95, 0x8b, 0x7e, 0xac, 0x5c, 0xf4, 0xf6, 0xc9, 0x7f, 0xfe, 0xd7, 0x8f, 0xab, 0x6a, 0xda, 0x9a, 0xa2, 0xf0, 0xa0, 0x1c, 0xeb, 0xe1, 0xcf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe6, 0xbf, 0x19, 0xa6, 0x24, 0x04, 0x00, 0x00, } docker-containerd-tags-docker-17.12.1/api/services/events/v1/events.proto000066400000000000000000000034301322771672400263110ustar00rootroot00000000000000syntax = "proto3"; package containerd.services.events.v1; import weak "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto"; import weak "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; option go_package = "github.com/containerd/containerd/api/services/events/v1;events"; service Events { // Publish an event to a topic. // // The event will be packed into a timestamp envelope with the namespace // introspected from the context. The envelope will then be dispatched. rpc Publish(PublishRequest) returns (google.protobuf.Empty); // Forward sends an event that has already been packaged into an envelope // with a timestamp and namespace. // // This is useful if earlier timestamping is required or when fowarding on // behalf of another component, namespace or publisher. rpc Forward(ForwardRequest) returns (google.protobuf.Empty); // Subscribe to a stream of events, possibly returning only that match any // of the provided filters. // // Unlike many other methods in containerd, subscribers will get messages // from all namespaces unless otherwise specified. If this is not desired, // a filter can be provided in the format 'namespace==' to // restrict the received events. rpc Subscribe(SubscribeRequest) returns (stream Envelope); } message PublishRequest { string topic = 1; google.protobuf.Any event = 2; } message ForwardRequest { Envelope envelope = 1; } message SubscribeRequest { repeated string filters = 1; } message Envelope { option (containerd.plugin.fieldpath) = true; google.protobuf.Timestamp timestamp = 1 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; string namespace = 2; string topic = 3; google.protobuf.Any event = 4; } docker-containerd-tags-docker-17.12.1/api/services/images/000077500000000000000000000000001322771672400233335ustar00rootroot00000000000000docker-containerd-tags-docker-17.12.1/api/services/images/v1/000077500000000000000000000000001322771672400236615ustar00rootroot00000000000000docker-containerd-tags-docker-17.12.1/api/services/images/v1/docs.go000066400000000000000000000000171322771672400251360ustar00rootroot00000000000000package images docker-containerd-tags-docker-17.12.1/api/services/images/v1/images.pb.go000066400000000000000000001603321322771672400260620ustar00rootroot00000000000000// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/containerd/containerd/api/services/images/v1/images.proto /* Package images is a generated protocol buffer package. It is generated from these files: github.com/containerd/containerd/api/services/images/v1/images.proto It has these top-level messages: Image GetImageRequest GetImageResponse CreateImageRequest CreateImageResponse UpdateImageRequest UpdateImageResponse ListImagesRequest ListImagesResponse DeleteImageRequest */ package images import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" // skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto" import google_protobuf1 "github.com/gogo/protobuf/types" import google_protobuf2 "github.com/gogo/protobuf/types" import _ "github.com/gogo/protobuf/types" import containerd_types "github.com/containerd/containerd/api/types" import time "time" import ( context "golang.org/x/net/context" grpc "google.golang.org/grpc" ) import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" import strings "strings" import reflect "reflect" import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" import io "io" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf var _ = time.Kitchen // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package type Image struct { // Name provides a unique name for the image. // // Containerd treats this as the primary identifier. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Labels provides free form labels for the image. These are runtime only // and do not get inherited into the package image in any way. // // Labels may be updated using the field mask. // The combined size of a key/value pair cannot exceed 4096 bytes. Labels map[string]string `protobuf:"bytes,2,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Target describes the content entry point of the image. Target containerd_types.Descriptor `protobuf:"bytes,3,opt,name=target" json:"target"` // CreatedAt is the time the image was first created. CreatedAt time.Time `protobuf:"bytes,7,opt,name=created_at,json=createdAt,stdtime" json:"created_at"` // UpdatedAt is the last time the image was mutated. UpdatedAt time.Time `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,stdtime" json:"updated_at"` } func (m *Image) Reset() { *m = Image{} } func (*Image) ProtoMessage() {} func (*Image) Descriptor() ([]byte, []int) { return fileDescriptorImages, []int{0} } type GetImageRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } func (m *GetImageRequest) Reset() { *m = GetImageRequest{} } func (*GetImageRequest) ProtoMessage() {} func (*GetImageRequest) Descriptor() ([]byte, []int) { return fileDescriptorImages, []int{1} } type GetImageResponse struct { Image *Image `protobuf:"bytes,1,opt,name=image" json:"image,omitempty"` } func (m *GetImageResponse) Reset() { *m = GetImageResponse{} } func (*GetImageResponse) ProtoMessage() {} func (*GetImageResponse) Descriptor() ([]byte, []int) { return fileDescriptorImages, []int{2} } type CreateImageRequest struct { Image Image `protobuf:"bytes,1,opt,name=image" json:"image"` } func (m *CreateImageRequest) Reset() { *m = CreateImageRequest{} } func (*CreateImageRequest) ProtoMessage() {} func (*CreateImageRequest) Descriptor() ([]byte, []int) { return fileDescriptorImages, []int{3} } type CreateImageResponse struct { Image Image `protobuf:"bytes,1,opt,name=image" json:"image"` } func (m *CreateImageResponse) Reset() { *m = CreateImageResponse{} } func (*CreateImageResponse) ProtoMessage() {} func (*CreateImageResponse) Descriptor() ([]byte, []int) { return fileDescriptorImages, []int{4} } type UpdateImageRequest struct { // Image provides a full or partial image for update. // // The name field must be set or an error will be returned. Image Image `protobuf:"bytes,1,opt,name=image" json:"image"` // UpdateMask specifies which fields to perform the update on. If empty, // the operation applies to all fields. UpdateMask *google_protobuf2.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask" json:"update_mask,omitempty"` } func (m *UpdateImageRequest) Reset() { *m = UpdateImageRequest{} } func (*UpdateImageRequest) ProtoMessage() {} func (*UpdateImageRequest) Descriptor() ([]byte, []int) { return fileDescriptorImages, []int{5} } type UpdateImageResponse struct { Image Image `protobuf:"bytes,1,opt,name=image" json:"image"` } func (m *UpdateImageResponse) Reset() { *m = UpdateImageResponse{} } func (*UpdateImageResponse) ProtoMessage() {} func (*UpdateImageResponse) Descriptor() ([]byte, []int) { return fileDescriptorImages, []int{6} } type ListImagesRequest struct { // Filters contains one or more filters using the syntax defined in the // containerd filter package. // // The returned result will be those that match any of the provided // filters. Expanded, images that match the following will be // returned: // // filters[0] or filters[1] or ... or filters[n-1] or filters[n] // // If filters is zero-length or nil, all items will be returned. Filters []string `protobuf:"bytes,1,rep,name=filters" json:"filters,omitempty"` } func (m *ListImagesRequest) Reset() { *m = ListImagesRequest{} } func (*ListImagesRequest) ProtoMessage() {} func (*ListImagesRequest) Descriptor() ([]byte, []int) { return fileDescriptorImages, []int{7} } type ListImagesResponse struct { Images []Image `protobuf:"bytes,1,rep,name=images" json:"images"` } func (m *ListImagesResponse) Reset() { *m = ListImagesResponse{} } func (*ListImagesResponse) ProtoMessage() {} func (*ListImagesResponse) Descriptor() ([]byte, []int) { return fileDescriptorImages, []int{8} } type DeleteImageRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Sync indicates that the delete and cleanup should be done // synchronously before returning to the caller // // Default is false Sync bool `protobuf:"varint,2,opt,name=sync,proto3" json:"sync,omitempty"` } func (m *DeleteImageRequest) Reset() { *m = DeleteImageRequest{} } func (*DeleteImageRequest) ProtoMessage() {} func (*DeleteImageRequest) Descriptor() ([]byte, []int) { return fileDescriptorImages, []int{9} } func init() { proto.RegisterType((*Image)(nil), "containerd.services.images.v1.Image") proto.RegisterType((*GetImageRequest)(nil), "containerd.services.images.v1.GetImageRequest") proto.RegisterType((*GetImageResponse)(nil), "containerd.services.images.v1.GetImageResponse") proto.RegisterType((*CreateImageRequest)(nil), "containerd.services.images.v1.CreateImageRequest") proto.RegisterType((*CreateImageResponse)(nil), "containerd.services.images.v1.CreateImageResponse") proto.RegisterType((*UpdateImageRequest)(nil), "containerd.services.images.v1.UpdateImageRequest") proto.RegisterType((*UpdateImageResponse)(nil), "containerd.services.images.v1.UpdateImageResponse") proto.RegisterType((*ListImagesRequest)(nil), "containerd.services.images.v1.ListImagesRequest") proto.RegisterType((*ListImagesResponse)(nil), "containerd.services.images.v1.ListImagesResponse") proto.RegisterType((*DeleteImageRequest)(nil), "containerd.services.images.v1.DeleteImageRequest") } // Reference imports to suppress errors if they are not otherwise used. var _ context.Context var _ grpc.ClientConn // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 // Client API for Images service type ImagesClient interface { // Get returns an image by name. Get(ctx context.Context, in *GetImageRequest, opts ...grpc.CallOption) (*GetImageResponse, error) // List returns a list of all images known to containerd. List(ctx context.Context, in *ListImagesRequest, opts ...grpc.CallOption) (*ListImagesResponse, error) // Create an image record in the metadata store. // // The name of the image must be unique. Create(ctx context.Context, in *CreateImageRequest, opts ...grpc.CallOption) (*CreateImageResponse, error) // Update assigns the name to a given target image based on the provided // image. Update(ctx context.Context, in *UpdateImageRequest, opts ...grpc.CallOption) (*UpdateImageResponse, error) // Delete deletes the image by name. Delete(ctx context.Context, in *DeleteImageRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) } type imagesClient struct { cc *grpc.ClientConn } func NewImagesClient(cc *grpc.ClientConn) ImagesClient { return &imagesClient{cc} } func (c *imagesClient) Get(ctx context.Context, in *GetImageRequest, opts ...grpc.CallOption) (*GetImageResponse, error) { out := new(GetImageResponse) err := grpc.Invoke(ctx, "/containerd.services.images.v1.Images/Get", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *imagesClient) List(ctx context.Context, in *ListImagesRequest, opts ...grpc.CallOption) (*ListImagesResponse, error) { out := new(ListImagesResponse) err := grpc.Invoke(ctx, "/containerd.services.images.v1.Images/List", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *imagesClient) Create(ctx context.Context, in *CreateImageRequest, opts ...grpc.CallOption) (*CreateImageResponse, error) { out := new(CreateImageResponse) err := grpc.Invoke(ctx, "/containerd.services.images.v1.Images/Create", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *imagesClient) Update(ctx context.Context, in *UpdateImageRequest, opts ...grpc.CallOption) (*UpdateImageResponse, error) { out := new(UpdateImageResponse) err := grpc.Invoke(ctx, "/containerd.services.images.v1.Images/Update", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *imagesClient) Delete(ctx context.Context, in *DeleteImageRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) { out := new(google_protobuf1.Empty) err := grpc.Invoke(ctx, "/containerd.services.images.v1.Images/Delete", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } // Server API for Images service type ImagesServer interface { // Get returns an image by name. Get(context.Context, *GetImageRequest) (*GetImageResponse, error) // List returns a list of all images known to containerd. List(context.Context, *ListImagesRequest) (*ListImagesResponse, error) // Create an image record in the metadata store. // // The name of the image must be unique. Create(context.Context, *CreateImageRequest) (*CreateImageResponse, error) // Update assigns the name to a given target image based on the provided // image. Update(context.Context, *UpdateImageRequest) (*UpdateImageResponse, error) // Delete deletes the image by name. Delete(context.Context, *DeleteImageRequest) (*google_protobuf1.Empty, error) } func RegisterImagesServer(s *grpc.Server, srv ImagesServer) { s.RegisterService(&_Images_serviceDesc, srv) } func _Images_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetImageRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ImagesServer).Get(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.images.v1.Images/Get", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ImagesServer).Get(ctx, req.(*GetImageRequest)) } return interceptor(ctx, in, info, handler) } func _Images_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListImagesRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ImagesServer).List(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.images.v1.Images/List", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ImagesServer).List(ctx, req.(*ListImagesRequest)) } return interceptor(ctx, in, info, handler) } func _Images_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CreateImageRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ImagesServer).Create(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.images.v1.Images/Create", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ImagesServer).Create(ctx, req.(*CreateImageRequest)) } return interceptor(ctx, in, info, handler) } func _Images_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateImageRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ImagesServer).Update(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.images.v1.Images/Update", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ImagesServer).Update(ctx, req.(*UpdateImageRequest)) } return interceptor(ctx, in, info, handler) } func _Images_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DeleteImageRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ImagesServer).Delete(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.images.v1.Images/Delete", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ImagesServer).Delete(ctx, req.(*DeleteImageRequest)) } return interceptor(ctx, in, info, handler) } var _Images_serviceDesc = grpc.ServiceDesc{ ServiceName: "containerd.services.images.v1.Images", HandlerType: (*ImagesServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Get", Handler: _Images_Get_Handler, }, { MethodName: "List", Handler: _Images_List_Handler, }, { MethodName: "Create", Handler: _Images_Create_Handler, }, { MethodName: "Update", Handler: _Images_Update_Handler, }, { MethodName: "Delete", Handler: _Images_Delete_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "github.com/containerd/containerd/api/services/images/v1/images.proto", } func (m *Image) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Image) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Name) > 0 { dAtA[i] = 0xa i++ i = encodeVarintImages(dAtA, i, uint64(len(m.Name))) i += copy(dAtA[i:], m.Name) } if len(m.Labels) > 0 { for k, _ := range m.Labels { dAtA[i] = 0x12 i++ v := m.Labels[k] mapSize := 1 + len(k) + sovImages(uint64(len(k))) + 1 + len(v) + sovImages(uint64(len(v))) i = encodeVarintImages(dAtA, i, uint64(mapSize)) dAtA[i] = 0xa i++ i = encodeVarintImages(dAtA, i, uint64(len(k))) i += copy(dAtA[i:], k) dAtA[i] = 0x12 i++ i = encodeVarintImages(dAtA, i, uint64(len(v))) i += copy(dAtA[i:], v) } } dAtA[i] = 0x1a i++ i = encodeVarintImages(dAtA, i, uint64(m.Target.Size())) n1, err := m.Target.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n1 dAtA[i] = 0x3a i++ i = encodeVarintImages(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt))) n2, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i:]) if err != nil { return 0, err } i += n2 dAtA[i] = 0x42 i++ i = encodeVarintImages(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdatedAt))) n3, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.UpdatedAt, dAtA[i:]) if err != nil { return 0, err } i += n3 return i, nil } func (m *GetImageRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *GetImageRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Name) > 0 { dAtA[i] = 0xa i++ i = encodeVarintImages(dAtA, i, uint64(len(m.Name))) i += copy(dAtA[i:], m.Name) } return i, nil } func (m *GetImageResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *GetImageResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if m.Image != nil { dAtA[i] = 0xa i++ i = encodeVarintImages(dAtA, i, uint64(m.Image.Size())) n4, err := m.Image.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n4 } return i, nil } func (m *CreateImageRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *CreateImageRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l dAtA[i] = 0xa i++ i = encodeVarintImages(dAtA, i, uint64(m.Image.Size())) n5, err := m.Image.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n5 return i, nil } func (m *CreateImageResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *CreateImageResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l dAtA[i] = 0xa i++ i = encodeVarintImages(dAtA, i, uint64(m.Image.Size())) n6, err := m.Image.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n6 return i, nil } func (m *UpdateImageRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *UpdateImageRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l dAtA[i] = 0xa i++ i = encodeVarintImages(dAtA, i, uint64(m.Image.Size())) n7, err := m.Image.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n7 if m.UpdateMask != nil { dAtA[i] = 0x12 i++ i = encodeVarintImages(dAtA, i, uint64(m.UpdateMask.Size())) n8, err := m.UpdateMask.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n8 } return i, nil } func (m *UpdateImageResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *UpdateImageResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l dAtA[i] = 0xa i++ i = encodeVarintImages(dAtA, i, uint64(m.Image.Size())) n9, err := m.Image.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n9 return i, nil } func (m *ListImagesRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ListImagesRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Filters) > 0 { for _, s := range m.Filters { dAtA[i] = 0xa i++ l = len(s) for l >= 1<<7 { dAtA[i] = uint8(uint64(l)&0x7f | 0x80) l >>= 7 i++ } dAtA[i] = uint8(l) i++ i += copy(dAtA[i:], s) } } return i, nil } func (m *ListImagesResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ListImagesResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Images) > 0 { for _, msg := range m.Images { dAtA[i] = 0xa i++ i = encodeVarintImages(dAtA, i, uint64(msg.Size())) n, err := msg.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n } } return i, nil } func (m *DeleteImageRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *DeleteImageRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Name) > 0 { dAtA[i] = 0xa i++ i = encodeVarintImages(dAtA, i, uint64(len(m.Name))) i += copy(dAtA[i:], m.Name) } if m.Sync { dAtA[i] = 0x10 i++ if m.Sync { dAtA[i] = 1 } else { dAtA[i] = 0 } i++ } return i, nil } func encodeVarintImages(dAtA []byte, offset int, v uint64) int { for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return offset + 1 } func (m *Image) Size() (n int) { var l int _ = l l = len(m.Name) if l > 0 { n += 1 + l + sovImages(uint64(l)) } if len(m.Labels) > 0 { for k, v := range m.Labels { _ = k _ = v mapEntrySize := 1 + len(k) + sovImages(uint64(len(k))) + 1 + len(v) + sovImages(uint64(len(v))) n += mapEntrySize + 1 + sovImages(uint64(mapEntrySize)) } } l = m.Target.Size() n += 1 + l + sovImages(uint64(l)) l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt) n += 1 + l + sovImages(uint64(l)) l = github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdatedAt) n += 1 + l + sovImages(uint64(l)) return n } func (m *GetImageRequest) Size() (n int) { var l int _ = l l = len(m.Name) if l > 0 { n += 1 + l + sovImages(uint64(l)) } return n } func (m *GetImageResponse) Size() (n int) { var l int _ = l if m.Image != nil { l = m.Image.Size() n += 1 + l + sovImages(uint64(l)) } return n } func (m *CreateImageRequest) Size() (n int) { var l int _ = l l = m.Image.Size() n += 1 + l + sovImages(uint64(l)) return n } func (m *CreateImageResponse) Size() (n int) { var l int _ = l l = m.Image.Size() n += 1 + l + sovImages(uint64(l)) return n } func (m *UpdateImageRequest) Size() (n int) { var l int _ = l l = m.Image.Size() n += 1 + l + sovImages(uint64(l)) if m.UpdateMask != nil { l = m.UpdateMask.Size() n += 1 + l + sovImages(uint64(l)) } return n } func (m *UpdateImageResponse) Size() (n int) { var l int _ = l l = m.Image.Size() n += 1 + l + sovImages(uint64(l)) return n } func (m *ListImagesRequest) Size() (n int) { var l int _ = l if len(m.Filters) > 0 { for _, s := range m.Filters { l = len(s) n += 1 + l + sovImages(uint64(l)) } } return n } func (m *ListImagesResponse) Size() (n int) { var l int _ = l if len(m.Images) > 0 { for _, e := range m.Images { l = e.Size() n += 1 + l + sovImages(uint64(l)) } } return n } func (m *DeleteImageRequest) Size() (n int) { var l int _ = l l = len(m.Name) if l > 0 { n += 1 + l + sovImages(uint64(l)) } if m.Sync { n += 2 } return n } func sovImages(x uint64) (n int) { for { n++ x >>= 7 if x == 0 { break } } return n } func sozImages(x uint64) (n int) { return sovImages(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (this *Image) String() string { if this == nil { return "nil" } keysForLabels := make([]string, 0, len(this.Labels)) for k, _ := range this.Labels { keysForLabels = append(keysForLabels, k) } github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) mapStringForLabels := "map[string]string{" for _, k := range keysForLabels { mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) } mapStringForLabels += "}" s := strings.Join([]string{`&Image{`, `Name:` + fmt.Sprintf("%v", this.Name) + `,`, `Labels:` + mapStringForLabels + `,`, `Target:` + strings.Replace(strings.Replace(this.Target.String(), "Descriptor", "containerd_types.Descriptor", 1), `&`, ``, 1) + `,`, `CreatedAt:` + strings.Replace(strings.Replace(this.CreatedAt.String(), "Timestamp", "google_protobuf3.Timestamp", 1), `&`, ``, 1) + `,`, `UpdatedAt:` + strings.Replace(strings.Replace(this.UpdatedAt.String(), "Timestamp", "google_protobuf3.Timestamp", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } func (this *GetImageRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&GetImageRequest{`, `Name:` + fmt.Sprintf("%v", this.Name) + `,`, `}`, }, "") return s } func (this *GetImageResponse) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&GetImageResponse{`, `Image:` + strings.Replace(fmt.Sprintf("%v", this.Image), "Image", "Image", 1) + `,`, `}`, }, "") return s } func (this *CreateImageRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&CreateImageRequest{`, `Image:` + strings.Replace(strings.Replace(this.Image.String(), "Image", "Image", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } func (this *CreateImageResponse) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&CreateImageResponse{`, `Image:` + strings.Replace(strings.Replace(this.Image.String(), "Image", "Image", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } func (this *UpdateImageRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&UpdateImageRequest{`, `Image:` + strings.Replace(strings.Replace(this.Image.String(), "Image", "Image", 1), `&`, ``, 1) + `,`, `UpdateMask:` + strings.Replace(fmt.Sprintf("%v", this.UpdateMask), "FieldMask", "google_protobuf2.FieldMask", 1) + `,`, `}`, }, "") return s } func (this *UpdateImageResponse) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&UpdateImageResponse{`, `Image:` + strings.Replace(strings.Replace(this.Image.String(), "Image", "Image", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } func (this *ListImagesRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&ListImagesRequest{`, `Filters:` + fmt.Sprintf("%v", this.Filters) + `,`, `}`, }, "") return s } func (this *ListImagesResponse) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&ListImagesResponse{`, `Images:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Images), "Image", "Image", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } func (this *DeleteImageRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&DeleteImageRequest{`, `Name:` + fmt.Sprintf("%v", this.Name) + `,`, `Sync:` + fmt.Sprintf("%v", this.Sync) + `,`, `}`, }, "") return s } func valueToStringImages(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { return "nil" } pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } func (m *Image) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Image: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Image: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthImages } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthImages } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Labels == nil { m.Labels = make(map[string]string) } var mapkey string var mapvalue string for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapkey |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { return ErrInvalidLengthImages } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var stringLenmapvalue uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapvalue |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLenmapvalue := int(stringLenmapvalue) if intStringLenmapvalue < 0 { return ErrInvalidLengthImages } postStringIndexmapvalue := iNdEx + intStringLenmapvalue if postStringIndexmapvalue > l { return io.ErrUnexpectedEOF } mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) iNdEx = postStringIndexmapvalue } else { iNdEx = entryPreIndex skippy, err := skipImages(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthImages } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.Labels[mapkey] = mapvalue iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthImages } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Target.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthImages } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field UpdatedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthImages } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.UpdatedAt, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipImages(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthImages } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *GetImageRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: GetImageRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: GetImageRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthImages } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipImages(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthImages } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *GetImageResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: GetImageResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: GetImageResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthImages } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Image == nil { m.Image = &Image{} } if err := m.Image.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipImages(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthImages } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *CreateImageRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: CreateImageRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: CreateImageRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthImages } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Image.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipImages(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthImages } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *CreateImageResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: CreateImageResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: CreateImageResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthImages } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Image.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipImages(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthImages } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *UpdateImageRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: UpdateImageRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UpdateImageRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthImages } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Image.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field UpdateMask", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthImages } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.UpdateMask == nil { m.UpdateMask = &google_protobuf2.FieldMask{} } if err := m.UpdateMask.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipImages(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthImages } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *UpdateImageResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: UpdateImageResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UpdateImageResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthImages } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Image.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipImages(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthImages } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ListImagesRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ListImagesRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ListImagesRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Filters", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthImages } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Filters = append(m.Filters, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipImages(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthImages } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ListImagesResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ListImagesResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ListImagesResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Images", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthImages } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } m.Images = append(m.Images, Image{}) if err := m.Images[len(m.Images)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipImages(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthImages } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *DeleteImageRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: DeleteImageRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: DeleteImageRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthImages } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Sync", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImages } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= (int(b) & 0x7F) << shift if b < 0x80 { break } } m.Sync = bool(v != 0) default: iNdEx = preIndex skippy, err := skipImages(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthImages } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipImages(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowImages } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } wireType := int(wire & 0x7) switch wireType { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowImages } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } iNdEx++ if dAtA[iNdEx-1] < 0x80 { break } } return iNdEx, nil case 1: iNdEx += 8 return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowImages } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ length |= (int(b) & 0x7F) << shift if b < 0x80 { break } } iNdEx += length if length < 0 { return 0, ErrInvalidLengthImages } return iNdEx, nil case 3: for { var innerWire uint64 var start int = iNdEx for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowImages } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ innerWire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } innerWireType := int(innerWire & 0x7) if innerWireType == 4 { break } next, err := skipImages(dAtA[start:]) if err != nil { return 0, err } iNdEx = start + next } return iNdEx, nil case 4: return iNdEx, nil case 5: iNdEx += 4 return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } } panic("unreachable") } var ( ErrInvalidLengthImages = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowImages = fmt.Errorf("proto: integer overflow") ) func init() { proto.RegisterFile("github.com/containerd/containerd/api/services/images/v1/images.proto", fileDescriptorImages) } var fileDescriptorImages = []byte{ // 659 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xcd, 0x6e, 0xd3, 0x40, 0x10, 0x8e, 0x93, 0xd4, 0x6d, 0x27, 0x07, 0xca, 0x52, 0x21, 0xcb, 0x40, 0x1a, 0x45, 0x20, 0xe5, 0xc2, 0x9a, 0x86, 0x0b, 0xb4, 0x08, 0xd1, 0xb4, 0xa5, 0x20, 0x15, 0x0e, 0xe6, 0xaf, 0xe2, 0x52, 0x6d, 0x92, 0x89, 0xb1, 0x62, 0xc7, 0xc6, 0xbb, 0x89, 0x94, 0x1b, 0x8f, 0x80, 0x04, 0x0f, 0xd5, 0x23, 0x47, 0x4e, 0x40, 0x73, 0xe0, 0x39, 0x90, 0x77, 0x37, 0x34, 0x4d, 0x22, 0x92, 0x94, 0xde, 0x66, 0xed, 0xef, 0x9b, 0x9f, 0x6f, 0x66, 0x76, 0x61, 0xcf, 0xf3, 0xc5, 0x87, 0x6e, 0x9d, 0x36, 0xa2, 0xd0, 0x69, 0x44, 0x1d, 0xc1, 0xfc, 0x0e, 0x26, 0xcd, 0x51, 0x93, 0xc5, 0xbe, 0xc3, 0x31, 0xe9, 0xf9, 0x0d, 0xe4, 0x8e, 0x1f, 0x32, 0x0f, 0xb9, 0xd3, 0xdb, 0xd4, 0x16, 0x8d, 0x93, 0x48, 0x44, 0xe4, 0xd6, 0x19, 0x9e, 0x0e, 0xb1, 0x54, 0x23, 0x7a, 0x9b, 0xf6, 0xba, 0x17, 0x79, 0x91, 0x44, 0x3a, 0xa9, 0xa5, 0x48, 0xf6, 0x0d, 0x2f, 0x8a, 0xbc, 0x00, 0x1d, 0x79, 0xaa, 0x77, 0x5b, 0x0e, 0x86, 0xb1, 0xe8, 0xeb, 0x9f, 0xa5, 0xf1, 0x9f, 0x2d, 0x1f, 0x83, 0xe6, 0x71, 0xc8, 0x78, 0x5b, 0x23, 0x36, 0xc6, 0x11, 0xc2, 0x0f, 0x91, 0x0b, 0x16, 0xc6, 0x1a, 0xb0, 0x3d, 0x57, 0x69, 0xa2, 0x1f, 0x23, 0x77, 0x9a, 0xc8, 0x1b, 0x89, 0x1f, 0x8b, 0x28, 0x51, 0xe4, 0xf2, 0xef, 0x2c, 0x2c, 0x3d, 0x4f, 0x0b, 0x20, 0x04, 0xf2, 0x1d, 0x16, 0xa2, 0x65, 0x94, 0x8c, 0xca, 0xaa, 0x2b, 0x6d, 0xf2, 0x0c, 0xcc, 0x80, 0xd5, 0x31, 0xe0, 0x56, 0xb6, 0x94, 0xab, 0x14, 0xaa, 0xf7, 0xe8, 0x3f, 0x05, 0xa0, 0xd2, 0x13, 0x3d, 0x94, 0x94, 0xfd, 0x8e, 0x48, 0xfa, 0xae, 0xe6, 0x93, 0x2d, 0x30, 0x05, 0x4b, 0x3c, 0x14, 0x56, 0xae, 0x64, 0x54, 0x0a, 0xd5, 0x9b, 0xa3, 0x9e, 0x64, 0x6e, 0x74, 0xef, 0x6f, 0x6e, 0xb5, 0xfc, 0xc9, 0x8f, 0x8d, 0x8c, 0xab, 0x19, 0x64, 0x17, 0xa0, 0x91, 0x20, 0x13, 0xd8, 0x3c, 0x66, 0xc2, 0x5a, 0x96, 0x7c, 0x9b, 0x2a, 0x59, 0xe8, 0x50, 0x16, 0xfa, 0x7a, 0x28, 0x4b, 0x6d, 0x25, 0x65, 0x7f, 0xfe, 0xb9, 0x61, 0xb8, 0xab, 0x9a, 0xb7, 0x23, 0x9d, 0x74, 0xe3, 0xe6, 0xd0, 0xc9, 0xca, 0x22, 0x4e, 0x34, 0x6f, 0x47, 0xd8, 0x0f, 0xa1, 0x30, 0x52, 0x1c, 0x59, 0x83, 0x5c, 0x1b, 0xfb, 0x5a, 0xb1, 0xd4, 0x24, 0xeb, 0xb0, 0xd4, 0x63, 0x41, 0x17, 0xad, 0xac, 0xfc, 0xa6, 0x0e, 0x5b, 0xd9, 0x07, 0x46, 0xf9, 0x0e, 0x5c, 0x39, 0x40, 0x21, 0x05, 0x72, 0xf1, 0x63, 0x17, 0xb9, 0x98, 0xa6, 0x78, 0xf9, 0x25, 0xac, 0x9d, 0xc1, 0x78, 0x1c, 0x75, 0x38, 0x92, 0x2d, 0x58, 0x92, 0x12, 0x4b, 0x60, 0xa1, 0x7a, 0x7b, 0x9e, 0x26, 0xb8, 0x8a, 0x52, 0x7e, 0x0b, 0x64, 0x57, 0x6a, 0x70, 0x2e, 0xf2, 0x93, 0x0b, 0x78, 0xd4, 0x4d, 0xd1, 0x7e, 0xdf, 0xc1, 0xb5, 0x73, 0x7e, 0x75, 0xaa, 0xff, 0xef, 0xf8, 0x8b, 0x01, 0xe4, 0x8d, 0x14, 0xfc, 0x72, 0x33, 0x26, 0xdb, 0x50, 0x50, 0x8d, 0x94, 0xcb, 0x25, 0x1b, 0x34, 0x6d, 0x02, 0x9e, 0xa6, 0xfb, 0xf7, 0x82, 0xf1, 0xb6, 0xab, 0xe7, 0x25, 0xb5, 0xd3, 0x72, 0xcf, 0x25, 0x75, 0x69, 0xe5, 0xde, 0x85, 0xab, 0x87, 0x3e, 0x57, 0x0d, 0xe7, 0xc3, 0x62, 0x2d, 0x58, 0x6e, 0xf9, 0x81, 0xc0, 0x84, 0x5b, 0x46, 0x29, 0x57, 0x59, 0x75, 0x87, 0xc7, 0xf2, 0x11, 0x90, 0x51, 0xb8, 0x4e, 0xa3, 0x06, 0xa6, 0x0a, 0x22, 0xe1, 0x8b, 0xe5, 0xa1, 0x99, 0xe5, 0x47, 0x40, 0xf6, 0x30, 0xc0, 0x31, 0xd9, 0xa7, 0x5d, 0x0a, 0x04, 0xf2, 0xbc, 0xdf, 0x69, 0x48, 0x05, 0x57, 0x5c, 0x69, 0x57, 0xbf, 0xe6, 0xc1, 0x54, 0x49, 0x91, 0x16, 0xe4, 0x0e, 0x50, 0x10, 0x3a, 0x23, 0x87, 0xb1, 0x65, 0xb0, 0x9d, 0xb9, 0xf1, 0xba, 0xe8, 0x36, 0xe4, 0x53, 0x29, 0xc8, 0xac, 0x3b, 0x69, 0x42, 0x5e, 0x7b, 0x73, 0x01, 0x86, 0x0e, 0x16, 0x81, 0xa9, 0xc6, 0x9d, 0xcc, 0x22, 0x4f, 0x6e, 0x9b, 0x5d, 0x5d, 0x84, 0x72, 0x16, 0x50, 0x0d, 0xdc, 0xcc, 0x80, 0x93, 0xcb, 0x32, 0x33, 0xe0, 0xb4, 0x51, 0x7e, 0x05, 0xa6, 0xea, 0xff, 0xcc, 0x80, 0x93, 0x63, 0x62, 0x5f, 0x9f, 0x58, 0xa3, 0xfd, 0xf4, 0x8d, 0xab, 0x1d, 0x9d, 0x9c, 0x16, 0x33, 0xdf, 0x4f, 0x8b, 0x99, 0x4f, 0x83, 0xa2, 0x71, 0x32, 0x28, 0x1a, 0xdf, 0x06, 0x45, 0xe3, 0xd7, 0xa0, 0x68, 0xbc, 0x7f, 0x7c, 0xc1, 0xf7, 0x78, 0x5b, 0x59, 0x47, 0x99, 0xba, 0x29, 0x63, 0xdd, 0xff, 0x13, 0x00, 0x00, 0xff, 0xff, 0x24, 0x4e, 0xca, 0x64, 0xda, 0x07, 0x00, 0x00, } docker-containerd-tags-docker-17.12.1/api/services/images/v1/images.proto000066400000000000000000000074461322771672400262260ustar00rootroot00000000000000syntax = "proto3"; package containerd.services.images.v1; import weak "gogoproto/gogo.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; import "github.com/containerd/containerd/api/types/descriptor.proto"; option go_package = "github.com/containerd/containerd/api/services/images/v1;images"; // Images is a service that allows one to register images with containerd. // // In containerd, an image is merely the mapping of a name to a content root, // described by a descriptor. The behavior and state of image is purely // dictated by the type of the descriptor. // // From the perspective of this service, these references are mostly shallow, // in that the existence of the required content won't be validated until // required by consuming services. // // As such, this can really be considered a "metadata service". service Images { // Get returns an image by name. rpc Get(GetImageRequest) returns (GetImageResponse); // List returns a list of all images known to containerd. rpc List(ListImagesRequest) returns (ListImagesResponse); // Create an image record in the metadata store. // // The name of the image must be unique. rpc Create(CreateImageRequest) returns (CreateImageResponse); // Update assigns the name to a given target image based on the provided // image. rpc Update(UpdateImageRequest) returns (UpdateImageResponse); // Delete deletes the image by name. rpc Delete(DeleteImageRequest) returns (google.protobuf.Empty); } message Image { // Name provides a unique name for the image. // // Containerd treats this as the primary identifier. string name = 1; // Labels provides free form labels for the image. These are runtime only // and do not get inherited into the package image in any way. // // Labels may be updated using the field mask. // The combined size of a key/value pair cannot exceed 4096 bytes. map labels = 2; // Target describes the content entry point of the image. containerd.types.Descriptor target = 3 [(gogoproto.nullable) = false]; // CreatedAt is the time the image was first created. google.protobuf.Timestamp created_at = 7 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; // UpdatedAt is the last time the image was mutated. google.protobuf.Timestamp updated_at = 8 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; } message GetImageRequest { string name = 1; } message GetImageResponse { Image image = 1; } message CreateImageRequest { Image image = 1 [(gogoproto.nullable) = false]; } message CreateImageResponse { Image image = 1 [(gogoproto.nullable) = false]; } message UpdateImageRequest { // Image provides a full or partial image for update. // // The name field must be set or an error will be returned. Image image = 1 [(gogoproto.nullable) = false]; // UpdateMask specifies which fields to perform the update on. If empty, // the operation applies to all fields. google.protobuf.FieldMask update_mask = 2; } message UpdateImageResponse { Image image = 1 [(gogoproto.nullable) = false]; } message ListImagesRequest { // Filters contains one or more filters using the syntax defined in the // containerd filter package. // // The returned result will be those that match any of the provided // filters. Expanded, images that match the following will be // returned: // // filters[0] or filters[1] or ... or filters[n-1] or filters[n] // // If filters is zero-length or nil, all items will be returned. repeated string filters = 1; } message ListImagesResponse { repeated Image images = 1 [(gogoproto.nullable) = false]; } message DeleteImageRequest { string name = 1; // Sync indicates that the delete and cleanup should be done // synchronously before returning to the caller // // Default is false bool sync = 2; } docker-containerd-tags-docker-17.12.1/api/services/introspection/000077500000000000000000000000001322771672400247665ustar00rootroot00000000000000docker-containerd-tags-docker-17.12.1/api/services/introspection/v1/000077500000000000000000000000001322771672400253145ustar00rootroot00000000000000docker-containerd-tags-docker-17.12.1/api/services/introspection/v1/doc.go000066400000000000000000000000261322771672400264060ustar00rootroot00000000000000package introspection docker-containerd-tags-docker-17.12.1/api/services/introspection/v1/introspection.pb.go000066400000000000000000000752051322771672400311540ustar00rootroot00000000000000// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/containerd/containerd/api/services/introspection/v1/introspection.proto /* Package introspection is a generated protocol buffer package. It is generated from these files: github.com/containerd/containerd/api/services/introspection/v1/introspection.proto It has these top-level messages: Plugin PluginsRequest PluginsResponse */ package introspection import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" import containerd_types "github.com/containerd/containerd/api/types" import google_rpc "github.com/containerd/containerd/protobuf/google/rpc" // skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto" import ( context "golang.org/x/net/context" grpc "google.golang.org/grpc" ) import strings "strings" import reflect "reflect" import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" import io "io" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package type Plugin struct { // Type defines the type of plugin. // // See package plugin for a list of possible values. Non core plugins may // define their own values during registration. Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // ID identifies the plugin uniquely in the system. ID string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` // Requires lists the plugin types required by this plugin. Requires []string `protobuf:"bytes,3,rep,name=requires" json:"requires,omitempty"` // Platforms enumerates the platforms this plugin will support. // // If values are provided here, the plugin will only be operable under the // provided platforms. // // If this is empty, the plugin will work across all platforms. // // If the plugin prefers certain platforms over others, they should be // listed from most to least preferred. Platforms []containerd_types.Platform `protobuf:"bytes,4,rep,name=platforms" json:"platforms"` // Exports allows plugins to provide values about state or configuration to // interested parties. // // One example is exposing the configured path of a snapshotter plugin. Exports map[string]string `protobuf:"bytes,5,rep,name=exports" json:"exports,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Capabilities allows plugins to communicate feature switches to allow // clients to detect features that may not be on be default or may be // different from version to version. // // Use this sparingly. Capabilities []string `protobuf:"bytes,6,rep,name=capabilities" json:"capabilities,omitempty"` // InitErr will be set if the plugin fails initialization. // // This means the plugin may have been registered but a non-terminal error // was encountered during initialization. // // Plugins that have this value set cannot be used. InitErr *google_rpc.Status `protobuf:"bytes,7,opt,name=init_err,json=initErr" json:"init_err,omitempty"` } func (m *Plugin) Reset() { *m = Plugin{} } func (*Plugin) ProtoMessage() {} func (*Plugin) Descriptor() ([]byte, []int) { return fileDescriptorIntrospection, []int{0} } type PluginsRequest struct { // Filters contains one or more filters using the syntax defined in the // containerd filter package. // // The returned result will be those that match any of the provided // filters. Expanded, plugins that match the following will be // returned: // // filters[0] or filters[1] or ... or filters[n-1] or filters[n] // // If filters is zero-length or nil, all items will be returned. Filters []string `protobuf:"bytes,1,rep,name=filters" json:"filters,omitempty"` } func (m *PluginsRequest) Reset() { *m = PluginsRequest{} } func (*PluginsRequest) ProtoMessage() {} func (*PluginsRequest) Descriptor() ([]byte, []int) { return fileDescriptorIntrospection, []int{1} } type PluginsResponse struct { Plugins []Plugin `protobuf:"bytes,1,rep,name=plugins" json:"plugins"` } func (m *PluginsResponse) Reset() { *m = PluginsResponse{} } func (*PluginsResponse) ProtoMessage() {} func (*PluginsResponse) Descriptor() ([]byte, []int) { return fileDescriptorIntrospection, []int{2} } func init() { proto.RegisterType((*Plugin)(nil), "containerd.services.introspection.v1.Plugin") proto.RegisterType((*PluginsRequest)(nil), "containerd.services.introspection.v1.PluginsRequest") proto.RegisterType((*PluginsResponse)(nil), "containerd.services.introspection.v1.PluginsResponse") } // Reference imports to suppress errors if they are not otherwise used. var _ context.Context var _ grpc.ClientConn // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 // Client API for Introspection service type IntrospectionClient interface { // Plugins returns a list of plugins in containerd. // // Clients can use this to detect features and capabilities when using // containerd. Plugins(ctx context.Context, in *PluginsRequest, opts ...grpc.CallOption) (*PluginsResponse, error) } type introspectionClient struct { cc *grpc.ClientConn } func NewIntrospectionClient(cc *grpc.ClientConn) IntrospectionClient { return &introspectionClient{cc} } func (c *introspectionClient) Plugins(ctx context.Context, in *PluginsRequest, opts ...grpc.CallOption) (*PluginsResponse, error) { out := new(PluginsResponse) err := grpc.Invoke(ctx, "/containerd.services.introspection.v1.Introspection/Plugins", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } // Server API for Introspection service type IntrospectionServer interface { // Plugins returns a list of plugins in containerd. // // Clients can use this to detect features and capabilities when using // containerd. Plugins(context.Context, *PluginsRequest) (*PluginsResponse, error) } func RegisterIntrospectionServer(s *grpc.Server, srv IntrospectionServer) { s.RegisterService(&_Introspection_serviceDesc, srv) } func _Introspection_Plugins_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(PluginsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(IntrospectionServer).Plugins(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.introspection.v1.Introspection/Plugins", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(IntrospectionServer).Plugins(ctx, req.(*PluginsRequest)) } return interceptor(ctx, in, info, handler) } var _Introspection_serviceDesc = grpc.ServiceDesc{ ServiceName: "containerd.services.introspection.v1.Introspection", HandlerType: (*IntrospectionServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Plugins", Handler: _Introspection_Plugins_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "github.com/containerd/containerd/api/services/introspection/v1/introspection.proto", } func (m *Plugin) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Plugin) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Type) > 0 { dAtA[i] = 0xa i++ i = encodeVarintIntrospection(dAtA, i, uint64(len(m.Type))) i += copy(dAtA[i:], m.Type) } if len(m.ID) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintIntrospection(dAtA, i, uint64(len(m.ID))) i += copy(dAtA[i:], m.ID) } if len(m.Requires) > 0 { for _, s := range m.Requires { dAtA[i] = 0x1a i++ l = len(s) for l >= 1<<7 { dAtA[i] = uint8(uint64(l)&0x7f | 0x80) l >>= 7 i++ } dAtA[i] = uint8(l) i++ i += copy(dAtA[i:], s) } } if len(m.Platforms) > 0 { for _, msg := range m.Platforms { dAtA[i] = 0x22 i++ i = encodeVarintIntrospection(dAtA, i, uint64(msg.Size())) n, err := msg.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n } } if len(m.Exports) > 0 { for k, _ := range m.Exports { dAtA[i] = 0x2a i++ v := m.Exports[k] mapSize := 1 + len(k) + sovIntrospection(uint64(len(k))) + 1 + len(v) + sovIntrospection(uint64(len(v))) i = encodeVarintIntrospection(dAtA, i, uint64(mapSize)) dAtA[i] = 0xa i++ i = encodeVarintIntrospection(dAtA, i, uint64(len(k))) i += copy(dAtA[i:], k) dAtA[i] = 0x12 i++ i = encodeVarintIntrospection(dAtA, i, uint64(len(v))) i += copy(dAtA[i:], v) } } if len(m.Capabilities) > 0 { for _, s := range m.Capabilities { dAtA[i] = 0x32 i++ l = len(s) for l >= 1<<7 { dAtA[i] = uint8(uint64(l)&0x7f | 0x80) l >>= 7 i++ } dAtA[i] = uint8(l) i++ i += copy(dAtA[i:], s) } } if m.InitErr != nil { dAtA[i] = 0x3a i++ i = encodeVarintIntrospection(dAtA, i, uint64(m.InitErr.Size())) n1, err := m.InitErr.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n1 } return i, nil } func (m *PluginsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *PluginsRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Filters) > 0 { for _, s := range m.Filters { dAtA[i] = 0xa i++ l = len(s) for l >= 1<<7 { dAtA[i] = uint8(uint64(l)&0x7f | 0x80) l >>= 7 i++ } dAtA[i] = uint8(l) i++ i += copy(dAtA[i:], s) } } return i, nil } func (m *PluginsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *PluginsResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Plugins) > 0 { for _, msg := range m.Plugins { dAtA[i] = 0xa i++ i = encodeVarintIntrospection(dAtA, i, uint64(msg.Size())) n, err := msg.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n } } return i, nil } func encodeVarintIntrospection(dAtA []byte, offset int, v uint64) int { for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return offset + 1 } func (m *Plugin) Size() (n int) { var l int _ = l l = len(m.Type) if l > 0 { n += 1 + l + sovIntrospection(uint64(l)) } l = len(m.ID) if l > 0 { n += 1 + l + sovIntrospection(uint64(l)) } if len(m.Requires) > 0 { for _, s := range m.Requires { l = len(s) n += 1 + l + sovIntrospection(uint64(l)) } } if len(m.Platforms) > 0 { for _, e := range m.Platforms { l = e.Size() n += 1 + l + sovIntrospection(uint64(l)) } } if len(m.Exports) > 0 { for k, v := range m.Exports { _ = k _ = v mapEntrySize := 1 + len(k) + sovIntrospection(uint64(len(k))) + 1 + len(v) + sovIntrospection(uint64(len(v))) n += mapEntrySize + 1 + sovIntrospection(uint64(mapEntrySize)) } } if len(m.Capabilities) > 0 { for _, s := range m.Capabilities { l = len(s) n += 1 + l + sovIntrospection(uint64(l)) } } if m.InitErr != nil { l = m.InitErr.Size() n += 1 + l + sovIntrospection(uint64(l)) } return n } func (m *PluginsRequest) Size() (n int) { var l int _ = l if len(m.Filters) > 0 { for _, s := range m.Filters { l = len(s) n += 1 + l + sovIntrospection(uint64(l)) } } return n } func (m *PluginsResponse) Size() (n int) { var l int _ = l if len(m.Plugins) > 0 { for _, e := range m.Plugins { l = e.Size() n += 1 + l + sovIntrospection(uint64(l)) } } return n } func sovIntrospection(x uint64) (n int) { for { n++ x >>= 7 if x == 0 { break } } return n } func sozIntrospection(x uint64) (n int) { return sovIntrospection(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (this *Plugin) String() string { if this == nil { return "nil" } keysForExports := make([]string, 0, len(this.Exports)) for k, _ := range this.Exports { keysForExports = append(keysForExports, k) } github_com_gogo_protobuf_sortkeys.Strings(keysForExports) mapStringForExports := "map[string]string{" for _, k := range keysForExports { mapStringForExports += fmt.Sprintf("%v: %v,", k, this.Exports[k]) } mapStringForExports += "}" s := strings.Join([]string{`&Plugin{`, `Type:` + fmt.Sprintf("%v", this.Type) + `,`, `ID:` + fmt.Sprintf("%v", this.ID) + `,`, `Requires:` + fmt.Sprintf("%v", this.Requires) + `,`, `Platforms:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Platforms), "Platform", "containerd_types.Platform", 1), `&`, ``, 1) + `,`, `Exports:` + mapStringForExports + `,`, `Capabilities:` + fmt.Sprintf("%v", this.Capabilities) + `,`, `InitErr:` + strings.Replace(fmt.Sprintf("%v", this.InitErr), "Status", "google_rpc.Status", 1) + `,`, `}`, }, "") return s } func (this *PluginsRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&PluginsRequest{`, `Filters:` + fmt.Sprintf("%v", this.Filters) + `,`, `}`, }, "") return s } func (this *PluginsResponse) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&PluginsResponse{`, `Plugins:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Plugins), "Plugin", "Plugin", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } func valueToStringIntrospection(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { return "nil" } pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } func (m *Plugin) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowIntrospection } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Plugin: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Plugin: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowIntrospection } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthIntrospection } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Type = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowIntrospection } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthIntrospection } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Requires", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowIntrospection } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthIntrospection } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Requires = append(m.Requires, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Platforms", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowIntrospection } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthIntrospection } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } m.Platforms = append(m.Platforms, containerd_types.Platform{}) if err := m.Platforms[len(m.Platforms)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Exports", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowIntrospection } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthIntrospection } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Exports == nil { m.Exports = make(map[string]string) } var mapkey string var mapvalue string for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowIntrospection } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowIntrospection } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapkey |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { return ErrInvalidLengthIntrospection } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var stringLenmapvalue uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowIntrospection } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapvalue |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLenmapvalue := int(stringLenmapvalue) if intStringLenmapvalue < 0 { return ErrInvalidLengthIntrospection } postStringIndexmapvalue := iNdEx + intStringLenmapvalue if postStringIndexmapvalue > l { return io.ErrUnexpectedEOF } mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) iNdEx = postStringIndexmapvalue } else { iNdEx = entryPreIndex skippy, err := skipIntrospection(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthIntrospection } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.Exports[mapkey] = mapvalue iNdEx = postIndex case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Capabilities", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowIntrospection } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthIntrospection } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Capabilities = append(m.Capabilities, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field InitErr", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowIntrospection } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthIntrospection } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.InitErr == nil { m.InitErr = &google_rpc.Status{} } if err := m.InitErr.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipIntrospection(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthIntrospection } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *PluginsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowIntrospection } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: PluginsRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: PluginsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Filters", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowIntrospection } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthIntrospection } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Filters = append(m.Filters, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipIntrospection(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthIntrospection } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *PluginsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowIntrospection } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: PluginsResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: PluginsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Plugins", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowIntrospection } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthIntrospection } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } m.Plugins = append(m.Plugins, Plugin{}) if err := m.Plugins[len(m.Plugins)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipIntrospection(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthIntrospection } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipIntrospection(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowIntrospection } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } wireType := int(wire & 0x7) switch wireType { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowIntrospection } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } iNdEx++ if dAtA[iNdEx-1] < 0x80 { break } } return iNdEx, nil case 1: iNdEx += 8 return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowIntrospection } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ length |= (int(b) & 0x7F) << shift if b < 0x80 { break } } iNdEx += length if length < 0 { return 0, ErrInvalidLengthIntrospection } return iNdEx, nil case 3: for { var innerWire uint64 var start int = iNdEx for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowIntrospection } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ innerWire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } innerWireType := int(innerWire & 0x7) if innerWireType == 4 { break } next, err := skipIntrospection(dAtA[start:]) if err != nil { return 0, err } iNdEx = start + next } return iNdEx, nil case 4: return iNdEx, nil case 5: iNdEx += 4 return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } } panic("unreachable") } var ( ErrInvalidLengthIntrospection = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowIntrospection = fmt.Errorf("proto: integer overflow") ) func init() { proto.RegisterFile("github.com/containerd/containerd/api/services/introspection/v1/introspection.proto", fileDescriptorIntrospection) } var fileDescriptorIntrospection = []byte{ // 487 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x53, 0x4d, 0x6f, 0xd3, 0x40, 0x10, 0xcd, 0x3a, 0x69, 0xdc, 0x4c, 0xca, 0x87, 0x56, 0x15, 0x58, 0x3e, 0xb8, 0x51, 0xc4, 0x21, 0x42, 0xb0, 0x56, 0x03, 0x48, 0xb4, 0x48, 0x1c, 0x22, 0x72, 0xa8, 0xd4, 0x43, 0xe5, 0x5e, 0x10, 0x97, 0xca, 0x71, 0x36, 0x66, 0x85, 0xeb, 0xdd, 0xee, 0xae, 0x2d, 0x72, 0xe3, 0xc6, 0x5f, 0xcb, 0x91, 0x23, 0xa7, 0x8a, 0xfa, 0x37, 0xf0, 0x03, 0x90, 0xbd, 0x76, 0x9b, 0xdc, 0x12, 0x71, 0x9b, 0x79, 0x7e, 0x6f, 0xe6, 0xcd, 0x93, 0x17, 0x82, 0x98, 0xe9, 0xaf, 0xd9, 0x8c, 0x44, 0xfc, 0xda, 0x8f, 0x78, 0xaa, 0x43, 0x96, 0x52, 0x39, 0x5f, 0x2f, 0x43, 0xc1, 0x7c, 0x45, 0x65, 0xce, 0x22, 0xaa, 0x7c, 0x96, 0x6a, 0xc9, 0x95, 0xa0, 0x91, 0x66, 0x3c, 0xf5, 0xf3, 0xe3, 0x4d, 0x80, 0x08, 0xc9, 0x35, 0xc7, 0x2f, 0x1e, 0xd4, 0xa4, 0x51, 0x92, 0x4d, 0x62, 0x7e, 0xec, 0x9e, 0x6c, 0xb5, 0x59, 0x2f, 0x05, 0x55, 0xbe, 0x48, 0x42, 0xbd, 0xe0, 0xf2, 0xda, 0x2c, 0x70, 0x9f, 0xc7, 0x9c, 0xc7, 0x09, 0xf5, 0xa5, 0x88, 0x7c, 0xa5, 0x43, 0x9d, 0xa9, 0xfa, 0xc3, 0x61, 0xcc, 0x63, 0x5e, 0x95, 0x7e, 0x59, 0x19, 0x74, 0xf8, 0xd7, 0x82, 0xee, 0x45, 0x92, 0xc5, 0x2c, 0xc5, 0x18, 0x3a, 0xe5, 0x44, 0x07, 0x0d, 0xd0, 0xa8, 0x17, 0x54, 0x35, 0x7e, 0x06, 0x16, 0x9b, 0x3b, 0x56, 0x89, 0x4c, 0xba, 0xc5, 0xed, 0x91, 0x75, 0xf6, 0x29, 0xb0, 0xd8, 0x1c, 0xbb, 0xb0, 0x2f, 0xe9, 0x4d, 0xc6, 0x24, 0x55, 0x4e, 0x7b, 0xd0, 0x1e, 0xf5, 0x82, 0xfb, 0x1e, 0x7f, 0x84, 0x5e, 0xe3, 0x49, 0x39, 0x9d, 0x41, 0x7b, 0xd4, 0x1f, 0xbb, 0x64, 0xed, 0xec, 0xca, 0x36, 0xb9, 0xa8, 0x29, 0x93, 0xce, 0xea, 0xf6, 0xa8, 0x15, 0x3c, 0x48, 0xf0, 0x25, 0xd8, 0xf4, 0xbb, 0xe0, 0x52, 0x2b, 0x67, 0xaf, 0x52, 0x9f, 0x90, 0x6d, 0x42, 0x23, 0xe6, 0x0c, 0x32, 0x35, 0xda, 0x69, 0xaa, 0xe5, 0x32, 0x68, 0x26, 0xe1, 0x21, 0x1c, 0x44, 0xa1, 0x08, 0x67, 0x2c, 0x61, 0x9a, 0x51, 0xe5, 0x74, 0x2b, 0xd3, 0x1b, 0x18, 0x7e, 0x0d, 0xfb, 0x2c, 0x65, 0xfa, 0x8a, 0x4a, 0xe9, 0xd8, 0x03, 0x34, 0xea, 0x8f, 0x31, 0x31, 0x69, 0x12, 0x29, 0x22, 0x72, 0x59, 0xa5, 0x19, 0xd8, 0x25, 0x67, 0x2a, 0xa5, 0x7b, 0x0a, 0x07, 0xeb, 0xbb, 0xf0, 0x53, 0x68, 0x7f, 0xa3, 0xcb, 0x3a, 0xbe, 0xb2, 0xc4, 0x87, 0xb0, 0x97, 0x87, 0x49, 0x46, 0x4d, 0x80, 0x81, 0x69, 0x4e, 0xad, 0xf7, 0x68, 0xf8, 0x12, 0x1e, 0x1b, 0xbb, 0x2a, 0xa0, 0x37, 0x19, 0x55, 0x1a, 0x3b, 0x60, 0x2f, 0x58, 0xa2, 0xa9, 0x54, 0x0e, 0xaa, 0xbc, 0x35, 0xed, 0xf0, 0x0a, 0x9e, 0xdc, 0x73, 0x95, 0xe0, 0xa9, 0xa2, 0xf8, 0x1c, 0x6c, 0x61, 0xa0, 0x8a, 0xdc, 0x1f, 0xbf, 0xda, 0x25, 0xa2, 0x3a, 0xf2, 0x66, 0xc4, 0xf8, 0x27, 0x82, 0x47, 0x67, 0xeb, 0x54, 0x9c, 0x83, 0x5d, 0xaf, 0xc4, 0x6f, 0x77, 0x99, 0xdc, 0x5c, 0xe3, 0xbe, 0xdb, 0x51, 0x65, 0xee, 0x9a, 0x2c, 0x56, 0x77, 0x5e, 0xeb, 0xf7, 0x9d, 0xd7, 0xfa, 0x51, 0x78, 0x68, 0x55, 0x78, 0xe8, 0x57, 0xe1, 0xa1, 0x3f, 0x85, 0x87, 0xbe, 0x9c, 0xff, 0xdf, 0x5b, 0xfc, 0xb0, 0x01, 0x7c, 0xb6, 0x66, 0xdd, 0xea, 0xf7, 0x7f, 0xf3, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xe6, 0x72, 0xde, 0x35, 0xe4, 0x03, 0x00, 0x00, } docker-containerd-tags-docker-17.12.1/api/services/introspection/v1/introspection.proto000066400000000000000000000050561322771672400313070ustar00rootroot00000000000000syntax = "proto3"; package containerd.services.introspection.v1; import "github.com/containerd/containerd/api/types/platform.proto"; import "google/rpc/status.proto"; import weak "gogoproto/gogo.proto"; option go_package = "github.com/containerd/containerd/api/services/introspection/v1;introspection"; service Introspection { // Plugins returns a list of plugins in containerd. // // Clients can use this to detect features and capabilities when using // containerd. rpc Plugins(PluginsRequest) returns (PluginsResponse); } message Plugin { // Type defines the type of plugin. // // See package plugin for a list of possible values. Non core plugins may // define their own values during registration. string type = 1; // ID identifies the plugin uniquely in the system. string id = 2; // Requires lists the plugin types required by this plugin. repeated string requires = 3; // Platforms enumerates the platforms this plugin will support. // // If values are provided here, the plugin will only be operable under the // provided platforms. // // If this is empty, the plugin will work across all platforms. // // If the plugin prefers certain platforms over others, they should be // listed from most to least preferred. repeated types.Platform platforms = 4 [(gogoproto.nullable) = false]; // Exports allows plugins to provide values about state or configuration to // interested parties. // // One example is exposing the configured path of a snapshotter plugin. map exports = 5; // Capabilities allows plugins to communicate feature switches to allow // clients to detect features that may not be on be default or may be // different from version to version. // // Use this sparingly. repeated string capabilities = 6; // InitErr will be set if the plugin fails initialization. // // This means the plugin may have been registered but a non-terminal error // was encountered during initialization. // // Plugins that have this value set cannot be used. google.rpc.Status init_err = 7; } message PluginsRequest { // Filters contains one or more filters using the syntax defined in the // containerd filter package. // // The returned result will be those that match any of the provided // filters. Expanded, plugins that match the following will be // returned: // // filters[0] or filters[1] or ... or filters[n-1] or filters[n] // // If filters is zero-length or nil, all items will be returned. repeated string filters = 1; } message PluginsResponse { repeated Plugin plugins = 1 [(gogoproto.nullable) = false]; } docker-containerd-tags-docker-17.12.1/api/services/leases/000077500000000000000000000000001322771672400233425ustar00rootroot00000000000000docker-containerd-tags-docker-17.12.1/api/services/leases/v1/000077500000000000000000000000001322771672400236705ustar00rootroot00000000000000docker-containerd-tags-docker-17.12.1/api/services/leases/v1/doc.go000066400000000000000000000000171322771672400247620ustar00rootroot00000000000000package leases docker-containerd-tags-docker-17.12.1/api/services/leases/v1/leases.pb.go000066400000000000000000001166261322771672400261070ustar00rootroot00000000000000// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/containerd/containerd/api/services/leases/v1/leases.proto /* Package leases is a generated protocol buffer package. It is generated from these files: github.com/containerd/containerd/api/services/leases/v1/leases.proto It has these top-level messages: Lease CreateRequest CreateResponse DeleteRequest ListRequest ListResponse */ package leases import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" // skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto" import google_protobuf1 "github.com/gogo/protobuf/types" import _ "github.com/gogo/protobuf/types" import time "time" import ( context "golang.org/x/net/context" grpc "google.golang.org/grpc" ) import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" import strings "strings" import reflect "reflect" import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" import io "io" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf var _ = time.Kitchen // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package // Lease is an object which retains resources while it exists. type Lease struct { ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` CreatedAt time.Time `protobuf:"bytes,2,opt,name=created_at,json=createdAt,stdtime" json:"created_at"` Labels map[string]string `protobuf:"bytes,3,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (m *Lease) Reset() { *m = Lease{} } func (*Lease) ProtoMessage() {} func (*Lease) Descriptor() ([]byte, []int) { return fileDescriptorLeases, []int{0} } type CreateRequest struct { // ID is used to identity the lease, when the id is not set the service // generates a random identifier for the lease. ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Labels map[string]string `protobuf:"bytes,3,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (m *CreateRequest) Reset() { *m = CreateRequest{} } func (*CreateRequest) ProtoMessage() {} func (*CreateRequest) Descriptor() ([]byte, []int) { return fileDescriptorLeases, []int{1} } type CreateResponse struct { Lease *Lease `protobuf:"bytes,1,opt,name=lease" json:"lease,omitempty"` } func (m *CreateResponse) Reset() { *m = CreateResponse{} } func (*CreateResponse) ProtoMessage() {} func (*CreateResponse) Descriptor() ([]byte, []int) { return fileDescriptorLeases, []int{2} } type DeleteRequest struct { ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } func (m *DeleteRequest) Reset() { *m = DeleteRequest{} } func (*DeleteRequest) ProtoMessage() {} func (*DeleteRequest) Descriptor() ([]byte, []int) { return fileDescriptorLeases, []int{3} } type ListRequest struct { Filters []string `protobuf:"bytes,1,rep,name=filters" json:"filters,omitempty"` } func (m *ListRequest) Reset() { *m = ListRequest{} } func (*ListRequest) ProtoMessage() {} func (*ListRequest) Descriptor() ([]byte, []int) { return fileDescriptorLeases, []int{4} } type ListResponse struct { Leases []*Lease `protobuf:"bytes,1,rep,name=leases" json:"leases,omitempty"` } func (m *ListResponse) Reset() { *m = ListResponse{} } func (*ListResponse) ProtoMessage() {} func (*ListResponse) Descriptor() ([]byte, []int) { return fileDescriptorLeases, []int{5} } func init() { proto.RegisterType((*Lease)(nil), "containerd.services.leases.v1.Lease") proto.RegisterType((*CreateRequest)(nil), "containerd.services.leases.v1.CreateRequest") proto.RegisterType((*CreateResponse)(nil), "containerd.services.leases.v1.CreateResponse") proto.RegisterType((*DeleteRequest)(nil), "containerd.services.leases.v1.DeleteRequest") proto.RegisterType((*ListRequest)(nil), "containerd.services.leases.v1.ListRequest") proto.RegisterType((*ListResponse)(nil), "containerd.services.leases.v1.ListResponse") } // Reference imports to suppress errors if they are not otherwise used. var _ context.Context var _ grpc.ClientConn // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 // Client API for Leases service type LeasesClient interface { // Create creates a new lease for managing changes to metadata. A lease // can be used to protect objects from being removed. Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) // Delete deletes the lease and makes any unreferenced objects created // during the lease eligible for garbage collection if not referenced // or retained by other resources during the lease. Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) // List lists all active leases, returning the full list of // leases and optionally including the referenced resources. List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) } type leasesClient struct { cc *grpc.ClientConn } func NewLeasesClient(cc *grpc.ClientConn) LeasesClient { return &leasesClient{cc} } func (c *leasesClient) Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) { out := new(CreateResponse) err := grpc.Invoke(ctx, "/containerd.services.leases.v1.Leases/Create", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *leasesClient) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) { out := new(google_protobuf1.Empty) err := grpc.Invoke(ctx, "/containerd.services.leases.v1.Leases/Delete", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *leasesClient) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) { out := new(ListResponse) err := grpc.Invoke(ctx, "/containerd.services.leases.v1.Leases/List", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } // Server API for Leases service type LeasesServer interface { // Create creates a new lease for managing changes to metadata. A lease // can be used to protect objects from being removed. Create(context.Context, *CreateRequest) (*CreateResponse, error) // Delete deletes the lease and makes any unreferenced objects created // during the lease eligible for garbage collection if not referenced // or retained by other resources during the lease. Delete(context.Context, *DeleteRequest) (*google_protobuf1.Empty, error) // List lists all active leases, returning the full list of // leases and optionally including the referenced resources. List(context.Context, *ListRequest) (*ListResponse, error) } func RegisterLeasesServer(s *grpc.Server, srv LeasesServer) { s.RegisterService(&_Leases_serviceDesc, srv) } func _Leases_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CreateRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(LeasesServer).Create(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.leases.v1.Leases/Create", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(LeasesServer).Create(ctx, req.(*CreateRequest)) } return interceptor(ctx, in, info, handler) } func _Leases_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DeleteRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(LeasesServer).Delete(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.leases.v1.Leases/Delete", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(LeasesServer).Delete(ctx, req.(*DeleteRequest)) } return interceptor(ctx, in, info, handler) } func _Leases_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(LeasesServer).List(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.leases.v1.Leases/List", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(LeasesServer).List(ctx, req.(*ListRequest)) } return interceptor(ctx, in, info, handler) } var _Leases_serviceDesc = grpc.ServiceDesc{ ServiceName: "containerd.services.leases.v1.Leases", HandlerType: (*LeasesServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Create", Handler: _Leases_Create_Handler, }, { MethodName: "Delete", Handler: _Leases_Delete_Handler, }, { MethodName: "List", Handler: _Leases_List_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "github.com/containerd/containerd/api/services/leases/v1/leases.proto", } func (m *Lease) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Lease) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.ID) > 0 { dAtA[i] = 0xa i++ i = encodeVarintLeases(dAtA, i, uint64(len(m.ID))) i += copy(dAtA[i:], m.ID) } dAtA[i] = 0x12 i++ i = encodeVarintLeases(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt))) n1, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i:]) if err != nil { return 0, err } i += n1 if len(m.Labels) > 0 { for k, _ := range m.Labels { dAtA[i] = 0x1a i++ v := m.Labels[k] mapSize := 1 + len(k) + sovLeases(uint64(len(k))) + 1 + len(v) + sovLeases(uint64(len(v))) i = encodeVarintLeases(dAtA, i, uint64(mapSize)) dAtA[i] = 0xa i++ i = encodeVarintLeases(dAtA, i, uint64(len(k))) i += copy(dAtA[i:], k) dAtA[i] = 0x12 i++ i = encodeVarintLeases(dAtA, i, uint64(len(v))) i += copy(dAtA[i:], v) } } return i, nil } func (m *CreateRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *CreateRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.ID) > 0 { dAtA[i] = 0xa i++ i = encodeVarintLeases(dAtA, i, uint64(len(m.ID))) i += copy(dAtA[i:], m.ID) } if len(m.Labels) > 0 { for k, _ := range m.Labels { dAtA[i] = 0x1a i++ v := m.Labels[k] mapSize := 1 + len(k) + sovLeases(uint64(len(k))) + 1 + len(v) + sovLeases(uint64(len(v))) i = encodeVarintLeases(dAtA, i, uint64(mapSize)) dAtA[i] = 0xa i++ i = encodeVarintLeases(dAtA, i, uint64(len(k))) i += copy(dAtA[i:], k) dAtA[i] = 0x12 i++ i = encodeVarintLeases(dAtA, i, uint64(len(v))) i += copy(dAtA[i:], v) } } return i, nil } func (m *CreateResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *CreateResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if m.Lease != nil { dAtA[i] = 0xa i++ i = encodeVarintLeases(dAtA, i, uint64(m.Lease.Size())) n2, err := m.Lease.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n2 } return i, nil } func (m *DeleteRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *DeleteRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.ID) > 0 { dAtA[i] = 0xa i++ i = encodeVarintLeases(dAtA, i, uint64(len(m.ID))) i += copy(dAtA[i:], m.ID) } return i, nil } func (m *ListRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ListRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Filters) > 0 { for _, s := range m.Filters { dAtA[i] = 0xa i++ l = len(s) for l >= 1<<7 { dAtA[i] = uint8(uint64(l)&0x7f | 0x80) l >>= 7 i++ } dAtA[i] = uint8(l) i++ i += copy(dAtA[i:], s) } } return i, nil } func (m *ListResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ListResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Leases) > 0 { for _, msg := range m.Leases { dAtA[i] = 0xa i++ i = encodeVarintLeases(dAtA, i, uint64(msg.Size())) n, err := msg.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n } } return i, nil } func encodeVarintLeases(dAtA []byte, offset int, v uint64) int { for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return offset + 1 } func (m *Lease) Size() (n int) { var l int _ = l l = len(m.ID) if l > 0 { n += 1 + l + sovLeases(uint64(l)) } l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt) n += 1 + l + sovLeases(uint64(l)) if len(m.Labels) > 0 { for k, v := range m.Labels { _ = k _ = v mapEntrySize := 1 + len(k) + sovLeases(uint64(len(k))) + 1 + len(v) + sovLeases(uint64(len(v))) n += mapEntrySize + 1 + sovLeases(uint64(mapEntrySize)) } } return n } func (m *CreateRequest) Size() (n int) { var l int _ = l l = len(m.ID) if l > 0 { n += 1 + l + sovLeases(uint64(l)) } if len(m.Labels) > 0 { for k, v := range m.Labels { _ = k _ = v mapEntrySize := 1 + len(k) + sovLeases(uint64(len(k))) + 1 + len(v) + sovLeases(uint64(len(v))) n += mapEntrySize + 1 + sovLeases(uint64(mapEntrySize)) } } return n } func (m *CreateResponse) Size() (n int) { var l int _ = l if m.Lease != nil { l = m.Lease.Size() n += 1 + l + sovLeases(uint64(l)) } return n } func (m *DeleteRequest) Size() (n int) { var l int _ = l l = len(m.ID) if l > 0 { n += 1 + l + sovLeases(uint64(l)) } return n } func (m *ListRequest) Size() (n int) { var l int _ = l if len(m.Filters) > 0 { for _, s := range m.Filters { l = len(s) n += 1 + l + sovLeases(uint64(l)) } } return n } func (m *ListResponse) Size() (n int) { var l int _ = l if len(m.Leases) > 0 { for _, e := range m.Leases { l = e.Size() n += 1 + l + sovLeases(uint64(l)) } } return n } func sovLeases(x uint64) (n int) { for { n++ x >>= 7 if x == 0 { break } } return n } func sozLeases(x uint64) (n int) { return sovLeases(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (this *Lease) String() string { if this == nil { return "nil" } keysForLabels := make([]string, 0, len(this.Labels)) for k, _ := range this.Labels { keysForLabels = append(keysForLabels, k) } github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) mapStringForLabels := "map[string]string{" for _, k := range keysForLabels { mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) } mapStringForLabels += "}" s := strings.Join([]string{`&Lease{`, `ID:` + fmt.Sprintf("%v", this.ID) + `,`, `CreatedAt:` + strings.Replace(strings.Replace(this.CreatedAt.String(), "Timestamp", "google_protobuf2.Timestamp", 1), `&`, ``, 1) + `,`, `Labels:` + mapStringForLabels + `,`, `}`, }, "") return s } func (this *CreateRequest) String() string { if this == nil { return "nil" } keysForLabels := make([]string, 0, len(this.Labels)) for k, _ := range this.Labels { keysForLabels = append(keysForLabels, k) } github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) mapStringForLabels := "map[string]string{" for _, k := range keysForLabels { mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) } mapStringForLabels += "}" s := strings.Join([]string{`&CreateRequest{`, `ID:` + fmt.Sprintf("%v", this.ID) + `,`, `Labels:` + mapStringForLabels + `,`, `}`, }, "") return s } func (this *CreateResponse) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&CreateResponse{`, `Lease:` + strings.Replace(fmt.Sprintf("%v", this.Lease), "Lease", "Lease", 1) + `,`, `}`, }, "") return s } func (this *DeleteRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&DeleteRequest{`, `ID:` + fmt.Sprintf("%v", this.ID) + `,`, `}`, }, "") return s } func (this *ListRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&ListRequest{`, `Filters:` + fmt.Sprintf("%v", this.Filters) + `,`, `}`, }, "") return s } func (this *ListResponse) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&ListResponse{`, `Leases:` + strings.Replace(fmt.Sprintf("%v", this.Leases), "Lease", "Lease", 1) + `,`, `}`, }, "") return s } func valueToStringLeases(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { return "nil" } pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } func (m *Lease) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowLeases } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Lease: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Lease: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowLeases } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthLeases } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowLeases } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthLeases } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowLeases } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthLeases } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Labels == nil { m.Labels = make(map[string]string) } var mapkey string var mapvalue string for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowLeases } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowLeases } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapkey |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { return ErrInvalidLengthLeases } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var stringLenmapvalue uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowLeases } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapvalue |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLenmapvalue := int(stringLenmapvalue) if intStringLenmapvalue < 0 { return ErrInvalidLengthLeases } postStringIndexmapvalue := iNdEx + intStringLenmapvalue if postStringIndexmapvalue > l { return io.ErrUnexpectedEOF } mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) iNdEx = postStringIndexmapvalue } else { iNdEx = entryPreIndex skippy, err := skipLeases(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthLeases } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.Labels[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipLeases(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthLeases } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *CreateRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowLeases } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: CreateRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: CreateRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowLeases } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthLeases } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowLeases } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthLeases } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Labels == nil { m.Labels = make(map[string]string) } var mapkey string var mapvalue string for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowLeases } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowLeases } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapkey |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { return ErrInvalidLengthLeases } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var stringLenmapvalue uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowLeases } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapvalue |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLenmapvalue := int(stringLenmapvalue) if intStringLenmapvalue < 0 { return ErrInvalidLengthLeases } postStringIndexmapvalue := iNdEx + intStringLenmapvalue if postStringIndexmapvalue > l { return io.ErrUnexpectedEOF } mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) iNdEx = postStringIndexmapvalue } else { iNdEx = entryPreIndex skippy, err := skipLeases(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthLeases } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.Labels[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipLeases(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthLeases } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *CreateResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowLeases } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: CreateResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: CreateResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Lease", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowLeases } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthLeases } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Lease == nil { m.Lease = &Lease{} } if err := m.Lease.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipLeases(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthLeases } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *DeleteRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowLeases } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: DeleteRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: DeleteRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowLeases } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthLeases } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipLeases(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthLeases } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ListRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowLeases } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ListRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ListRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Filters", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowLeases } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthLeases } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Filters = append(m.Filters, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipLeases(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthLeases } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ListResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowLeases } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ListResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ListResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Leases", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowLeases } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthLeases } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } m.Leases = append(m.Leases, &Lease{}) if err := m.Leases[len(m.Leases)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipLeases(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthLeases } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipLeases(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowLeases } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } wireType := int(wire & 0x7) switch wireType { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowLeases } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } iNdEx++ if dAtA[iNdEx-1] < 0x80 { break } } return iNdEx, nil case 1: iNdEx += 8 return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowLeases } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ length |= (int(b) & 0x7F) << shift if b < 0x80 { break } } iNdEx += length if length < 0 { return 0, ErrInvalidLengthLeases } return iNdEx, nil case 3: for { var innerWire uint64 var start int = iNdEx for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowLeases } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ innerWire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } innerWireType := int(innerWire & 0x7) if innerWireType == 4 { break } next, err := skipLeases(dAtA[start:]) if err != nil { return 0, err } iNdEx = start + next } return iNdEx, nil case 4: return iNdEx, nil case 5: iNdEx += 4 return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } } panic("unreachable") } var ( ErrInvalidLengthLeases = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowLeases = fmt.Errorf("proto: integer overflow") ) func init() { proto.RegisterFile("github.com/containerd/containerd/api/services/leases/v1/leases.proto", fileDescriptorLeases) } var fileDescriptorLeases = []byte{ // 504 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0xdf, 0x8a, 0xd3, 0x40, 0x14, 0xc6, 0x3b, 0xa9, 0x8d, 0xf6, 0xc4, 0x15, 0x19, 0x96, 0x25, 0x44, 0x4c, 0x4b, 0x10, 0xb6, 0xf8, 0x67, 0xe2, 0xd6, 0x9b, 0x75, 0x15, 0xc1, 0x6e, 0x17, 0x14, 0x82, 0x48, 0xf0, 0x62, 0xf1, 0x66, 0x49, 0xdb, 0xb3, 0x31, 0x98, 0x36, 0x31, 0x33, 0x2d, 0xf4, 0xce, 0x47, 0xf0, 0x11, 0x7c, 0x08, 0x1f, 0xa2, 0x97, 0x5e, 0x7a, 0xb5, 0xba, 0xb9, 0xf3, 0x2d, 0x24, 0x33, 0x09, 0xbb, 0x5b, 0xd1, 0x56, 0xd9, 0xbb, 0x33, 0x99, 0xef, 0x3b, 0xe7, 0x77, 0x3e, 0x98, 0x40, 0x3f, 0x8c, 0xc4, 0xbb, 0xe9, 0x80, 0x0d, 0x93, 0xb1, 0x3b, 0x4c, 0x26, 0x22, 0x88, 0x26, 0x98, 0x8d, 0xce, 0x97, 0x41, 0x1a, 0xb9, 0x1c, 0xb3, 0x59, 0x34, 0x44, 0xee, 0xc6, 0x18, 0x70, 0xe4, 0xee, 0x6c, 0xa7, 0xac, 0x58, 0x9a, 0x25, 0x22, 0xa1, 0xb7, 0xcf, 0xf4, 0xac, 0xd2, 0xb2, 0x52, 0x31, 0xdb, 0xb1, 0x36, 0xc3, 0x24, 0x4c, 0xa4, 0xd2, 0x2d, 0x2a, 0x65, 0xb2, 0x6e, 0x85, 0x49, 0x12, 0xc6, 0xe8, 0xca, 0xd3, 0x60, 0x7a, 0xec, 0xe2, 0x38, 0x15, 0xf3, 0xf2, 0xb2, 0xb5, 0x7c, 0x29, 0xa2, 0x31, 0x72, 0x11, 0x8c, 0x53, 0x25, 0x70, 0x7e, 0x12, 0x68, 0x78, 0xc5, 0x04, 0xba, 0x05, 0x5a, 0x34, 0x32, 0x49, 0x9b, 0x74, 0x9a, 0x3d, 0x3d, 0x3f, 0x69, 0x69, 0x2f, 0xfb, 0xbe, 0x16, 0x8d, 0xe8, 0x3e, 0xc0, 0x30, 0xc3, 0x40, 0xe0, 0xe8, 0x28, 0x10, 0xa6, 0xd6, 0x26, 0x1d, 0xa3, 0x6b, 0x31, 0xd5, 0x97, 0x55, 0x7d, 0xd9, 0x9b, 0xaa, 0x6f, 0xef, 0xda, 0xe2, 0xa4, 0x55, 0xfb, 0xf4, 0xbd, 0x45, 0xfc, 0x66, 0xe9, 0x7b, 0x2e, 0xe8, 0x0b, 0xd0, 0xe3, 0x60, 0x80, 0x31, 0x37, 0xeb, 0xed, 0x7a, 0xc7, 0xe8, 0x3e, 0x64, 0x7f, 0x5d, 0x95, 0x49, 0x24, 0xe6, 0x49, 0xcb, 0xc1, 0x44, 0x64, 0x73, 0xbf, 0xf4, 0x5b, 0x8f, 0xc1, 0x38, 0xf7, 0x99, 0xde, 0x84, 0xfa, 0x7b, 0x9c, 0x2b, 0x6c, 0xbf, 0x28, 0xe9, 0x26, 0x34, 0x66, 0x41, 0x3c, 0x45, 0x89, 0xda, 0xf4, 0xd5, 0x61, 0x4f, 0xdb, 0x25, 0xce, 0x17, 0x02, 0x1b, 0xfb, 0x12, 0xc9, 0xc7, 0x0f, 0x53, 0xe4, 0xe2, 0x8f, 0x3b, 0xbf, 0x5e, 0xc2, 0xdd, 0x5d, 0x81, 0x7b, 0xa1, 0xeb, 0x65, 0x63, 0x7b, 0x70, 0xa3, 0xea, 0xcf, 0xd3, 0x64, 0xc2, 0x91, 0xee, 0x41, 0x43, 0xce, 0x96, 0x7e, 0xa3, 0x7b, 0x67, 0x9d, 0x30, 0x7d, 0x65, 0x71, 0xb6, 0x61, 0xa3, 0x8f, 0x31, 0xae, 0xcc, 0xc0, 0xd9, 0x06, 0xc3, 0x8b, 0xb8, 0xa8, 0x64, 0x26, 0x5c, 0x3d, 0x8e, 0x62, 0x81, 0x19, 0x37, 0x49, 0xbb, 0xde, 0x69, 0xfa, 0xd5, 0xd1, 0xf1, 0xe0, 0xba, 0x12, 0x96, 0x74, 0x4f, 0x41, 0x57, 0xb3, 0xa5, 0x70, 0x5d, 0xbc, 0xd2, 0xd3, 0xfd, 0xac, 0x81, 0x2e, 0xbf, 0x70, 0x8a, 0xa0, 0xab, 0xc5, 0xe9, 0xfd, 0x7f, 0xc9, 0xdf, 0x7a, 0xb0, 0xa6, 0xba, 0xe4, 0x7d, 0x05, 0xba, 0x4a, 0x64, 0xe5, 0x98, 0x0b, 0xc1, 0x59, 0x5b, 0xbf, 0x3d, 0x82, 0x83, 0xe2, 0xe5, 0xd1, 0x23, 0xb8, 0x52, 0xe4, 0x41, 0xef, 0xae, 0xda, 0xfb, 0x2c, 0x5d, 0xeb, 0xde, 0x5a, 0x5a, 0x05, 0xdc, 0x3b, 0x5c, 0x9c, 0xda, 0xb5, 0x6f, 0xa7, 0x76, 0xed, 0x63, 0x6e, 0x93, 0x45, 0x6e, 0x93, 0xaf, 0xb9, 0x4d, 0x7e, 0xe4, 0x36, 0x79, 0xfb, 0xec, 0x3f, 0x7f, 0x43, 0x4f, 0x54, 0x75, 0x58, 0x1b, 0xe8, 0x72, 0x99, 0x47, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0xad, 0x77, 0xda, 0x73, 0xd1, 0x04, 0x00, 0x00, } docker-containerd-tags-docker-17.12.1/api/services/leases/v1/leases.proto000066400000000000000000000030721322771672400262330ustar00rootroot00000000000000syntax = "proto3"; package containerd.services.leases.v1; import weak "gogoproto/gogo.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; option go_package = "github.com/containerd/containerd/api/services/leases/v1;leases"; // Leases service manages resources leases within the metadata store. service Leases { // Create creates a new lease for managing changes to metadata. A lease // can be used to protect objects from being removed. rpc Create(CreateRequest) returns (CreateResponse); // Delete deletes the lease and makes any unreferenced objects created // during the lease eligible for garbage collection if not referenced // or retained by other resources during the lease. rpc Delete(DeleteRequest) returns (google.protobuf.Empty); // List lists all active leases, returning the full list of // leases and optionally including the referenced resources. rpc List(ListRequest) returns (ListResponse); } // Lease is an object which retains resources while it exists. message Lease { string id = 1; google.protobuf.Timestamp created_at = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; map labels = 3; } message CreateRequest { // ID is used to identity the lease, when the id is not set the service // generates a random identifier for the lease. string id = 1; map labels = 3; } message CreateResponse { Lease lease = 1; } message DeleteRequest { string id = 1; } message ListRequest { repeated string filters = 1; } message ListResponse { repeated Lease leases = 1; } docker-containerd-tags-docker-17.12.1/api/services/namespaces/000077500000000000000000000000001322771672400242055ustar00rootroot00000000000000docker-containerd-tags-docker-17.12.1/api/services/namespaces/v1/000077500000000000000000000000001322771672400245335ustar00rootroot00000000000000docker-containerd-tags-docker-17.12.1/api/services/namespaces/v1/namespace.pb.go000066400000000000000000001473051322771672400274300ustar00rootroot00000000000000// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/containerd/containerd/api/services/namespaces/v1/namespace.proto /* Package namespaces is a generated protocol buffer package. It is generated from these files: github.com/containerd/containerd/api/services/namespaces/v1/namespace.proto It has these top-level messages: Namespace GetNamespaceRequest GetNamespaceResponse ListNamespacesRequest ListNamespacesResponse CreateNamespaceRequest CreateNamespaceResponse UpdateNamespaceRequest UpdateNamespaceResponse DeleteNamespaceRequest */ package namespaces import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" // skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto" import google_protobuf1 "github.com/gogo/protobuf/types" import google_protobuf2 "github.com/gogo/protobuf/types" import ( context "golang.org/x/net/context" grpc "google.golang.org/grpc" ) import strings "strings" import reflect "reflect" import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" import io "io" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package type Namespace struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Labels provides an area to include arbitrary data on namespaces. // // The combined size of a key/value pair cannot exceed 4096 bytes. // // Note that to add a new value to this field, read the existing set and // include the entire result in the update call. Labels map[string]string `protobuf:"bytes,2,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (m *Namespace) Reset() { *m = Namespace{} } func (*Namespace) ProtoMessage() {} func (*Namespace) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{0} } type GetNamespaceRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } func (m *GetNamespaceRequest) Reset() { *m = GetNamespaceRequest{} } func (*GetNamespaceRequest) ProtoMessage() {} func (*GetNamespaceRequest) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{1} } type GetNamespaceResponse struct { Namespace Namespace `protobuf:"bytes,1,opt,name=namespace" json:"namespace"` } func (m *GetNamespaceResponse) Reset() { *m = GetNamespaceResponse{} } func (*GetNamespaceResponse) ProtoMessage() {} func (*GetNamespaceResponse) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{2} } type ListNamespacesRequest struct { Filter string `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` } func (m *ListNamespacesRequest) Reset() { *m = ListNamespacesRequest{} } func (*ListNamespacesRequest) ProtoMessage() {} func (*ListNamespacesRequest) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{3} } type ListNamespacesResponse struct { Namespaces []Namespace `protobuf:"bytes,1,rep,name=namespaces" json:"namespaces"` } func (m *ListNamespacesResponse) Reset() { *m = ListNamespacesResponse{} } func (*ListNamespacesResponse) ProtoMessage() {} func (*ListNamespacesResponse) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{4} } type CreateNamespaceRequest struct { Namespace Namespace `protobuf:"bytes,1,opt,name=namespace" json:"namespace"` } func (m *CreateNamespaceRequest) Reset() { *m = CreateNamespaceRequest{} } func (*CreateNamespaceRequest) ProtoMessage() {} func (*CreateNamespaceRequest) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{5} } type CreateNamespaceResponse struct { Namespace Namespace `protobuf:"bytes,1,opt,name=namespace" json:"namespace"` } func (m *CreateNamespaceResponse) Reset() { *m = CreateNamespaceResponse{} } func (*CreateNamespaceResponse) ProtoMessage() {} func (*CreateNamespaceResponse) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{6} } // UpdateNamespaceRequest updates the metadata for a namespace. // // The operation should follow semantics described in // https://developers.google.com/protocol-buffers/docs/reference/csharp/class/google/protobuf/well-known-types/field-mask, // unless otherwise qualified. type UpdateNamespaceRequest struct { // Namespace provides the target value, as declared by the mask, for the update. // // The namespace field must be set. Namespace Namespace `protobuf:"bytes,1,opt,name=namespace" json:"namespace"` // UpdateMask specifies which fields to perform the update on. If empty, // the operation applies to all fields. // // For the most part, this applies only to selectively updating labels on // the namespace. While field masks are typically limited to ascii alphas // and digits, we just take everything after the "labels." as the map key. UpdateMask *google_protobuf2.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask" json:"update_mask,omitempty"` } func (m *UpdateNamespaceRequest) Reset() { *m = UpdateNamespaceRequest{} } func (*UpdateNamespaceRequest) ProtoMessage() {} func (*UpdateNamespaceRequest) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{7} } type UpdateNamespaceResponse struct { Namespace Namespace `protobuf:"bytes,1,opt,name=namespace" json:"namespace"` } func (m *UpdateNamespaceResponse) Reset() { *m = UpdateNamespaceResponse{} } func (*UpdateNamespaceResponse) ProtoMessage() {} func (*UpdateNamespaceResponse) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{8} } type DeleteNamespaceRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } func (m *DeleteNamespaceRequest) Reset() { *m = DeleteNamespaceRequest{} } func (*DeleteNamespaceRequest) ProtoMessage() {} func (*DeleteNamespaceRequest) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{9} } func init() { proto.RegisterType((*Namespace)(nil), "containerd.services.namespaces.v1.Namespace") proto.RegisterType((*GetNamespaceRequest)(nil), "containerd.services.namespaces.v1.GetNamespaceRequest") proto.RegisterType((*GetNamespaceResponse)(nil), "containerd.services.namespaces.v1.GetNamespaceResponse") proto.RegisterType((*ListNamespacesRequest)(nil), "containerd.services.namespaces.v1.ListNamespacesRequest") proto.RegisterType((*ListNamespacesResponse)(nil), "containerd.services.namespaces.v1.ListNamespacesResponse") proto.RegisterType((*CreateNamespaceRequest)(nil), "containerd.services.namespaces.v1.CreateNamespaceRequest") proto.RegisterType((*CreateNamespaceResponse)(nil), "containerd.services.namespaces.v1.CreateNamespaceResponse") proto.RegisterType((*UpdateNamespaceRequest)(nil), "containerd.services.namespaces.v1.UpdateNamespaceRequest") proto.RegisterType((*UpdateNamespaceResponse)(nil), "containerd.services.namespaces.v1.UpdateNamespaceResponse") proto.RegisterType((*DeleteNamespaceRequest)(nil), "containerd.services.namespaces.v1.DeleteNamespaceRequest") } // Reference imports to suppress errors if they are not otherwise used. var _ context.Context var _ grpc.ClientConn // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 // Client API for Namespaces service type NamespacesClient interface { Get(ctx context.Context, in *GetNamespaceRequest, opts ...grpc.CallOption) (*GetNamespaceResponse, error) List(ctx context.Context, in *ListNamespacesRequest, opts ...grpc.CallOption) (*ListNamespacesResponse, error) Create(ctx context.Context, in *CreateNamespaceRequest, opts ...grpc.CallOption) (*CreateNamespaceResponse, error) Update(ctx context.Context, in *UpdateNamespaceRequest, opts ...grpc.CallOption) (*UpdateNamespaceResponse, error) Delete(ctx context.Context, in *DeleteNamespaceRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) } type namespacesClient struct { cc *grpc.ClientConn } func NewNamespacesClient(cc *grpc.ClientConn) NamespacesClient { return &namespacesClient{cc} } func (c *namespacesClient) Get(ctx context.Context, in *GetNamespaceRequest, opts ...grpc.CallOption) (*GetNamespaceResponse, error) { out := new(GetNamespaceResponse) err := grpc.Invoke(ctx, "/containerd.services.namespaces.v1.Namespaces/Get", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *namespacesClient) List(ctx context.Context, in *ListNamespacesRequest, opts ...grpc.CallOption) (*ListNamespacesResponse, error) { out := new(ListNamespacesResponse) err := grpc.Invoke(ctx, "/containerd.services.namespaces.v1.Namespaces/List", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *namespacesClient) Create(ctx context.Context, in *CreateNamespaceRequest, opts ...grpc.CallOption) (*CreateNamespaceResponse, error) { out := new(CreateNamespaceResponse) err := grpc.Invoke(ctx, "/containerd.services.namespaces.v1.Namespaces/Create", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *namespacesClient) Update(ctx context.Context, in *UpdateNamespaceRequest, opts ...grpc.CallOption) (*UpdateNamespaceResponse, error) { out := new(UpdateNamespaceResponse) err := grpc.Invoke(ctx, "/containerd.services.namespaces.v1.Namespaces/Update", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *namespacesClient) Delete(ctx context.Context, in *DeleteNamespaceRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) { out := new(google_protobuf1.Empty) err := grpc.Invoke(ctx, "/containerd.services.namespaces.v1.Namespaces/Delete", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } // Server API for Namespaces service type NamespacesServer interface { Get(context.Context, *GetNamespaceRequest) (*GetNamespaceResponse, error) List(context.Context, *ListNamespacesRequest) (*ListNamespacesResponse, error) Create(context.Context, *CreateNamespaceRequest) (*CreateNamespaceResponse, error) Update(context.Context, *UpdateNamespaceRequest) (*UpdateNamespaceResponse, error) Delete(context.Context, *DeleteNamespaceRequest) (*google_protobuf1.Empty, error) } func RegisterNamespacesServer(s *grpc.Server, srv NamespacesServer) { s.RegisterService(&_Namespaces_serviceDesc, srv) } func _Namespaces_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetNamespaceRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(NamespacesServer).Get(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.namespaces.v1.Namespaces/Get", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(NamespacesServer).Get(ctx, req.(*GetNamespaceRequest)) } return interceptor(ctx, in, info, handler) } func _Namespaces_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListNamespacesRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(NamespacesServer).List(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.namespaces.v1.Namespaces/List", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(NamespacesServer).List(ctx, req.(*ListNamespacesRequest)) } return interceptor(ctx, in, info, handler) } func _Namespaces_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CreateNamespaceRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(NamespacesServer).Create(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.namespaces.v1.Namespaces/Create", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(NamespacesServer).Create(ctx, req.(*CreateNamespaceRequest)) } return interceptor(ctx, in, info, handler) } func _Namespaces_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateNamespaceRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(NamespacesServer).Update(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.namespaces.v1.Namespaces/Update", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(NamespacesServer).Update(ctx, req.(*UpdateNamespaceRequest)) } return interceptor(ctx, in, info, handler) } func _Namespaces_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DeleteNamespaceRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(NamespacesServer).Delete(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.namespaces.v1.Namespaces/Delete", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(NamespacesServer).Delete(ctx, req.(*DeleteNamespaceRequest)) } return interceptor(ctx, in, info, handler) } var _Namespaces_serviceDesc = grpc.ServiceDesc{ ServiceName: "containerd.services.namespaces.v1.Namespaces", HandlerType: (*NamespacesServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Get", Handler: _Namespaces_Get_Handler, }, { MethodName: "List", Handler: _Namespaces_List_Handler, }, { MethodName: "Create", Handler: _Namespaces_Create_Handler, }, { MethodName: "Update", Handler: _Namespaces_Update_Handler, }, { MethodName: "Delete", Handler: _Namespaces_Delete_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "github.com/containerd/containerd/api/services/namespaces/v1/namespace.proto", } func (m *Namespace) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Namespace) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Name) > 0 { dAtA[i] = 0xa i++ i = encodeVarintNamespace(dAtA, i, uint64(len(m.Name))) i += copy(dAtA[i:], m.Name) } if len(m.Labels) > 0 { for k, _ := range m.Labels { dAtA[i] = 0x12 i++ v := m.Labels[k] mapSize := 1 + len(k) + sovNamespace(uint64(len(k))) + 1 + len(v) + sovNamespace(uint64(len(v))) i = encodeVarintNamespace(dAtA, i, uint64(mapSize)) dAtA[i] = 0xa i++ i = encodeVarintNamespace(dAtA, i, uint64(len(k))) i += copy(dAtA[i:], k) dAtA[i] = 0x12 i++ i = encodeVarintNamespace(dAtA, i, uint64(len(v))) i += copy(dAtA[i:], v) } } return i, nil } func (m *GetNamespaceRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *GetNamespaceRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Name) > 0 { dAtA[i] = 0xa i++ i = encodeVarintNamespace(dAtA, i, uint64(len(m.Name))) i += copy(dAtA[i:], m.Name) } return i, nil } func (m *GetNamespaceResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *GetNamespaceResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l dAtA[i] = 0xa i++ i = encodeVarintNamespace(dAtA, i, uint64(m.Namespace.Size())) n1, err := m.Namespace.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n1 return i, nil } func (m *ListNamespacesRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ListNamespacesRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Filter) > 0 { dAtA[i] = 0xa i++ i = encodeVarintNamespace(dAtA, i, uint64(len(m.Filter))) i += copy(dAtA[i:], m.Filter) } return i, nil } func (m *ListNamespacesResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ListNamespacesResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Namespaces) > 0 { for _, msg := range m.Namespaces { dAtA[i] = 0xa i++ i = encodeVarintNamespace(dAtA, i, uint64(msg.Size())) n, err := msg.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n } } return i, nil } func (m *CreateNamespaceRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *CreateNamespaceRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l dAtA[i] = 0xa i++ i = encodeVarintNamespace(dAtA, i, uint64(m.Namespace.Size())) n2, err := m.Namespace.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n2 return i, nil } func (m *CreateNamespaceResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *CreateNamespaceResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l dAtA[i] = 0xa i++ i = encodeVarintNamespace(dAtA, i, uint64(m.Namespace.Size())) n3, err := m.Namespace.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n3 return i, nil } func (m *UpdateNamespaceRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *UpdateNamespaceRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l dAtA[i] = 0xa i++ i = encodeVarintNamespace(dAtA, i, uint64(m.Namespace.Size())) n4, err := m.Namespace.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n4 if m.UpdateMask != nil { dAtA[i] = 0x12 i++ i = encodeVarintNamespace(dAtA, i, uint64(m.UpdateMask.Size())) n5, err := m.UpdateMask.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n5 } return i, nil } func (m *UpdateNamespaceResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *UpdateNamespaceResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l dAtA[i] = 0xa i++ i = encodeVarintNamespace(dAtA, i, uint64(m.Namespace.Size())) n6, err := m.Namespace.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n6 return i, nil } func (m *DeleteNamespaceRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *DeleteNamespaceRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Name) > 0 { dAtA[i] = 0xa i++ i = encodeVarintNamespace(dAtA, i, uint64(len(m.Name))) i += copy(dAtA[i:], m.Name) } return i, nil } func encodeVarintNamespace(dAtA []byte, offset int, v uint64) int { for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return offset + 1 } func (m *Namespace) Size() (n int) { var l int _ = l l = len(m.Name) if l > 0 { n += 1 + l + sovNamespace(uint64(l)) } if len(m.Labels) > 0 { for k, v := range m.Labels { _ = k _ = v mapEntrySize := 1 + len(k) + sovNamespace(uint64(len(k))) + 1 + len(v) + sovNamespace(uint64(len(v))) n += mapEntrySize + 1 + sovNamespace(uint64(mapEntrySize)) } } return n } func (m *GetNamespaceRequest) Size() (n int) { var l int _ = l l = len(m.Name) if l > 0 { n += 1 + l + sovNamespace(uint64(l)) } return n } func (m *GetNamespaceResponse) Size() (n int) { var l int _ = l l = m.Namespace.Size() n += 1 + l + sovNamespace(uint64(l)) return n } func (m *ListNamespacesRequest) Size() (n int) { var l int _ = l l = len(m.Filter) if l > 0 { n += 1 + l + sovNamespace(uint64(l)) } return n } func (m *ListNamespacesResponse) Size() (n int) { var l int _ = l if len(m.Namespaces) > 0 { for _, e := range m.Namespaces { l = e.Size() n += 1 + l + sovNamespace(uint64(l)) } } return n } func (m *CreateNamespaceRequest) Size() (n int) { var l int _ = l l = m.Namespace.Size() n += 1 + l + sovNamespace(uint64(l)) return n } func (m *CreateNamespaceResponse) Size() (n int) { var l int _ = l l = m.Namespace.Size() n += 1 + l + sovNamespace(uint64(l)) return n } func (m *UpdateNamespaceRequest) Size() (n int) { var l int _ = l l = m.Namespace.Size() n += 1 + l + sovNamespace(uint64(l)) if m.UpdateMask != nil { l = m.UpdateMask.Size() n += 1 + l + sovNamespace(uint64(l)) } return n } func (m *UpdateNamespaceResponse) Size() (n int) { var l int _ = l l = m.Namespace.Size() n += 1 + l + sovNamespace(uint64(l)) return n } func (m *DeleteNamespaceRequest) Size() (n int) { var l int _ = l l = len(m.Name) if l > 0 { n += 1 + l + sovNamespace(uint64(l)) } return n } func sovNamespace(x uint64) (n int) { for { n++ x >>= 7 if x == 0 { break } } return n } func sozNamespace(x uint64) (n int) { return sovNamespace(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (this *Namespace) String() string { if this == nil { return "nil" } keysForLabels := make([]string, 0, len(this.Labels)) for k, _ := range this.Labels { keysForLabels = append(keysForLabels, k) } github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) mapStringForLabels := "map[string]string{" for _, k := range keysForLabels { mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) } mapStringForLabels += "}" s := strings.Join([]string{`&Namespace{`, `Name:` + fmt.Sprintf("%v", this.Name) + `,`, `Labels:` + mapStringForLabels + `,`, `}`, }, "") return s } func (this *GetNamespaceRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&GetNamespaceRequest{`, `Name:` + fmt.Sprintf("%v", this.Name) + `,`, `}`, }, "") return s } func (this *GetNamespaceResponse) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&GetNamespaceResponse{`, `Namespace:` + strings.Replace(strings.Replace(this.Namespace.String(), "Namespace", "Namespace", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } func (this *ListNamespacesRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&ListNamespacesRequest{`, `Filter:` + fmt.Sprintf("%v", this.Filter) + `,`, `}`, }, "") return s } func (this *ListNamespacesResponse) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&ListNamespacesResponse{`, `Namespaces:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Namespaces), "Namespace", "Namespace", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } func (this *CreateNamespaceRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&CreateNamespaceRequest{`, `Namespace:` + strings.Replace(strings.Replace(this.Namespace.String(), "Namespace", "Namespace", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } func (this *CreateNamespaceResponse) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&CreateNamespaceResponse{`, `Namespace:` + strings.Replace(strings.Replace(this.Namespace.String(), "Namespace", "Namespace", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } func (this *UpdateNamespaceRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&UpdateNamespaceRequest{`, `Namespace:` + strings.Replace(strings.Replace(this.Namespace.String(), "Namespace", "Namespace", 1), `&`, ``, 1) + `,`, `UpdateMask:` + strings.Replace(fmt.Sprintf("%v", this.UpdateMask), "FieldMask", "google_protobuf2.FieldMask", 1) + `,`, `}`, }, "") return s } func (this *UpdateNamespaceResponse) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&UpdateNamespaceResponse{`, `Namespace:` + strings.Replace(strings.Replace(this.Namespace.String(), "Namespace", "Namespace", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } func (this *DeleteNamespaceRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&DeleteNamespaceRequest{`, `Name:` + fmt.Sprintf("%v", this.Name) + `,`, `}`, }, "") return s } func valueToStringNamespace(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { return "nil" } pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } func (m *Namespace) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNamespace } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Namespace: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Namespace: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNamespace } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthNamespace } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNamespace } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthNamespace } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Labels == nil { m.Labels = make(map[string]string) } var mapkey string var mapvalue string for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNamespace } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNamespace } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapkey |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { return ErrInvalidLengthNamespace } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var stringLenmapvalue uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNamespace } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapvalue |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLenmapvalue := int(stringLenmapvalue) if intStringLenmapvalue < 0 { return ErrInvalidLengthNamespace } postStringIndexmapvalue := iNdEx + intStringLenmapvalue if postStringIndexmapvalue > l { return io.ErrUnexpectedEOF } mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) iNdEx = postStringIndexmapvalue } else { iNdEx = entryPreIndex skippy, err := skipNamespace(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthNamespace } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.Labels[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipNamespace(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthNamespace } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *GetNamespaceRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNamespace } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: GetNamespaceRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: GetNamespaceRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNamespace } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthNamespace } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipNamespace(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthNamespace } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *GetNamespaceResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNamespace } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: GetNamespaceResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: GetNamespaceResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNamespace } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthNamespace } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Namespace.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipNamespace(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthNamespace } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ListNamespacesRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNamespace } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ListNamespacesRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ListNamespacesRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNamespace } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthNamespace } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Filter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipNamespace(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthNamespace } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ListNamespacesResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNamespace } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ListNamespacesResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ListNamespacesResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Namespaces", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNamespace } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthNamespace } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } m.Namespaces = append(m.Namespaces, Namespace{}) if err := m.Namespaces[len(m.Namespaces)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipNamespace(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthNamespace } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *CreateNamespaceRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNamespace } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: CreateNamespaceRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: CreateNamespaceRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNamespace } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthNamespace } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Namespace.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipNamespace(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthNamespace } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *CreateNamespaceResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNamespace } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: CreateNamespaceResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: CreateNamespaceResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNamespace } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthNamespace } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Namespace.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipNamespace(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthNamespace } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *UpdateNamespaceRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNamespace } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: UpdateNamespaceRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UpdateNamespaceRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNamespace } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthNamespace } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Namespace.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field UpdateMask", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNamespace } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthNamespace } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.UpdateMask == nil { m.UpdateMask = &google_protobuf2.FieldMask{} } if err := m.UpdateMask.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipNamespace(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthNamespace } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *UpdateNamespaceResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNamespace } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: UpdateNamespaceResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UpdateNamespaceResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNamespace } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthNamespace } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Namespace.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipNamespace(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthNamespace } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *DeleteNamespaceRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNamespace } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: DeleteNamespaceRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: DeleteNamespaceRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNamespace } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthNamespace } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipNamespace(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthNamespace } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipNamespace(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowNamespace } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } wireType := int(wire & 0x7) switch wireType { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowNamespace } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } iNdEx++ if dAtA[iNdEx-1] < 0x80 { break } } return iNdEx, nil case 1: iNdEx += 8 return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowNamespace } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ length |= (int(b) & 0x7F) << shift if b < 0x80 { break } } iNdEx += length if length < 0 { return 0, ErrInvalidLengthNamespace } return iNdEx, nil case 3: for { var innerWire uint64 var start int = iNdEx for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowNamespace } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ innerWire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } innerWireType := int(innerWire & 0x7) if innerWireType == 4 { break } next, err := skipNamespace(dAtA[start:]) if err != nil { return 0, err } iNdEx = start + next } return iNdEx, nil case 4: return iNdEx, nil case 5: iNdEx += 4 return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } } panic("unreachable") } var ( ErrInvalidLengthNamespace = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowNamespace = fmt.Errorf("proto: integer overflow") ) func init() { proto.RegisterFile("github.com/containerd/containerd/api/services/namespaces/v1/namespace.proto", fileDescriptorNamespace) } var fileDescriptorNamespace = []byte{ // 551 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xcd, 0x6e, 0xd3, 0x4c, 0x14, 0xcd, 0x24, 0xf9, 0x2c, 0xe5, 0x7a, 0xf3, 0x69, 0x08, 0x26, 0x32, 0x92, 0x09, 0x5e, 0x15, 0xa9, 0x1a, 0xab, 0x41, 0x82, 0xfe, 0xec, 0x0a, 0x6d, 0x17, 0x14, 0x84, 0x2c, 0x21, 0x21, 0x58, 0x80, 0x93, 0x4c, 0x5c, 0x13, 0xc7, 0x36, 0x9e, 0xb1, 0xa5, 0x88, 0x05, 0xbc, 0x0d, 0x1b, 0x1e, 0x24, 0x4b, 0x96, 0xac, 0x50, 0x9b, 0x27, 0x41, 0x33, 0x76, 0xe2, 0xd0, 0x18, 0xe1, 0x06, 0xca, 0xee, 0x5e, 0x7b, 0xce, 0x3d, 0x67, 0xae, 0xce, 0xb1, 0xe1, 0x89, 0xeb, 0xf1, 0xb3, 0xa4, 0x4f, 0x06, 0xe1, 0xc4, 0x1a, 0x84, 0x01, 0x77, 0xbc, 0x80, 0xc6, 0xc3, 0xd5, 0xd2, 0x89, 0x3c, 0x8b, 0xd1, 0x38, 0xf5, 0x06, 0x94, 0x59, 0x81, 0x33, 0xa1, 0x2c, 0x72, 0x44, 0x99, 0xee, 0x14, 0x1d, 0x89, 0xe2, 0x90, 0x87, 0xf8, 0x6e, 0x01, 0x23, 0x0b, 0x08, 0x29, 0x20, 0x24, 0xdd, 0xd1, 0xdb, 0x6e, 0xe8, 0x86, 0xf2, 0xb4, 0x25, 0xaa, 0x0c, 0xa8, 0xdf, 0x76, 0xc3, 0xd0, 0xf5, 0xa9, 0x25, 0xbb, 0x7e, 0x32, 0xb2, 0xe8, 0x24, 0xe2, 0xd3, 0xfc, 0x65, 0xf7, 0xf2, 0xcb, 0x91, 0x47, 0xfd, 0xe1, 0x9b, 0x89, 0xc3, 0xc6, 0xd9, 0x09, 0xf3, 0x0b, 0x82, 0xd6, 0xb3, 0x05, 0x0d, 0xc6, 0xd0, 0x14, 0x9c, 0x1d, 0xd4, 0x45, 0x5b, 0x2d, 0x5b, 0xd6, 0xf8, 0x39, 0x28, 0xbe, 0xd3, 0xa7, 0x3e, 0xeb, 0xd4, 0xbb, 0x8d, 0x2d, 0xb5, 0xb7, 0x4b, 0x7e, 0x2b, 0x95, 0x2c, 0x27, 0x92, 0x53, 0x09, 0x3d, 0x0a, 0x78, 0x3c, 0xb5, 0xf3, 0x39, 0xfa, 0x1e, 0xa8, 0x2b, 0x8f, 0xf1, 0xff, 0xd0, 0x18, 0xd3, 0x69, 0xce, 0x29, 0x4a, 0xdc, 0x86, 0xff, 0x52, 0xc7, 0x4f, 0x68, 0xa7, 0x2e, 0x9f, 0x65, 0xcd, 0x7e, 0x7d, 0x17, 0x99, 0xf7, 0xe0, 0xc6, 0x09, 0xe5, 0xcb, 0xf1, 0x36, 0x7d, 0x9f, 0x50, 0xc6, 0xcb, 0x74, 0x9b, 0x67, 0xd0, 0xfe, 0xf9, 0x28, 0x8b, 0xc2, 0x80, 0x89, 0xfb, 0xb4, 0x96, 0x62, 0x25, 0x40, 0xed, 0x6d, 0x5f, 0xe5, 0x4a, 0x87, 0xcd, 0xd9, 0xf7, 0x3b, 0x35, 0xbb, 0x18, 0x62, 0x5a, 0x70, 0xf3, 0xd4, 0x63, 0x05, 0x15, 0x5b, 0xc8, 0xd2, 0x40, 0x19, 0x79, 0x3e, 0xa7, 0x71, 0x2e, 0x2c, 0xef, 0x4c, 0x1f, 0xb4, 0xcb, 0x80, 0x5c, 0x9c, 0x0d, 0x50, 0xd0, 0x76, 0x90, 0x5c, 0xf8, 0x26, 0xea, 0x56, 0xa6, 0x98, 0xef, 0x40, 0x7b, 0x14, 0x53, 0x87, 0xd3, 0xb5, 0xb5, 0xfd, 0xfd, 0x55, 0x8c, 0xe1, 0xd6, 0x1a, 0xd7, 0xb5, 0xed, 0xfd, 0x33, 0x02, 0xed, 0x45, 0x34, 0xfc, 0x27, 0x37, 0xc3, 0x07, 0xa0, 0x26, 0x92, 0x4b, 0xa6, 0x47, 0x3a, 0x53, 0xed, 0xe9, 0x24, 0x0b, 0x18, 0x59, 0x04, 0x8c, 0x1c, 0x8b, 0x80, 0x3d, 0x75, 0xd8, 0xd8, 0x86, 0xec, 0xb8, 0xa8, 0xc5, 0x5a, 0xd6, 0x84, 0x5e, 0xdb, 0x5a, 0xb6, 0x41, 0x7b, 0x4c, 0x7d, 0x5a, 0xb2, 0x95, 0x92, 0x98, 0xf4, 0xce, 0x9b, 0x00, 0x85, 0x11, 0x71, 0x0a, 0x8d, 0x13, 0xca, 0xf1, 0x83, 0x0a, 0x12, 0x4a, 0x82, 0xa8, 0x3f, 0xbc, 0x32, 0x2e, 0x5f, 0xc3, 0x07, 0x68, 0x8a, 0x48, 0xe0, 0x2a, 0x5f, 0x97, 0xd2, 0xb0, 0xe9, 0x7b, 0x1b, 0x20, 0x73, 0xf2, 0x8f, 0xa0, 0x64, 0xae, 0xc5, 0x55, 0x86, 0x94, 0x87, 0x49, 0xdf, 0xdf, 0x04, 0x5a, 0x08, 0xc8, 0xfc, 0x51, 0x49, 0x40, 0xb9, 0xe7, 0x2b, 0x09, 0xf8, 0x95, 0x0b, 0x5f, 0x83, 0x92, 0x79, 0xa6, 0x92, 0x80, 0x72, 0x7b, 0xe9, 0xda, 0x5a, 0x1a, 0x8e, 0xc4, 0xbf, 0xe8, 0xf0, 0xed, 0xec, 0xc2, 0xa8, 0x7d, 0xbb, 0x30, 0x6a, 0x9f, 0xe6, 0x06, 0x9a, 0xcd, 0x0d, 0xf4, 0x75, 0x6e, 0xa0, 0xf3, 0xb9, 0x81, 0x5e, 0x1d, 0xff, 0xc1, 0x2f, 0xf4, 0xa0, 0xe8, 0x5e, 0xd6, 0xfa, 0x8a, 0xe4, 0xbc, 0xff, 0x23, 0x00, 0x00, 0xff, 0xff, 0x4f, 0x4a, 0x87, 0xf3, 0x95, 0x07, 0x00, 0x00, } docker-containerd-tags-docker-17.12.1/api/services/namespaces/v1/namespace.proto000066400000000000000000000056211322771672400275600ustar00rootroot00000000000000syntax = "proto3"; package containerd.services.namespaces.v1; import weak "gogoproto/gogo.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; option go_package = "github.com/containerd/containerd/api/services/namespaces/v1;namespaces"; // Namespaces provides the ability to manipulate containerd namespaces. // // All objects in the system are required to be a member of a namespace. If a // namespace is deleted, all objects, including containers, images and // snapshots, will be deleted, as well. // // Unless otherwise noted, operations in containerd apply only to the namespace // supplied per request. // // I hope this goes without saying, but namespaces are themselves NOT // namespaced. service Namespaces { rpc Get(GetNamespaceRequest) returns (GetNamespaceResponse); rpc List(ListNamespacesRequest) returns (ListNamespacesResponse); rpc Create(CreateNamespaceRequest) returns (CreateNamespaceResponse); rpc Update(UpdateNamespaceRequest) returns (UpdateNamespaceResponse); rpc Delete(DeleteNamespaceRequest) returns (google.protobuf.Empty); } message Namespace { string name = 1; // Labels provides an area to include arbitrary data on namespaces. // // The combined size of a key/value pair cannot exceed 4096 bytes. // // Note that to add a new value to this field, read the existing set and // include the entire result in the update call. map labels = 2; } message GetNamespaceRequest { string name = 1; } message GetNamespaceResponse { Namespace namespace = 1 [(gogoproto.nullable) = false]; } message ListNamespacesRequest { string filter = 1; } message ListNamespacesResponse { repeated Namespace namespaces = 1 [(gogoproto.nullable) = false]; } message CreateNamespaceRequest { Namespace namespace = 1 [(gogoproto.nullable) = false]; } message CreateNamespaceResponse { Namespace namespace = 1 [(gogoproto.nullable) = false]; } // UpdateNamespaceRequest updates the metadata for a namespace. // // The operation should follow semantics described in // https://developers.google.com/protocol-buffers/docs/reference/csharp/class/google/protobuf/well-known-types/field-mask, // unless otherwise qualified. message UpdateNamespaceRequest { // Namespace provides the target value, as declared by the mask, for the update. // // The namespace field must be set. Namespace namespace = 1 [(gogoproto.nullable) = false]; // UpdateMask specifies which fields to perform the update on. If empty, // the operation applies to all fields. // // For the most part, this applies only to selectively updating labels on // the namespace. While field masks are typically limited to ascii alphas // and digits, we just take everything after the "labels." as the map key. google.protobuf.FieldMask update_mask = 2; } message UpdateNamespaceResponse { Namespace namespace = 1 [(gogoproto.nullable) = false]; } message DeleteNamespaceRequest { string name = 1; } docker-containerd-tags-docker-17.12.1/api/services/snapshots/000077500000000000000000000000001322771672400241105ustar00rootroot00000000000000docker-containerd-tags-docker-17.12.1/api/services/snapshots/v1/000077500000000000000000000000001322771672400244365ustar00rootroot00000000000000docker-containerd-tags-docker-17.12.1/api/services/snapshots/v1/snapshots.pb.go000066400000000000000000003323601322771672400274160ustar00rootroot00000000000000// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/containerd/containerd/api/services/snapshots/v1/snapshots.proto /* Package snapshots is a generated protocol buffer package. It is generated from these files: github.com/containerd/containerd/api/services/snapshots/v1/snapshots.proto It has these top-level messages: PrepareSnapshotRequest PrepareSnapshotResponse ViewSnapshotRequest ViewSnapshotResponse MountsRequest MountsResponse RemoveSnapshotRequest CommitSnapshotRequest StatSnapshotRequest Info StatSnapshotResponse UpdateSnapshotRequest UpdateSnapshotResponse ListSnapshotsRequest ListSnapshotsResponse UsageRequest UsageResponse */ package snapshots import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" // skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto" import google_protobuf1 "github.com/gogo/protobuf/types" import google_protobuf2 "github.com/gogo/protobuf/types" import _ "github.com/gogo/protobuf/types" import containerd_types "github.com/containerd/containerd/api/types" import time "time" import ( context "golang.org/x/net/context" grpc "google.golang.org/grpc" ) import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" import strings "strings" import reflect "reflect" import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" import io "io" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf var _ = time.Kitchen // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package type Kind int32 const ( KindUnknown Kind = 0 KindView Kind = 1 KindActive Kind = 2 KindCommitted Kind = 3 ) var Kind_name = map[int32]string{ 0: "UNKNOWN", 1: "VIEW", 2: "ACTIVE", 3: "COMMITTED", } var Kind_value = map[string]int32{ "UNKNOWN": 0, "VIEW": 1, "ACTIVE": 2, "COMMITTED": 3, } func (x Kind) String() string { return proto.EnumName(Kind_name, int32(x)) } func (Kind) EnumDescriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{0} } type PrepareSnapshotRequest struct { Snapshotter string `protobuf:"bytes,1,opt,name=snapshotter,proto3" json:"snapshotter,omitempty"` Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` Parent string `protobuf:"bytes,3,opt,name=parent,proto3" json:"parent,omitempty"` // Labels are arbitrary data on snapshots. // // The combined size of a key/value pair cannot exceed 4096 bytes. Labels map[string]string `protobuf:"bytes,4,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (m *PrepareSnapshotRequest) Reset() { *m = PrepareSnapshotRequest{} } func (*PrepareSnapshotRequest) ProtoMessage() {} func (*PrepareSnapshotRequest) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{0} } type PrepareSnapshotResponse struct { Mounts []*containerd_types.Mount `protobuf:"bytes,1,rep,name=mounts" json:"mounts,omitempty"` } func (m *PrepareSnapshotResponse) Reset() { *m = PrepareSnapshotResponse{} } func (*PrepareSnapshotResponse) ProtoMessage() {} func (*PrepareSnapshotResponse) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{1} } type ViewSnapshotRequest struct { Snapshotter string `protobuf:"bytes,1,opt,name=snapshotter,proto3" json:"snapshotter,omitempty"` Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` Parent string `protobuf:"bytes,3,opt,name=parent,proto3" json:"parent,omitempty"` // Labels are arbitrary data on snapshots. // // The combined size of a key/value pair cannot exceed 4096 bytes. Labels map[string]string `protobuf:"bytes,4,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (m *ViewSnapshotRequest) Reset() { *m = ViewSnapshotRequest{} } func (*ViewSnapshotRequest) ProtoMessage() {} func (*ViewSnapshotRequest) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{2} } type ViewSnapshotResponse struct { Mounts []*containerd_types.Mount `protobuf:"bytes,1,rep,name=mounts" json:"mounts,omitempty"` } func (m *ViewSnapshotResponse) Reset() { *m = ViewSnapshotResponse{} } func (*ViewSnapshotResponse) ProtoMessage() {} func (*ViewSnapshotResponse) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{3} } type MountsRequest struct { Snapshotter string `protobuf:"bytes,1,opt,name=snapshotter,proto3" json:"snapshotter,omitempty"` Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` } func (m *MountsRequest) Reset() { *m = MountsRequest{} } func (*MountsRequest) ProtoMessage() {} func (*MountsRequest) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{4} } type MountsResponse struct { Mounts []*containerd_types.Mount `protobuf:"bytes,1,rep,name=mounts" json:"mounts,omitempty"` } func (m *MountsResponse) Reset() { *m = MountsResponse{} } func (*MountsResponse) ProtoMessage() {} func (*MountsResponse) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{5} } type RemoveSnapshotRequest struct { Snapshotter string `protobuf:"bytes,1,opt,name=snapshotter,proto3" json:"snapshotter,omitempty"` Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` } func (m *RemoveSnapshotRequest) Reset() { *m = RemoveSnapshotRequest{} } func (*RemoveSnapshotRequest) ProtoMessage() {} func (*RemoveSnapshotRequest) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{6} } type CommitSnapshotRequest struct { Snapshotter string `protobuf:"bytes,1,opt,name=snapshotter,proto3" json:"snapshotter,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` // Labels are arbitrary data on snapshots. // // The combined size of a key/value pair cannot exceed 4096 bytes. Labels map[string]string `protobuf:"bytes,4,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (m *CommitSnapshotRequest) Reset() { *m = CommitSnapshotRequest{} } func (*CommitSnapshotRequest) ProtoMessage() {} func (*CommitSnapshotRequest) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{7} } type StatSnapshotRequest struct { Snapshotter string `protobuf:"bytes,1,opt,name=snapshotter,proto3" json:"snapshotter,omitempty"` Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` } func (m *StatSnapshotRequest) Reset() { *m = StatSnapshotRequest{} } func (*StatSnapshotRequest) ProtoMessage() {} func (*StatSnapshotRequest) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{8} } type Info struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Parent string `protobuf:"bytes,2,opt,name=parent,proto3" json:"parent,omitempty"` Kind Kind `protobuf:"varint,3,opt,name=kind,proto3,enum=containerd.services.snapshots.v1.Kind" json:"kind,omitempty"` // CreatedAt provides the time at which the snapshot was created. CreatedAt time.Time `protobuf:"bytes,4,opt,name=created_at,json=createdAt,stdtime" json:"created_at"` // UpdatedAt provides the time the info was last updated. UpdatedAt time.Time `protobuf:"bytes,5,opt,name=updated_at,json=updatedAt,stdtime" json:"updated_at"` // Labels are arbitrary data on snapshots. // // The combined size of a key/value pair cannot exceed 4096 bytes. Labels map[string]string `protobuf:"bytes,6,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (m *Info) Reset() { *m = Info{} } func (*Info) ProtoMessage() {} func (*Info) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{9} } type StatSnapshotResponse struct { Info Info `protobuf:"bytes,1,opt,name=info" json:"info"` } func (m *StatSnapshotResponse) Reset() { *m = StatSnapshotResponse{} } func (*StatSnapshotResponse) ProtoMessage() {} func (*StatSnapshotResponse) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{10} } type UpdateSnapshotRequest struct { Snapshotter string `protobuf:"bytes,1,opt,name=snapshotter,proto3" json:"snapshotter,omitempty"` Info Info `protobuf:"bytes,2,opt,name=info" json:"info"` // UpdateMask specifies which fields to perform the update on. If empty, // the operation applies to all fields. // // In info, Name, Parent, Kind, Created are immutable, // other field may be updated using this mask. // If no mask is provided, all mutable field are updated. UpdateMask *google_protobuf2.FieldMask `protobuf:"bytes,3,opt,name=update_mask,json=updateMask" json:"update_mask,omitempty"` } func (m *UpdateSnapshotRequest) Reset() { *m = UpdateSnapshotRequest{} } func (*UpdateSnapshotRequest) ProtoMessage() {} func (*UpdateSnapshotRequest) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{11} } type UpdateSnapshotResponse struct { Info Info `protobuf:"bytes,1,opt,name=info" json:"info"` } func (m *UpdateSnapshotResponse) Reset() { *m = UpdateSnapshotResponse{} } func (*UpdateSnapshotResponse) ProtoMessage() {} func (*UpdateSnapshotResponse) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{12} } type ListSnapshotsRequest struct { Snapshotter string `protobuf:"bytes,1,opt,name=snapshotter,proto3" json:"snapshotter,omitempty"` } func (m *ListSnapshotsRequest) Reset() { *m = ListSnapshotsRequest{} } func (*ListSnapshotsRequest) ProtoMessage() {} func (*ListSnapshotsRequest) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{13} } type ListSnapshotsResponse struct { Info []Info `protobuf:"bytes,1,rep,name=info" json:"info"` } func (m *ListSnapshotsResponse) Reset() { *m = ListSnapshotsResponse{} } func (*ListSnapshotsResponse) ProtoMessage() {} func (*ListSnapshotsResponse) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{14} } type UsageRequest struct { Snapshotter string `protobuf:"bytes,1,opt,name=snapshotter,proto3" json:"snapshotter,omitempty"` Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` } func (m *UsageRequest) Reset() { *m = UsageRequest{} } func (*UsageRequest) ProtoMessage() {} func (*UsageRequest) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{15} } type UsageResponse struct { Size_ int64 `protobuf:"varint,1,opt,name=size,proto3" json:"size,omitempty"` Inodes int64 `protobuf:"varint,2,opt,name=inodes,proto3" json:"inodes,omitempty"` } func (m *UsageResponse) Reset() { *m = UsageResponse{} } func (*UsageResponse) ProtoMessage() {} func (*UsageResponse) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{16} } func init() { proto.RegisterType((*PrepareSnapshotRequest)(nil), "containerd.services.snapshots.v1.PrepareSnapshotRequest") proto.RegisterType((*PrepareSnapshotResponse)(nil), "containerd.services.snapshots.v1.PrepareSnapshotResponse") proto.RegisterType((*ViewSnapshotRequest)(nil), "containerd.services.snapshots.v1.ViewSnapshotRequest") proto.RegisterType((*ViewSnapshotResponse)(nil), "containerd.services.snapshots.v1.ViewSnapshotResponse") proto.RegisterType((*MountsRequest)(nil), "containerd.services.snapshots.v1.MountsRequest") proto.RegisterType((*MountsResponse)(nil), "containerd.services.snapshots.v1.MountsResponse") proto.RegisterType((*RemoveSnapshotRequest)(nil), "containerd.services.snapshots.v1.RemoveSnapshotRequest") proto.RegisterType((*CommitSnapshotRequest)(nil), "containerd.services.snapshots.v1.CommitSnapshotRequest") proto.RegisterType((*StatSnapshotRequest)(nil), "containerd.services.snapshots.v1.StatSnapshotRequest") proto.RegisterType((*Info)(nil), "containerd.services.snapshots.v1.Info") proto.RegisterType((*StatSnapshotResponse)(nil), "containerd.services.snapshots.v1.StatSnapshotResponse") proto.RegisterType((*UpdateSnapshotRequest)(nil), "containerd.services.snapshots.v1.UpdateSnapshotRequest") proto.RegisterType((*UpdateSnapshotResponse)(nil), "containerd.services.snapshots.v1.UpdateSnapshotResponse") proto.RegisterType((*ListSnapshotsRequest)(nil), "containerd.services.snapshots.v1.ListSnapshotsRequest") proto.RegisterType((*ListSnapshotsResponse)(nil), "containerd.services.snapshots.v1.ListSnapshotsResponse") proto.RegisterType((*UsageRequest)(nil), "containerd.services.snapshots.v1.UsageRequest") proto.RegisterType((*UsageResponse)(nil), "containerd.services.snapshots.v1.UsageResponse") proto.RegisterEnum("containerd.services.snapshots.v1.Kind", Kind_name, Kind_value) } // Reference imports to suppress errors if they are not otherwise used. var _ context.Context var _ grpc.ClientConn // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 // Client API for Snapshots service type SnapshotsClient interface { Prepare(ctx context.Context, in *PrepareSnapshotRequest, opts ...grpc.CallOption) (*PrepareSnapshotResponse, error) View(ctx context.Context, in *ViewSnapshotRequest, opts ...grpc.CallOption) (*ViewSnapshotResponse, error) Mounts(ctx context.Context, in *MountsRequest, opts ...grpc.CallOption) (*MountsResponse, error) Commit(ctx context.Context, in *CommitSnapshotRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) Remove(ctx context.Context, in *RemoveSnapshotRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) Stat(ctx context.Context, in *StatSnapshotRequest, opts ...grpc.CallOption) (*StatSnapshotResponse, error) Update(ctx context.Context, in *UpdateSnapshotRequest, opts ...grpc.CallOption) (*UpdateSnapshotResponse, error) List(ctx context.Context, in *ListSnapshotsRequest, opts ...grpc.CallOption) (Snapshots_ListClient, error) Usage(ctx context.Context, in *UsageRequest, opts ...grpc.CallOption) (*UsageResponse, error) } type snapshotsClient struct { cc *grpc.ClientConn } func NewSnapshotsClient(cc *grpc.ClientConn) SnapshotsClient { return &snapshotsClient{cc} } func (c *snapshotsClient) Prepare(ctx context.Context, in *PrepareSnapshotRequest, opts ...grpc.CallOption) (*PrepareSnapshotResponse, error) { out := new(PrepareSnapshotResponse) err := grpc.Invoke(ctx, "/containerd.services.snapshots.v1.Snapshots/Prepare", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *snapshotsClient) View(ctx context.Context, in *ViewSnapshotRequest, opts ...grpc.CallOption) (*ViewSnapshotResponse, error) { out := new(ViewSnapshotResponse) err := grpc.Invoke(ctx, "/containerd.services.snapshots.v1.Snapshots/View", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *snapshotsClient) Mounts(ctx context.Context, in *MountsRequest, opts ...grpc.CallOption) (*MountsResponse, error) { out := new(MountsResponse) err := grpc.Invoke(ctx, "/containerd.services.snapshots.v1.Snapshots/Mounts", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *snapshotsClient) Commit(ctx context.Context, in *CommitSnapshotRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) { out := new(google_protobuf1.Empty) err := grpc.Invoke(ctx, "/containerd.services.snapshots.v1.Snapshots/Commit", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *snapshotsClient) Remove(ctx context.Context, in *RemoveSnapshotRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) { out := new(google_protobuf1.Empty) err := grpc.Invoke(ctx, "/containerd.services.snapshots.v1.Snapshots/Remove", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *snapshotsClient) Stat(ctx context.Context, in *StatSnapshotRequest, opts ...grpc.CallOption) (*StatSnapshotResponse, error) { out := new(StatSnapshotResponse) err := grpc.Invoke(ctx, "/containerd.services.snapshots.v1.Snapshots/Stat", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *snapshotsClient) Update(ctx context.Context, in *UpdateSnapshotRequest, opts ...grpc.CallOption) (*UpdateSnapshotResponse, error) { out := new(UpdateSnapshotResponse) err := grpc.Invoke(ctx, "/containerd.services.snapshots.v1.Snapshots/Update", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *snapshotsClient) List(ctx context.Context, in *ListSnapshotsRequest, opts ...grpc.CallOption) (Snapshots_ListClient, error) { stream, err := grpc.NewClientStream(ctx, &_Snapshots_serviceDesc.Streams[0], c.cc, "/containerd.services.snapshots.v1.Snapshots/List", opts...) if err != nil { return nil, err } x := &snapshotsListClient{stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } if err := x.ClientStream.CloseSend(); err != nil { return nil, err } return x, nil } type Snapshots_ListClient interface { Recv() (*ListSnapshotsResponse, error) grpc.ClientStream } type snapshotsListClient struct { grpc.ClientStream } func (x *snapshotsListClient) Recv() (*ListSnapshotsResponse, error) { m := new(ListSnapshotsResponse) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func (c *snapshotsClient) Usage(ctx context.Context, in *UsageRequest, opts ...grpc.CallOption) (*UsageResponse, error) { out := new(UsageResponse) err := grpc.Invoke(ctx, "/containerd.services.snapshots.v1.Snapshots/Usage", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } // Server API for Snapshots service type SnapshotsServer interface { Prepare(context.Context, *PrepareSnapshotRequest) (*PrepareSnapshotResponse, error) View(context.Context, *ViewSnapshotRequest) (*ViewSnapshotResponse, error) Mounts(context.Context, *MountsRequest) (*MountsResponse, error) Commit(context.Context, *CommitSnapshotRequest) (*google_protobuf1.Empty, error) Remove(context.Context, *RemoveSnapshotRequest) (*google_protobuf1.Empty, error) Stat(context.Context, *StatSnapshotRequest) (*StatSnapshotResponse, error) Update(context.Context, *UpdateSnapshotRequest) (*UpdateSnapshotResponse, error) List(*ListSnapshotsRequest, Snapshots_ListServer) error Usage(context.Context, *UsageRequest) (*UsageResponse, error) } func RegisterSnapshotsServer(s *grpc.Server, srv SnapshotsServer) { s.RegisterService(&_Snapshots_serviceDesc, srv) } func _Snapshots_Prepare_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(PrepareSnapshotRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(SnapshotsServer).Prepare(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.snapshots.v1.Snapshots/Prepare", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SnapshotsServer).Prepare(ctx, req.(*PrepareSnapshotRequest)) } return interceptor(ctx, in, info, handler) } func _Snapshots_View_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ViewSnapshotRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(SnapshotsServer).View(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.snapshots.v1.Snapshots/View", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SnapshotsServer).View(ctx, req.(*ViewSnapshotRequest)) } return interceptor(ctx, in, info, handler) } func _Snapshots_Mounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MountsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(SnapshotsServer).Mounts(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.snapshots.v1.Snapshots/Mounts", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SnapshotsServer).Mounts(ctx, req.(*MountsRequest)) } return interceptor(ctx, in, info, handler) } func _Snapshots_Commit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CommitSnapshotRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(SnapshotsServer).Commit(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.snapshots.v1.Snapshots/Commit", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SnapshotsServer).Commit(ctx, req.(*CommitSnapshotRequest)) } return interceptor(ctx, in, info, handler) } func _Snapshots_Remove_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(RemoveSnapshotRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(SnapshotsServer).Remove(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.snapshots.v1.Snapshots/Remove", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SnapshotsServer).Remove(ctx, req.(*RemoveSnapshotRequest)) } return interceptor(ctx, in, info, handler) } func _Snapshots_Stat_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(StatSnapshotRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(SnapshotsServer).Stat(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.snapshots.v1.Snapshots/Stat", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SnapshotsServer).Stat(ctx, req.(*StatSnapshotRequest)) } return interceptor(ctx, in, info, handler) } func _Snapshots_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateSnapshotRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(SnapshotsServer).Update(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.snapshots.v1.Snapshots/Update", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SnapshotsServer).Update(ctx, req.(*UpdateSnapshotRequest)) } return interceptor(ctx, in, info, handler) } func _Snapshots_List_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(ListSnapshotsRequest) if err := stream.RecvMsg(m); err != nil { return err } return srv.(SnapshotsServer).List(m, &snapshotsListServer{stream}) } type Snapshots_ListServer interface { Send(*ListSnapshotsResponse) error grpc.ServerStream } type snapshotsListServer struct { grpc.ServerStream } func (x *snapshotsListServer) Send(m *ListSnapshotsResponse) error { return x.ServerStream.SendMsg(m) } func _Snapshots_Usage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UsageRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(SnapshotsServer).Usage(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.snapshots.v1.Snapshots/Usage", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SnapshotsServer).Usage(ctx, req.(*UsageRequest)) } return interceptor(ctx, in, info, handler) } var _Snapshots_serviceDesc = grpc.ServiceDesc{ ServiceName: "containerd.services.snapshots.v1.Snapshots", HandlerType: (*SnapshotsServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Prepare", Handler: _Snapshots_Prepare_Handler, }, { MethodName: "View", Handler: _Snapshots_View_Handler, }, { MethodName: "Mounts", Handler: _Snapshots_Mounts_Handler, }, { MethodName: "Commit", Handler: _Snapshots_Commit_Handler, }, { MethodName: "Remove", Handler: _Snapshots_Remove_Handler, }, { MethodName: "Stat", Handler: _Snapshots_Stat_Handler, }, { MethodName: "Update", Handler: _Snapshots_Update_Handler, }, { MethodName: "Usage", Handler: _Snapshots_Usage_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "List", Handler: _Snapshots_List_Handler, ServerStreams: true, }, }, Metadata: "github.com/containerd/containerd/api/services/snapshots/v1/snapshots.proto", } func (m *PrepareSnapshotRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *PrepareSnapshotRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Snapshotter) > 0 { dAtA[i] = 0xa i++ i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Snapshotter))) i += copy(dAtA[i:], m.Snapshotter) } if len(m.Key) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Key))) i += copy(dAtA[i:], m.Key) } if len(m.Parent) > 0 { dAtA[i] = 0x1a i++ i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Parent))) i += copy(dAtA[i:], m.Parent) } if len(m.Labels) > 0 { for k, _ := range m.Labels { dAtA[i] = 0x22 i++ v := m.Labels[k] mapSize := 1 + len(k) + sovSnapshots(uint64(len(k))) + 1 + len(v) + sovSnapshots(uint64(len(v))) i = encodeVarintSnapshots(dAtA, i, uint64(mapSize)) dAtA[i] = 0xa i++ i = encodeVarintSnapshots(dAtA, i, uint64(len(k))) i += copy(dAtA[i:], k) dAtA[i] = 0x12 i++ i = encodeVarintSnapshots(dAtA, i, uint64(len(v))) i += copy(dAtA[i:], v) } } return i, nil } func (m *PrepareSnapshotResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *PrepareSnapshotResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Mounts) > 0 { for _, msg := range m.Mounts { dAtA[i] = 0xa i++ i = encodeVarintSnapshots(dAtA, i, uint64(msg.Size())) n, err := msg.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n } } return i, nil } func (m *ViewSnapshotRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ViewSnapshotRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Snapshotter) > 0 { dAtA[i] = 0xa i++ i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Snapshotter))) i += copy(dAtA[i:], m.Snapshotter) } if len(m.Key) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Key))) i += copy(dAtA[i:], m.Key) } if len(m.Parent) > 0 { dAtA[i] = 0x1a i++ i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Parent))) i += copy(dAtA[i:], m.Parent) } if len(m.Labels) > 0 { for k, _ := range m.Labels { dAtA[i] = 0x22 i++ v := m.Labels[k] mapSize := 1 + len(k) + sovSnapshots(uint64(len(k))) + 1 + len(v) + sovSnapshots(uint64(len(v))) i = encodeVarintSnapshots(dAtA, i, uint64(mapSize)) dAtA[i] = 0xa i++ i = encodeVarintSnapshots(dAtA, i, uint64(len(k))) i += copy(dAtA[i:], k) dAtA[i] = 0x12 i++ i = encodeVarintSnapshots(dAtA, i, uint64(len(v))) i += copy(dAtA[i:], v) } } return i, nil } func (m *ViewSnapshotResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ViewSnapshotResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Mounts) > 0 { for _, msg := range m.Mounts { dAtA[i] = 0xa i++ i = encodeVarintSnapshots(dAtA, i, uint64(msg.Size())) n, err := msg.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n } } return i, nil } func (m *MountsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *MountsRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Snapshotter) > 0 { dAtA[i] = 0xa i++ i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Snapshotter))) i += copy(dAtA[i:], m.Snapshotter) } if len(m.Key) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Key))) i += copy(dAtA[i:], m.Key) } return i, nil } func (m *MountsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *MountsResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Mounts) > 0 { for _, msg := range m.Mounts { dAtA[i] = 0xa i++ i = encodeVarintSnapshots(dAtA, i, uint64(msg.Size())) n, err := msg.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n } } return i, nil } func (m *RemoveSnapshotRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *RemoveSnapshotRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Snapshotter) > 0 { dAtA[i] = 0xa i++ i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Snapshotter))) i += copy(dAtA[i:], m.Snapshotter) } if len(m.Key) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Key))) i += copy(dAtA[i:], m.Key) } return i, nil } func (m *CommitSnapshotRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *CommitSnapshotRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Snapshotter) > 0 { dAtA[i] = 0xa i++ i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Snapshotter))) i += copy(dAtA[i:], m.Snapshotter) } if len(m.Name) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Name))) i += copy(dAtA[i:], m.Name) } if len(m.Key) > 0 { dAtA[i] = 0x1a i++ i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Key))) i += copy(dAtA[i:], m.Key) } if len(m.Labels) > 0 { for k, _ := range m.Labels { dAtA[i] = 0x22 i++ v := m.Labels[k] mapSize := 1 + len(k) + sovSnapshots(uint64(len(k))) + 1 + len(v) + sovSnapshots(uint64(len(v))) i = encodeVarintSnapshots(dAtA, i, uint64(mapSize)) dAtA[i] = 0xa i++ i = encodeVarintSnapshots(dAtA, i, uint64(len(k))) i += copy(dAtA[i:], k) dAtA[i] = 0x12 i++ i = encodeVarintSnapshots(dAtA, i, uint64(len(v))) i += copy(dAtA[i:], v) } } return i, nil } func (m *StatSnapshotRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *StatSnapshotRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Snapshotter) > 0 { dAtA[i] = 0xa i++ i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Snapshotter))) i += copy(dAtA[i:], m.Snapshotter) } if len(m.Key) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Key))) i += copy(dAtA[i:], m.Key) } return i, nil } func (m *Info) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Info) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Name) > 0 { dAtA[i] = 0xa i++ i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Name))) i += copy(dAtA[i:], m.Name) } if len(m.Parent) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Parent))) i += copy(dAtA[i:], m.Parent) } if m.Kind != 0 { dAtA[i] = 0x18 i++ i = encodeVarintSnapshots(dAtA, i, uint64(m.Kind)) } dAtA[i] = 0x22 i++ i = encodeVarintSnapshots(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt))) n1, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i:]) if err != nil { return 0, err } i += n1 dAtA[i] = 0x2a i++ i = encodeVarintSnapshots(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdatedAt))) n2, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.UpdatedAt, dAtA[i:]) if err != nil { return 0, err } i += n2 if len(m.Labels) > 0 { for k, _ := range m.Labels { dAtA[i] = 0x32 i++ v := m.Labels[k] mapSize := 1 + len(k) + sovSnapshots(uint64(len(k))) + 1 + len(v) + sovSnapshots(uint64(len(v))) i = encodeVarintSnapshots(dAtA, i, uint64(mapSize)) dAtA[i] = 0xa i++ i = encodeVarintSnapshots(dAtA, i, uint64(len(k))) i += copy(dAtA[i:], k) dAtA[i] = 0x12 i++ i = encodeVarintSnapshots(dAtA, i, uint64(len(v))) i += copy(dAtA[i:], v) } } return i, nil } func (m *StatSnapshotResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *StatSnapshotResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l dAtA[i] = 0xa i++ i = encodeVarintSnapshots(dAtA, i, uint64(m.Info.Size())) n3, err := m.Info.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n3 return i, nil } func (m *UpdateSnapshotRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *UpdateSnapshotRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Snapshotter) > 0 { dAtA[i] = 0xa i++ i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Snapshotter))) i += copy(dAtA[i:], m.Snapshotter) } dAtA[i] = 0x12 i++ i = encodeVarintSnapshots(dAtA, i, uint64(m.Info.Size())) n4, err := m.Info.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n4 if m.UpdateMask != nil { dAtA[i] = 0x1a i++ i = encodeVarintSnapshots(dAtA, i, uint64(m.UpdateMask.Size())) n5, err := m.UpdateMask.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n5 } return i, nil } func (m *UpdateSnapshotResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *UpdateSnapshotResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l dAtA[i] = 0xa i++ i = encodeVarintSnapshots(dAtA, i, uint64(m.Info.Size())) n6, err := m.Info.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n6 return i, nil } func (m *ListSnapshotsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ListSnapshotsRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Snapshotter) > 0 { dAtA[i] = 0xa i++ i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Snapshotter))) i += copy(dAtA[i:], m.Snapshotter) } return i, nil } func (m *ListSnapshotsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ListSnapshotsResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Info) > 0 { for _, msg := range m.Info { dAtA[i] = 0xa i++ i = encodeVarintSnapshots(dAtA, i, uint64(msg.Size())) n, err := msg.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n } } return i, nil } func (m *UsageRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *UsageRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Snapshotter) > 0 { dAtA[i] = 0xa i++ i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Snapshotter))) i += copy(dAtA[i:], m.Snapshotter) } if len(m.Key) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Key))) i += copy(dAtA[i:], m.Key) } return i, nil } func (m *UsageResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *UsageResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if m.Size_ != 0 { dAtA[i] = 0x8 i++ i = encodeVarintSnapshots(dAtA, i, uint64(m.Size_)) } if m.Inodes != 0 { dAtA[i] = 0x10 i++ i = encodeVarintSnapshots(dAtA, i, uint64(m.Inodes)) } return i, nil } func encodeVarintSnapshots(dAtA []byte, offset int, v uint64) int { for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return offset + 1 } func (m *PrepareSnapshotRequest) Size() (n int) { var l int _ = l l = len(m.Snapshotter) if l > 0 { n += 1 + l + sovSnapshots(uint64(l)) } l = len(m.Key) if l > 0 { n += 1 + l + sovSnapshots(uint64(l)) } l = len(m.Parent) if l > 0 { n += 1 + l + sovSnapshots(uint64(l)) } if len(m.Labels) > 0 { for k, v := range m.Labels { _ = k _ = v mapEntrySize := 1 + len(k) + sovSnapshots(uint64(len(k))) + 1 + len(v) + sovSnapshots(uint64(len(v))) n += mapEntrySize + 1 + sovSnapshots(uint64(mapEntrySize)) } } return n } func (m *PrepareSnapshotResponse) Size() (n int) { var l int _ = l if len(m.Mounts) > 0 { for _, e := range m.Mounts { l = e.Size() n += 1 + l + sovSnapshots(uint64(l)) } } return n } func (m *ViewSnapshotRequest) Size() (n int) { var l int _ = l l = len(m.Snapshotter) if l > 0 { n += 1 + l + sovSnapshots(uint64(l)) } l = len(m.Key) if l > 0 { n += 1 + l + sovSnapshots(uint64(l)) } l = len(m.Parent) if l > 0 { n += 1 + l + sovSnapshots(uint64(l)) } if len(m.Labels) > 0 { for k, v := range m.Labels { _ = k _ = v mapEntrySize := 1 + len(k) + sovSnapshots(uint64(len(k))) + 1 + len(v) + sovSnapshots(uint64(len(v))) n += mapEntrySize + 1 + sovSnapshots(uint64(mapEntrySize)) } } return n } func (m *ViewSnapshotResponse) Size() (n int) { var l int _ = l if len(m.Mounts) > 0 { for _, e := range m.Mounts { l = e.Size() n += 1 + l + sovSnapshots(uint64(l)) } } return n } func (m *MountsRequest) Size() (n int) { var l int _ = l l = len(m.Snapshotter) if l > 0 { n += 1 + l + sovSnapshots(uint64(l)) } l = len(m.Key) if l > 0 { n += 1 + l + sovSnapshots(uint64(l)) } return n } func (m *MountsResponse) Size() (n int) { var l int _ = l if len(m.Mounts) > 0 { for _, e := range m.Mounts { l = e.Size() n += 1 + l + sovSnapshots(uint64(l)) } } return n } func (m *RemoveSnapshotRequest) Size() (n int) { var l int _ = l l = len(m.Snapshotter) if l > 0 { n += 1 + l + sovSnapshots(uint64(l)) } l = len(m.Key) if l > 0 { n += 1 + l + sovSnapshots(uint64(l)) } return n } func (m *CommitSnapshotRequest) Size() (n int) { var l int _ = l l = len(m.Snapshotter) if l > 0 { n += 1 + l + sovSnapshots(uint64(l)) } l = len(m.Name) if l > 0 { n += 1 + l + sovSnapshots(uint64(l)) } l = len(m.Key) if l > 0 { n += 1 + l + sovSnapshots(uint64(l)) } if len(m.Labels) > 0 { for k, v := range m.Labels { _ = k _ = v mapEntrySize := 1 + len(k) + sovSnapshots(uint64(len(k))) + 1 + len(v) + sovSnapshots(uint64(len(v))) n += mapEntrySize + 1 + sovSnapshots(uint64(mapEntrySize)) } } return n } func (m *StatSnapshotRequest) Size() (n int) { var l int _ = l l = len(m.Snapshotter) if l > 0 { n += 1 + l + sovSnapshots(uint64(l)) } l = len(m.Key) if l > 0 { n += 1 + l + sovSnapshots(uint64(l)) } return n } func (m *Info) Size() (n int) { var l int _ = l l = len(m.Name) if l > 0 { n += 1 + l + sovSnapshots(uint64(l)) } l = len(m.Parent) if l > 0 { n += 1 + l + sovSnapshots(uint64(l)) } if m.Kind != 0 { n += 1 + sovSnapshots(uint64(m.Kind)) } l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt) n += 1 + l + sovSnapshots(uint64(l)) l = github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdatedAt) n += 1 + l + sovSnapshots(uint64(l)) if len(m.Labels) > 0 { for k, v := range m.Labels { _ = k _ = v mapEntrySize := 1 + len(k) + sovSnapshots(uint64(len(k))) + 1 + len(v) + sovSnapshots(uint64(len(v))) n += mapEntrySize + 1 + sovSnapshots(uint64(mapEntrySize)) } } return n } func (m *StatSnapshotResponse) Size() (n int) { var l int _ = l l = m.Info.Size() n += 1 + l + sovSnapshots(uint64(l)) return n } func (m *UpdateSnapshotRequest) Size() (n int) { var l int _ = l l = len(m.Snapshotter) if l > 0 { n += 1 + l + sovSnapshots(uint64(l)) } l = m.Info.Size() n += 1 + l + sovSnapshots(uint64(l)) if m.UpdateMask != nil { l = m.UpdateMask.Size() n += 1 + l + sovSnapshots(uint64(l)) } return n } func (m *UpdateSnapshotResponse) Size() (n int) { var l int _ = l l = m.Info.Size() n += 1 + l + sovSnapshots(uint64(l)) return n } func (m *ListSnapshotsRequest) Size() (n int) { var l int _ = l l = len(m.Snapshotter) if l > 0 { n += 1 + l + sovSnapshots(uint64(l)) } return n } func (m *ListSnapshotsResponse) Size() (n int) { var l int _ = l if len(m.Info) > 0 { for _, e := range m.Info { l = e.Size() n += 1 + l + sovSnapshots(uint64(l)) } } return n } func (m *UsageRequest) Size() (n int) { var l int _ = l l = len(m.Snapshotter) if l > 0 { n += 1 + l + sovSnapshots(uint64(l)) } l = len(m.Key) if l > 0 { n += 1 + l + sovSnapshots(uint64(l)) } return n } func (m *UsageResponse) Size() (n int) { var l int _ = l if m.Size_ != 0 { n += 1 + sovSnapshots(uint64(m.Size_)) } if m.Inodes != 0 { n += 1 + sovSnapshots(uint64(m.Inodes)) } return n } func sovSnapshots(x uint64) (n int) { for { n++ x >>= 7 if x == 0 { break } } return n } func sozSnapshots(x uint64) (n int) { return sovSnapshots(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (this *PrepareSnapshotRequest) String() string { if this == nil { return "nil" } keysForLabels := make([]string, 0, len(this.Labels)) for k, _ := range this.Labels { keysForLabels = append(keysForLabels, k) } github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) mapStringForLabels := "map[string]string{" for _, k := range keysForLabels { mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) } mapStringForLabels += "}" s := strings.Join([]string{`&PrepareSnapshotRequest{`, `Snapshotter:` + fmt.Sprintf("%v", this.Snapshotter) + `,`, `Key:` + fmt.Sprintf("%v", this.Key) + `,`, `Parent:` + fmt.Sprintf("%v", this.Parent) + `,`, `Labels:` + mapStringForLabels + `,`, `}`, }, "") return s } func (this *PrepareSnapshotResponse) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&PrepareSnapshotResponse{`, `Mounts:` + strings.Replace(fmt.Sprintf("%v", this.Mounts), "Mount", "containerd_types.Mount", 1) + `,`, `}`, }, "") return s } func (this *ViewSnapshotRequest) String() string { if this == nil { return "nil" } keysForLabels := make([]string, 0, len(this.Labels)) for k, _ := range this.Labels { keysForLabels = append(keysForLabels, k) } github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) mapStringForLabels := "map[string]string{" for _, k := range keysForLabels { mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) } mapStringForLabels += "}" s := strings.Join([]string{`&ViewSnapshotRequest{`, `Snapshotter:` + fmt.Sprintf("%v", this.Snapshotter) + `,`, `Key:` + fmt.Sprintf("%v", this.Key) + `,`, `Parent:` + fmt.Sprintf("%v", this.Parent) + `,`, `Labels:` + mapStringForLabels + `,`, `}`, }, "") return s } func (this *ViewSnapshotResponse) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&ViewSnapshotResponse{`, `Mounts:` + strings.Replace(fmt.Sprintf("%v", this.Mounts), "Mount", "containerd_types.Mount", 1) + `,`, `}`, }, "") return s } func (this *MountsRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&MountsRequest{`, `Snapshotter:` + fmt.Sprintf("%v", this.Snapshotter) + `,`, `Key:` + fmt.Sprintf("%v", this.Key) + `,`, `}`, }, "") return s } func (this *MountsResponse) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&MountsResponse{`, `Mounts:` + strings.Replace(fmt.Sprintf("%v", this.Mounts), "Mount", "containerd_types.Mount", 1) + `,`, `}`, }, "") return s } func (this *RemoveSnapshotRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&RemoveSnapshotRequest{`, `Snapshotter:` + fmt.Sprintf("%v", this.Snapshotter) + `,`, `Key:` + fmt.Sprintf("%v", this.Key) + `,`, `}`, }, "") return s } func (this *CommitSnapshotRequest) String() string { if this == nil { return "nil" } keysForLabels := make([]string, 0, len(this.Labels)) for k, _ := range this.Labels { keysForLabels = append(keysForLabels, k) } github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) mapStringForLabels := "map[string]string{" for _, k := range keysForLabels { mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) } mapStringForLabels += "}" s := strings.Join([]string{`&CommitSnapshotRequest{`, `Snapshotter:` + fmt.Sprintf("%v", this.Snapshotter) + `,`, `Name:` + fmt.Sprintf("%v", this.Name) + `,`, `Key:` + fmt.Sprintf("%v", this.Key) + `,`, `Labels:` + mapStringForLabels + `,`, `}`, }, "") return s } func (this *StatSnapshotRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&StatSnapshotRequest{`, `Snapshotter:` + fmt.Sprintf("%v", this.Snapshotter) + `,`, `Key:` + fmt.Sprintf("%v", this.Key) + `,`, `}`, }, "") return s } func (this *Info) String() string { if this == nil { return "nil" } keysForLabels := make([]string, 0, len(this.Labels)) for k, _ := range this.Labels { keysForLabels = append(keysForLabels, k) } github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) mapStringForLabels := "map[string]string{" for _, k := range keysForLabels { mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) } mapStringForLabels += "}" s := strings.Join([]string{`&Info{`, `Name:` + fmt.Sprintf("%v", this.Name) + `,`, `Parent:` + fmt.Sprintf("%v", this.Parent) + `,`, `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, `CreatedAt:` + strings.Replace(strings.Replace(this.CreatedAt.String(), "Timestamp", "google_protobuf3.Timestamp", 1), `&`, ``, 1) + `,`, `UpdatedAt:` + strings.Replace(strings.Replace(this.UpdatedAt.String(), "Timestamp", "google_protobuf3.Timestamp", 1), `&`, ``, 1) + `,`, `Labels:` + mapStringForLabels + `,`, `}`, }, "") return s } func (this *StatSnapshotResponse) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&StatSnapshotResponse{`, `Info:` + strings.Replace(strings.Replace(this.Info.String(), "Info", "Info", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } func (this *UpdateSnapshotRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&UpdateSnapshotRequest{`, `Snapshotter:` + fmt.Sprintf("%v", this.Snapshotter) + `,`, `Info:` + strings.Replace(strings.Replace(this.Info.String(), "Info", "Info", 1), `&`, ``, 1) + `,`, `UpdateMask:` + strings.Replace(fmt.Sprintf("%v", this.UpdateMask), "FieldMask", "google_protobuf2.FieldMask", 1) + `,`, `}`, }, "") return s } func (this *UpdateSnapshotResponse) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&UpdateSnapshotResponse{`, `Info:` + strings.Replace(strings.Replace(this.Info.String(), "Info", "Info", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } func (this *ListSnapshotsRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&ListSnapshotsRequest{`, `Snapshotter:` + fmt.Sprintf("%v", this.Snapshotter) + `,`, `}`, }, "") return s } func (this *ListSnapshotsResponse) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&ListSnapshotsResponse{`, `Info:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Info), "Info", "Info", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } func (this *UsageRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&UsageRequest{`, `Snapshotter:` + fmt.Sprintf("%v", this.Snapshotter) + `,`, `Key:` + fmt.Sprintf("%v", this.Key) + `,`, `}`, }, "") return s } func (this *UsageResponse) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&UsageResponse{`, `Size_:` + fmt.Sprintf("%v", this.Size_) + `,`, `Inodes:` + fmt.Sprintf("%v", this.Inodes) + `,`, `}`, }, "") return s } func valueToStringSnapshots(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { return "nil" } pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } func (m *PrepareSnapshotRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: PrepareSnapshotRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: PrepareSnapshotRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Snapshotter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthSnapshots } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Snapshotter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthSnapshots } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Key = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Parent", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthSnapshots } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Parent = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthSnapshots } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Labels == nil { m.Labels = make(map[string]string) } var mapkey string var mapvalue string for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapkey |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { return ErrInvalidLengthSnapshots } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var stringLenmapvalue uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapvalue |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLenmapvalue := int(stringLenmapvalue) if intStringLenmapvalue < 0 { return ErrInvalidLengthSnapshots } postStringIndexmapvalue := iNdEx + intStringLenmapvalue if postStringIndexmapvalue > l { return io.ErrUnexpectedEOF } mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) iNdEx = postStringIndexmapvalue } else { iNdEx = entryPreIndex skippy, err := skipSnapshots(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthSnapshots } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.Labels[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSnapshots(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthSnapshots } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *PrepareSnapshotResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: PrepareSnapshotResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: PrepareSnapshotResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Mounts", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthSnapshots } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } m.Mounts = append(m.Mounts, &containerd_types.Mount{}) if err := m.Mounts[len(m.Mounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSnapshots(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthSnapshots } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ViewSnapshotRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ViewSnapshotRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ViewSnapshotRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Snapshotter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthSnapshots } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Snapshotter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthSnapshots } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Key = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Parent", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthSnapshots } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Parent = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthSnapshots } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Labels == nil { m.Labels = make(map[string]string) } var mapkey string var mapvalue string for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapkey |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { return ErrInvalidLengthSnapshots } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var stringLenmapvalue uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapvalue |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLenmapvalue := int(stringLenmapvalue) if intStringLenmapvalue < 0 { return ErrInvalidLengthSnapshots } postStringIndexmapvalue := iNdEx + intStringLenmapvalue if postStringIndexmapvalue > l { return io.ErrUnexpectedEOF } mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) iNdEx = postStringIndexmapvalue } else { iNdEx = entryPreIndex skippy, err := skipSnapshots(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthSnapshots } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.Labels[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSnapshots(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthSnapshots } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ViewSnapshotResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ViewSnapshotResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ViewSnapshotResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Mounts", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthSnapshots } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } m.Mounts = append(m.Mounts, &containerd_types.Mount{}) if err := m.Mounts[len(m.Mounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSnapshots(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthSnapshots } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *MountsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: MountsRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MountsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Snapshotter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthSnapshots } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Snapshotter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthSnapshots } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Key = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSnapshots(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthSnapshots } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *MountsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: MountsResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MountsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Mounts", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthSnapshots } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } m.Mounts = append(m.Mounts, &containerd_types.Mount{}) if err := m.Mounts[len(m.Mounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSnapshots(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthSnapshots } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *RemoveSnapshotRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: RemoveSnapshotRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: RemoveSnapshotRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Snapshotter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthSnapshots } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Snapshotter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthSnapshots } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Key = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSnapshots(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthSnapshots } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *CommitSnapshotRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: CommitSnapshotRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: CommitSnapshotRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Snapshotter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthSnapshots } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Snapshotter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthSnapshots } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthSnapshots } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Key = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthSnapshots } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Labels == nil { m.Labels = make(map[string]string) } var mapkey string var mapvalue string for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapkey |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { return ErrInvalidLengthSnapshots } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var stringLenmapvalue uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapvalue |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLenmapvalue := int(stringLenmapvalue) if intStringLenmapvalue < 0 { return ErrInvalidLengthSnapshots } postStringIndexmapvalue := iNdEx + intStringLenmapvalue if postStringIndexmapvalue > l { return io.ErrUnexpectedEOF } mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) iNdEx = postStringIndexmapvalue } else { iNdEx = entryPreIndex skippy, err := skipSnapshots(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthSnapshots } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.Labels[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSnapshots(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthSnapshots } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *StatSnapshotRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: StatSnapshotRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: StatSnapshotRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Snapshotter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthSnapshots } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Snapshotter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthSnapshots } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Key = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSnapshots(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthSnapshots } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Info) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Info: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Info: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthSnapshots } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Parent", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthSnapshots } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Parent = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) } m.Kind = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Kind |= (Kind(b) & 0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthSnapshots } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field UpdatedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthSnapshots } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.UpdatedAt, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthSnapshots } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Labels == nil { m.Labels = make(map[string]string) } var mapkey string var mapvalue string for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapkey |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { return ErrInvalidLengthSnapshots } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var stringLenmapvalue uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapvalue |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLenmapvalue := int(stringLenmapvalue) if intStringLenmapvalue < 0 { return ErrInvalidLengthSnapshots } postStringIndexmapvalue := iNdEx + intStringLenmapvalue if postStringIndexmapvalue > l { return io.ErrUnexpectedEOF } mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) iNdEx = postStringIndexmapvalue } else { iNdEx = entryPreIndex skippy, err := skipSnapshots(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthSnapshots } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.Labels[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSnapshots(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthSnapshots } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *StatSnapshotResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: StatSnapshotResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: StatSnapshotResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthSnapshots } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Info.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSnapshots(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthSnapshots } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *UpdateSnapshotRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: UpdateSnapshotRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UpdateSnapshotRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Snapshotter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthSnapshots } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Snapshotter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthSnapshots } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Info.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field UpdateMask", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthSnapshots } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.UpdateMask == nil { m.UpdateMask = &google_protobuf2.FieldMask{} } if err := m.UpdateMask.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSnapshots(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthSnapshots } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *UpdateSnapshotResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: UpdateSnapshotResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UpdateSnapshotResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthSnapshots } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Info.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSnapshots(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthSnapshots } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ListSnapshotsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ListSnapshotsRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ListSnapshotsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Snapshotter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthSnapshots } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Snapshotter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSnapshots(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthSnapshots } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ListSnapshotsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ListSnapshotsResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ListSnapshotsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthSnapshots } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } m.Info = append(m.Info, Info{}) if err := m.Info[len(m.Info)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSnapshots(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthSnapshots } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *UsageRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: UsageRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UsageRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Snapshotter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthSnapshots } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Snapshotter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthSnapshots } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Key = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSnapshots(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthSnapshots } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *UsageResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: UsageResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UsageResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Size_", wireType) } m.Size_ = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Size_ |= (int64(b) & 0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Inodes", wireType) } m.Inodes = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSnapshots } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Inodes |= (int64(b) & 0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := skipSnapshots(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthSnapshots } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipSnapshots(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowSnapshots } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } wireType := int(wire & 0x7) switch wireType { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowSnapshots } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } iNdEx++ if dAtA[iNdEx-1] < 0x80 { break } } return iNdEx, nil case 1: iNdEx += 8 return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowSnapshots } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ length |= (int(b) & 0x7F) << shift if b < 0x80 { break } } iNdEx += length if length < 0 { return 0, ErrInvalidLengthSnapshots } return iNdEx, nil case 3: for { var innerWire uint64 var start int = iNdEx for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowSnapshots } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ innerWire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } innerWireType := int(innerWire & 0x7) if innerWireType == 4 { break } next, err := skipSnapshots(dAtA[start:]) if err != nil { return 0, err } iNdEx = start + next } return iNdEx, nil case 4: return iNdEx, nil case 5: iNdEx += 4 return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } } panic("unreachable") } var ( ErrInvalidLengthSnapshots = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowSnapshots = fmt.Errorf("proto: integer overflow") ) func init() { proto.RegisterFile("github.com/containerd/containerd/api/services/snapshots/v1/snapshots.proto", fileDescriptorSnapshots) } var fileDescriptorSnapshots = []byte{ // 1007 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0x4f, 0x6f, 0x1a, 0x47, 0x14, 0x67, 0x60, 0x8d, 0xe3, 0x87, 0xed, 0xd2, 0x09, 0x26, 0x68, 0x5b, 0xe1, 0x15, 0x87, 0xca, 0xea, 0x61, 0x37, 0xa1, 0x6a, 0xe2, 0xc4, 0x97, 0x62, 0x4c, 0x2b, 0xec, 0xd8, 0xa9, 0x36, 0xb6, 0x13, 0xa7, 0x55, 0xa3, 0x35, 0x8c, 0xf1, 0x0a, 0x76, 0x97, 0x32, 0x03, 0x11, 0xad, 0x54, 0xf5, 0x18, 0xf9, 0xd4, 0x2f, 0xe0, 0x53, 0xfb, 0x21, 0xaa, 0x7e, 0x02, 0x1f, 0x7b, 0xec, 0xa9, 0x6d, 0xfc, 0x25, 0x7a, 0xea, 0x1f, 0xcd, 0xec, 0x2c, 0x60, 0x4c, 0xc5, 0x82, 0xc9, 0x6d, 0x66, 0x67, 0x7e, 0xef, 0xfd, 0xe6, 0xf7, 0xe6, 0xbd, 0x37, 0x0b, 0xdb, 0x35, 0x9b, 0x9d, 0xb6, 0x8f, 0xf5, 0x8a, 0xe7, 0x18, 0x15, 0xcf, 0x65, 0x96, 0xed, 0x92, 0x56, 0x75, 0x70, 0x68, 0x35, 0x6d, 0x83, 0x92, 0x56, 0xc7, 0xae, 0x10, 0x6a, 0x50, 0xd7, 0x6a, 0xd2, 0x53, 0x8f, 0x51, 0xa3, 0x73, 0xaf, 0x3f, 0xd1, 0x9b, 0x2d, 0x8f, 0x79, 0x58, 0xeb, 0xa3, 0xf4, 0x00, 0xa1, 0xf7, 0x37, 0x75, 0xee, 0xa9, 0xa9, 0x9a, 0x57, 0xf3, 0xc4, 0x66, 0x83, 0x8f, 0x7c, 0x9c, 0xfa, 0x5e, 0xcd, 0xf3, 0x6a, 0x0d, 0x62, 0x88, 0xd9, 0x71, 0xfb, 0xc4, 0x20, 0x4e, 0x93, 0x75, 0xe5, 0xa2, 0x36, 0xbc, 0x78, 0x62, 0x93, 0x46, 0xf5, 0xa5, 0x63, 0xd1, 0xba, 0xdc, 0xb1, 0x3a, 0xbc, 0x83, 0xd9, 0x0e, 0xa1, 0xcc, 0x72, 0x9a, 0x72, 0xc3, 0xfd, 0x50, 0x67, 0x64, 0xdd, 0x26, 0xa1, 0x86, 0xe3, 0xb5, 0x5d, 0xe6, 0xe3, 0x72, 0x7f, 0x23, 0x48, 0x7f, 0xde, 0x22, 0x4d, 0xab, 0x45, 0x9e, 0xca, 0x53, 0x98, 0xe4, 0xeb, 0x36, 0xa1, 0x0c, 0x6b, 0x90, 0x08, 0x0e, 0xc6, 0x48, 0x2b, 0x83, 0x34, 0xb4, 0xb6, 0x60, 0x0e, 0x7e, 0xc2, 0x49, 0x88, 0xd5, 0x49, 0x37, 0x13, 0x15, 0x2b, 0x7c, 0x88, 0xd3, 0x10, 0xe7, 0xa6, 0x5c, 0x96, 0x89, 0x89, 0x8f, 0x72, 0x86, 0xbf, 0x84, 0x78, 0xc3, 0x3a, 0x26, 0x0d, 0x9a, 0x51, 0xb4, 0xd8, 0x5a, 0x22, 0xbf, 0xa5, 0x8f, 0xd3, 0x51, 0x1f, 0xcd, 0x4a, 0x7f, 0x2c, 0xcc, 0x94, 0x5c, 0xd6, 0xea, 0x9a, 0xd2, 0xa6, 0xfa, 0x10, 0x12, 0x03, 0x9f, 0x03, 0x5a, 0xa8, 0x4f, 0x2b, 0x05, 0x73, 0x1d, 0xab, 0xd1, 0x26, 0x92, 0xaa, 0x3f, 0x79, 0x14, 0x5d, 0x47, 0xb9, 0x6d, 0xb8, 0x73, 0xcd, 0x11, 0x6d, 0x7a, 0x2e, 0x25, 0xd8, 0x80, 0xb8, 0x50, 0x8a, 0x66, 0x90, 0xe0, 0x7c, 0x67, 0x90, 0xb3, 0x50, 0x52, 0xdf, 0xe5, 0xeb, 0xa6, 0xdc, 0x96, 0xfb, 0x0b, 0xc1, 0xed, 0x43, 0x9b, 0xbc, 0x7a, 0x9b, 0x42, 0x1e, 0x0d, 0x09, 0x59, 0x18, 0x2f, 0xe4, 0x08, 0x4a, 0xb3, 0x56, 0xf1, 0x33, 0x48, 0x5d, 0xf5, 0x32, 0xad, 0x84, 0x45, 0x58, 0x12, 0x1f, 0xe8, 0x0d, 0xb4, 0xcb, 0x15, 0x60, 0x39, 0x30, 0x32, 0x2d, 0x8f, 0x1d, 0x58, 0x31, 0x89, 0xe3, 0x75, 0x66, 0x91, 0x14, 0xfc, 0x5e, 0xac, 0x14, 0x3d, 0xc7, 0xb1, 0xd9, 0xe4, 0xd6, 0x30, 0x28, 0xae, 0xe5, 0x04, 0x92, 0x8b, 0x71, 0xe0, 0x21, 0xd6, 0x8f, 0xcc, 0x17, 0x43, 0xb7, 0xa2, 0x38, 0xfe, 0x56, 0x8c, 0x24, 0x34, 0xeb, 0x7b, 0x51, 0x86, 0xdb, 0x4f, 0x99, 0xc5, 0x66, 0x21, 0xe2, 0xbf, 0x51, 0x50, 0xca, 0xee, 0x89, 0xd7, 0x53, 0x04, 0x0d, 0x28, 0xd2, 0xcf, 0x96, 0xe8, 0x95, 0x6c, 0x79, 0x04, 0x4a, 0xdd, 0x76, 0xab, 0x42, 0xaa, 0xe5, 0xfc, 0x07, 0xe3, 0x55, 0xd9, 0xb1, 0xdd, 0xaa, 0x29, 0x30, 0xb8, 0x08, 0x50, 0x69, 0x11, 0x8b, 0x91, 0xea, 0x4b, 0x8b, 0x65, 0x14, 0x0d, 0xad, 0x25, 0xf2, 0xaa, 0xee, 0xd7, 0x61, 0x3d, 0xa8, 0xc3, 0xfa, 0x7e, 0x50, 0x87, 0x37, 0x6f, 0x5d, 0xfc, 0xbe, 0x1a, 0xf9, 0xe1, 0x8f, 0x55, 0x64, 0x2e, 0x48, 0x5c, 0x81, 0x71, 0x23, 0xed, 0x66, 0x35, 0x30, 0x32, 0x37, 0x89, 0x11, 0x89, 0x2b, 0x30, 0xbc, 0xdd, 0x8b, 0x6e, 0x5c, 0x44, 0x37, 0x3f, 0xfe, 0x1c, 0x5c, 0xa9, 0x59, 0x07, 0xf3, 0x39, 0xa4, 0xae, 0x06, 0x53, 0x26, 0xd7, 0x27, 0xa0, 0xd8, 0xee, 0x89, 0x27, 0x8c, 0x24, 0xc2, 0x88, 0xcc, 0xc9, 0x6d, 0x2a, 0xfc, 0xa4, 0xa6, 0x40, 0xe6, 0x7e, 0x46, 0xb0, 0x72, 0x20, 0x8e, 0x3b, 0xf9, 0x4d, 0x09, 0xbc, 0x47, 0xa7, 0xf5, 0x8e, 0x37, 0x20, 0xe1, 0x6b, 0x2d, 0x1a, 0xae, 0xb8, 0x2b, 0xa3, 0x82, 0xf4, 0x29, 0xef, 0xc9, 0xbb, 0x16, 0xad, 0x9b, 0x32, 0xa4, 0x7c, 0x9c, 0x7b, 0x01, 0xe9, 0x61, 0xe6, 0x33, 0x93, 0x65, 0x1d, 0x52, 0x8f, 0x6d, 0xda, 0x13, 0x3c, 0x7c, 0x4d, 0xcc, 0x1d, 0xc1, 0xca, 0x10, 0xf2, 0x1a, 0xa9, 0xd8, 0x94, 0xa4, 0x36, 0x61, 0xf1, 0x80, 0x5a, 0x35, 0x72, 0x93, 0x5c, 0xde, 0x80, 0x25, 0x69, 0x43, 0xd2, 0xc2, 0xa0, 0x50, 0xfb, 0x1b, 0x3f, 0xa7, 0x63, 0xa6, 0x18, 0xf3, 0x9c, 0xb6, 0x5d, 0xaf, 0x4a, 0xa8, 0x40, 0xc6, 0x4c, 0x39, 0xfb, 0xf0, 0x35, 0x02, 0x85, 0xa7, 0x29, 0x7e, 0x1f, 0xe6, 0x0f, 0xf6, 0x76, 0xf6, 0x9e, 0x3c, 0xdb, 0x4b, 0x46, 0xd4, 0x77, 0xce, 0xce, 0xb5, 0x04, 0xff, 0x7c, 0xe0, 0xd6, 0x5d, 0xef, 0x95, 0x8b, 0xd3, 0xa0, 0x1c, 0x96, 0x4b, 0xcf, 0x92, 0x48, 0x5d, 0x3c, 0x3b, 0xd7, 0x6e, 0xf1, 0x25, 0xde, 0xa2, 0xb0, 0x0a, 0xf1, 0x42, 0x71, 0xbf, 0x7c, 0x58, 0x4a, 0x46, 0xd5, 0xe5, 0xb3, 0x73, 0x0d, 0xf8, 0x4a, 0xa1, 0xc2, 0xec, 0x0e, 0xc1, 0x1a, 0x2c, 0x14, 0x9f, 0xec, 0xee, 0x96, 0xf7, 0xf7, 0x4b, 0x5b, 0xc9, 0x98, 0xfa, 0xee, 0xd9, 0xb9, 0xb6, 0xc4, 0x97, 0xfd, 0x5a, 0xc9, 0x48, 0x55, 0x5d, 0x7c, 0xfd, 0x63, 0x36, 0xf2, 0xcb, 0x4f, 0x59, 0xc1, 0x20, 0xff, 0xcf, 0x3c, 0x2c, 0xf4, 0x34, 0xc6, 0xdf, 0xc1, 0xbc, 0x7c, 0x4a, 0xe0, 0xf5, 0x69, 0x9f, 0x37, 0xea, 0xc3, 0x29, 0x90, 0x52, 0xc4, 0x36, 0x28, 0xe2, 0x84, 0x1f, 0x4f, 0xf5, 0x24, 0x50, 0xef, 0x4f, 0x0a, 0x93, 0x6e, 0xeb, 0x10, 0xf7, 0xbb, 0x2d, 0x36, 0xc6, 0x5b, 0xb8, 0xd2, 0xdc, 0xd5, 0xbb, 0xe1, 0x01, 0xd2, 0xd9, 0x11, 0xc4, 0xfd, 0x60, 0xe0, 0x07, 0x53, 0xb6, 0x38, 0x35, 0x7d, 0x2d, 0xb3, 0x4b, 0xfc, 0x29, 0xce, 0x4d, 0xfb, 0x2d, 0x3f, 0x8c, 0xe9, 0x91, 0x8f, 0x83, 0xff, 0x35, 0xdd, 0x06, 0x85, 0x57, 0xce, 0x30, 0x91, 0x19, 0xd1, 0x2e, 0xc3, 0x44, 0x66, 0x64, 0x61, 0xfe, 0x16, 0xe2, 0x7e, 0x6d, 0x0a, 0x73, 0xa2, 0x91, 0xf5, 0x57, 0x5d, 0x9f, 0x1c, 0x28, 0x9d, 0x77, 0x41, 0xe1, 0x25, 0x08, 0x87, 0x20, 0x3f, 0xaa, 0xc8, 0xa9, 0x0f, 0x26, 0xc6, 0xf9, 0x8e, 0xef, 0x22, 0x7c, 0x0a, 0x73, 0xa2, 0xbc, 0x60, 0x3d, 0x04, 0xfb, 0x81, 0x5a, 0xa6, 0x1a, 0xa1, 0xf7, 0xfb, 0xbe, 0x36, 0xbf, 0xba, 0x78, 0x93, 0x8d, 0xfc, 0xf6, 0x26, 0x1b, 0xf9, 0xfe, 0x32, 0x8b, 0x2e, 0x2e, 0xb3, 0xe8, 0xd7, 0xcb, 0x2c, 0xfa, 0xf3, 0x32, 0x8b, 0x5e, 0x6c, 0x4d, 0xff, 0xcf, 0xb9, 0xd1, 0x9b, 0x3c, 0x8f, 0x1c, 0xc7, 0xc5, 0x55, 0xfa, 0xe8, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x8e, 0xa0, 0xb2, 0xda, 0xc4, 0x0e, 0x00, 0x00, } docker-containerd-tags-docker-17.12.1/api/services/snapshots/v1/snapshots.proto000066400000000000000000000076571322771672400275640ustar00rootroot00000000000000syntax = "proto3"; package containerd.services.snapshots.v1; import weak "gogoproto/gogo.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; import "github.com/containerd/containerd/api/types/mount.proto"; option go_package = "github.com/containerd/containerd/api/services/snapshots/v1;snapshots"; // Snapshot service manages snapshots service Snapshots { rpc Prepare(PrepareSnapshotRequest) returns (PrepareSnapshotResponse); rpc View(ViewSnapshotRequest) returns (ViewSnapshotResponse); rpc Mounts(MountsRequest) returns (MountsResponse); rpc Commit(CommitSnapshotRequest) returns (google.protobuf.Empty); rpc Remove(RemoveSnapshotRequest) returns (google.protobuf.Empty); rpc Stat(StatSnapshotRequest) returns (StatSnapshotResponse); rpc Update(UpdateSnapshotRequest) returns (UpdateSnapshotResponse); rpc List(ListSnapshotsRequest) returns (stream ListSnapshotsResponse); rpc Usage(UsageRequest) returns (UsageResponse); } message PrepareSnapshotRequest { string snapshotter = 1; string key = 2; string parent = 3; // Labels are arbitrary data on snapshots. // // The combined size of a key/value pair cannot exceed 4096 bytes. map labels = 4; } message PrepareSnapshotResponse { repeated containerd.types.Mount mounts = 1; } message ViewSnapshotRequest { string snapshotter = 1; string key = 2; string parent = 3; // Labels are arbitrary data on snapshots. // // The combined size of a key/value pair cannot exceed 4096 bytes. map labels = 4; } message ViewSnapshotResponse { repeated containerd.types.Mount mounts = 1; } message MountsRequest { string snapshotter = 1; string key = 2; } message MountsResponse { repeated containerd.types.Mount mounts = 1; } message RemoveSnapshotRequest { string snapshotter = 1; string key = 2; } message CommitSnapshotRequest { string snapshotter = 1; string name = 2; string key = 3; // Labels are arbitrary data on snapshots. // // The combined size of a key/value pair cannot exceed 4096 bytes. map labels = 4; } message StatSnapshotRequest { string snapshotter = 1; string key = 2; } enum Kind { option (gogoproto.goproto_enum_prefix) = false; option (gogoproto.enum_customname) = "Kind"; UNKNOWN = 0 [(gogoproto.enumvalue_customname) = "KindUnknown"]; VIEW = 1 [(gogoproto.enumvalue_customname) = "KindView"]; ACTIVE = 2 [(gogoproto.enumvalue_customname) = "KindActive"]; COMMITTED = 3 [(gogoproto.enumvalue_customname) = "KindCommitted"]; } message Info { string name = 1; string parent = 2; Kind kind = 3; // CreatedAt provides the time at which the snapshot was created. google.protobuf.Timestamp created_at = 4 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; // UpdatedAt provides the time the info was last updated. google.protobuf.Timestamp updated_at = 5 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; // Labels are arbitrary data on snapshots. // // The combined size of a key/value pair cannot exceed 4096 bytes. map labels = 6; } message StatSnapshotResponse { Info info = 1 [(gogoproto.nullable) = false]; } message UpdateSnapshotRequest { string snapshotter = 1; Info info = 2 [(gogoproto.nullable) = false]; // UpdateMask specifies which fields to perform the update on. If empty, // the operation applies to all fields. // // In info, Name, Parent, Kind, Created are immutable, // other field may be updated using this mask. // If no mask is provided, all mutable field are updated. google.protobuf.FieldMask update_mask = 3; } message UpdateSnapshotResponse { Info info = 1 [(gogoproto.nullable) = false]; } message ListSnapshotsRequest{ string snapshotter = 1; } message ListSnapshotsResponse { repeated Info info = 1 [(gogoproto.nullable) = false]; } message UsageRequest { string snapshotter = 1; string key = 2; } message UsageResponse { int64 size = 1; int64 inodes = 2; } docker-containerd-tags-docker-17.12.1/api/services/tasks/000077500000000000000000000000001322771672400232135ustar00rootroot00000000000000docker-containerd-tags-docker-17.12.1/api/services/tasks/v1/000077500000000000000000000000001322771672400235415ustar00rootroot00000000000000docker-containerd-tags-docker-17.12.1/api/services/tasks/v1/tasks.pb.go000066400000000000000000004421171322771672400256260ustar00rootroot00000000000000// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/containerd/containerd/api/services/tasks/v1/tasks.proto /* Package tasks is a generated protocol buffer package. It is generated from these files: github.com/containerd/containerd/api/services/tasks/v1/tasks.proto It has these top-level messages: CreateTaskRequest CreateTaskResponse StartRequest StartResponse DeleteTaskRequest DeleteResponse DeleteProcessRequest GetRequest GetResponse ListTasksRequest ListTasksResponse KillRequest ExecProcessRequest ExecProcessResponse ResizePtyRequest CloseIORequest PauseTaskRequest ResumeTaskRequest ListPidsRequest ListPidsResponse CheckpointTaskRequest CheckpointTaskResponse UpdateTaskRequest MetricsRequest MetricsResponse WaitRequest WaitResponse */ package tasks import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" import google_protobuf "github.com/gogo/protobuf/types" import google_protobuf1 "github.com/gogo/protobuf/types" // skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto" import containerd_types "github.com/containerd/containerd/api/types" import containerd_types1 "github.com/containerd/containerd/api/types" import containerd_types2 "github.com/containerd/containerd/api/types" import containerd_v1_types "github.com/containerd/containerd/api/types/task" import _ "github.com/gogo/protobuf/types" import time "time" import github_com_opencontainers_go_digest "github.com/opencontainers/go-digest" import ( context "golang.org/x/net/context" grpc "google.golang.org/grpc" ) import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" import strings "strings" import reflect "reflect" import io "io" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf var _ = time.Kitchen // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package type CreateTaskRequest struct { ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` // RootFS provides the pre-chroot mounts to perform in the shim before // executing the container task. // // These are for mounts that cannot be performed in the user namespace. // Typically, these mounts should be resolved from snapshots specified on // the container object. Rootfs []*containerd_types.Mount `protobuf:"bytes,3,rep,name=rootfs" json:"rootfs,omitempty"` Stdin string `protobuf:"bytes,4,opt,name=stdin,proto3" json:"stdin,omitempty"` Stdout string `protobuf:"bytes,5,opt,name=stdout,proto3" json:"stdout,omitempty"` Stderr string `protobuf:"bytes,6,opt,name=stderr,proto3" json:"stderr,omitempty"` Terminal bool `protobuf:"varint,7,opt,name=terminal,proto3" json:"terminal,omitempty"` Checkpoint *containerd_types2.Descriptor `protobuf:"bytes,8,opt,name=checkpoint" json:"checkpoint,omitempty"` Options *google_protobuf1.Any `protobuf:"bytes,9,opt,name=options" json:"options,omitempty"` } func (m *CreateTaskRequest) Reset() { *m = CreateTaskRequest{} } func (*CreateTaskRequest) ProtoMessage() {} func (*CreateTaskRequest) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{0} } type CreateTaskResponse struct { ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` Pid uint32 `protobuf:"varint,2,opt,name=pid,proto3" json:"pid,omitempty"` } func (m *CreateTaskResponse) Reset() { *m = CreateTaskResponse{} } func (*CreateTaskResponse) ProtoMessage() {} func (*CreateTaskResponse) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{1} } type StartRequest struct { ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` ExecID string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"` } func (m *StartRequest) Reset() { *m = StartRequest{} } func (*StartRequest) ProtoMessage() {} func (*StartRequest) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{2} } type StartResponse struct { Pid uint32 `protobuf:"varint,1,opt,name=pid,proto3" json:"pid,omitempty"` } func (m *StartResponse) Reset() { *m = StartResponse{} } func (*StartResponse) ProtoMessage() {} func (*StartResponse) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{3} } type DeleteTaskRequest struct { ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` } func (m *DeleteTaskRequest) Reset() { *m = DeleteTaskRequest{} } func (*DeleteTaskRequest) ProtoMessage() {} func (*DeleteTaskRequest) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{4} } type DeleteResponse struct { ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Pid uint32 `protobuf:"varint,2,opt,name=pid,proto3" json:"pid,omitempty"` ExitStatus uint32 `protobuf:"varint,3,opt,name=exit_status,json=exitStatus,proto3" json:"exit_status,omitempty"` ExitedAt time.Time `protobuf:"bytes,4,opt,name=exited_at,json=exitedAt,stdtime" json:"exited_at"` } func (m *DeleteResponse) Reset() { *m = DeleteResponse{} } func (*DeleteResponse) ProtoMessage() {} func (*DeleteResponse) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{5} } type DeleteProcessRequest struct { ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` ExecID string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"` } func (m *DeleteProcessRequest) Reset() { *m = DeleteProcessRequest{} } func (*DeleteProcessRequest) ProtoMessage() {} func (*DeleteProcessRequest) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{6} } type GetRequest struct { ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` ExecID string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"` } func (m *GetRequest) Reset() { *m = GetRequest{} } func (*GetRequest) ProtoMessage() {} func (*GetRequest) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{7} } type GetResponse struct { Process *containerd_v1_types.Process `protobuf:"bytes,1,opt,name=process" json:"process,omitempty"` } func (m *GetResponse) Reset() { *m = GetResponse{} } func (*GetResponse) ProtoMessage() {} func (*GetResponse) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{8} } type ListTasksRequest struct { Filter string `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` } func (m *ListTasksRequest) Reset() { *m = ListTasksRequest{} } func (*ListTasksRequest) ProtoMessage() {} func (*ListTasksRequest) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{9} } type ListTasksResponse struct { Tasks []*containerd_v1_types.Process `protobuf:"bytes,1,rep,name=tasks" json:"tasks,omitempty"` } func (m *ListTasksResponse) Reset() { *m = ListTasksResponse{} } func (*ListTasksResponse) ProtoMessage() {} func (*ListTasksResponse) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{10} } type KillRequest struct { ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` ExecID string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"` Signal uint32 `protobuf:"varint,3,opt,name=signal,proto3" json:"signal,omitempty"` All bool `protobuf:"varint,4,opt,name=all,proto3" json:"all,omitempty"` } func (m *KillRequest) Reset() { *m = KillRequest{} } func (*KillRequest) ProtoMessage() {} func (*KillRequest) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{11} } type ExecProcessRequest struct { ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` Stdin string `protobuf:"bytes,2,opt,name=stdin,proto3" json:"stdin,omitempty"` Stdout string `protobuf:"bytes,3,opt,name=stdout,proto3" json:"stdout,omitempty"` Stderr string `protobuf:"bytes,4,opt,name=stderr,proto3" json:"stderr,omitempty"` Terminal bool `protobuf:"varint,5,opt,name=terminal,proto3" json:"terminal,omitempty"` // Spec for starting a process in the target container. // // For runc, this is a process spec, for example. Spec *google_protobuf1.Any `protobuf:"bytes,6,opt,name=spec" json:"spec,omitempty"` // id of the exec process ExecID string `protobuf:"bytes,7,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"` } func (m *ExecProcessRequest) Reset() { *m = ExecProcessRequest{} } func (*ExecProcessRequest) ProtoMessage() {} func (*ExecProcessRequest) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{12} } type ExecProcessResponse struct { } func (m *ExecProcessResponse) Reset() { *m = ExecProcessResponse{} } func (*ExecProcessResponse) ProtoMessage() {} func (*ExecProcessResponse) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{13} } type ResizePtyRequest struct { ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` ExecID string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"` Width uint32 `protobuf:"varint,3,opt,name=width,proto3" json:"width,omitempty"` Height uint32 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` } func (m *ResizePtyRequest) Reset() { *m = ResizePtyRequest{} } func (*ResizePtyRequest) ProtoMessage() {} func (*ResizePtyRequest) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{14} } type CloseIORequest struct { ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` ExecID string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"` Stdin bool `protobuf:"varint,3,opt,name=stdin,proto3" json:"stdin,omitempty"` } func (m *CloseIORequest) Reset() { *m = CloseIORequest{} } func (*CloseIORequest) ProtoMessage() {} func (*CloseIORequest) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{15} } type PauseTaskRequest struct { ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` } func (m *PauseTaskRequest) Reset() { *m = PauseTaskRequest{} } func (*PauseTaskRequest) ProtoMessage() {} func (*PauseTaskRequest) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{16} } type ResumeTaskRequest struct { ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` } func (m *ResumeTaskRequest) Reset() { *m = ResumeTaskRequest{} } func (*ResumeTaskRequest) ProtoMessage() {} func (*ResumeTaskRequest) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{17} } type ListPidsRequest struct { ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` } func (m *ListPidsRequest) Reset() { *m = ListPidsRequest{} } func (*ListPidsRequest) ProtoMessage() {} func (*ListPidsRequest) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{18} } type ListPidsResponse struct { // Processes includes the process ID and additional process information Processes []*containerd_v1_types.ProcessInfo `protobuf:"bytes,1,rep,name=processes" json:"processes,omitempty"` } func (m *ListPidsResponse) Reset() { *m = ListPidsResponse{} } func (*ListPidsResponse) ProtoMessage() {} func (*ListPidsResponse) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{19} } type CheckpointTaskRequest struct { ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` ParentCheckpoint github_com_opencontainers_go_digest.Digest `protobuf:"bytes,2,opt,name=parent_checkpoint,json=parentCheckpoint,proto3,customtype=github.com/opencontainers/go-digest.Digest" json:"parent_checkpoint"` Options *google_protobuf1.Any `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` } func (m *CheckpointTaskRequest) Reset() { *m = CheckpointTaskRequest{} } func (*CheckpointTaskRequest) ProtoMessage() {} func (*CheckpointTaskRequest) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{20} } type CheckpointTaskResponse struct { Descriptors []*containerd_types2.Descriptor `protobuf:"bytes,1,rep,name=descriptors" json:"descriptors,omitempty"` } func (m *CheckpointTaskResponse) Reset() { *m = CheckpointTaskResponse{} } func (*CheckpointTaskResponse) ProtoMessage() {} func (*CheckpointTaskResponse) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{21} } type UpdateTaskRequest struct { ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` Resources *google_protobuf1.Any `protobuf:"bytes,2,opt,name=resources" json:"resources,omitempty"` } func (m *UpdateTaskRequest) Reset() { *m = UpdateTaskRequest{} } func (*UpdateTaskRequest) ProtoMessage() {} func (*UpdateTaskRequest) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{22} } type MetricsRequest struct { Filters []string `protobuf:"bytes,1,rep,name=filters" json:"filters,omitempty"` } func (m *MetricsRequest) Reset() { *m = MetricsRequest{} } func (*MetricsRequest) ProtoMessage() {} func (*MetricsRequest) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{23} } type MetricsResponse struct { Metrics []*containerd_types1.Metric `protobuf:"bytes,1,rep,name=metrics" json:"metrics,omitempty"` } func (m *MetricsResponse) Reset() { *m = MetricsResponse{} } func (*MetricsResponse) ProtoMessage() {} func (*MetricsResponse) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{24} } type WaitRequest struct { ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` ExecID string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"` } func (m *WaitRequest) Reset() { *m = WaitRequest{} } func (*WaitRequest) ProtoMessage() {} func (*WaitRequest) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{25} } type WaitResponse struct { ExitStatus uint32 `protobuf:"varint,1,opt,name=exit_status,json=exitStatus,proto3" json:"exit_status,omitempty"` ExitedAt time.Time `protobuf:"bytes,2,opt,name=exited_at,json=exitedAt,stdtime" json:"exited_at"` } func (m *WaitResponse) Reset() { *m = WaitResponse{} } func (*WaitResponse) ProtoMessage() {} func (*WaitResponse) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{26} } func init() { proto.RegisterType((*CreateTaskRequest)(nil), "containerd.services.tasks.v1.CreateTaskRequest") proto.RegisterType((*CreateTaskResponse)(nil), "containerd.services.tasks.v1.CreateTaskResponse") proto.RegisterType((*StartRequest)(nil), "containerd.services.tasks.v1.StartRequest") proto.RegisterType((*StartResponse)(nil), "containerd.services.tasks.v1.StartResponse") proto.RegisterType((*DeleteTaskRequest)(nil), "containerd.services.tasks.v1.DeleteTaskRequest") proto.RegisterType((*DeleteResponse)(nil), "containerd.services.tasks.v1.DeleteResponse") proto.RegisterType((*DeleteProcessRequest)(nil), "containerd.services.tasks.v1.DeleteProcessRequest") proto.RegisterType((*GetRequest)(nil), "containerd.services.tasks.v1.GetRequest") proto.RegisterType((*GetResponse)(nil), "containerd.services.tasks.v1.GetResponse") proto.RegisterType((*ListTasksRequest)(nil), "containerd.services.tasks.v1.ListTasksRequest") proto.RegisterType((*ListTasksResponse)(nil), "containerd.services.tasks.v1.ListTasksResponse") proto.RegisterType((*KillRequest)(nil), "containerd.services.tasks.v1.KillRequest") proto.RegisterType((*ExecProcessRequest)(nil), "containerd.services.tasks.v1.ExecProcessRequest") proto.RegisterType((*ExecProcessResponse)(nil), "containerd.services.tasks.v1.ExecProcessResponse") proto.RegisterType((*ResizePtyRequest)(nil), "containerd.services.tasks.v1.ResizePtyRequest") proto.RegisterType((*CloseIORequest)(nil), "containerd.services.tasks.v1.CloseIORequest") proto.RegisterType((*PauseTaskRequest)(nil), "containerd.services.tasks.v1.PauseTaskRequest") proto.RegisterType((*ResumeTaskRequest)(nil), "containerd.services.tasks.v1.ResumeTaskRequest") proto.RegisterType((*ListPidsRequest)(nil), "containerd.services.tasks.v1.ListPidsRequest") proto.RegisterType((*ListPidsResponse)(nil), "containerd.services.tasks.v1.ListPidsResponse") proto.RegisterType((*CheckpointTaskRequest)(nil), "containerd.services.tasks.v1.CheckpointTaskRequest") proto.RegisterType((*CheckpointTaskResponse)(nil), "containerd.services.tasks.v1.CheckpointTaskResponse") proto.RegisterType((*UpdateTaskRequest)(nil), "containerd.services.tasks.v1.UpdateTaskRequest") proto.RegisterType((*MetricsRequest)(nil), "containerd.services.tasks.v1.MetricsRequest") proto.RegisterType((*MetricsResponse)(nil), "containerd.services.tasks.v1.MetricsResponse") proto.RegisterType((*WaitRequest)(nil), "containerd.services.tasks.v1.WaitRequest") proto.RegisterType((*WaitResponse)(nil), "containerd.services.tasks.v1.WaitResponse") } // Reference imports to suppress errors if they are not otherwise used. var _ context.Context var _ grpc.ClientConn // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 // Client API for Tasks service type TasksClient interface { // Create a task. Create(ctx context.Context, in *CreateTaskRequest, opts ...grpc.CallOption) (*CreateTaskResponse, error) // Start a process. Start(ctx context.Context, in *StartRequest, opts ...grpc.CallOption) (*StartResponse, error) // Delete a task and on disk state. Delete(ctx context.Context, in *DeleteTaskRequest, opts ...grpc.CallOption) (*DeleteResponse, error) DeleteProcess(ctx context.Context, in *DeleteProcessRequest, opts ...grpc.CallOption) (*DeleteResponse, error) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) List(ctx context.Context, in *ListTasksRequest, opts ...grpc.CallOption) (*ListTasksResponse, error) // Kill a task or process. Kill(ctx context.Context, in *KillRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) Exec(ctx context.Context, in *ExecProcessRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) ResizePty(ctx context.Context, in *ResizePtyRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) CloseIO(ctx context.Context, in *CloseIORequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) Pause(ctx context.Context, in *PauseTaskRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) Resume(ctx context.Context, in *ResumeTaskRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) ListPids(ctx context.Context, in *ListPidsRequest, opts ...grpc.CallOption) (*ListPidsResponse, error) Checkpoint(ctx context.Context, in *CheckpointTaskRequest, opts ...grpc.CallOption) (*CheckpointTaskResponse, error) Update(ctx context.Context, in *UpdateTaskRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) Metrics(ctx context.Context, in *MetricsRequest, opts ...grpc.CallOption) (*MetricsResponse, error) Wait(ctx context.Context, in *WaitRequest, opts ...grpc.CallOption) (*WaitResponse, error) } type tasksClient struct { cc *grpc.ClientConn } func NewTasksClient(cc *grpc.ClientConn) TasksClient { return &tasksClient{cc} } func (c *tasksClient) Create(ctx context.Context, in *CreateTaskRequest, opts ...grpc.CallOption) (*CreateTaskResponse, error) { out := new(CreateTaskResponse) err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Create", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *tasksClient) Start(ctx context.Context, in *StartRequest, opts ...grpc.CallOption) (*StartResponse, error) { out := new(StartResponse) err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Start", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *tasksClient) Delete(ctx context.Context, in *DeleteTaskRequest, opts ...grpc.CallOption) (*DeleteResponse, error) { out := new(DeleteResponse) err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Delete", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *tasksClient) DeleteProcess(ctx context.Context, in *DeleteProcessRequest, opts ...grpc.CallOption) (*DeleteResponse, error) { out := new(DeleteResponse) err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/DeleteProcess", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *tasksClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) { out := new(GetResponse) err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Get", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *tasksClient) List(ctx context.Context, in *ListTasksRequest, opts ...grpc.CallOption) (*ListTasksResponse, error) { out := new(ListTasksResponse) err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/List", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *tasksClient) Kill(ctx context.Context, in *KillRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) { out := new(google_protobuf.Empty) err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Kill", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *tasksClient) Exec(ctx context.Context, in *ExecProcessRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) { out := new(google_protobuf.Empty) err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Exec", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *tasksClient) ResizePty(ctx context.Context, in *ResizePtyRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) { out := new(google_protobuf.Empty) err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/ResizePty", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *tasksClient) CloseIO(ctx context.Context, in *CloseIORequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) { out := new(google_protobuf.Empty) err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/CloseIO", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *tasksClient) Pause(ctx context.Context, in *PauseTaskRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) { out := new(google_protobuf.Empty) err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Pause", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *tasksClient) Resume(ctx context.Context, in *ResumeTaskRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) { out := new(google_protobuf.Empty) err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Resume", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *tasksClient) ListPids(ctx context.Context, in *ListPidsRequest, opts ...grpc.CallOption) (*ListPidsResponse, error) { out := new(ListPidsResponse) err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/ListPids", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *tasksClient) Checkpoint(ctx context.Context, in *CheckpointTaskRequest, opts ...grpc.CallOption) (*CheckpointTaskResponse, error) { out := new(CheckpointTaskResponse) err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Checkpoint", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *tasksClient) Update(ctx context.Context, in *UpdateTaskRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) { out := new(google_protobuf.Empty) err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Update", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *tasksClient) Metrics(ctx context.Context, in *MetricsRequest, opts ...grpc.CallOption) (*MetricsResponse, error) { out := new(MetricsResponse) err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Metrics", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } func (c *tasksClient) Wait(ctx context.Context, in *WaitRequest, opts ...grpc.CallOption) (*WaitResponse, error) { out := new(WaitResponse) err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Wait", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } // Server API for Tasks service type TasksServer interface { // Create a task. Create(context.Context, *CreateTaskRequest) (*CreateTaskResponse, error) // Start a process. Start(context.Context, *StartRequest) (*StartResponse, error) // Delete a task and on disk state. Delete(context.Context, *DeleteTaskRequest) (*DeleteResponse, error) DeleteProcess(context.Context, *DeleteProcessRequest) (*DeleteResponse, error) Get(context.Context, *GetRequest) (*GetResponse, error) List(context.Context, *ListTasksRequest) (*ListTasksResponse, error) // Kill a task or process. Kill(context.Context, *KillRequest) (*google_protobuf.Empty, error) Exec(context.Context, *ExecProcessRequest) (*google_protobuf.Empty, error) ResizePty(context.Context, *ResizePtyRequest) (*google_protobuf.Empty, error) CloseIO(context.Context, *CloseIORequest) (*google_protobuf.Empty, error) Pause(context.Context, *PauseTaskRequest) (*google_protobuf.Empty, error) Resume(context.Context, *ResumeTaskRequest) (*google_protobuf.Empty, error) ListPids(context.Context, *ListPidsRequest) (*ListPidsResponse, error) Checkpoint(context.Context, *CheckpointTaskRequest) (*CheckpointTaskResponse, error) Update(context.Context, *UpdateTaskRequest) (*google_protobuf.Empty, error) Metrics(context.Context, *MetricsRequest) (*MetricsResponse, error) Wait(context.Context, *WaitRequest) (*WaitResponse, error) } func RegisterTasksServer(s *grpc.Server, srv TasksServer) { s.RegisterService(&_Tasks_serviceDesc, srv) } func _Tasks_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CreateTaskRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(TasksServer).Create(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.tasks.v1.Tasks/Create", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(TasksServer).Create(ctx, req.(*CreateTaskRequest)) } return interceptor(ctx, in, info, handler) } func _Tasks_Start_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(StartRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(TasksServer).Start(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.tasks.v1.Tasks/Start", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(TasksServer).Start(ctx, req.(*StartRequest)) } return interceptor(ctx, in, info, handler) } func _Tasks_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DeleteTaskRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(TasksServer).Delete(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.tasks.v1.Tasks/Delete", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(TasksServer).Delete(ctx, req.(*DeleteTaskRequest)) } return interceptor(ctx, in, info, handler) } func _Tasks_DeleteProcess_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DeleteProcessRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(TasksServer).DeleteProcess(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.tasks.v1.Tasks/DeleteProcess", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(TasksServer).DeleteProcess(ctx, req.(*DeleteProcessRequest)) } return interceptor(ctx, in, info, handler) } func _Tasks_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(TasksServer).Get(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.tasks.v1.Tasks/Get", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(TasksServer).Get(ctx, req.(*GetRequest)) } return interceptor(ctx, in, info, handler) } func _Tasks_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListTasksRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(TasksServer).List(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.tasks.v1.Tasks/List", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(TasksServer).List(ctx, req.(*ListTasksRequest)) } return interceptor(ctx, in, info, handler) } func _Tasks_Kill_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(KillRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(TasksServer).Kill(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.tasks.v1.Tasks/Kill", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(TasksServer).Kill(ctx, req.(*KillRequest)) } return interceptor(ctx, in, info, handler) } func _Tasks_Exec_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ExecProcessRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(TasksServer).Exec(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.tasks.v1.Tasks/Exec", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(TasksServer).Exec(ctx, req.(*ExecProcessRequest)) } return interceptor(ctx, in, info, handler) } func _Tasks_ResizePty_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ResizePtyRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(TasksServer).ResizePty(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.tasks.v1.Tasks/ResizePty", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(TasksServer).ResizePty(ctx, req.(*ResizePtyRequest)) } return interceptor(ctx, in, info, handler) } func _Tasks_CloseIO_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CloseIORequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(TasksServer).CloseIO(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.tasks.v1.Tasks/CloseIO", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(TasksServer).CloseIO(ctx, req.(*CloseIORequest)) } return interceptor(ctx, in, info, handler) } func _Tasks_Pause_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(PauseTaskRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(TasksServer).Pause(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.tasks.v1.Tasks/Pause", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(TasksServer).Pause(ctx, req.(*PauseTaskRequest)) } return interceptor(ctx, in, info, handler) } func _Tasks_Resume_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ResumeTaskRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(TasksServer).Resume(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.tasks.v1.Tasks/Resume", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(TasksServer).Resume(ctx, req.(*ResumeTaskRequest)) } return interceptor(ctx, in, info, handler) } func _Tasks_ListPids_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListPidsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(TasksServer).ListPids(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.tasks.v1.Tasks/ListPids", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(TasksServer).ListPids(ctx, req.(*ListPidsRequest)) } return interceptor(ctx, in, info, handler) } func _Tasks_Checkpoint_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CheckpointTaskRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(TasksServer).Checkpoint(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.tasks.v1.Tasks/Checkpoint", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(TasksServer).Checkpoint(ctx, req.(*CheckpointTaskRequest)) } return interceptor(ctx, in, info, handler) } func _Tasks_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateTaskRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(TasksServer).Update(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.tasks.v1.Tasks/Update", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(TasksServer).Update(ctx, req.(*UpdateTaskRequest)) } return interceptor(ctx, in, info, handler) } func _Tasks_Metrics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MetricsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(TasksServer).Metrics(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.tasks.v1.Tasks/Metrics", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(TasksServer).Metrics(ctx, req.(*MetricsRequest)) } return interceptor(ctx, in, info, handler) } func _Tasks_Wait_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(WaitRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(TasksServer).Wait(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.tasks.v1.Tasks/Wait", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(TasksServer).Wait(ctx, req.(*WaitRequest)) } return interceptor(ctx, in, info, handler) } var _Tasks_serviceDesc = grpc.ServiceDesc{ ServiceName: "containerd.services.tasks.v1.Tasks", HandlerType: (*TasksServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Create", Handler: _Tasks_Create_Handler, }, { MethodName: "Start", Handler: _Tasks_Start_Handler, }, { MethodName: "Delete", Handler: _Tasks_Delete_Handler, }, { MethodName: "DeleteProcess", Handler: _Tasks_DeleteProcess_Handler, }, { MethodName: "Get", Handler: _Tasks_Get_Handler, }, { MethodName: "List", Handler: _Tasks_List_Handler, }, { MethodName: "Kill", Handler: _Tasks_Kill_Handler, }, { MethodName: "Exec", Handler: _Tasks_Exec_Handler, }, { MethodName: "ResizePty", Handler: _Tasks_ResizePty_Handler, }, { MethodName: "CloseIO", Handler: _Tasks_CloseIO_Handler, }, { MethodName: "Pause", Handler: _Tasks_Pause_Handler, }, { MethodName: "Resume", Handler: _Tasks_Resume_Handler, }, { MethodName: "ListPids", Handler: _Tasks_ListPids_Handler, }, { MethodName: "Checkpoint", Handler: _Tasks_Checkpoint_Handler, }, { MethodName: "Update", Handler: _Tasks_Update_Handler, }, { MethodName: "Metrics", Handler: _Tasks_Metrics_Handler, }, { MethodName: "Wait", Handler: _Tasks_Wait_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "github.com/containerd/containerd/api/services/tasks/v1/tasks.proto", } func (m *CreateTaskRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *CreateTaskRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.ContainerID) > 0 { dAtA[i] = 0xa i++ i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) i += copy(dAtA[i:], m.ContainerID) } if len(m.Rootfs) > 0 { for _, msg := range m.Rootfs { dAtA[i] = 0x1a i++ i = encodeVarintTasks(dAtA, i, uint64(msg.Size())) n, err := msg.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n } } if len(m.Stdin) > 0 { dAtA[i] = 0x22 i++ i = encodeVarintTasks(dAtA, i, uint64(len(m.Stdin))) i += copy(dAtA[i:], m.Stdin) } if len(m.Stdout) > 0 { dAtA[i] = 0x2a i++ i = encodeVarintTasks(dAtA, i, uint64(len(m.Stdout))) i += copy(dAtA[i:], m.Stdout) } if len(m.Stderr) > 0 { dAtA[i] = 0x32 i++ i = encodeVarintTasks(dAtA, i, uint64(len(m.Stderr))) i += copy(dAtA[i:], m.Stderr) } if m.Terminal { dAtA[i] = 0x38 i++ if m.Terminal { dAtA[i] = 1 } else { dAtA[i] = 0 } i++ } if m.Checkpoint != nil { dAtA[i] = 0x42 i++ i = encodeVarintTasks(dAtA, i, uint64(m.Checkpoint.Size())) n1, err := m.Checkpoint.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n1 } if m.Options != nil { dAtA[i] = 0x4a i++ i = encodeVarintTasks(dAtA, i, uint64(m.Options.Size())) n2, err := m.Options.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n2 } return i, nil } func (m *CreateTaskResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *CreateTaskResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.ContainerID) > 0 { dAtA[i] = 0xa i++ i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) i += copy(dAtA[i:], m.ContainerID) } if m.Pid != 0 { dAtA[i] = 0x10 i++ i = encodeVarintTasks(dAtA, i, uint64(m.Pid)) } return i, nil } func (m *StartRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *StartRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.ContainerID) > 0 { dAtA[i] = 0xa i++ i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) i += copy(dAtA[i:], m.ContainerID) } if len(m.ExecID) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintTasks(dAtA, i, uint64(len(m.ExecID))) i += copy(dAtA[i:], m.ExecID) } return i, nil } func (m *StartResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *StartResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if m.Pid != 0 { dAtA[i] = 0x8 i++ i = encodeVarintTasks(dAtA, i, uint64(m.Pid)) } return i, nil } func (m *DeleteTaskRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *DeleteTaskRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.ContainerID) > 0 { dAtA[i] = 0xa i++ i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) i += copy(dAtA[i:], m.ContainerID) } return i, nil } func (m *DeleteResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *DeleteResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.ID) > 0 { dAtA[i] = 0xa i++ i = encodeVarintTasks(dAtA, i, uint64(len(m.ID))) i += copy(dAtA[i:], m.ID) } if m.Pid != 0 { dAtA[i] = 0x10 i++ i = encodeVarintTasks(dAtA, i, uint64(m.Pid)) } if m.ExitStatus != 0 { dAtA[i] = 0x18 i++ i = encodeVarintTasks(dAtA, i, uint64(m.ExitStatus)) } dAtA[i] = 0x22 i++ i = encodeVarintTasks(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt))) n3, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:]) if err != nil { return 0, err } i += n3 return i, nil } func (m *DeleteProcessRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *DeleteProcessRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.ContainerID) > 0 { dAtA[i] = 0xa i++ i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) i += copy(dAtA[i:], m.ContainerID) } if len(m.ExecID) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintTasks(dAtA, i, uint64(len(m.ExecID))) i += copy(dAtA[i:], m.ExecID) } return i, nil } func (m *GetRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *GetRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.ContainerID) > 0 { dAtA[i] = 0xa i++ i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) i += copy(dAtA[i:], m.ContainerID) } if len(m.ExecID) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintTasks(dAtA, i, uint64(len(m.ExecID))) i += copy(dAtA[i:], m.ExecID) } return i, nil } func (m *GetResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *GetResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if m.Process != nil { dAtA[i] = 0xa i++ i = encodeVarintTasks(dAtA, i, uint64(m.Process.Size())) n4, err := m.Process.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n4 } return i, nil } func (m *ListTasksRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ListTasksRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Filter) > 0 { dAtA[i] = 0xa i++ i = encodeVarintTasks(dAtA, i, uint64(len(m.Filter))) i += copy(dAtA[i:], m.Filter) } return i, nil } func (m *ListTasksResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ListTasksResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Tasks) > 0 { for _, msg := range m.Tasks { dAtA[i] = 0xa i++ i = encodeVarintTasks(dAtA, i, uint64(msg.Size())) n, err := msg.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n } } return i, nil } func (m *KillRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *KillRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.ContainerID) > 0 { dAtA[i] = 0xa i++ i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) i += copy(dAtA[i:], m.ContainerID) } if len(m.ExecID) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintTasks(dAtA, i, uint64(len(m.ExecID))) i += copy(dAtA[i:], m.ExecID) } if m.Signal != 0 { dAtA[i] = 0x18 i++ i = encodeVarintTasks(dAtA, i, uint64(m.Signal)) } if m.All { dAtA[i] = 0x20 i++ if m.All { dAtA[i] = 1 } else { dAtA[i] = 0 } i++ } return i, nil } func (m *ExecProcessRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ExecProcessRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.ContainerID) > 0 { dAtA[i] = 0xa i++ i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) i += copy(dAtA[i:], m.ContainerID) } if len(m.Stdin) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintTasks(dAtA, i, uint64(len(m.Stdin))) i += copy(dAtA[i:], m.Stdin) } if len(m.Stdout) > 0 { dAtA[i] = 0x1a i++ i = encodeVarintTasks(dAtA, i, uint64(len(m.Stdout))) i += copy(dAtA[i:], m.Stdout) } if len(m.Stderr) > 0 { dAtA[i] = 0x22 i++ i = encodeVarintTasks(dAtA, i, uint64(len(m.Stderr))) i += copy(dAtA[i:], m.Stderr) } if m.Terminal { dAtA[i] = 0x28 i++ if m.Terminal { dAtA[i] = 1 } else { dAtA[i] = 0 } i++ } if m.Spec != nil { dAtA[i] = 0x32 i++ i = encodeVarintTasks(dAtA, i, uint64(m.Spec.Size())) n5, err := m.Spec.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n5 } if len(m.ExecID) > 0 { dAtA[i] = 0x3a i++ i = encodeVarintTasks(dAtA, i, uint64(len(m.ExecID))) i += copy(dAtA[i:], m.ExecID) } return i, nil } func (m *ExecProcessResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ExecProcessResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l return i, nil } func (m *ResizePtyRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ResizePtyRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.ContainerID) > 0 { dAtA[i] = 0xa i++ i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) i += copy(dAtA[i:], m.ContainerID) } if len(m.ExecID) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintTasks(dAtA, i, uint64(len(m.ExecID))) i += copy(dAtA[i:], m.ExecID) } if m.Width != 0 { dAtA[i] = 0x18 i++ i = encodeVarintTasks(dAtA, i, uint64(m.Width)) } if m.Height != 0 { dAtA[i] = 0x20 i++ i = encodeVarintTasks(dAtA, i, uint64(m.Height)) } return i, nil } func (m *CloseIORequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *CloseIORequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.ContainerID) > 0 { dAtA[i] = 0xa i++ i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) i += copy(dAtA[i:], m.ContainerID) } if len(m.ExecID) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintTasks(dAtA, i, uint64(len(m.ExecID))) i += copy(dAtA[i:], m.ExecID) } if m.Stdin { dAtA[i] = 0x18 i++ if m.Stdin { dAtA[i] = 1 } else { dAtA[i] = 0 } i++ } return i, nil } func (m *PauseTaskRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *PauseTaskRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.ContainerID) > 0 { dAtA[i] = 0xa i++ i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) i += copy(dAtA[i:], m.ContainerID) } return i, nil } func (m *ResumeTaskRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ResumeTaskRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.ContainerID) > 0 { dAtA[i] = 0xa i++ i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) i += copy(dAtA[i:], m.ContainerID) } return i, nil } func (m *ListPidsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ListPidsRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.ContainerID) > 0 { dAtA[i] = 0xa i++ i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) i += copy(dAtA[i:], m.ContainerID) } return i, nil } func (m *ListPidsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ListPidsResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Processes) > 0 { for _, msg := range m.Processes { dAtA[i] = 0xa i++ i = encodeVarintTasks(dAtA, i, uint64(msg.Size())) n, err := msg.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n } } return i, nil } func (m *CheckpointTaskRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *CheckpointTaskRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.ContainerID) > 0 { dAtA[i] = 0xa i++ i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) i += copy(dAtA[i:], m.ContainerID) } if len(m.ParentCheckpoint) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintTasks(dAtA, i, uint64(len(m.ParentCheckpoint))) i += copy(dAtA[i:], m.ParentCheckpoint) } if m.Options != nil { dAtA[i] = 0x1a i++ i = encodeVarintTasks(dAtA, i, uint64(m.Options.Size())) n6, err := m.Options.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n6 } return i, nil } func (m *CheckpointTaskResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *CheckpointTaskResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Descriptors) > 0 { for _, msg := range m.Descriptors { dAtA[i] = 0xa i++ i = encodeVarintTasks(dAtA, i, uint64(msg.Size())) n, err := msg.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n } } return i, nil } func (m *UpdateTaskRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *UpdateTaskRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.ContainerID) > 0 { dAtA[i] = 0xa i++ i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) i += copy(dAtA[i:], m.ContainerID) } if m.Resources != nil { dAtA[i] = 0x12 i++ i = encodeVarintTasks(dAtA, i, uint64(m.Resources.Size())) n7, err := m.Resources.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n7 } return i, nil } func (m *MetricsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *MetricsRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Filters) > 0 { for _, s := range m.Filters { dAtA[i] = 0xa i++ l = len(s) for l >= 1<<7 { dAtA[i] = uint8(uint64(l)&0x7f | 0x80) l >>= 7 i++ } dAtA[i] = uint8(l) i++ i += copy(dAtA[i:], s) } } return i, nil } func (m *MetricsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *MetricsResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Metrics) > 0 { for _, msg := range m.Metrics { dAtA[i] = 0xa i++ i = encodeVarintTasks(dAtA, i, uint64(msg.Size())) n, err := msg.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n } } return i, nil } func (m *WaitRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *WaitRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.ContainerID) > 0 { dAtA[i] = 0xa i++ i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID))) i += copy(dAtA[i:], m.ContainerID) } if len(m.ExecID) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintTasks(dAtA, i, uint64(len(m.ExecID))) i += copy(dAtA[i:], m.ExecID) } return i, nil } func (m *WaitResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *WaitResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if m.ExitStatus != 0 { dAtA[i] = 0x8 i++ i = encodeVarintTasks(dAtA, i, uint64(m.ExitStatus)) } dAtA[i] = 0x12 i++ i = encodeVarintTasks(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt))) n8, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:]) if err != nil { return 0, err } i += n8 return i, nil } func encodeVarintTasks(dAtA []byte, offset int, v uint64) int { for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return offset + 1 } func (m *CreateTaskRequest) Size() (n int) { var l int _ = l l = len(m.ContainerID) if l > 0 { n += 1 + l + sovTasks(uint64(l)) } if len(m.Rootfs) > 0 { for _, e := range m.Rootfs { l = e.Size() n += 1 + l + sovTasks(uint64(l)) } } l = len(m.Stdin) if l > 0 { n += 1 + l + sovTasks(uint64(l)) } l = len(m.Stdout) if l > 0 { n += 1 + l + sovTasks(uint64(l)) } l = len(m.Stderr) if l > 0 { n += 1 + l + sovTasks(uint64(l)) } if m.Terminal { n += 2 } if m.Checkpoint != nil { l = m.Checkpoint.Size() n += 1 + l + sovTasks(uint64(l)) } if m.Options != nil { l = m.Options.Size() n += 1 + l + sovTasks(uint64(l)) } return n } func (m *CreateTaskResponse) Size() (n int) { var l int _ = l l = len(m.ContainerID) if l > 0 { n += 1 + l + sovTasks(uint64(l)) } if m.Pid != 0 { n += 1 + sovTasks(uint64(m.Pid)) } return n } func (m *StartRequest) Size() (n int) { var l int _ = l l = len(m.ContainerID) if l > 0 { n += 1 + l + sovTasks(uint64(l)) } l = len(m.ExecID) if l > 0 { n += 1 + l + sovTasks(uint64(l)) } return n } func (m *StartResponse) Size() (n int) { var l int _ = l if m.Pid != 0 { n += 1 + sovTasks(uint64(m.Pid)) } return n } func (m *DeleteTaskRequest) Size() (n int) { var l int _ = l l = len(m.ContainerID) if l > 0 { n += 1 + l + sovTasks(uint64(l)) } return n } func (m *DeleteResponse) Size() (n int) { var l int _ = l l = len(m.ID) if l > 0 { n += 1 + l + sovTasks(uint64(l)) } if m.Pid != 0 { n += 1 + sovTasks(uint64(m.Pid)) } if m.ExitStatus != 0 { n += 1 + sovTasks(uint64(m.ExitStatus)) } l = github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt) n += 1 + l + sovTasks(uint64(l)) return n } func (m *DeleteProcessRequest) Size() (n int) { var l int _ = l l = len(m.ContainerID) if l > 0 { n += 1 + l + sovTasks(uint64(l)) } l = len(m.ExecID) if l > 0 { n += 1 + l + sovTasks(uint64(l)) } return n } func (m *GetRequest) Size() (n int) { var l int _ = l l = len(m.ContainerID) if l > 0 { n += 1 + l + sovTasks(uint64(l)) } l = len(m.ExecID) if l > 0 { n += 1 + l + sovTasks(uint64(l)) } return n } func (m *GetResponse) Size() (n int) { var l int _ = l if m.Process != nil { l = m.Process.Size() n += 1 + l + sovTasks(uint64(l)) } return n } func (m *ListTasksRequest) Size() (n int) { var l int _ = l l = len(m.Filter) if l > 0 { n += 1 + l + sovTasks(uint64(l)) } return n } func (m *ListTasksResponse) Size() (n int) { var l int _ = l if len(m.Tasks) > 0 { for _, e := range m.Tasks { l = e.Size() n += 1 + l + sovTasks(uint64(l)) } } return n } func (m *KillRequest) Size() (n int) { var l int _ = l l = len(m.ContainerID) if l > 0 { n += 1 + l + sovTasks(uint64(l)) } l = len(m.ExecID) if l > 0 { n += 1 + l + sovTasks(uint64(l)) } if m.Signal != 0 { n += 1 + sovTasks(uint64(m.Signal)) } if m.All { n += 2 } return n } func (m *ExecProcessRequest) Size() (n int) { var l int _ = l l = len(m.ContainerID) if l > 0 { n += 1 + l + sovTasks(uint64(l)) } l = len(m.Stdin) if l > 0 { n += 1 + l + sovTasks(uint64(l)) } l = len(m.Stdout) if l > 0 { n += 1 + l + sovTasks(uint64(l)) } l = len(m.Stderr) if l > 0 { n += 1 + l + sovTasks(uint64(l)) } if m.Terminal { n += 2 } if m.Spec != nil { l = m.Spec.Size() n += 1 + l + sovTasks(uint64(l)) } l = len(m.ExecID) if l > 0 { n += 1 + l + sovTasks(uint64(l)) } return n } func (m *ExecProcessResponse) Size() (n int) { var l int _ = l return n } func (m *ResizePtyRequest) Size() (n int) { var l int _ = l l = len(m.ContainerID) if l > 0 { n += 1 + l + sovTasks(uint64(l)) } l = len(m.ExecID) if l > 0 { n += 1 + l + sovTasks(uint64(l)) } if m.Width != 0 { n += 1 + sovTasks(uint64(m.Width)) } if m.Height != 0 { n += 1 + sovTasks(uint64(m.Height)) } return n } func (m *CloseIORequest) Size() (n int) { var l int _ = l l = len(m.ContainerID) if l > 0 { n += 1 + l + sovTasks(uint64(l)) } l = len(m.ExecID) if l > 0 { n += 1 + l + sovTasks(uint64(l)) } if m.Stdin { n += 2 } return n } func (m *PauseTaskRequest) Size() (n int) { var l int _ = l l = len(m.ContainerID) if l > 0 { n += 1 + l + sovTasks(uint64(l)) } return n } func (m *ResumeTaskRequest) Size() (n int) { var l int _ = l l = len(m.ContainerID) if l > 0 { n += 1 + l + sovTasks(uint64(l)) } return n } func (m *ListPidsRequest) Size() (n int) { var l int _ = l l = len(m.ContainerID) if l > 0 { n += 1 + l + sovTasks(uint64(l)) } return n } func (m *ListPidsResponse) Size() (n int) { var l int _ = l if len(m.Processes) > 0 { for _, e := range m.Processes { l = e.Size() n += 1 + l + sovTasks(uint64(l)) } } return n } func (m *CheckpointTaskRequest) Size() (n int) { var l int _ = l l = len(m.ContainerID) if l > 0 { n += 1 + l + sovTasks(uint64(l)) } l = len(m.ParentCheckpoint) if l > 0 { n += 1 + l + sovTasks(uint64(l)) } if m.Options != nil { l = m.Options.Size() n += 1 + l + sovTasks(uint64(l)) } return n } func (m *CheckpointTaskResponse) Size() (n int) { var l int _ = l if len(m.Descriptors) > 0 { for _, e := range m.Descriptors { l = e.Size() n += 1 + l + sovTasks(uint64(l)) } } return n } func (m *UpdateTaskRequest) Size() (n int) { var l int _ = l l = len(m.ContainerID) if l > 0 { n += 1 + l + sovTasks(uint64(l)) } if m.Resources != nil { l = m.Resources.Size() n += 1 + l + sovTasks(uint64(l)) } return n } func (m *MetricsRequest) Size() (n int) { var l int _ = l if len(m.Filters) > 0 { for _, s := range m.Filters { l = len(s) n += 1 + l + sovTasks(uint64(l)) } } return n } func (m *MetricsResponse) Size() (n int) { var l int _ = l if len(m.Metrics) > 0 { for _, e := range m.Metrics { l = e.Size() n += 1 + l + sovTasks(uint64(l)) } } return n } func (m *WaitRequest) Size() (n int) { var l int _ = l l = len(m.ContainerID) if l > 0 { n += 1 + l + sovTasks(uint64(l)) } l = len(m.ExecID) if l > 0 { n += 1 + l + sovTasks(uint64(l)) } return n } func (m *WaitResponse) Size() (n int) { var l int _ = l if m.ExitStatus != 0 { n += 1 + sovTasks(uint64(m.ExitStatus)) } l = github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt) n += 1 + l + sovTasks(uint64(l)) return n } func sovTasks(x uint64) (n int) { for { n++ x >>= 7 if x == 0 { break } } return n } func sozTasks(x uint64) (n int) { return sovTasks(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (this *CreateTaskRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&CreateTaskRequest{`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, `Rootfs:` + strings.Replace(fmt.Sprintf("%v", this.Rootfs), "Mount", "containerd_types.Mount", 1) + `,`, `Stdin:` + fmt.Sprintf("%v", this.Stdin) + `,`, `Stdout:` + fmt.Sprintf("%v", this.Stdout) + `,`, `Stderr:` + fmt.Sprintf("%v", this.Stderr) + `,`, `Terminal:` + fmt.Sprintf("%v", this.Terminal) + `,`, `Checkpoint:` + strings.Replace(fmt.Sprintf("%v", this.Checkpoint), "Descriptor", "containerd_types2.Descriptor", 1) + `,`, `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Any", "google_protobuf1.Any", 1) + `,`, `}`, }, "") return s } func (this *CreateTaskResponse) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&CreateTaskResponse{`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, `Pid:` + fmt.Sprintf("%v", this.Pid) + `,`, `}`, }, "") return s } func (this *StartRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&StartRequest{`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, `ExecID:` + fmt.Sprintf("%v", this.ExecID) + `,`, `}`, }, "") return s } func (this *StartResponse) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&StartResponse{`, `Pid:` + fmt.Sprintf("%v", this.Pid) + `,`, `}`, }, "") return s } func (this *DeleteTaskRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&DeleteTaskRequest{`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, `}`, }, "") return s } func (this *DeleteResponse) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&DeleteResponse{`, `ID:` + fmt.Sprintf("%v", this.ID) + `,`, `Pid:` + fmt.Sprintf("%v", this.Pid) + `,`, `ExitStatus:` + fmt.Sprintf("%v", this.ExitStatus) + `,`, `ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "google_protobuf3.Timestamp", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } func (this *DeleteProcessRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&DeleteProcessRequest{`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, `ExecID:` + fmt.Sprintf("%v", this.ExecID) + `,`, `}`, }, "") return s } func (this *GetRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&GetRequest{`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, `ExecID:` + fmt.Sprintf("%v", this.ExecID) + `,`, `}`, }, "") return s } func (this *GetResponse) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&GetResponse{`, `Process:` + strings.Replace(fmt.Sprintf("%v", this.Process), "Process", "containerd_v1_types.Process", 1) + `,`, `}`, }, "") return s } func (this *ListTasksRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&ListTasksRequest{`, `Filter:` + fmt.Sprintf("%v", this.Filter) + `,`, `}`, }, "") return s } func (this *ListTasksResponse) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&ListTasksResponse{`, `Tasks:` + strings.Replace(fmt.Sprintf("%v", this.Tasks), "Process", "containerd_v1_types.Process", 1) + `,`, `}`, }, "") return s } func (this *KillRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&KillRequest{`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, `ExecID:` + fmt.Sprintf("%v", this.ExecID) + `,`, `Signal:` + fmt.Sprintf("%v", this.Signal) + `,`, `All:` + fmt.Sprintf("%v", this.All) + `,`, `}`, }, "") return s } func (this *ExecProcessRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&ExecProcessRequest{`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, `Stdin:` + fmt.Sprintf("%v", this.Stdin) + `,`, `Stdout:` + fmt.Sprintf("%v", this.Stdout) + `,`, `Stderr:` + fmt.Sprintf("%v", this.Stderr) + `,`, `Terminal:` + fmt.Sprintf("%v", this.Terminal) + `,`, `Spec:` + strings.Replace(fmt.Sprintf("%v", this.Spec), "Any", "google_protobuf1.Any", 1) + `,`, `ExecID:` + fmt.Sprintf("%v", this.ExecID) + `,`, `}`, }, "") return s } func (this *ExecProcessResponse) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&ExecProcessResponse{`, `}`, }, "") return s } func (this *ResizePtyRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&ResizePtyRequest{`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, `ExecID:` + fmt.Sprintf("%v", this.ExecID) + `,`, `Width:` + fmt.Sprintf("%v", this.Width) + `,`, `Height:` + fmt.Sprintf("%v", this.Height) + `,`, `}`, }, "") return s } func (this *CloseIORequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&CloseIORequest{`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, `ExecID:` + fmt.Sprintf("%v", this.ExecID) + `,`, `Stdin:` + fmt.Sprintf("%v", this.Stdin) + `,`, `}`, }, "") return s } func (this *PauseTaskRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&PauseTaskRequest{`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, `}`, }, "") return s } func (this *ResumeTaskRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&ResumeTaskRequest{`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, `}`, }, "") return s } func (this *ListPidsRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&ListPidsRequest{`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, `}`, }, "") return s } func (this *ListPidsResponse) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&ListPidsResponse{`, `Processes:` + strings.Replace(fmt.Sprintf("%v", this.Processes), "ProcessInfo", "containerd_v1_types.ProcessInfo", 1) + `,`, `}`, }, "") return s } func (this *CheckpointTaskRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&CheckpointTaskRequest{`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, `ParentCheckpoint:` + fmt.Sprintf("%v", this.ParentCheckpoint) + `,`, `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Any", "google_protobuf1.Any", 1) + `,`, `}`, }, "") return s } func (this *CheckpointTaskResponse) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&CheckpointTaskResponse{`, `Descriptors:` + strings.Replace(fmt.Sprintf("%v", this.Descriptors), "Descriptor", "containerd_types2.Descriptor", 1) + `,`, `}`, }, "") return s } func (this *UpdateTaskRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&UpdateTaskRequest{`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, `Resources:` + strings.Replace(fmt.Sprintf("%v", this.Resources), "Any", "google_protobuf1.Any", 1) + `,`, `}`, }, "") return s } func (this *MetricsRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&MetricsRequest{`, `Filters:` + fmt.Sprintf("%v", this.Filters) + `,`, `}`, }, "") return s } func (this *MetricsResponse) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&MetricsResponse{`, `Metrics:` + strings.Replace(fmt.Sprintf("%v", this.Metrics), "Metric", "containerd_types1.Metric", 1) + `,`, `}`, }, "") return s } func (this *WaitRequest) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&WaitRequest{`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, `ExecID:` + fmt.Sprintf("%v", this.ExecID) + `,`, `}`, }, "") return s } func (this *WaitResponse) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&WaitResponse{`, `ExitStatus:` + fmt.Sprintf("%v", this.ExitStatus) + `,`, `ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "google_protobuf3.Timestamp", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } func valueToStringTasks(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { return "nil" } pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: CreateTaskRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: CreateTaskRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ContainerID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Rootfs", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } m.Rootfs = append(m.Rootfs, &containerd_types.Mount{}) if err := m.Rootfs[len(m.Rootfs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Stdin", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Stdin = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Stdout", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Stdout = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Stderr", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Stderr = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 7: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Terminal", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= (int(b) & 0x7F) << shift if b < 0x80 { break } } m.Terminal = bool(v != 0) case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Checkpoint", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Checkpoint == nil { m.Checkpoint = &containerd_types2.Descriptor{} } if err := m.Checkpoint.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 9: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Options == nil { m.Options = &google_protobuf1.Any{} } if err := m.Options.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTasks(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTasks } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *CreateTaskResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: CreateTaskResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: CreateTaskResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ContainerID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Pid", wireType) } m.Pid = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Pid |= (uint32(b) & 0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := skipTasks(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTasks } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *StartRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: StartRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: StartRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ContainerID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ExecID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ExecID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTasks(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTasks } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *StartResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: StartResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: StartResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Pid", wireType) } m.Pid = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Pid |= (uint32(b) & 0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := skipTasks(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTasks } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *DeleteTaskRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: DeleteTaskRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: DeleteTaskRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ContainerID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTasks(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTasks } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *DeleteResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: DeleteResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: DeleteResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Pid", wireType) } m.Pid = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Pid |= (uint32(b) & 0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field ExitStatus", wireType) } m.ExitStatus = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.ExitStatus |= (uint32(b) & 0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ExitedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.ExitedAt, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTasks(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTasks } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *DeleteProcessRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: DeleteProcessRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: DeleteProcessRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ContainerID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ExecID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ExecID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTasks(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTasks } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *GetRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: GetRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: GetRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ContainerID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ExecID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ExecID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTasks(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTasks } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *GetResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: GetResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: GetResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Process", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Process == nil { m.Process = &containerd_v1_types.Process{} } if err := m.Process.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTasks(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTasks } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ListTasksRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ListTasksRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ListTasksRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Filter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTasks(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTasks } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ListTasksResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ListTasksResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ListTasksResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Tasks", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } m.Tasks = append(m.Tasks, &containerd_v1_types.Process{}) if err := m.Tasks[len(m.Tasks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTasks(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTasks } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *KillRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: KillRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: KillRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ContainerID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ExecID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ExecID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Signal", wireType) } m.Signal = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Signal |= (uint32(b) & 0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field All", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= (int(b) & 0x7F) << shift if b < 0x80 { break } } m.All = bool(v != 0) default: iNdEx = preIndex skippy, err := skipTasks(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTasks } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ExecProcessRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ExecProcessRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ContainerID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Stdin", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Stdin = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Stdout", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Stdout = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Stderr", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Stderr = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Terminal", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= (int(b) & 0x7F) << shift if b < 0x80 { break } } m.Terminal = bool(v != 0) case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Spec == nil { m.Spec = &google_protobuf1.Any{} } if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ExecID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ExecID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTasks(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTasks } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ExecProcessResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ExecProcessResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ExecProcessResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := skipTasks(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTasks } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ResizePtyRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ResizePtyRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ResizePtyRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ContainerID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ExecID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ExecID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Width", wireType) } m.Width = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Width |= (uint32(b) & 0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) } m.Height = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Height |= (uint32(b) & 0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := skipTasks(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTasks } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *CloseIORequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: CloseIORequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: CloseIORequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ContainerID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ExecID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ExecID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Stdin", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= (int(b) & 0x7F) << shift if b < 0x80 { break } } m.Stdin = bool(v != 0) default: iNdEx = preIndex skippy, err := skipTasks(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTasks } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *PauseTaskRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: PauseTaskRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: PauseTaskRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ContainerID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTasks(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTasks } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ResumeTaskRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ResumeTaskRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ResumeTaskRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ContainerID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTasks(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTasks } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ListPidsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ListPidsRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ListPidsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ContainerID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTasks(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTasks } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ListPidsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ListPidsResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ListPidsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Processes", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } m.Processes = append(m.Processes, &containerd_v1_types.ProcessInfo{}) if err := m.Processes[len(m.Processes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTasks(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTasks } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *CheckpointTaskRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: CheckpointTaskRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: CheckpointTaskRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ContainerID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ParentCheckpoint", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ParentCheckpoint = github_com_opencontainers_go_digest.Digest(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Options == nil { m.Options = &google_protobuf1.Any{} } if err := m.Options.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTasks(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTasks } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *CheckpointTaskResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: CheckpointTaskResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: CheckpointTaskResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Descriptors", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } m.Descriptors = append(m.Descriptors, &containerd_types2.Descriptor{}) if err := m.Descriptors[len(m.Descriptors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTasks(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTasks } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *UpdateTaskRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: UpdateTaskRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UpdateTaskRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ContainerID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Resources == nil { m.Resources = &google_protobuf1.Any{} } if err := m.Resources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTasks(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTasks } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *MetricsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: MetricsRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MetricsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Filters", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Filters = append(m.Filters, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTasks(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTasks } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *MetricsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: MetricsResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MetricsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Metrics", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } m.Metrics = append(m.Metrics, &containerd_types1.Metric{}) if err := m.Metrics[len(m.Metrics)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTasks(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTasks } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *WaitRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: WaitRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: WaitRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ContainerID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ExecID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ExecID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTasks(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTasks } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *WaitResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: WaitResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: WaitResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field ExitStatus", wireType) } m.ExitStatus = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.ExitStatus |= (uint32(b) & 0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ExitedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTasks } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTasks } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.ExitedAt, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTasks(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTasks } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipTasks(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowTasks } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } wireType := int(wire & 0x7) switch wireType { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowTasks } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } iNdEx++ if dAtA[iNdEx-1] < 0x80 { break } } return iNdEx, nil case 1: iNdEx += 8 return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowTasks } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ length |= (int(b) & 0x7F) << shift if b < 0x80 { break } } iNdEx += length if length < 0 { return 0, ErrInvalidLengthTasks } return iNdEx, nil case 3: for { var innerWire uint64 var start int = iNdEx for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowTasks } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ innerWire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } innerWireType := int(innerWire & 0x7) if innerWireType == 4 { break } next, err := skipTasks(dAtA[start:]) if err != nil { return 0, err } iNdEx = start + next } return iNdEx, nil case 4: return iNdEx, nil case 5: iNdEx += 4 return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } } panic("unreachable") } var ( ErrInvalidLengthTasks = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTasks = fmt.Errorf("proto: integer overflow") ) func init() { proto.RegisterFile("github.com/containerd/containerd/api/services/tasks/v1/tasks.proto", fileDescriptorTasks) } var fileDescriptorTasks = []byte{ // 1318 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0x4b, 0x6f, 0x1b, 0x45, 0x1c, 0xef, 0xfa, 0xed, 0xbf, 0x93, 0x36, 0x59, 0xd2, 0x60, 0x96, 0x2a, 0x0e, 0xcb, 0xc5, 0x04, 0xba, 0x4b, 0x5d, 0x54, 0x21, 0x5a, 0x21, 0x35, 0x0f, 0x22, 0x0b, 0xaa, 0xa6, 0xdb, 0x02, 0x55, 0x25, 0x14, 0xb6, 0xbb, 0x13, 0x67, 0x14, 0x7b, 0x67, 0xbb, 0x33, 0x4e, 0x1b, 0x38, 0xc0, 0x47, 0xe8, 0x95, 0x0b, 0x9f, 0x27, 0x47, 0x8e, 0x08, 0x55, 0x81, 0xfa, 0x5b, 0x70, 0x43, 0xf3, 0xd8, 0xcd, 0xc6, 0x8e, 0xbd, 0x4e, 0xd3, 0x70, 0x69, 0x67, 0x66, 0xff, 0xaf, 0xf9, 0xcd, 0xff, 0xf1, 0x73, 0x60, 0xb5, 0x83, 0xd9, 0x6e, 0xff, 0xa9, 0xe5, 0x91, 0x9e, 0xed, 0x91, 0x80, 0xb9, 0x38, 0x40, 0x91, 0x9f, 0x5e, 0xba, 0x21, 0xb6, 0x29, 0x8a, 0xf6, 0xb1, 0x87, 0xa8, 0xcd, 0x5c, 0xba, 0x47, 0xed, 0xfd, 0x1b, 0x72, 0x61, 0x85, 0x11, 0x61, 0x44, 0xbf, 0x76, 0x2c, 0x6d, 0xc5, 0x92, 0x96, 0x14, 0xd8, 0xbf, 0x61, 0xbc, 0xdf, 0x21, 0xa4, 0xd3, 0x45, 0xb6, 0x90, 0x7d, 0xda, 0xdf, 0xb1, 0x51, 0x2f, 0x64, 0x07, 0x52, 0xd5, 0x78, 0x6f, 0xf8, 0xa3, 0x1b, 0xc4, 0x9f, 0x16, 0x3a, 0xa4, 0x43, 0xc4, 0xd2, 0xe6, 0x2b, 0x75, 0x7a, 0x6b, 0xaa, 0x78, 0xd9, 0x41, 0x88, 0xa8, 0xdd, 0x23, 0xfd, 0x80, 0x29, 0xbd, 0xcf, 0xcf, 0xa2, 0x87, 0x58, 0x84, 0x3d, 0x75, 0x3b, 0xe3, 0xf6, 0x19, 0x34, 0x7d, 0x44, 0xbd, 0x08, 0x87, 0x8c, 0x44, 0x4a, 0xf9, 0x8b, 0x33, 0x28, 0x73, 0xc4, 0xc4, 0x3f, 0x4a, 0xb7, 0x31, 0x8c, 0x0d, 0xc3, 0x3d, 0x44, 0x99, 0xdb, 0x0b, 0xa5, 0x80, 0x79, 0x98, 0x83, 0xf9, 0xb5, 0x08, 0xb9, 0x0c, 0x3d, 0x72, 0xe9, 0x9e, 0x83, 0x9e, 0xf5, 0x11, 0x65, 0x7a, 0x0b, 0x66, 0x12, 0xf3, 0xdb, 0xd8, 0xaf, 0x6b, 0xcb, 0x5a, 0xb3, 0xba, 0x7a, 0x65, 0x70, 0xd4, 0xa8, 0xad, 0xc5, 0xe7, 0xed, 0x75, 0xa7, 0x96, 0x08, 0xb5, 0x7d, 0xdd, 0x86, 0x52, 0x44, 0x08, 0xdb, 0xa1, 0xf5, 0xfc, 0x72, 0xbe, 0x59, 0x6b, 0xbd, 0x6b, 0xa5, 0x9e, 0x54, 0x44, 0x67, 0xdd, 0xe3, 0x60, 0x3a, 0x4a, 0x4c, 0x5f, 0x80, 0x22, 0x65, 0x3e, 0x0e, 0xea, 0x05, 0x6e, 0xdd, 0x91, 0x1b, 0x7d, 0x11, 0x4a, 0x94, 0xf9, 0xa4, 0xcf, 0xea, 0x45, 0x71, 0xac, 0x76, 0xea, 0x1c, 0x45, 0x51, 0xbd, 0x94, 0x9c, 0xa3, 0x28, 0xd2, 0x0d, 0xa8, 0x30, 0x14, 0xf5, 0x70, 0xe0, 0x76, 0xeb, 0xe5, 0x65, 0xad, 0x59, 0x71, 0x92, 0xbd, 0x7e, 0x07, 0xc0, 0xdb, 0x45, 0xde, 0x5e, 0x48, 0x70, 0xc0, 0xea, 0x95, 0x65, 0xad, 0x59, 0x6b, 0x5d, 0x1b, 0x0d, 0x6b, 0x3d, 0x41, 0xdc, 0x49, 0xc9, 0xeb, 0x16, 0x94, 0x49, 0xc8, 0x30, 0x09, 0x68, 0xbd, 0x2a, 0x54, 0x17, 0x2c, 0x89, 0xa6, 0x15, 0xa3, 0x69, 0xdd, 0x0d, 0x0e, 0x9c, 0x58, 0xc8, 0x7c, 0x02, 0x7a, 0x1a, 0x49, 0x1a, 0x92, 0x80, 0xa2, 0x37, 0x82, 0x72, 0x0e, 0xf2, 0x21, 0xf6, 0xeb, 0xb9, 0x65, 0xad, 0x39, 0xeb, 0xf0, 0xa5, 0xd9, 0x81, 0x99, 0x87, 0xcc, 0x8d, 0xd8, 0x79, 0x1e, 0xe8, 0x43, 0x28, 0xa3, 0x17, 0xc8, 0xdb, 0x56, 0x96, 0xab, 0xab, 0x30, 0x38, 0x6a, 0x94, 0x36, 0x5e, 0x20, 0xaf, 0xbd, 0xee, 0x94, 0xf8, 0xa7, 0xb6, 0x6f, 0x7e, 0x00, 0xb3, 0xca, 0x91, 0x8a, 0x5f, 0xc5, 0xa2, 0x1d, 0xc7, 0xb2, 0x09, 0xf3, 0xeb, 0xa8, 0x8b, 0xce, 0x9d, 0x31, 0xe6, 0xef, 0x1a, 0x5c, 0x96, 0x96, 0x12, 0x6f, 0x8b, 0x90, 0x4b, 0x94, 0x4b, 0x83, 0xa3, 0x46, 0xae, 0xbd, 0xee, 0xe4, 0xf0, 0x29, 0x88, 0xe8, 0x0d, 0xa8, 0xa1, 0x17, 0x98, 0x6d, 0x53, 0xe6, 0xb2, 0x3e, 0xcf, 0x39, 0xfe, 0x05, 0xf8, 0xd1, 0x43, 0x71, 0xa2, 0xdf, 0x85, 0x2a, 0xdf, 0x21, 0x7f, 0xdb, 0x65, 0x22, 0xc5, 0x6a, 0x2d, 0x63, 0xe4, 0x01, 0x1f, 0xc5, 0xe5, 0xb0, 0x5a, 0x39, 0x3c, 0x6a, 0x5c, 0x7a, 0xf9, 0x77, 0x43, 0x73, 0x2a, 0x52, 0xed, 0x2e, 0x33, 0x09, 0x2c, 0xc8, 0xf8, 0xb6, 0x22, 0xe2, 0x21, 0x4a, 0x2f, 0x1c, 0x7d, 0x04, 0xb0, 0x89, 0x2e, 0xfe, 0x91, 0x37, 0xa0, 0x26, 0xdc, 0x28, 0xd0, 0x6f, 0x41, 0x39, 0x94, 0x17, 0x14, 0x2e, 0x86, 0x6a, 0x64, 0xff, 0x86, 0x2a, 0x93, 0x18, 0x84, 0x58, 0xd8, 0x5c, 0x81, 0xb9, 0x6f, 0x30, 0x65, 0x3c, 0x0d, 0x12, 0x68, 0x16, 0xa1, 0xb4, 0x83, 0xbb, 0x0c, 0x45, 0x32, 0x5a, 0x47, 0xed, 0x78, 0xd2, 0xa4, 0x64, 0x93, 0xda, 0x28, 0x8a, 0x16, 0x5f, 0xd7, 0x44, 0xc7, 0x98, 0xec, 0x56, 0x8a, 0x9a, 0x2f, 0x35, 0xa8, 0x7d, 0x8d, 0xbb, 0xdd, 0x8b, 0x06, 0x49, 0x34, 0x1c, 0xdc, 0xe1, 0x6d, 0x45, 0xe6, 0x96, 0xda, 0xf1, 0x54, 0x74, 0xbb, 0x5d, 0x91, 0x51, 0x15, 0x87, 0x2f, 0xcd, 0x7f, 0x35, 0xd0, 0xb9, 0xf2, 0x5b, 0xc8, 0x92, 0xa4, 0x27, 0xe6, 0x4e, 0xef, 0x89, 0xf9, 0x31, 0x3d, 0xb1, 0x30, 0xb6, 0x27, 0x16, 0x87, 0x7a, 0x62, 0x13, 0x0a, 0x34, 0x44, 0x9e, 0xe8, 0xa2, 0xe3, 0x5a, 0x9a, 0x90, 0x48, 0xa3, 0x54, 0x1e, 0x9b, 0x4a, 0x57, 0xe1, 0x9d, 0x13, 0x57, 0x97, 0x2f, 0x6b, 0xfe, 0xa6, 0xc1, 0x9c, 0x83, 0x28, 0xfe, 0x09, 0x6d, 0xb1, 0x83, 0x0b, 0x7f, 0xaa, 0x05, 0x28, 0x3e, 0xc7, 0x3e, 0xdb, 0x55, 0x2f, 0x25, 0x37, 0x1c, 0x9d, 0x5d, 0x84, 0x3b, 0xbb, 0xb2, 0xfa, 0x67, 0x1d, 0xb5, 0x33, 0x7f, 0x81, 0xcb, 0x6b, 0x5d, 0x42, 0x51, 0xfb, 0xfe, 0xff, 0x11, 0x98, 0x7c, 0xce, 0xbc, 0x78, 0x05, 0xb9, 0x31, 0xbf, 0x82, 0xb9, 0x2d, 0xb7, 0x4f, 0xcf, 0xdd, 0x3f, 0x37, 0x61, 0xde, 0x41, 0xb4, 0xdf, 0x3b, 0xb7, 0xa1, 0x0d, 0xb8, 0xc2, 0x8b, 0x73, 0x0b, 0xfb, 0xe7, 0x49, 0x5e, 0xd3, 0x91, 0xfd, 0x40, 0x9a, 0x51, 0x25, 0xfe, 0x25, 0x54, 0x55, 0xbb, 0x40, 0x71, 0x99, 0x2f, 0x4f, 0x2a, 0xf3, 0x76, 0xb0, 0x43, 0x9c, 0x63, 0x15, 0xf3, 0x95, 0x06, 0x57, 0xd7, 0x92, 0x99, 0x7c, 0x5e, 0x8e, 0xb2, 0x0d, 0xf3, 0xa1, 0x1b, 0xa1, 0x80, 0x6d, 0xa7, 0x78, 0x81, 0x7c, 0xbe, 0x16, 0xef, 0xff, 0x7f, 0x1d, 0x35, 0x56, 0x52, 0x6c, 0x8b, 0x84, 0x28, 0x48, 0xd4, 0xa9, 0xdd, 0x21, 0xd7, 0x7d, 0xdc, 0x41, 0x94, 0x59, 0xeb, 0xe2, 0x3f, 0x67, 0x4e, 0x1a, 0x5b, 0x3b, 0x95, 0x33, 0xe4, 0xa7, 0xe1, 0x0c, 0x8f, 0x61, 0x71, 0xf8, 0x76, 0x09, 0x70, 0xb5, 0x63, 0x26, 0x78, 0x6a, 0x87, 0x1c, 0x21, 0x2f, 0x69, 0x05, 0xf3, 0x67, 0x98, 0xff, 0x36, 0xf4, 0xdf, 0x02, 0xaf, 0x6b, 0x41, 0x35, 0x42, 0x94, 0xf4, 0x23, 0x0f, 0x51, 0x81, 0xd5, 0xb8, 0x4b, 0x1d, 0x8b, 0x99, 0x2b, 0x70, 0xf9, 0x9e, 0x24, 0xc0, 0xb1, 0xe7, 0x3a, 0x94, 0xe5, 0x24, 0x90, 0x57, 0xa9, 0x3a, 0xf1, 0x96, 0x27, 0x5f, 0x22, 0x9b, 0xcc, 0x85, 0xb2, 0xe2, 0xcf, 0xea, 0xde, 0xf5, 0x53, 0xb8, 0xa4, 0x10, 0x70, 0x62, 0x41, 0x73, 0x07, 0x6a, 0xdf, 0xbb, 0xf8, 0xe2, 0x67, 0x67, 0x04, 0x33, 0xd2, 0x8f, 0x8a, 0x75, 0x88, 0x87, 0x68, 0x93, 0x79, 0x48, 0xee, 0x4d, 0x78, 0x48, 0xeb, 0xd5, 0x0c, 0x14, 0xc5, 0xe4, 0xd4, 0xf7, 0xa0, 0x24, 0x39, 0xa6, 0x6e, 0x5b, 0x93, 0x7e, 0x31, 0x59, 0x23, 0x9c, 0xde, 0xf8, 0x74, 0x7a, 0x05, 0x75, 0xb5, 0x1f, 0xa1, 0x28, 0xb8, 0xa0, 0xbe, 0x32, 0x59, 0x35, 0xcd, 0x4c, 0x8d, 0x8f, 0xa7, 0x92, 0x55, 0x1e, 0x3a, 0x50, 0x92, 0x04, 0x2b, 0xeb, 0x3a, 0x23, 0x84, 0xd3, 0xf8, 0x64, 0x1a, 0x85, 0xc4, 0xd1, 0x33, 0x98, 0x3d, 0xc1, 0xe4, 0xf4, 0xd6, 0x34, 0xea, 0x27, 0x07, 0xfa, 0x19, 0x5d, 0x3e, 0x81, 0xfc, 0x26, 0x62, 0x7a, 0x73, 0xb2, 0xd2, 0x31, 0xdd, 0x33, 0x3e, 0x9a, 0x42, 0x32, 0xc1, 0xad, 0xc0, 0x3b, 0xad, 0x6e, 0x4d, 0x56, 0x19, 0x66, 0x67, 0x86, 0x3d, 0xb5, 0xbc, 0x72, 0xd4, 0x86, 0x02, 0x27, 0x5b, 0x7a, 0x46, 0x6c, 0x29, 0x42, 0x66, 0x2c, 0x8e, 0x24, 0xf7, 0x06, 0xff, 0xb1, 0xae, 0x6f, 0x41, 0x81, 0x97, 0x92, 0x9e, 0x91, 0x87, 0xa3, 0x44, 0x6a, 0xac, 0xc5, 0x87, 0x50, 0x4d, 0x38, 0x46, 0x16, 0x14, 0xc3, 0x64, 0x64, 0xac, 0xd1, 0xfb, 0x50, 0x56, 0xec, 0x40, 0xcf, 0x78, 0xef, 0x93, 0x24, 0x62, 0x82, 0xc1, 0xa2, 0x98, 0xf6, 0x59, 0x11, 0x0e, 0x53, 0x82, 0xb1, 0x06, 0x1f, 0x40, 0x49, 0x8e, 0xfd, 0xac, 0xa2, 0x19, 0x21, 0x07, 0x63, 0x4d, 0x62, 0xa8, 0xc4, 0x93, 0x5b, 0xbf, 0x9e, 0x9d, 0x23, 0x29, 0xa2, 0x60, 0x58, 0xd3, 0x8a, 0xab, 0x8c, 0x7a, 0x0e, 0x90, 0x9a, 0x97, 0x37, 0x33, 0x20, 0x3e, 0x6d, 0xf2, 0x1b, 0x9f, 0x9d, 0x4d, 0x49, 0x39, 0x7e, 0x00, 0x25, 0x39, 0x10, 0xb3, 0x60, 0x1b, 0x19, 0x9b, 0x63, 0x61, 0xdb, 0x81, 0xb2, 0x1a, 0x5d, 0x59, 0xb9, 0x72, 0x72, 0x1a, 0x1a, 0xd7, 0xa7, 0x94, 0x56, 0xa1, 0xff, 0x00, 0x05, 0x3e, 0x73, 0xb2, 0xaa, 0x30, 0x35, 0xff, 0x8c, 0x95, 0x69, 0x44, 0xa5, 0xf9, 0xd5, 0xef, 0x0e, 0x5f, 0x2f, 0x5d, 0xfa, 0xf3, 0xf5, 0xd2, 0xa5, 0x5f, 0x07, 0x4b, 0xda, 0xe1, 0x60, 0x49, 0xfb, 0x63, 0xb0, 0xa4, 0xfd, 0x33, 0x58, 0xd2, 0x9e, 0xdc, 0x79, 0xb3, 0xbf, 0xec, 0xdd, 0x16, 0x8b, 0xc7, 0xb9, 0xa7, 0x25, 0x01, 0xd8, 0xcd, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x85, 0xa2, 0x4f, 0xd1, 0x22, 0x14, 0x00, 0x00, } docker-containerd-tags-docker-17.12.1/api/services/tasks/v1/tasks.proto000066400000000000000000000113131322771672400257520ustar00rootroot00000000000000syntax = "proto3"; package containerd.services.tasks.v1; import "google/protobuf/empty.proto"; import "google/protobuf/any.proto"; import weak "gogoproto/gogo.proto"; import "github.com/containerd/containerd/api/types/mount.proto"; import "github.com/containerd/containerd/api/types/metrics.proto"; import "github.com/containerd/containerd/api/types/descriptor.proto"; import "github.com/containerd/containerd/api/types/task/task.proto"; import "google/protobuf/timestamp.proto"; option go_package = "github.com/containerd/containerd/api/services/tasks/v1;tasks"; service Tasks { // Create a task. rpc Create(CreateTaskRequest) returns (CreateTaskResponse); // Start a process. rpc Start(StartRequest) returns (StartResponse); // Delete a task and on disk state. rpc Delete(DeleteTaskRequest) returns (DeleteResponse); rpc DeleteProcess(DeleteProcessRequest) returns (DeleteResponse); rpc Get(GetRequest) returns (GetResponse); rpc List(ListTasksRequest) returns (ListTasksResponse); // Kill a task or process. rpc Kill(KillRequest) returns (google.protobuf.Empty); rpc Exec(ExecProcessRequest) returns (google.protobuf.Empty); rpc ResizePty(ResizePtyRequest) returns (google.protobuf.Empty); rpc CloseIO(CloseIORequest) returns (google.protobuf.Empty); rpc Pause(PauseTaskRequest) returns (google.protobuf.Empty); rpc Resume(ResumeTaskRequest) returns (google.protobuf.Empty); rpc ListPids(ListPidsRequest) returns (ListPidsResponse); rpc Checkpoint(CheckpointTaskRequest) returns (CheckpointTaskResponse); rpc Update(UpdateTaskRequest) returns (google.protobuf.Empty); rpc Metrics(MetricsRequest) returns (MetricsResponse); rpc Wait(WaitRequest) returns (WaitResponse); } message CreateTaskRequest { string container_id = 1; // RootFS provides the pre-chroot mounts to perform in the shim before // executing the container task. // // These are for mounts that cannot be performed in the user namespace. // Typically, these mounts should be resolved from snapshots specified on // the container object. repeated containerd.types.Mount rootfs = 3; string stdin = 4; string stdout = 5; string stderr = 6; bool terminal = 7; containerd.types.Descriptor checkpoint = 8; google.protobuf.Any options = 9; } message CreateTaskResponse { string container_id = 1; uint32 pid = 2; } message StartRequest { string container_id = 1; string exec_id = 2; } message StartResponse { uint32 pid = 1; } message DeleteTaskRequest { string container_id = 1; } message DeleteResponse { string id = 1; uint32 pid = 2; uint32 exit_status = 3; google.protobuf.Timestamp exited_at = 4 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; } message DeleteProcessRequest { string container_id = 1; string exec_id = 2; } message GetRequest { string container_id = 1; string exec_id = 2; } message GetResponse { containerd.v1.types.Process process = 1; } message ListTasksRequest { string filter = 1; } message ListTasksResponse { repeated containerd.v1.types.Process tasks = 1; } message KillRequest { string container_id = 1; string exec_id = 2; uint32 signal = 3; bool all = 4; } message ExecProcessRequest { string container_id = 1; string stdin = 2; string stdout = 3; string stderr = 4; bool terminal = 5; // Spec for starting a process in the target container. // // For runc, this is a process spec, for example. google.protobuf.Any spec = 6; // id of the exec process string exec_id = 7; } message ExecProcessResponse { } message ResizePtyRequest { string container_id = 1; string exec_id = 2; uint32 width = 3; uint32 height = 4; } message CloseIORequest { string container_id = 1; string exec_id = 2; bool stdin = 3; } message PauseTaskRequest { string container_id = 1; } message ResumeTaskRequest { string container_id = 1; } message ListPidsRequest { string container_id = 1; } message ListPidsResponse { // Processes includes the process ID and additional process information repeated containerd.v1.types.ProcessInfo processes = 1; } message CheckpointTaskRequest { string container_id = 1; string parent_checkpoint = 2 [(gogoproto.customtype) = "github.com/opencontainers/go-digest.Digest", (gogoproto.nullable) = false]; google.protobuf.Any options = 3; } message CheckpointTaskResponse { repeated containerd.types.Descriptor descriptors = 1; } message UpdateTaskRequest { string container_id = 1; google.protobuf.Any resources = 2; } message MetricsRequest { repeated string filters = 1; } message MetricsResponse { repeated types.Metric metrics = 1; } message WaitRequest { string container_id = 1; string exec_id = 2; } message WaitResponse { uint32 exit_status = 1; google.protobuf.Timestamp exited_at = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; } docker-containerd-tags-docker-17.12.1/api/services/version/000077500000000000000000000000001322771672400235535ustar00rootroot00000000000000docker-containerd-tags-docker-17.12.1/api/services/version/v1/000077500000000000000000000000001322771672400241015ustar00rootroot00000000000000docker-containerd-tags-docker-17.12.1/api/services/version/v1/version.pb.go000066400000000000000000000270051322771672400265210ustar00rootroot00000000000000// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/containerd/containerd/api/services/version/v1/version.proto /* Package version is a generated protocol buffer package. It is generated from these files: github.com/containerd/containerd/api/services/version/v1/version.proto It has these top-level messages: VersionResponse */ package version import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" import google_protobuf "github.com/gogo/protobuf/types" // skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto" import ( context "golang.org/x/net/context" grpc "google.golang.org/grpc" ) import strings "strings" import reflect "reflect" import io "io" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package type VersionResponse struct { Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` Revision string `protobuf:"bytes,2,opt,name=revision,proto3" json:"revision,omitempty"` } func (m *VersionResponse) Reset() { *m = VersionResponse{} } func (*VersionResponse) ProtoMessage() {} func (*VersionResponse) Descriptor() ([]byte, []int) { return fileDescriptorVersion, []int{0} } func init() { proto.RegisterType((*VersionResponse)(nil), "containerd.services.version.v1.VersionResponse") } // Reference imports to suppress errors if they are not otherwise used. var _ context.Context var _ grpc.ClientConn // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 // Client API for Version service type VersionClient interface { Version(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*VersionResponse, error) } type versionClient struct { cc *grpc.ClientConn } func NewVersionClient(cc *grpc.ClientConn) VersionClient { return &versionClient{cc} } func (c *versionClient) Version(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*VersionResponse, error) { out := new(VersionResponse) err := grpc.Invoke(ctx, "/containerd.services.version.v1.Version/Version", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } // Server API for Version service type VersionServer interface { Version(context.Context, *google_protobuf.Empty) (*VersionResponse, error) } func RegisterVersionServer(s *grpc.Server, srv VersionServer) { s.RegisterService(&_Version_serviceDesc, srv) } func _Version_Version_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(google_protobuf.Empty) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(VersionServer).Version(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/containerd.services.version.v1.Version/Version", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(VersionServer).Version(ctx, req.(*google_protobuf.Empty)) } return interceptor(ctx, in, info, handler) } var _Version_serviceDesc = grpc.ServiceDesc{ ServiceName: "containerd.services.version.v1.Version", HandlerType: (*VersionServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Version", Handler: _Version_Version_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "github.com/containerd/containerd/api/services/version/v1/version.proto", } func (m *VersionResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *VersionResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Version) > 0 { dAtA[i] = 0xa i++ i = encodeVarintVersion(dAtA, i, uint64(len(m.Version))) i += copy(dAtA[i:], m.Version) } if len(m.Revision) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintVersion(dAtA, i, uint64(len(m.Revision))) i += copy(dAtA[i:], m.Revision) } return i, nil } func encodeVarintVersion(dAtA []byte, offset int, v uint64) int { for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return offset + 1 } func (m *VersionResponse) Size() (n int) { var l int _ = l l = len(m.Version) if l > 0 { n += 1 + l + sovVersion(uint64(l)) } l = len(m.Revision) if l > 0 { n += 1 + l + sovVersion(uint64(l)) } return n } func sovVersion(x uint64) (n int) { for { n++ x >>= 7 if x == 0 { break } } return n } func sozVersion(x uint64) (n int) { return sovVersion(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (this *VersionResponse) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&VersionResponse{`, `Version:` + fmt.Sprintf("%v", this.Version) + `,`, `Revision:` + fmt.Sprintf("%v", this.Revision) + `,`, `}`, }, "") return s } func valueToStringVersion(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { return "nil" } pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } func (m *VersionResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowVersion } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: VersionResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: VersionResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowVersion } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthVersion } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Version = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Revision", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowVersion } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthVersion } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Revision = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipVersion(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthVersion } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipVersion(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowVersion } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } wireType := int(wire & 0x7) switch wireType { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowVersion } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } iNdEx++ if dAtA[iNdEx-1] < 0x80 { break } } return iNdEx, nil case 1: iNdEx += 8 return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowVersion } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ length |= (int(b) & 0x7F) << shift if b < 0x80 { break } } iNdEx += length if length < 0 { return 0, ErrInvalidLengthVersion } return iNdEx, nil case 3: for { var innerWire uint64 var start int = iNdEx for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowVersion } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ innerWire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } innerWireType := int(innerWire & 0x7) if innerWireType == 4 { break } next, err := skipVersion(dAtA[start:]) if err != nil { return 0, err } iNdEx = start + next } return iNdEx, nil case 4: return iNdEx, nil case 5: iNdEx += 4 return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } } panic("unreachable") } var ( ErrInvalidLengthVersion = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowVersion = fmt.Errorf("proto: integer overflow") ) func init() { proto.RegisterFile("github.com/containerd/containerd/api/services/version/v1/version.proto", fileDescriptorVersion) } var fileDescriptorVersion = []byte{ // 243 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x72, 0x4b, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xcc, 0xcc, 0x4b, 0x2d, 0x4a, 0x41, 0x66, 0x26, 0x16, 0x64, 0xea, 0x17, 0xa7, 0x16, 0x95, 0x65, 0x26, 0xa7, 0x16, 0xeb, 0x97, 0xa5, 0x16, 0x15, 0x67, 0xe6, 0xe7, 0xe9, 0x97, 0x19, 0xc2, 0x98, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x72, 0x08, 0x1d, 0x7a, 0x30, 0xd5, 0x7a, 0x30, 0x25, 0x65, 0x86, 0x52, 0xd2, 0xe9, 0xf9, 0xf9, 0xe9, 0x39, 0xa9, 0xfa, 0x60, 0xd5, 0x49, 0xa5, 0x69, 0xfa, 0xa9, 0xb9, 0x05, 0x25, 0x95, 0x10, 0xcd, 0x52, 0x22, 0xe9, 0xf9, 0xe9, 0xf9, 0x60, 0xa6, 0x3e, 0x88, 0x05, 0x11, 0x55, 0x72, 0xe7, 0xe2, 0x0f, 0x83, 0x18, 0x10, 0x94, 0x5a, 0x5c, 0x90, 0x9f, 0x57, 0x9c, 0x2a, 0x24, 0xc1, 0xc5, 0x0e, 0x35, 0x53, 0x82, 0x51, 0x81, 0x51, 0x83, 0x33, 0x08, 0xc6, 0x15, 0x92, 0xe2, 0xe2, 0x28, 0x4a, 0x2d, 0xcb, 0x04, 0x4b, 0x31, 0x81, 0xa5, 0xe0, 0x7c, 0xa3, 0x58, 0x2e, 0x76, 0xa8, 0x41, 0x42, 0x41, 0x08, 0xa6, 0x98, 0x1e, 0xc4, 0x49, 0x7a, 0x30, 0x27, 0xe9, 0xb9, 0x82, 0x9c, 0x24, 0xa5, 0xaf, 0x87, 0xdf, 0x2b, 0x7a, 0x68, 0x8e, 0x72, 0x8a, 0x3a, 0xf1, 0x50, 0x8e, 0xe1, 0xc6, 0x43, 0x39, 0x86, 0x86, 0x47, 0x72, 0x8c, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0x63, 0x94, 0x03, 0xb9, 0x81, 0x6b, 0x0d, 0x65, 0x46, 0x30, 0x26, 0xb1, 0x81, 0x9d, 0x67, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x95, 0x0d, 0x52, 0x23, 0xa9, 0x01, 0x00, 0x00, } docker-containerd-tags-docker-17.12.1/api/services/version/v1/version.proto000066400000000000000000000006751322771672400266630ustar00rootroot00000000000000syntax = "proto3"; package containerd.services.version.v1; import "google/protobuf/empty.proto"; import weak "gogoproto/gogo.proto"; // TODO(stevvooe): Should version service actually be versioned? option go_package = "github.com/containerd/containerd/api/services/version/v1;version"; service Version { rpc Version(google.protobuf.Empty) returns (VersionResponse); } message VersionResponse { string version = 1; string revision = 2; } docker-containerd-tags-docker-17.12.1/api/types/000077500000000000000000000000001322771672400214075ustar00rootroot00000000000000docker-containerd-tags-docker-17.12.1/api/types/descriptor.pb.go000066400000000000000000000250261322771672400245210ustar00rootroot00000000000000// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/containerd/containerd/api/types/descriptor.proto /* Package types is a generated protocol buffer package. It is generated from these files: github.com/containerd/containerd/api/types/descriptor.proto github.com/containerd/containerd/api/types/metrics.proto github.com/containerd/containerd/api/types/mount.proto github.com/containerd/containerd/api/types/platform.proto It has these top-level messages: Descriptor Metric Mount Platform */ package types import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" // skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto" import github_com_opencontainers_go_digest "github.com/opencontainers/go-digest" import strings "strings" import reflect "reflect" import io "io" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package // Descriptor describes a blob in a content store. // // This descriptor can be used to reference content from an // oci descriptor found in a manifest. // See https://godoc.org/github.com/opencontainers/image-spec/specs-go/v1#Descriptor type Descriptor struct { MediaType string `protobuf:"bytes,1,opt,name=media_type,json=mediaType,proto3" json:"media_type,omitempty"` Digest github_com_opencontainers_go_digest.Digest `protobuf:"bytes,2,opt,name=digest,proto3,customtype=github.com/opencontainers/go-digest.Digest" json:"digest"` Size_ int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"` } func (m *Descriptor) Reset() { *m = Descriptor{} } func (*Descriptor) ProtoMessage() {} func (*Descriptor) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{0} } func init() { proto.RegisterType((*Descriptor)(nil), "containerd.types.Descriptor") } func (m *Descriptor) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Descriptor) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.MediaType) > 0 { dAtA[i] = 0xa i++ i = encodeVarintDescriptor(dAtA, i, uint64(len(m.MediaType))) i += copy(dAtA[i:], m.MediaType) } if len(m.Digest) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintDescriptor(dAtA, i, uint64(len(m.Digest))) i += copy(dAtA[i:], m.Digest) } if m.Size_ != 0 { dAtA[i] = 0x18 i++ i = encodeVarintDescriptor(dAtA, i, uint64(m.Size_)) } return i, nil } func encodeVarintDescriptor(dAtA []byte, offset int, v uint64) int { for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return offset + 1 } func (m *Descriptor) Size() (n int) { var l int _ = l l = len(m.MediaType) if l > 0 { n += 1 + l + sovDescriptor(uint64(l)) } l = len(m.Digest) if l > 0 { n += 1 + l + sovDescriptor(uint64(l)) } if m.Size_ != 0 { n += 1 + sovDescriptor(uint64(m.Size_)) } return n } func sovDescriptor(x uint64) (n int) { for { n++ x >>= 7 if x == 0 { break } } return n } func sozDescriptor(x uint64) (n int) { return sovDescriptor(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (this *Descriptor) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&Descriptor{`, `MediaType:` + fmt.Sprintf("%v", this.MediaType) + `,`, `Digest:` + fmt.Sprintf("%v", this.Digest) + `,`, `Size_:` + fmt.Sprintf("%v", this.Size_) + `,`, `}`, }, "") return s } func valueToStringDescriptor(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { return "nil" } pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } func (m *Descriptor) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDescriptor } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Descriptor: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Descriptor: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MediaType", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDescriptor } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthDescriptor } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.MediaType = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Digest", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDescriptor } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthDescriptor } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Digest = github_com_opencontainers_go_digest.Digest(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Size_", wireType) } m.Size_ = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDescriptor } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Size_ |= (int64(b) & 0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := skipDescriptor(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthDescriptor } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipDescriptor(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowDescriptor } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } wireType := int(wire & 0x7) switch wireType { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowDescriptor } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } iNdEx++ if dAtA[iNdEx-1] < 0x80 { break } } return iNdEx, nil case 1: iNdEx += 8 return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowDescriptor } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ length |= (int(b) & 0x7F) << shift if b < 0x80 { break } } iNdEx += length if length < 0 { return 0, ErrInvalidLengthDescriptor } return iNdEx, nil case 3: for { var innerWire uint64 var start int = iNdEx for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowDescriptor } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ innerWire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } innerWireType := int(innerWire & 0x7) if innerWireType == 4 { break } next, err := skipDescriptor(dAtA[start:]) if err != nil { return 0, err } iNdEx = start + next } return iNdEx, nil case 4: return iNdEx, nil case 5: iNdEx += 4 return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } } panic("unreachable") } var ( ErrInvalidLengthDescriptor = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowDescriptor = fmt.Errorf("proto: integer overflow") ) func init() { proto.RegisterFile("github.com/containerd/containerd/api/types/descriptor.proto", fileDescriptorDescriptor) } var fileDescriptorDescriptor = []byte{ // 234 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xb2, 0x4e, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xcc, 0xcc, 0x4b, 0x2d, 0x4a, 0x41, 0x66, 0x26, 0x16, 0x64, 0xea, 0x97, 0x54, 0x16, 0xa4, 0x16, 0xeb, 0xa7, 0xa4, 0x16, 0x27, 0x17, 0x65, 0x16, 0x94, 0xe4, 0x17, 0xe9, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x09, 0x20, 0x94, 0xe9, 0x81, 0x95, 0x48, 0x89, 0xa4, 0xe7, 0xa7, 0xe7, 0x83, 0x25, 0xf5, 0x41, 0x2c, 0x88, 0x3a, 0xa5, 0x6e, 0x46, 0x2e, 0x2e, 0x17, 0xb8, 0x66, 0x21, 0x59, 0x2e, 0xae, 0xdc, 0xd4, 0x94, 0xcc, 0xc4, 0x78, 0x90, 0x1e, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, 0x4e, 0xb0, 0x48, 0x48, 0x65, 0x41, 0xaa, 0x90, 0x17, 0x17, 0x5b, 0x4a, 0x66, 0x7a, 0x6a, 0x71, 0x89, 0x04, 0x13, 0x48, 0xca, 0xc9, 0xe8, 0xc4, 0x3d, 0x79, 0x86, 0x5b, 0xf7, 0xe4, 0xb5, 0x90, 0x9c, 0x9a, 0x5f, 0x90, 0x9a, 0x07, 0xb7, 0xbc, 0x58, 0x3f, 0x3d, 0x5f, 0x17, 0xa2, 0x45, 0xcf, 0x05, 0x4c, 0x05, 0x41, 0x4d, 0x10, 0x12, 0xe2, 0x62, 0x29, 0xce, 0xac, 0x4a, 0x95, 0x60, 0x56, 0x60, 0xd4, 0x60, 0x0e, 0x02, 0xb3, 0x9d, 0xbc, 0x4e, 0x3c, 0x94, 0x63, 0xb8, 0xf1, 0x50, 0x8e, 0xa1, 0xe1, 0x91, 0x1c, 0xe3, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x18, 0x65, 0x40, 0x7c, 0x60, 0x58, 0x83, 0xc9, 0x08, 0x86, 0x24, 0x36, 0xb0, 0x17, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xea, 0xac, 0x78, 0x9a, 0x49, 0x01, 0x00, 0x00, } docker-containerd-tags-docker-17.12.1/api/types/descriptor.proto000066400000000000000000000011051322771672400246470ustar00rootroot00000000000000syntax = "proto3"; package containerd.types; import weak "gogoproto/gogo.proto"; option go_package = "github.com/containerd/containerd/api/types;types"; // Descriptor describes a blob in a content store. // // This descriptor can be used to reference content from an // oci descriptor found in a manifest. // See https://godoc.org/github.com/opencontainers/image-spec/specs-go/v1#Descriptor message Descriptor { string media_type = 1; string digest = 2 [(gogoproto.customtype) = "github.com/opencontainers/go-digest.Digest", (gogoproto.nullable) = false]; int64 size = 3; } docker-containerd-tags-docker-17.12.1/api/types/doc.go000066400000000000000000000000161322771672400225000ustar00rootroot00000000000000package types docker-containerd-tags-docker-17.12.1/api/types/metrics.pb.go000066400000000000000000000242621322771672400240120ustar00rootroot00000000000000// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/containerd/containerd/api/types/metrics.proto package types import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" // skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto" import google_protobuf1 "github.com/gogo/protobuf/types" import _ "github.com/gogo/protobuf/types" import time "time" import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" import strings "strings" import reflect "reflect" import io "io" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf var _ = time.Kitchen type Metric struct { Timestamp time.Time `protobuf:"bytes,1,opt,name=timestamp,stdtime" json:"timestamp"` ID string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` Data *google_protobuf1.Any `protobuf:"bytes,3,opt,name=data" json:"data,omitempty"` } func (m *Metric) Reset() { *m = Metric{} } func (*Metric) ProtoMessage() {} func (*Metric) Descriptor() ([]byte, []int) { return fileDescriptorMetrics, []int{0} } func init() { proto.RegisterType((*Metric)(nil), "containerd.types.Metric") } func (m *Metric) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Metric) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l dAtA[i] = 0xa i++ i = encodeVarintMetrics(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp))) n1, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i:]) if err != nil { return 0, err } i += n1 if len(m.ID) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintMetrics(dAtA, i, uint64(len(m.ID))) i += copy(dAtA[i:], m.ID) } if m.Data != nil { dAtA[i] = 0x1a i++ i = encodeVarintMetrics(dAtA, i, uint64(m.Data.Size())) n2, err := m.Data.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n2 } return i, nil } func encodeVarintMetrics(dAtA []byte, offset int, v uint64) int { for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return offset + 1 } func (m *Metric) Size() (n int) { var l int _ = l l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) n += 1 + l + sovMetrics(uint64(l)) l = len(m.ID) if l > 0 { n += 1 + l + sovMetrics(uint64(l)) } if m.Data != nil { l = m.Data.Size() n += 1 + l + sovMetrics(uint64(l)) } return n } func sovMetrics(x uint64) (n int) { for { n++ x >>= 7 if x == 0 { break } } return n } func sozMetrics(x uint64) (n int) { return sovMetrics(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (this *Metric) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&Metric{`, `Timestamp:` + strings.Replace(strings.Replace(this.Timestamp.String(), "Timestamp", "google_protobuf2.Timestamp", 1), `&`, ``, 1) + `,`, `ID:` + fmt.Sprintf("%v", this.ID) + `,`, `Data:` + strings.Replace(fmt.Sprintf("%v", this.Data), "Any", "google_protobuf1.Any", 1) + `,`, `}`, }, "") return s } func valueToStringMetrics(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { return "nil" } pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } func (m *Metric) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMetrics } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Metric: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Metric: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMetrics } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthMetrics } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMetrics } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthMetrics } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMetrics } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthMetrics } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Data == nil { m.Data = &google_protobuf1.Any{} } if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipMetrics(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthMetrics } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipMetrics(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowMetrics } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } wireType := int(wire & 0x7) switch wireType { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowMetrics } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } iNdEx++ if dAtA[iNdEx-1] < 0x80 { break } } return iNdEx, nil case 1: iNdEx += 8 return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowMetrics } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ length |= (int(b) & 0x7F) << shift if b < 0x80 { break } } iNdEx += length if length < 0 { return 0, ErrInvalidLengthMetrics } return iNdEx, nil case 3: for { var innerWire uint64 var start int = iNdEx for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowMetrics } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ innerWire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } innerWireType := int(innerWire & 0x7) if innerWireType == 4 { break } next, err := skipMetrics(dAtA[start:]) if err != nil { return 0, err } iNdEx = start + next } return iNdEx, nil case 4: return iNdEx, nil case 5: iNdEx += 4 return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } } panic("unreachable") } var ( ErrInvalidLengthMetrics = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowMetrics = fmt.Errorf("proto: integer overflow") ) func init() { proto.RegisterFile("github.com/containerd/containerd/api/types/metrics.proto", fileDescriptorMetrics) } var fileDescriptorMetrics = []byte{ // 258 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xb2, 0x48, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xcc, 0xcc, 0x4b, 0x2d, 0x4a, 0x41, 0x66, 0x26, 0x16, 0x64, 0xea, 0x97, 0x54, 0x16, 0xa4, 0x16, 0xeb, 0xe7, 0xa6, 0x96, 0x14, 0x65, 0x26, 0x17, 0xeb, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x09, 0x20, 0xd4, 0xe8, 0x81, 0xe5, 0xa5, 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x92, 0xfa, 0x20, 0x16, 0x44, 0x9d, 0x94, 0x64, 0x7a, 0x7e, 0x7e, 0x7a, 0x4e, 0xaa, 0x3e, 0x98, 0x97, 0x54, 0x9a, 0xa6, 0x9f, 0x98, 0x57, 0x09, 0x95, 0x92, 0x47, 0x97, 0x2a, 0xc9, 0xcc, 0x4d, 0x2d, 0x2e, 0x49, 0xcc, 0x2d, 0x80, 0x28, 0x50, 0xea, 0x63, 0xe4, 0x62, 0xf3, 0x05, 0xdb, 0x2a, 0xe4, 0xc4, 0xc5, 0x09, 0x97, 0x95, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x36, 0x92, 0xd2, 0x83, 0xe8, 0xd7, 0x83, 0xe9, 0xd7, 0x0b, 0x81, 0xa9, 0x70, 0xe2, 0x38, 0x71, 0x4f, 0x9e, 0x61, 0xc2, 0x7d, 0x79, 0xc6, 0x20, 0x84, 0x36, 0x21, 0x31, 0x2e, 0xa6, 0xcc, 0x14, 0x09, 0x26, 0x05, 0x46, 0x0d, 0x4e, 0x27, 0xb6, 0x47, 0xf7, 0xe4, 0x99, 0x3c, 0x5d, 0x82, 0x98, 0x32, 0x53, 0x84, 0x34, 0xb8, 0x58, 0x52, 0x12, 0x4b, 0x12, 0x25, 0x98, 0xc1, 0xc6, 0x8a, 0x60, 0x18, 0xeb, 0x98, 0x57, 0x19, 0x04, 0x56, 0xe1, 0xe4, 0x75, 0xe2, 0xa1, 0x1c, 0xc3, 0x8d, 0x87, 0x72, 0x0c, 0x0d, 0x8f, 0xe4, 0x18, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x28, 0x03, 0xe2, 0x03, 0xd2, 0x1a, 0x4c, 0x46, 0x30, 0x24, 0xb1, 0x81, 0x6d, 0x30, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xde, 0x0d, 0x02, 0xfe, 0x85, 0x01, 0x00, 0x00, } docker-containerd-tags-docker-17.12.1/api/types/metrics.proto000066400000000000000000000006221322771672400241420ustar00rootroot00000000000000syntax = "proto3"; package containerd.types; import weak "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; import "google/protobuf/timestamp.proto"; option go_package = "github.com/containerd/containerd/api/types;types"; message Metric { google.protobuf.Timestamp timestamp = 1 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; string id = 2; google.protobuf.Any data = 3; } docker-containerd-tags-docker-17.12.1/api/types/mount.pb.go000066400000000000000000000255161322771672400235110ustar00rootroot00000000000000// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/containerd/containerd/api/types/mount.proto package types import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" // skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto" import strings "strings" import reflect "reflect" import io "io" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // Mount describes mounts for a container. // // This type is the lingua franca of ContainerD. All services provide mounts // to be used with the container at creation time. // // The Mount type follows the structure of the mount syscall, including a type, // source, target and options. type Mount struct { // Type defines the nature of the mount. Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // Source specifies the name of the mount. Depending on mount type, this // may be a volume name or a host path, or even ignored. Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"` // Target path in container Target string `protobuf:"bytes,3,opt,name=target,proto3" json:"target,omitempty"` // Options specifies zero or more fstab style mount options. Options []string `protobuf:"bytes,4,rep,name=options" json:"options,omitempty"` } func (m *Mount) Reset() { *m = Mount{} } func (*Mount) ProtoMessage() {} func (*Mount) Descriptor() ([]byte, []int) { return fileDescriptorMount, []int{0} } func init() { proto.RegisterType((*Mount)(nil), "containerd.types.Mount") } func (m *Mount) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Mount) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Type) > 0 { dAtA[i] = 0xa i++ i = encodeVarintMount(dAtA, i, uint64(len(m.Type))) i += copy(dAtA[i:], m.Type) } if len(m.Source) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintMount(dAtA, i, uint64(len(m.Source))) i += copy(dAtA[i:], m.Source) } if len(m.Target) > 0 { dAtA[i] = 0x1a i++ i = encodeVarintMount(dAtA, i, uint64(len(m.Target))) i += copy(dAtA[i:], m.Target) } if len(m.Options) > 0 { for _, s := range m.Options { dAtA[i] = 0x22 i++ l = len(s) for l >= 1<<7 { dAtA[i] = uint8(uint64(l)&0x7f | 0x80) l >>= 7 i++ } dAtA[i] = uint8(l) i++ i += copy(dAtA[i:], s) } } return i, nil } func encodeVarintMount(dAtA []byte, offset int, v uint64) int { for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return offset + 1 } func (m *Mount) Size() (n int) { var l int _ = l l = len(m.Type) if l > 0 { n += 1 + l + sovMount(uint64(l)) } l = len(m.Source) if l > 0 { n += 1 + l + sovMount(uint64(l)) } l = len(m.Target) if l > 0 { n += 1 + l + sovMount(uint64(l)) } if len(m.Options) > 0 { for _, s := range m.Options { l = len(s) n += 1 + l + sovMount(uint64(l)) } } return n } func sovMount(x uint64) (n int) { for { n++ x >>= 7 if x == 0 { break } } return n } func sozMount(x uint64) (n int) { return sovMount(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (this *Mount) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&Mount{`, `Type:` + fmt.Sprintf("%v", this.Type) + `,`, `Source:` + fmt.Sprintf("%v", this.Source) + `,`, `Target:` + fmt.Sprintf("%v", this.Target) + `,`, `Options:` + fmt.Sprintf("%v", this.Options) + `,`, `}`, }, "") return s } func valueToStringMount(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { return "nil" } pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } func (m *Mount) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMount } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Mount: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Mount: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMount } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthMount } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Type = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMount } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthMount } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Source = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMount } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthMount } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Target = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMount } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthMount } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Options = append(m.Options, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipMount(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthMount } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipMount(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowMount } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } wireType := int(wire & 0x7) switch wireType { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowMount } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } iNdEx++ if dAtA[iNdEx-1] < 0x80 { break } } return iNdEx, nil case 1: iNdEx += 8 return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowMount } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ length |= (int(b) & 0x7F) << shift if b < 0x80 { break } } iNdEx += length if length < 0 { return 0, ErrInvalidLengthMount } return iNdEx, nil case 3: for { var innerWire uint64 var start int = iNdEx for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowMount } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ innerWire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } innerWireType := int(innerWire & 0x7) if innerWireType == 4 { break } next, err := skipMount(dAtA[start:]) if err != nil { return 0, err } iNdEx = start + next } return iNdEx, nil case 4: return iNdEx, nil case 5: iNdEx += 4 return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } } panic("unreachable") } var ( ErrInvalidLengthMount = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowMount = fmt.Errorf("proto: integer overflow") ) func init() { proto.RegisterFile("github.com/containerd/containerd/api/types/mount.proto", fileDescriptorMount) } var fileDescriptorMount = []byte{ // 202 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0x4b, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xcc, 0xcc, 0x4b, 0x2d, 0x4a, 0x41, 0x66, 0x26, 0x16, 0x64, 0xea, 0x97, 0x54, 0x16, 0xa4, 0x16, 0xeb, 0xe7, 0xe6, 0x97, 0xe6, 0x95, 0xe8, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x09, 0x20, 0x54, 0xe8, 0x81, 0x65, 0xa5, 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x92, 0xfa, 0x20, 0x16, 0x44, 0x9d, 0x52, 0x2a, 0x17, 0xab, 0x2f, 0x48, 0x9b, 0x90, 0x10, 0x17, 0x0b, 0x48, 0x9d, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x67, 0x10, 0x98, 0x2d, 0x24, 0xc6, 0xc5, 0x56, 0x9c, 0x5f, 0x5a, 0x94, 0x9c, 0x2a, 0xc1, 0x04, 0x16, 0x85, 0xf2, 0x40, 0xe2, 0x25, 0x89, 0x45, 0xe9, 0xa9, 0x25, 0x12, 0xcc, 0x10, 0x71, 0x08, 0x4f, 0x48, 0x82, 0x8b, 0x3d, 0xbf, 0xa0, 0x24, 0x33, 0x3f, 0xaf, 0x58, 0x82, 0x45, 0x81, 0x59, 0x83, 0x33, 0x08, 0xc6, 0x75, 0xf2, 0x3a, 0xf1, 0x50, 0x8e, 0xe1, 0xc6, 0x43, 0x39, 0x86, 0x86, 0x47, 0x72, 0x8c, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0x63, 0x94, 0x01, 0xf1, 0x1e, 0xb4, 0x06, 0x93, 0x11, 0x0c, 0x49, 0x6c, 0x60, 0xb7, 0x1b, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x82, 0x1c, 0x02, 0x18, 0x1d, 0x01, 0x00, 0x00, } docker-containerd-tags-docker-17.12.1/api/types/mount.proto000066400000000000000000000014631322771672400236420ustar00rootroot00000000000000syntax = "proto3"; package containerd.types; import weak "gogoproto/gogo.proto"; option go_package = "github.com/containerd/containerd/api/types;types"; // Mount describes mounts for a container. // // This type is the lingua franca of ContainerD. All services provide mounts // to be used with the container at creation time. // // The Mount type follows the structure of the mount syscall, including a type, // source, target and options. message Mount { // Type defines the nature of the mount. string type = 1; // Source specifies the name of the mount. Depending on mount type, this // may be a volume name or a host path, or even ignored. string source = 2; // Target path in container string target = 3; // Options specifies zero or more fstab style mount options. repeated string options = 4; } docker-containerd-tags-docker-17.12.1/api/types/platform.pb.go000066400000000000000000000227071322771672400241720ustar00rootroot00000000000000// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/containerd/containerd/api/types/platform.proto package types import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" // skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto" import strings "strings" import reflect "reflect" import io "io" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // Platform follows the structure of the OCI platform specification, from // descriptors. type Platform struct { OS string `protobuf:"bytes,1,opt,name=os,proto3" json:"os,omitempty"` Architecture string `protobuf:"bytes,2,opt,name=architecture,proto3" json:"architecture,omitempty"` Variant string `protobuf:"bytes,3,opt,name=variant,proto3" json:"variant,omitempty"` } func (m *Platform) Reset() { *m = Platform{} } func (*Platform) ProtoMessage() {} func (*Platform) Descriptor() ([]byte, []int) { return fileDescriptorPlatform, []int{0} } func init() { proto.RegisterType((*Platform)(nil), "containerd.types.Platform") } func (m *Platform) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Platform) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.OS) > 0 { dAtA[i] = 0xa i++ i = encodeVarintPlatform(dAtA, i, uint64(len(m.OS))) i += copy(dAtA[i:], m.OS) } if len(m.Architecture) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintPlatform(dAtA, i, uint64(len(m.Architecture))) i += copy(dAtA[i:], m.Architecture) } if len(m.Variant) > 0 { dAtA[i] = 0x1a i++ i = encodeVarintPlatform(dAtA, i, uint64(len(m.Variant))) i += copy(dAtA[i:], m.Variant) } return i, nil } func encodeVarintPlatform(dAtA []byte, offset int, v uint64) int { for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return offset + 1 } func (m *Platform) Size() (n int) { var l int _ = l l = len(m.OS) if l > 0 { n += 1 + l + sovPlatform(uint64(l)) } l = len(m.Architecture) if l > 0 { n += 1 + l + sovPlatform(uint64(l)) } l = len(m.Variant) if l > 0 { n += 1 + l + sovPlatform(uint64(l)) } return n } func sovPlatform(x uint64) (n int) { for { n++ x >>= 7 if x == 0 { break } } return n } func sozPlatform(x uint64) (n int) { return sovPlatform(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (this *Platform) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&Platform{`, `OS:` + fmt.Sprintf("%v", this.OS) + `,`, `Architecture:` + fmt.Sprintf("%v", this.Architecture) + `,`, `Variant:` + fmt.Sprintf("%v", this.Variant) + `,`, `}`, }, "") return s } func valueToStringPlatform(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { return "nil" } pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } func (m *Platform) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPlatform } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Platform: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Platform: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OS", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPlatform } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthPlatform } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.OS = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Architecture", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPlatform } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthPlatform } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Architecture = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Variant", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPlatform } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthPlatform } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Variant = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipPlatform(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthPlatform } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipPlatform(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowPlatform } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } wireType := int(wire & 0x7) switch wireType { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowPlatform } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } iNdEx++ if dAtA[iNdEx-1] < 0x80 { break } } return iNdEx, nil case 1: iNdEx += 8 return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowPlatform } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ length |= (int(b) & 0x7F) << shift if b < 0x80 { break } } iNdEx += length if length < 0 { return 0, ErrInvalidLengthPlatform } return iNdEx, nil case 3: for { var innerWire uint64 var start int = iNdEx for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowPlatform } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ innerWire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } innerWireType := int(innerWire & 0x7) if innerWireType == 4 { break } next, err := skipPlatform(dAtA[start:]) if err != nil { return 0, err } iNdEx = start + next } return iNdEx, nil case 4: return iNdEx, nil case 5: iNdEx += 4 return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } } panic("unreachable") } var ( ErrInvalidLengthPlatform = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowPlatform = fmt.Errorf("proto: integer overflow") ) func init() { proto.RegisterFile("github.com/containerd/containerd/api/types/platform.proto", fileDescriptorPlatform) } var fileDescriptorPlatform = []byte{ // 205 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xb2, 0x4c, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xcc, 0xcc, 0x4b, 0x2d, 0x4a, 0x41, 0x66, 0x26, 0x16, 0x64, 0xea, 0x97, 0x54, 0x16, 0xa4, 0x16, 0xeb, 0x17, 0xe4, 0x24, 0x96, 0xa4, 0xe5, 0x17, 0xe5, 0xea, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x09, 0x20, 0x14, 0xe9, 0x81, 0x15, 0x48, 0x89, 0xa4, 0xe7, 0xa7, 0xe7, 0x83, 0x25, 0xf5, 0x41, 0x2c, 0x88, 0x3a, 0xa5, 0x04, 0x2e, 0x8e, 0x00, 0xa8, 0x4e, 0x21, 0x31, 0x2e, 0xa6, 0xfc, 0x62, 0x09, 0x46, 0x05, 0x46, 0x0d, 0x4e, 0x27, 0xb6, 0x47, 0xf7, 0xe4, 0x99, 0xfc, 0x83, 0x83, 0x98, 0xf2, 0x8b, 0x85, 0x94, 0xb8, 0x78, 0x12, 0x8b, 0x92, 0x33, 0x32, 0x4b, 0x52, 0x93, 0x4b, 0x4a, 0x8b, 0x52, 0x25, 0x98, 0x40, 0x2a, 0x82, 0x50, 0xc4, 0x84, 0x24, 0xb8, 0xd8, 0xcb, 0x12, 0x8b, 0x32, 0x13, 0xf3, 0x4a, 0x24, 0x98, 0xc1, 0xd2, 0x30, 0xae, 0x93, 0xd7, 0x89, 0x87, 0x72, 0x0c, 0x37, 0x1e, 0xca, 0x31, 0x34, 0x3c, 0x92, 0x63, 0x3c, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0xa3, 0x0c, 0x88, 0xf7, 0x9e, 0x35, 0x98, 0x8c, 0x60, 0x48, 0x62, 0x03, 0x3b, 0xdb, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x05, 0xaa, 0xda, 0xa1, 0x1b, 0x01, 0x00, 0x00, } docker-containerd-tags-docker-17.12.1/api/types/platform.proto000066400000000000000000000005531322771672400243230ustar00rootroot00000000000000syntax = "proto3"; package containerd.types; import weak "gogoproto/gogo.proto"; option go_package = "github.com/containerd/containerd/api/types;types"; // Platform follows the structure of the OCI platform specification, from // descriptors. message Platform { string os = 1 [(gogoproto.customname) = "OS"]; string architecture = 2; string variant = 3; } docker-containerd-tags-docker-17.12.1/api/types/task/000077500000000000000000000000001322771672400223515ustar00rootroot00000000000000docker-containerd-tags-docker-17.12.1/api/types/task/task.pb.go000066400000000000000000000546471322771672400242620ustar00rootroot00000000000000// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/containerd/containerd/api/types/task/task.proto /* Package task is a generated protocol buffer package. It is generated from these files: github.com/containerd/containerd/api/types/task/task.proto It has these top-level messages: Process ProcessInfo */ package task import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" // skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto" import _ "github.com/gogo/protobuf/types" import google_protobuf2 "github.com/gogo/protobuf/types" import time "time" import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" import strings "strings" import reflect "reflect" import io "io" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf var _ = time.Kitchen // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package type Status int32 const ( StatusUnknown Status = 0 StatusCreated Status = 1 StatusRunning Status = 2 StatusStopped Status = 3 StatusPaused Status = 4 StatusPausing Status = 5 ) var Status_name = map[int32]string{ 0: "UNKNOWN", 1: "CREATED", 2: "RUNNING", 3: "STOPPED", 4: "PAUSED", 5: "PAUSING", } var Status_value = map[string]int32{ "UNKNOWN": 0, "CREATED": 1, "RUNNING": 2, "STOPPED": 3, "PAUSED": 4, "PAUSING": 5, } func (x Status) String() string { return proto.EnumName(Status_name, int32(x)) } func (Status) EnumDescriptor() ([]byte, []int) { return fileDescriptorTask, []int{0} } type Process struct { ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` ID string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` Pid uint32 `protobuf:"varint,3,opt,name=pid,proto3" json:"pid,omitempty"` Status Status `protobuf:"varint,4,opt,name=status,proto3,enum=containerd.v1.types.Status" json:"status,omitempty"` Stdin string `protobuf:"bytes,5,opt,name=stdin,proto3" json:"stdin,omitempty"` Stdout string `protobuf:"bytes,6,opt,name=stdout,proto3" json:"stdout,omitempty"` Stderr string `protobuf:"bytes,7,opt,name=stderr,proto3" json:"stderr,omitempty"` Terminal bool `protobuf:"varint,8,opt,name=terminal,proto3" json:"terminal,omitempty"` ExitStatus uint32 `protobuf:"varint,9,opt,name=exit_status,json=exitStatus,proto3" json:"exit_status,omitempty"` ExitedAt time.Time `protobuf:"bytes,10,opt,name=exited_at,json=exitedAt,stdtime" json:"exited_at"` } func (m *Process) Reset() { *m = Process{} } func (*Process) ProtoMessage() {} func (*Process) Descriptor() ([]byte, []int) { return fileDescriptorTask, []int{0} } type ProcessInfo struct { // PID is the process ID. Pid uint32 `protobuf:"varint,1,opt,name=pid,proto3" json:"pid,omitempty"` // Info contains additional process information. // // Info varies by platform. Info *google_protobuf2.Any `protobuf:"bytes,2,opt,name=info" json:"info,omitempty"` } func (m *ProcessInfo) Reset() { *m = ProcessInfo{} } func (*ProcessInfo) ProtoMessage() {} func (*ProcessInfo) Descriptor() ([]byte, []int) { return fileDescriptorTask, []int{1} } func init() { proto.RegisterType((*Process)(nil), "containerd.v1.types.Process") proto.RegisterType((*ProcessInfo)(nil), "containerd.v1.types.ProcessInfo") proto.RegisterEnum("containerd.v1.types.Status", Status_name, Status_value) } func (m *Process) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Process) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.ContainerID) > 0 { dAtA[i] = 0xa i++ i = encodeVarintTask(dAtA, i, uint64(len(m.ContainerID))) i += copy(dAtA[i:], m.ContainerID) } if len(m.ID) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintTask(dAtA, i, uint64(len(m.ID))) i += copy(dAtA[i:], m.ID) } if m.Pid != 0 { dAtA[i] = 0x18 i++ i = encodeVarintTask(dAtA, i, uint64(m.Pid)) } if m.Status != 0 { dAtA[i] = 0x20 i++ i = encodeVarintTask(dAtA, i, uint64(m.Status)) } if len(m.Stdin) > 0 { dAtA[i] = 0x2a i++ i = encodeVarintTask(dAtA, i, uint64(len(m.Stdin))) i += copy(dAtA[i:], m.Stdin) } if len(m.Stdout) > 0 { dAtA[i] = 0x32 i++ i = encodeVarintTask(dAtA, i, uint64(len(m.Stdout))) i += copy(dAtA[i:], m.Stdout) } if len(m.Stderr) > 0 { dAtA[i] = 0x3a i++ i = encodeVarintTask(dAtA, i, uint64(len(m.Stderr))) i += copy(dAtA[i:], m.Stderr) } if m.Terminal { dAtA[i] = 0x40 i++ if m.Terminal { dAtA[i] = 1 } else { dAtA[i] = 0 } i++ } if m.ExitStatus != 0 { dAtA[i] = 0x48 i++ i = encodeVarintTask(dAtA, i, uint64(m.ExitStatus)) } dAtA[i] = 0x52 i++ i = encodeVarintTask(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt))) n1, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:]) if err != nil { return 0, err } i += n1 return i, nil } func (m *ProcessInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ProcessInfo) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if m.Pid != 0 { dAtA[i] = 0x8 i++ i = encodeVarintTask(dAtA, i, uint64(m.Pid)) } if m.Info != nil { dAtA[i] = 0x12 i++ i = encodeVarintTask(dAtA, i, uint64(m.Info.Size())) n2, err := m.Info.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n2 } return i, nil } func encodeVarintTask(dAtA []byte, offset int, v uint64) int { for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return offset + 1 } func (m *Process) Size() (n int) { var l int _ = l l = len(m.ContainerID) if l > 0 { n += 1 + l + sovTask(uint64(l)) } l = len(m.ID) if l > 0 { n += 1 + l + sovTask(uint64(l)) } if m.Pid != 0 { n += 1 + sovTask(uint64(m.Pid)) } if m.Status != 0 { n += 1 + sovTask(uint64(m.Status)) } l = len(m.Stdin) if l > 0 { n += 1 + l + sovTask(uint64(l)) } l = len(m.Stdout) if l > 0 { n += 1 + l + sovTask(uint64(l)) } l = len(m.Stderr) if l > 0 { n += 1 + l + sovTask(uint64(l)) } if m.Terminal { n += 2 } if m.ExitStatus != 0 { n += 1 + sovTask(uint64(m.ExitStatus)) } l = github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt) n += 1 + l + sovTask(uint64(l)) return n } func (m *ProcessInfo) Size() (n int) { var l int _ = l if m.Pid != 0 { n += 1 + sovTask(uint64(m.Pid)) } if m.Info != nil { l = m.Info.Size() n += 1 + l + sovTask(uint64(l)) } return n } func sovTask(x uint64) (n int) { for { n++ x >>= 7 if x == 0 { break } } return n } func sozTask(x uint64) (n int) { return sovTask(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (this *Process) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&Process{`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, `ID:` + fmt.Sprintf("%v", this.ID) + `,`, `Pid:` + fmt.Sprintf("%v", this.Pid) + `,`, `Status:` + fmt.Sprintf("%v", this.Status) + `,`, `Stdin:` + fmt.Sprintf("%v", this.Stdin) + `,`, `Stdout:` + fmt.Sprintf("%v", this.Stdout) + `,`, `Stderr:` + fmt.Sprintf("%v", this.Stderr) + `,`, `Terminal:` + fmt.Sprintf("%v", this.Terminal) + `,`, `ExitStatus:` + fmt.Sprintf("%v", this.ExitStatus) + `,`, `ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "google_protobuf1.Timestamp", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } func (this *ProcessInfo) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&ProcessInfo{`, `Pid:` + fmt.Sprintf("%v", this.Pid) + `,`, `Info:` + strings.Replace(fmt.Sprintf("%v", this.Info), "Any", "google_protobuf2.Any", 1) + `,`, `}`, }, "") return s } func valueToStringTask(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { return "nil" } pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } func (m *Process) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Process: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Process: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTask } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ContainerID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTask } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.ID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Pid", wireType) } m.Pid = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Pid |= (uint32(b) & 0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } m.Status = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Status |= (Status(b) & 0x7F) << shift if b < 0x80 { break } } case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Stdin", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTask } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Stdin = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Stdout", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTask } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Stdout = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Stderr", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthTask } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Stderr = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 8: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Terminal", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= (int(b) & 0x7F) << shift if b < 0x80 { break } } m.Terminal = bool(v != 0) case 9: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field ExitStatus", wireType) } m.ExitStatus = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.ExitStatus |= (uint32(b) & 0x7F) << shift if b < 0x80 { break } } case 10: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ExitedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTask } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.ExitedAt, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTask(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTask } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ProcessInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ProcessInfo: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ProcessInfo: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Pid", wireType) } m.Pid = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Pid |= (uint32(b) & 0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTask } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTask } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Info == nil { m.Info = &google_protobuf2.Any{} } if err := m.Info.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTask(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTask } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipTask(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowTask } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } wireType := int(wire & 0x7) switch wireType { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowTask } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } iNdEx++ if dAtA[iNdEx-1] < 0x80 { break } } return iNdEx, nil case 1: iNdEx += 8 return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowTask } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ length |= (int(b) & 0x7F) << shift if b < 0x80 { break } } iNdEx += length if length < 0 { return 0, ErrInvalidLengthTask } return iNdEx, nil case 3: for { var innerWire uint64 var start int = iNdEx for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowTask } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ innerWire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } innerWireType := int(innerWire & 0x7) if innerWireType == 4 { break } next, err := skipTask(dAtA[start:]) if err != nil { return 0, err } iNdEx = start + next } return iNdEx, nil case 4: return iNdEx, nil case 5: iNdEx += 4 return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } } panic("unreachable") } var ( ErrInvalidLengthTask = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTask = fmt.Errorf("proto: integer overflow") ) func init() { proto.RegisterFile("github.com/containerd/containerd/api/types/task/task.proto", fileDescriptorTask) } var fileDescriptorTask = []byte{ // 545 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0x3f, 0x6f, 0xd3, 0x40, 0x18, 0xc6, 0x7d, 0x6e, 0xeb, 0xa6, 0xe7, 0xb6, 0x18, 0x13, 0x55, 0xc6, 0x20, 0xdb, 0xea, 0x64, 0x31, 0xd8, 0x22, 0xdd, 0xd8, 0xf2, 0x4f, 0xc8, 0x42, 0x72, 0x23, 0x27, 0x11, 0x6c, 0x91, 0x13, 0x5f, 0xcc, 0xa9, 0xcd, 0x9d, 0x65, 0x9f, 0x81, 0x6c, 0x8c, 0xa8, 0x13, 0x5f, 0xa0, 0x13, 0x7c, 0x0a, 0x3e, 0x41, 0x46, 0x26, 0xc4, 0x14, 0xa8, 0x3f, 0x09, 0x3a, 0xdb, 0x49, 0x23, 0x60, 0x39, 0xbd, 0xef, 0xf3, 0x7b, 0xee, 0xbd, 0xf7, 0x1e, 0xf8, 0x22, 0xc6, 0xec, 0x6d, 0x3e, 0x75, 0x66, 0x74, 0xe1, 0xce, 0x28, 0x61, 0x21, 0x26, 0x28, 0x8d, 0x76, 0xcb, 0x30, 0xc1, 0x2e, 0x5b, 0x26, 0x28, 0x73, 0x59, 0x98, 0x5d, 0x95, 0x87, 0x93, 0xa4, 0x94, 0x51, 0xf5, 0xd1, 0xbd, 0xcb, 0x79, 0xf7, 0xdc, 0x29, 0x4d, 0x7a, 0x33, 0xa6, 0x31, 0x2d, 0xb9, 0xcb, 0xab, 0xca, 0xaa, 0x9b, 0x31, 0xa5, 0xf1, 0x35, 0x72, 0xcb, 0x6e, 0x9a, 0xcf, 0x5d, 0x86, 0x17, 0x28, 0x63, 0xe1, 0x22, 0xa9, 0x0d, 0x8f, 0xff, 0x36, 0x84, 0x64, 0x59, 0xa1, 0xf3, 0x42, 0x84, 0x87, 0x83, 0x94, 0xce, 0x50, 0x96, 0xa9, 0x2d, 0x78, 0xbc, 0x7d, 0x74, 0x82, 0x23, 0x0d, 0x58, 0xc0, 0x3e, 0xea, 0x3c, 0x28, 0xd6, 0xa6, 0xdc, 0xdd, 0xe8, 0x5e, 0x2f, 0x90, 0xb7, 0x26, 0x2f, 0x52, 0xcf, 0xa0, 0x88, 0x23, 0x4d, 0x2c, 0x9d, 0x52, 0xb1, 0x36, 0x45, 0xaf, 0x17, 0x88, 0x38, 0x52, 0x15, 0xb8, 0x97, 0xe0, 0x48, 0xdb, 0xb3, 0x80, 0x7d, 0x12, 0xf0, 0x52, 0xbd, 0x80, 0x52, 0xc6, 0x42, 0x96, 0x67, 0xda, 0xbe, 0x05, 0xec, 0xd3, 0xd6, 0x13, 0xe7, 0x3f, 0x3f, 0x74, 0x86, 0xa5, 0x25, 0xa8, 0xad, 0x6a, 0x13, 0x1e, 0x64, 0x2c, 0xc2, 0x44, 0x3b, 0xe0, 0x2f, 0x04, 0x55, 0xa3, 0x9e, 0xf1, 0x51, 0x11, 0xcd, 0x99, 0x26, 0x95, 0x72, 0xdd, 0xd5, 0x3a, 0x4a, 0x53, 0xed, 0x70, 0xab, 0xa3, 0x34, 0x55, 0x75, 0xd8, 0x60, 0x28, 0x5d, 0x60, 0x12, 0x5e, 0x6b, 0x0d, 0x0b, 0xd8, 0x8d, 0x60, 0xdb, 0xab, 0x26, 0x94, 0xd1, 0x07, 0xcc, 0x26, 0xf5, 0x6e, 0x47, 0xe5, 0xc2, 0x90, 0x4b, 0xd5, 0x2a, 0x6a, 0x1b, 0x1e, 0xf1, 0x0e, 0x45, 0x93, 0x90, 0x69, 0xd0, 0x02, 0xb6, 0xdc, 0xd2, 0x9d, 0x2a, 0x50, 0x67, 0x13, 0xa8, 0x33, 0xda, 0x24, 0xde, 0x69, 0xac, 0xd6, 0xa6, 0xf0, 0xf9, 0x97, 0x09, 0x82, 0x46, 0x75, 0xad, 0xcd, 0xce, 0x3d, 0x28, 0xd7, 0x19, 0x7b, 0x64, 0x4e, 0x37, 0xd9, 0x80, 0xfb, 0x6c, 0x6c, 0xb8, 0x8f, 0xc9, 0x9c, 0x96, 0x39, 0xca, 0xad, 0xe6, 0x3f, 0xe3, 0xdb, 0x64, 0x19, 0x94, 0x8e, 0x67, 0x3f, 0x00, 0x94, 0xea, 0xc5, 0x0c, 0x78, 0x38, 0xf6, 0x5f, 0xf9, 0x97, 0xaf, 0x7d, 0x45, 0xd0, 0x1f, 0xde, 0xdc, 0x5a, 0x27, 0x15, 0x18, 0x93, 0x2b, 0x42, 0xdf, 0x13, 0xce, 0xbb, 0x41, 0xbf, 0x3d, 0xea, 0xf7, 0x14, 0xb0, 0xcb, 0xbb, 0x29, 0x0a, 0x19, 0x8a, 0x38, 0x0f, 0xc6, 0xbe, 0xef, 0xf9, 0x2f, 0x15, 0x71, 0x97, 0x07, 0x39, 0x21, 0x98, 0xc4, 0x9c, 0x0f, 0x47, 0x97, 0x83, 0x41, 0xbf, 0xa7, 0xec, 0xed, 0xf2, 0x21, 0xa3, 0x49, 0x82, 0x22, 0xf5, 0x29, 0x94, 0x06, 0xed, 0xf1, 0xb0, 0xdf, 0x53, 0xf6, 0x75, 0xe5, 0xe6, 0xd6, 0x3a, 0xae, 0xf0, 0x20, 0xcc, 0xb3, 0x6a, 0x3a, 0xa7, 0x7c, 0xfa, 0xc1, 0xee, 0x6d, 0x8e, 0x31, 0x89, 0xf5, 0xd3, 0x4f, 0x5f, 0x0c, 0xe1, 0xdb, 0x57, 0xa3, 0xfe, 0x4d, 0x47, 0x5b, 0xdd, 0x19, 0xc2, 0xcf, 0x3b, 0x43, 0xf8, 0x58, 0x18, 0x60, 0x55, 0x18, 0xe0, 0x7b, 0x61, 0x80, 0xdf, 0x85, 0x01, 0xde, 0x08, 0x53, 0xa9, 0x0c, 0xe2, 0xe2, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc3, 0x32, 0xd2, 0x86, 0x50, 0x03, 0x00, 0x00, } docker-containerd-tags-docker-17.12.1/api/types/task/task.proto000066400000000000000000000022201322771672400243740ustar00rootroot00000000000000syntax = "proto3"; package containerd.v1.types; import weak "gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/any.proto"; enum Status { option (gogoproto.goproto_enum_prefix) = false; option (gogoproto.enum_customname) = "Status"; UNKNOWN = 0 [(gogoproto.enumvalue_customname) = "StatusUnknown"]; CREATED = 1 [(gogoproto.enumvalue_customname) = "StatusCreated"]; RUNNING = 2 [(gogoproto.enumvalue_customname) = "StatusRunning"]; STOPPED = 3 [(gogoproto.enumvalue_customname) = "StatusStopped"]; PAUSED = 4 [(gogoproto.enumvalue_customname) = "StatusPaused"]; PAUSING = 5 [(gogoproto.enumvalue_customname) = "StatusPausing"]; } message Process { string container_id = 1; string id = 2; uint32 pid = 3; Status status = 4; string stdin = 5; string stdout = 6; string stderr = 7; bool terminal = 8; uint32 exit_status = 9; google.protobuf.Timestamp exited_at = 10 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; } message ProcessInfo { // PID is the process ID. uint32 pid = 1; // Info contains additional process information. // // Info varies by platform. google.protobuf.Any info = 2; } docker-containerd-tags-docker-17.12.1/archive/000077500000000000000000000000001322771672400211135ustar00rootroot00000000000000docker-containerd-tags-docker-17.12.1/archive/compression/000077500000000000000000000000001322771672400234545ustar00rootroot00000000000000docker-containerd-tags-docker-17.12.1/archive/compression/compression.go000066400000000000000000000055771322771672400263620ustar00rootroot00000000000000package compression import ( "bufio" "bytes" "compress/gzip" "fmt" "io" "sync" ) type ( // Compression is the state represents if compressed or not. Compression int ) const ( // Uncompressed represents the uncompressed. Uncompressed Compression = iota // Gzip is gzip compression algorithm. Gzip ) var ( bufioReader32KPool = &sync.Pool{ New: func() interface{} { return bufio.NewReaderSize(nil, 32*1024) }, } ) type readCloserWrapper struct { io.Reader closer func() error } func (r *readCloserWrapper) Close() error { if r.closer != nil { return r.closer() } return nil } type writeCloserWrapper struct { io.Writer closer func() error } func (w *writeCloserWrapper) Close() error { if w.closer != nil { w.closer() } return nil } // DetectCompression detects the compression algorithm of the source. func DetectCompression(source []byte) Compression { for compression, m := range map[Compression][]byte{ Gzip: {0x1F, 0x8B, 0x08}, } { if len(source) < len(m) { // Len too short continue } if bytes.Equal(m, source[:len(m)]) { return compression } } return Uncompressed } // DecompressStream decompresses the archive and returns a ReaderCloser with the decompressed archive. func DecompressStream(archive io.Reader) (io.ReadCloser, error) { buf := bufioReader32KPool.Get().(*bufio.Reader) buf.Reset(archive) bs, err := buf.Peek(10) if err != nil && err != io.EOF { // Note: we'll ignore any io.EOF error because there are some odd // cases where the layer.tar file will be empty (zero bytes) and // that results in an io.EOF from the Peek() call. So, in those // cases we'll just treat it as a non-compressed stream and // that means just create an empty layer. // See Issue docker/docker#18170 return nil, err } closer := func() error { buf.Reset(nil) bufioReader32KPool.Put(buf) return nil } switch compression := DetectCompression(bs); compression { case Uncompressed: readBufWrapper := &readCloserWrapper{buf, closer} return readBufWrapper, nil case Gzip: gzReader, err := gzip.NewReader(buf) if err != nil { return nil, err } readBufWrapper := &readCloserWrapper{gzReader, closer} return readBufWrapper, nil default: return nil, fmt.Errorf("unsupported compression format %s", (&compression).Extension()) } } // CompressStream compresseses the dest with specified compression algorithm. func CompressStream(dest io.Writer, compression Compression) (io.WriteCloser, error) { switch compression { case Uncompressed: return &writeCloserWrapper{dest, nil}, nil case Gzip: return gzip.NewWriter(dest), nil default: return nil, fmt.Errorf("unsupported compression format %s", (&compression).Extension()) } } // Extension returns the extension of a file that uses the specified compression algorithm. func (compression *Compression) Extension() string { switch *compression { case Gzip: return "gz" } return "" } docker-containerd-tags-docker-17.12.1/archive/compression/compression_test.go000066400000000000000000000035161322771672400274100ustar00rootroot00000000000000package compression import ( "bytes" "crypto/rand" "io/ioutil" "testing" ) // generateData generates data that composed of 2 random parts // and single zero-filled part within them. // Typically, the compression ratio would be about 67%. func generateData(t *testing.T, size int) []byte { part0 := size / 3 // random part2 := size / 3 // random part1 := size - part0 - part2 // zero-filled part0Data := make([]byte, part0) if _, err := rand.Read(part0Data); err != nil { t.Fatal(err) } part1Data := make([]byte, part1) part2Data := make([]byte, part2) if _, err := rand.Read(part2Data); err != nil { t.Fatal(err) } return append(part0Data, append(part1Data, part2Data...)...) } func testCompressDecompress(t *testing.T, size int, compression Compression) { orig := generateData(t, size) var b bytes.Buffer compressor, err := CompressStream(&b, compression) if err != nil { t.Fatal(err) } if n, err := compressor.Write(orig); err != nil || n != size { t.Fatal(err) } compressor.Close() compressed := b.Bytes() t.Logf("compressed %d bytes to %d bytes (%.2f%%)", len(orig), len(compressed), 100.0*float32(len(compressed))/float32(len(orig))) if compared := bytes.Compare(orig, compressed); (compression == Uncompressed && compared != 0) || (compression != Uncompressed && compared == 0) { t.Fatal("strange compressed data") } decompressor, err := DecompressStream(bytes.NewReader(compressed)) if err != nil { t.Fatal(err) } decompressed, err := ioutil.ReadAll(decompressor) if err != nil { t.Fatal(err) } if !bytes.Equal(orig, decompressed) { t.Fatal("strange decompressed data") } } func TestCompressDecompressGzip(t *testing.T) { testCompressDecompress(t, 1024*1024, Gzip) } func TestCompressDecompressUncompressed(t *testing.T) { testCompressDecompress(t, 1024*1024, Uncompressed) } docker-containerd-tags-docker-17.12.1/archive/issues_test.go000066400000000000000000000025001322771672400240110ustar00rootroot00000000000000package archive import ( "bytes" "context" "io/ioutil" "os" "path/filepath" "strings" "testing" "github.com/containerd/containerd/archive/compression" "github.com/containerd/containerd/testutil" ) // TestPrefixHeaderReadable tests that files that could be created with the // version of this package that was built with <=go17 are still readable. func TestPrefixHeaderReadable(t *testing.T) { testutil.RequiresRoot(t) // https://gist.github.com/stevvooe/e2a790ad4e97425896206c0816e1a882#file-out-go var testFile = []byte("\x1f\x8b\x08\x08\x44\x21\x68\x59\x00\x03\x74\x2e\x74\x61\x72\x00\x4b\xcb\xcf\x67\xa0\x35\x30\x80\x00\x86\x06\x10\x47\x01\xc1\x37\x40\x00\x54\xb6\xb1\xa1\xa9\x99\x09\x48\x25\x1d\x40\x69\x71\x49\x62\x91\x02\xe5\x76\xa1\x79\x84\x21\x91\xd6\x80\x72\xaf\x8f\x82\x51\x30\x0a\x46\x36\x00\x00\xf0\x1c\x1e\x95\x00\x06\x00\x00") tmpDir, err := ioutil.TempDir("", "prefix-test") if err != nil { t.Fatal(err) } defer os.RemoveAll(tmpDir) r, err := compression.DecompressStream(bytes.NewReader(testFile)) if err != nil { t.Fatal(err) } defer r.Close() _, err = Apply(context.Background(), tmpDir, r) if err != nil { t.Fatal(err) } baseName := "foo" pth := strings.Repeat("a", 100-len(baseName)) + "/" + baseName _, err = os.Lstat(filepath.Join(tmpDir, pth)) if err != nil { t.Fatal(err) } } docker-containerd-tags-docker-17.12.1/archive/tar.go000066400000000000000000000373061322771672400222410ustar00rootroot00000000000000package archive import ( "context" "fmt" "io" "io/ioutil" "os" "path/filepath" "runtime" "strings" "sync" "syscall" "time" "github.com/containerd/containerd/fs" "github.com/containerd/containerd/log" "github.com/dmcgowan/go-tar" "github.com/pkg/errors" ) var bufferPool = &sync.Pool{ New: func() interface{} { buffer := make([]byte, 32*1024) return &buffer }, } var errInvalidArchive = errors.New("invalid archive") // Diff returns a tar stream of the computed filesystem // difference between the provided directories. // // Produces a tar using OCI style file markers for deletions. Deleted // files will be prepended with the prefix ".wh.". This style is // based off AUFS whiteouts. // See https://github.com/opencontainers/image-spec/blob/master/layer.md func Diff(ctx context.Context, a, b string) io.ReadCloser { r, w := io.Pipe() go func() { err := WriteDiff(ctx, w, a, b) if err = w.CloseWithError(err); err != nil { log.G(ctx).WithError(err).Debugf("closing tar pipe failed") } }() return r } // WriteDiff writes a tar stream of the computed difference between the // provided directories. // // Produces a tar using OCI style file markers for deletions. Deleted // files will be prepended with the prefix ".wh.". This style is // based off AUFS whiteouts. // See https://github.com/opencontainers/image-spec/blob/master/layer.md func WriteDiff(ctx context.Context, w io.Writer, a, b string) error { cw := newChangeWriter(w, b) err := fs.Changes(ctx, a, b, cw.HandleChange) if err != nil { return errors.Wrap(err, "failed to create diff tar stream") } return cw.Close() } const ( // whiteoutPrefix prefix means file is a whiteout. If this is followed by a // filename this means that file has been removed from the base layer. // See https://github.com/opencontainers/image-spec/blob/master/layer.md#whiteouts whiteoutPrefix = ".wh." // whiteoutMetaPrefix prefix means whiteout has a special meaning and is not // for removing an actual file. Normally these files are excluded from exported // archives. whiteoutMetaPrefix = whiteoutPrefix + whiteoutPrefix // whiteoutLinkDir is a directory AUFS uses for storing hardlink links to other // layers. Normally these should not go into exported archives and all changed // hardlinks should be copied to the top layer. whiteoutLinkDir = whiteoutMetaPrefix + "plnk" // whiteoutOpaqueDir file means directory has been made opaque - meaning // readdir calls to this directory do not follow to lower layers. whiteoutOpaqueDir = whiteoutMetaPrefix + ".opq" paxSchilyXattr = "SCHILY.xattrs." ) // Apply applies a tar stream of an OCI style diff tar. // See https://github.com/opencontainers/image-spec/blob/master/layer.md#applying-changesets func Apply(ctx context.Context, root string, r io.Reader) (int64, error) { root = filepath.Clean(root) var ( tr = tar.NewReader(r) size int64 dirs []*tar.Header // Used for handling opaque directory markers which // may occur out of order unpackedPaths = make(map[string]struct{}) // Used for aufs plink directory aufsTempdir = "" aufsHardlinks = make(map[string]*tar.Header) ) // Iterate through the files in the archive. for { select { case <-ctx.Done(): return 0, ctx.Err() default: } hdr, err := tr.Next() if err == io.EOF { // end of tar archive break } if err != nil { return 0, err } size += hdr.Size // Normalize name, for safety and for a simple is-root check hdr.Name = filepath.Clean(hdr.Name) if skipFile(hdr) { log.G(ctx).Warnf("file %q ignored: archive may not be supported on system", hdr.Name) continue } // Split name and resolve symlinks for root directory. ppath, base := filepath.Split(hdr.Name) ppath, err = fs.RootPath(root, ppath) if err != nil { return 0, errors.Wrap(err, "failed to get root path") } // Join to root before joining to parent path to ensure relative links are // already resolved based on the root before adding to parent. path := filepath.Join(ppath, filepath.Join("/", base)) if path == root { log.G(ctx).Debugf("file %q ignored: resolved to root", hdr.Name) continue } // If file is not directly under root, ensure parent directory // exists or is created. if ppath != root { parentPath := ppath if base == "" { parentPath = filepath.Dir(path) } if _, err := os.Lstat(parentPath); err != nil && os.IsNotExist(err) { err = mkdirAll(parentPath, 0700) if err != nil { return 0, err } } } // Skip AUFS metadata dirs if strings.HasPrefix(hdr.Name, whiteoutMetaPrefix) { // Regular files inside /.wh..wh.plnk can be used as hardlink targets // We don't want this directory, but we need the files in them so that // such hardlinks can be resolved. if strings.HasPrefix(hdr.Name, whiteoutLinkDir) && hdr.Typeflag == tar.TypeReg { basename := filepath.Base(hdr.Name) aufsHardlinks[basename] = hdr if aufsTempdir == "" { if aufsTempdir, err = ioutil.TempDir("", "dockerplnk"); err != nil { return 0, err } defer os.RemoveAll(aufsTempdir) } p, err := fs.RootPath(aufsTempdir, basename) if err != nil { return 0, err } if err := createTarFile(ctx, p, root, hdr, tr); err != nil { return 0, err } } if hdr.Name != whiteoutOpaqueDir { continue } } if strings.HasPrefix(base, whiteoutPrefix) { dir := filepath.Dir(path) if base == whiteoutOpaqueDir { _, err := os.Lstat(dir) if err != nil { return 0, err } err = filepath.Walk(dir, func(path string, info os.FileInfo, err error) error { if err != nil { if os.IsNotExist(err) { err = nil // parent was deleted } return err } if path == dir { return nil } if _, exists := unpackedPaths[path]; !exists { err := os.RemoveAll(path) return err } return nil }) if err != nil { return 0, err } continue } originalBase := base[len(whiteoutPrefix):] originalPath := filepath.Join(dir, originalBase) // Ensure originalPath is under dir if dir[len(dir)-1] != filepath.Separator { dir += string(filepath.Separator) } if !strings.HasPrefix(originalPath, dir) { return 0, errors.Wrapf(errInvalidArchive, "invalid whiteout name: %v", base) } if err := os.RemoveAll(originalPath); err != nil { return 0, err } continue } // If path exits we almost always just want to remove and replace it. // The only exception is when it is a directory *and* the file from // the layer is also a directory. Then we want to merge them (i.e. // just apply the metadata from the layer). if fi, err := os.Lstat(path); err == nil { if !(fi.IsDir() && hdr.Typeflag == tar.TypeDir) { if err := os.RemoveAll(path); err != nil { return 0, err } } } srcData := io.Reader(tr) srcHdr := hdr // Hard links into /.wh..wh.plnk don't work, as we don't extract that directory, so // we manually retarget these into the temporary files we extracted them into if hdr.Typeflag == tar.TypeLink && strings.HasPrefix(filepath.Clean(hdr.Linkname), whiteoutLinkDir) { linkBasename := filepath.Base(hdr.Linkname) srcHdr = aufsHardlinks[linkBasename] if srcHdr == nil { return 0, fmt.Errorf("Invalid aufs hardlink") } p, err := fs.RootPath(aufsTempdir, linkBasename) if err != nil { return 0, err } tmpFile, err := os.Open(p) if err != nil { return 0, err } defer tmpFile.Close() srcData = tmpFile } if err := createTarFile(ctx, path, root, srcHdr, srcData); err != nil { return 0, err } // Directory mtimes must be handled at the end to avoid further // file creation in them to modify the directory mtime if hdr.Typeflag == tar.TypeDir { dirs = append(dirs, hdr) } unpackedPaths[path] = struct{}{} } for _, hdr := range dirs { path, err := fs.RootPath(root, hdr.Name) if err != nil { return 0, err } if err := chtimes(path, boundTime(latestTime(hdr.AccessTime, hdr.ModTime)), boundTime(hdr.ModTime)); err != nil { return 0, err } } return size, nil } type changeWriter struct { tw *tar.Writer source string whiteoutT time.Time inodeSrc map[uint64]string inodeRefs map[uint64][]string addedDirs map[string]struct{} } func newChangeWriter(w io.Writer, source string) *changeWriter { return &changeWriter{ tw: tar.NewWriter(w), source: source, whiteoutT: time.Now(), inodeSrc: map[uint64]string{}, inodeRefs: map[uint64][]string{}, addedDirs: map[string]struct{}{}, } } func (cw *changeWriter) HandleChange(k fs.ChangeKind, p string, f os.FileInfo, err error) error { if err != nil { return err } if k == fs.ChangeKindDelete { whiteOutDir := filepath.Dir(p) whiteOutBase := filepath.Base(p) whiteOut := filepath.Join(whiteOutDir, whiteoutPrefix+whiteOutBase) hdr := &tar.Header{ Typeflag: tar.TypeReg, Name: whiteOut[1:], Size: 0, ModTime: cw.whiteoutT, AccessTime: cw.whiteoutT, ChangeTime: cw.whiteoutT, } if err := cw.tw.WriteHeader(hdr); err != nil { return errors.Wrap(err, "failed to write whiteout header") } } else { var ( link string err error source = filepath.Join(cw.source, p) ) if f.Mode()&os.ModeSymlink != 0 { if link, err = os.Readlink(source); err != nil { return err } } hdr, err := tar.FileInfoHeader(f, link) if err != nil { return err } hdr.Mode = int64(chmodTarEntry(os.FileMode(hdr.Mode))) name := p if strings.HasPrefix(name, string(filepath.Separator)) { name, err = filepath.Rel(string(filepath.Separator), name) if err != nil { return errors.Wrap(err, "failed to make path relative") } } name, err = tarName(name) if err != nil { return errors.Wrap(err, "cannot canonicalize path") } // suffix with '/' for directories if f.IsDir() && !strings.HasSuffix(name, "/") { name += "/" } hdr.Name = name if err := setHeaderForSpecialDevice(hdr, name, f); err != nil { return errors.Wrap(err, "failed to set device headers") } // additionalLinks stores file names which must be linked to // this file when this file is added var additionalLinks []string inode, isHardlink := fs.GetLinkInfo(f) if isHardlink { // If the inode has a source, always link to it if source, ok := cw.inodeSrc[inode]; ok { hdr.Typeflag = tar.TypeLink hdr.Linkname = source hdr.Size = 0 } else { if k == fs.ChangeKindUnmodified { cw.inodeRefs[inode] = append(cw.inodeRefs[inode], name) return nil } cw.inodeSrc[inode] = name additionalLinks = cw.inodeRefs[inode] delete(cw.inodeRefs, inode) } } else if k == fs.ChangeKindUnmodified { // Nothing to write to diff return nil } if capability, err := getxattr(source, "security.capability"); err != nil { return errors.Wrap(err, "failed to get capabilities xattr") } else if capability != nil { if hdr.PAXRecords == nil { hdr.PAXRecords = map[string]string{} } hdr.PAXRecords[paxSchilyXattr+"security.capability"] = string(capability) } if err := cw.includeParents(hdr); err != nil { return err } if err := cw.tw.WriteHeader(hdr); err != nil { return errors.Wrap(err, "failed to write file header") } if hdr.Typeflag == tar.TypeReg && hdr.Size > 0 { file, err := open(source) if err != nil { return errors.Wrapf(err, "failed to open path: %v", source) } defer file.Close() buf := bufferPool.Get().(*[]byte) n, err := io.CopyBuffer(cw.tw, file, *buf) bufferPool.Put(buf) if err != nil { return errors.Wrap(err, "failed to copy") } if n != hdr.Size { return errors.New("short write copying file") } } if additionalLinks != nil { source = hdr.Name for _, extra := range additionalLinks { hdr.Name = extra hdr.Typeflag = tar.TypeLink hdr.Linkname = source hdr.Size = 0 if err := cw.includeParents(hdr); err != nil { return err } if err := cw.tw.WriteHeader(hdr); err != nil { return errors.Wrap(err, "failed to write file header") } } } } return nil } func (cw *changeWriter) Close() error { if err := cw.tw.Close(); err != nil { return errors.Wrap(err, "failed to close tar writer") } return nil } func createTarFile(ctx context.Context, path, extractDir string, hdr *tar.Header, reader io.Reader) error { // hdr.Mode is in linux format, which we can use for syscalls, // but for os.Foo() calls we need the mode converted to os.FileMode, // so use hdrInfo.Mode() (they differ for e.g. setuid bits) hdrInfo := hdr.FileInfo() switch hdr.Typeflag { case tar.TypeDir: // Create directory unless it exists as a directory already. // In that case we just want to merge the two if fi, err := os.Lstat(path); !(err == nil && fi.IsDir()) { if err := mkdir(path, hdrInfo.Mode()); err != nil { return err } } case tar.TypeReg, tar.TypeRegA: file, err := openFile(path, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, hdrInfo.Mode()) if err != nil { return err } _, err = copyBuffered(ctx, file, reader) if err1 := file.Close(); err == nil { err = err1 } if err != nil { return err } case tar.TypeBlock, tar.TypeChar: // Handle this is an OS-specific way if err := handleTarTypeBlockCharFifo(hdr, path); err != nil { return err } case tar.TypeFifo: // Handle this is an OS-specific way if err := handleTarTypeBlockCharFifo(hdr, path); err != nil { return err } case tar.TypeLink: targetPath, err := fs.RootPath(extractDir, hdr.Linkname) if err != nil { return err } if err := os.Link(targetPath, path); err != nil { return err } case tar.TypeSymlink: if err := os.Symlink(hdr.Linkname, path); err != nil { return err } case tar.TypeXGlobalHeader: log.G(ctx).Debug("PAX Global Extended Headers found and ignored") return nil default: return errors.Errorf("unhandled tar header type %d\n", hdr.Typeflag) } // Lchown is not supported on Windows. if runtime.GOOS != "windows" { if err := os.Lchown(path, hdr.Uid, hdr.Gid); err != nil { return err } } for key, value := range hdr.PAXRecords { if strings.HasPrefix(key, paxSchilyXattr) { key = key[len(paxSchilyXattr):] if err := setxattr(path, key, value); err != nil { if errors.Cause(err) == syscall.ENOTSUP { log.G(ctx).WithError(err).Warnf("ignored xattr %s in archive", key) continue } return err } } } // There is no LChmod, so ignore mode for symlink. Also, this // must happen after chown, as that can modify the file mode if err := handleLChmod(hdr, path, hdrInfo); err != nil { return err } return chtimes(path, boundTime(latestTime(hdr.AccessTime, hdr.ModTime)), boundTime(hdr.ModTime)) } func (cw *changeWriter) includeParents(hdr *tar.Header) error { name := strings.TrimRight(hdr.Name, "/") fname := filepath.Join(cw.source, name) parent := filepath.Dir(name) pname := filepath.Join(cw.source, parent) // Do not include root directory as parent if fname != cw.source && pname != cw.source { _, ok := cw.addedDirs[parent] if !ok { cw.addedDirs[parent] = struct{}{} fi, err := os.Stat(pname) if err != nil { return err } if err := cw.HandleChange(fs.ChangeKindModify, parent, fi, nil); err != nil { return err } } } return nil } func copyBuffered(ctx context.Context, dst io.Writer, src io.Reader) (written int64, err error) { buf := bufferPool.Get().(*[]byte) defer bufferPool.Put(buf) for { select { case <-ctx.Done(): err = ctx.Err() return default: } nr, er := src.Read(*buf) if nr > 0 { nw, ew := dst.Write((*buf)[0:nr]) if nw > 0 { written += int64(nw) } if ew != nil { err = ew break } if nr != nw { err = io.ErrShortWrite break } } if er != nil { if er != io.EOF { err = er } break } } return written, err } docker-containerd-tags-docker-17.12.1/archive/tar_test.go000066400000000000000000001000401322771672400232620ustar00rootroot00000000000000// +build !windows package archive import ( "archive/tar" "bytes" "context" "io" "io/ioutil" "os" "os/exec" "path/filepath" "testing" "time" _ "crypto/sha256" "github.com/containerd/containerd/fs" "github.com/containerd/containerd/fs/fstest" "github.com/pkg/errors" ) const tarCmd = "tar" // baseApplier creates a basic filesystem layout // with multiple types of files for basic tests. var baseApplier = fstest.Apply( fstest.CreateDir("/etc/", 0755), fstest.CreateFile("/etc/hosts", []byte("127.0.0.1 localhost"), 0644), fstest.Link("/etc/hosts", "/etc/hosts.allow"), fstest.CreateDir("/usr/local/lib", 0755), fstest.CreateFile("/usr/local/lib/libnothing.so", []byte{0x00, 0x00}, 0755), fstest.Symlink("libnothing.so", "/usr/local/lib/libnothing.so.2"), fstest.CreateDir("/home", 0755), fstest.CreateDir("/home/derek", 0700), ) func TestUnpack(t *testing.T) { requireTar(t) if err := testApply(baseApplier); err != nil { t.Fatalf("Test apply failed: %+v", err) } } func TestBaseDiff(t *testing.T) { requireTar(t) if err := testBaseDiff(baseApplier); err != nil { t.Fatalf("Test base diff failed: %+v", err) } } func TestRelativeSymlinks(t *testing.T) { breakoutLinks := []fstest.Applier{ fstest.Apply( baseApplier, fstest.Symlink("../other", "/home/derek/other"), fstest.Symlink("../../etc", "/home/derek/etc"), fstest.Symlink("up/../../other", "/home/derek/updown"), ), fstest.Apply( baseApplier, fstest.Symlink("../../../breakout", "/home/derek/breakout"), ), fstest.Apply( baseApplier, fstest.Symlink("../../breakout", "/breakout"), ), fstest.Apply( baseApplier, fstest.Symlink("etc/../../upandout", "/breakout"), ), fstest.Apply( baseApplier, fstest.Symlink("derek/../../../downandout", "/home/breakout"), ), fstest.Apply( baseApplier, fstest.Symlink("/etc", "localetc"), ), } for _, bo := range breakoutLinks { if err := testDiffApply(bo); err != nil { t.Fatalf("Test apply failed: %+v", err) } } } func TestSymlinks(t *testing.T) { links := [][2]fstest.Applier{ { fstest.Apply( fstest.CreateDir("/bin/", 0755), fstest.CreateFile("/bin/superbinary", []byte{0x00, 0x00}, 0755), fstest.Symlink("../bin/superbinary", "/bin/other1"), ), fstest.Apply( fstest.Remove("/bin/other1"), fstest.Symlink("/bin/superbinary", "/bin/other1"), fstest.Symlink("../bin/superbinary", "/bin/other2"), fstest.Symlink("superbinary", "/bin/other3"), ), }, { fstest.Apply( fstest.CreateDir("/bin/", 0755), fstest.CreateDir("/sbin/", 0755), fstest.CreateFile("/sbin/superbinary", []byte{0x00, 0x00}, 0755), fstest.Symlink("/sbin/superbinary", "/bin/superbinary"), fstest.Symlink("../bin/superbinary", "/bin/other1"), ), fstest.Apply( fstest.Remove("/bin/other1"), fstest.Symlink("/bin/superbinary", "/bin/other1"), fstest.Symlink("superbinary", "/bin/other2"), ), }, { fstest.Apply( fstest.CreateDir("/bin/", 0755), fstest.CreateDir("/sbin/", 0755), fstest.CreateFile("/sbin/superbinary", []byte{0x00, 0x00}, 0755), fstest.Symlink("../sbin/superbinary", "/bin/superbinary"), fstest.Symlink("../bin/superbinary", "/bin/other1"), ), fstest.Apply( fstest.Remove("/bin/other1"), fstest.Symlink("/bin/superbinary", "/bin/other1"), ), }, { fstest.Apply( fstest.CreateDir("/bin/", 0755), fstest.CreateFile("/bin/actualbinary", []byte{0x00, 0x00}, 0755), fstest.Symlink("actualbinary", "/bin/superbinary"), fstest.Symlink("../bin/superbinary", "/bin/other1"), fstest.Symlink("superbinary", "/bin/other2"), ), fstest.Apply( fstest.Remove("/bin/other1"), fstest.Remove("/bin/other2"), fstest.Symlink("/bin/superbinary", "/bin/other1"), fstest.Symlink("superbinary", "/bin/other2"), ), }, { fstest.Apply( fstest.CreateDir("/bin/", 0755), fstest.CreateFile("/bin/actualbinary", []byte{0x00, 0x00}, 0755), fstest.Symlink("actualbinary", "/bin/myapp"), ), fstest.Apply( fstest.Remove("/bin/myapp"), fstest.CreateDir("/bin/myapp", 0755), ), }, } for i, l := range links { if err := testDiffApply(l[0], l[1]); err != nil { t.Fatalf("Test[%d] apply failed: %+v", i+1, err) } } } func TestBreakouts(t *testing.T) { tc := TarContext{}.WithUIDGID(os.Getuid(), os.Getgid()).WithModTime(time.Now().UTC()) expected := "unbroken" unbrokenCheck := func(root string) error { b, err := ioutil.ReadFile(filepath.Join(root, "etc", "unbroken")) if err != nil { return errors.Wrap(err, "failed to read unbroken") } if string(b) != expected { return errors.Errorf("/etc/unbroken: unexpected value %s, expected %s", b, expected) } return nil } errFileDiff := errors.New("files differ") sameFile := func(f1, f2 string) func(string) error { return func(root string) error { p1, err := fs.RootPath(root, f1) if err != nil { return err } p2, err := fs.RootPath(root, f2) if err != nil { return err } s1, err := os.Stat(p1) if err != nil { return err } s2, err := os.Stat(p2) if err != nil { return err } if !os.SameFile(s1, s2) { return errors.Wrapf(errFileDiff, "%#v and %#v", s1, s2) } return nil } } notSameFile := func(f1, f2 string) func(string) error { same := sameFile(f1, f2) return func(root string) error { err := same(root) if err == nil { return errors.New("files are the same, expected diff") } if errors.Cause(err) != errFileDiff { return err } return nil } } fileValue := func(f1 string, content []byte) func(string) error { return func(root string) error { b, err := ioutil.ReadFile(filepath.Join(root, f1)) if err != nil { return err } if bytes.Compare(b, content) != 0 { return errors.Errorf("content differs: expected %v, got %v", content, b) } return nil } } fileNotExists := func(f1 string) func(string) error { return func(root string) error { _, err := os.Lstat(filepath.Join(root, f1)) if err == nil { return errors.New("file exists") } else if !os.IsNotExist(err) { return err } return nil } } all := func(funcs ...func(string) error) func(string) error { return func(root string) error { for _, f := range funcs { if err := f(root); err != nil { return err } } return nil } } breakouts := []struct { name string w WriterToTar apply fstest.Applier validator func(string) error err error }{ { name: "SymlinkAbsolute", w: TarAll( tc.Dir("etc", 0755), tc.Symlink("/etc", "localetc"), tc.File("/localetc/unbroken", []byte(expected), 0644), ), validator: unbrokenCheck, }, { name: "SymlinkUpAndOut", w: TarAll( tc.Dir("etc", 0755), tc.Dir("dummy", 0755), tc.Symlink("/dummy/../etc", "localetc"), tc.File("/localetc/unbroken", []byte(expected), 0644), ), validator: unbrokenCheck, }, { name: "SymlinkMultipleAbsolute", w: TarAll( tc.Dir("etc", 0755), tc.Dir("dummy", 0755), tc.Symlink("/etc", "/dummy/etc"), tc.Symlink("/dummy/etc", "localetc"), tc.File("/dummy/etc/unbroken", []byte(expected), 0644), ), validator: unbrokenCheck, }, { name: "SymlinkMultipleRelative", w: TarAll( tc.Dir("etc", 0755), tc.Dir("dummy", 0755), tc.Symlink("/etc", "/dummy/etc"), tc.Symlink("./dummy/etc", "localetc"), tc.File("/dummy/etc/unbroken", []byte(expected), 0644), ), validator: unbrokenCheck, }, { name: "SymlinkEmptyFile", w: TarAll( tc.Dir("etc", 0755), tc.File("etc/emptied", []byte("notempty"), 0644), tc.Symlink("/etc", "localetc"), tc.File("/localetc/emptied", []byte{}, 0644), ), validator: func(root string) error { b, err := ioutil.ReadFile(filepath.Join(root, "etc", "emptied")) if err != nil { return errors.Wrap(err, "failed to read unbroken") } if len(b) > 0 { return errors.Errorf("/etc/emptied: non-empty") } return nil }, }, { name: "HardlinkRelative", w: TarAll( tc.Dir("etc", 0770), tc.File("/etc/passwd", []byte("inside"), 0644), tc.Dir("breakouts", 0755), tc.Symlink("../../etc", "breakouts/d1"), tc.Link("/breakouts/d1/passwd", "breakouts/mypasswd"), ), validator: sameFile("/breakouts/mypasswd", "/etc/passwd"), }, { name: "HardlinkDownAndOut", w: TarAll( tc.Dir("etc", 0770), tc.File("/etc/passwd", []byte("inside"), 0644), tc.Dir("breakouts", 0755), tc.Dir("downandout", 0755), tc.Symlink("../downandout/../../etc", "breakouts/d1"), tc.Link("/breakouts/d1/passwd", "breakouts/mypasswd"), ), validator: sameFile("/breakouts/mypasswd", "/etc/passwd"), }, { name: "HardlinkAbsolute", w: TarAll( tc.Dir("etc", 0770), tc.File("/etc/passwd", []byte("inside"), 0644), tc.Symlink("/etc", "localetc"), tc.Link("/localetc/passwd", "localpasswd"), ), validator: sameFile("localpasswd", "/etc/passwd"), }, { name: "HardlinkRelativeLong", w: TarAll( tc.Dir("etc", 0770), tc.File("/etc/passwd", []byte("inside"), 0644), tc.Symlink("../../../../../../../etc", "localetc"), tc.Link("/localetc/passwd", "localpasswd"), ), validator: sameFile("localpasswd", "/etc/passwd"), }, { name: "HardlinkRelativeUpAndOut", w: TarAll( tc.Dir("etc", 0770), tc.File("/etc/passwd", []byte("inside"), 0644), tc.Symlink("upandout/../../../etc", "localetc"), tc.Link("/localetc/passwd", "localpasswd"), ), validator: sameFile("localpasswd", "/etc/passwd"), }, { name: "HardlinkDirectRelative", w: TarAll( tc.Dir("etc", 0770), tc.File("/etc/passwd", []byte("inside"), 0644), tc.Link("../../../../../etc/passwd", "localpasswd"), ), validator: sameFile("localpasswd", "/etc/passwd"), }, { name: "HardlinkDirectAbsolute", w: TarAll( tc.Dir("etc", 0770), tc.File("/etc/passwd", []byte("inside"), 0644), tc.Link("/etc/passwd", "localpasswd"), ), validator: sameFile("localpasswd", "/etc/passwd"), }, { name: "HardlinkSymlinkRelative", w: TarAll( tc.Dir("etc", 0770), tc.File("/etc/passwd", []byte("inside"), 0644), tc.Symlink("../../../../../etc/passwd", "passwdlink"), tc.Link("/passwdlink", "localpasswd"), ), validator: sameFile("/localpasswd", "/etc/passwd"), }, { name: "HardlinkSymlinkAbsolute", w: TarAll( tc.Dir("etc", 0770), tc.File("/etc/passwd", []byte("inside"), 0644), tc.Symlink("/etc/passwd", "passwdlink"), tc.Link("/passwdlink", "localpasswd"), ), validator: sameFile("/localpasswd", "/etc/passwd"), }, { name: "SymlinkParentDirectory", w: TarAll( tc.Dir("etc", 0770), tc.File("/etc/passwd", []byte("inside"), 0644), tc.Symlink("/etc/", ".."), tc.Link("/etc/passwd", "localpasswd"), ), validator: sameFile("/localpasswd", "/etc/passwd"), }, { name: "SymlinkEmptyFilename", w: TarAll( tc.Dir("etc", 0770), tc.File("/etc/passwd", []byte("inside"), 0644), tc.Symlink("/etc/", ""), tc.Link("/etc/passwd", "localpasswd"), ), validator: sameFile("/localpasswd", "/etc/passwd"), }, { name: "SymlinkParentRelative", w: TarAll( tc.Dir("etc", 0770), tc.File("/etc/passwd", []byte("inside"), 0644), tc.Symlink("/etc/", "localetc/sub/.."), tc.Link("/etc/passwd", "/localetc/localpasswd"), ), validator: sameFile("/localetc/localpasswd", "/etc/passwd"), }, { name: "SymlinkSlashEnded", w: TarAll( tc.Dir("etc", 0770), tc.File("/etc/passwd", []byte("inside"), 0644), tc.Dir("localetc/", 0770), tc.Link("/etc/passwd", "/localetc/localpasswd"), ), validator: sameFile("/localetc/localpasswd", "/etc/passwd"), }, { name: "SymlinkOverrideDirectory", apply: fstest.Apply( fstest.CreateDir("/etc/", 0755), fstest.CreateFile("/etc/passwd", []byte("inside"), 0644), fstest.CreateDir("/localetc/", 0755), ), w: TarAll( tc.Symlink("/etc", "localetc"), tc.Link("/etc/passwd", "/localetc/localpasswd"), ), validator: sameFile("/localetc/localpasswd", "/etc/passwd"), }, { name: "SymlinkOverrideDirectoryRelative", apply: fstest.Apply( fstest.CreateDir("/etc/", 0755), fstest.CreateFile("/etc/passwd", []byte("inside"), 0644), fstest.CreateDir("/localetc/", 0755), ), w: TarAll( tc.Symlink("../../etc", "localetc"), tc.Link("/etc/passwd", "/localetc/localpasswd"), ), validator: sameFile("/localetc/localpasswd", "/etc/passwd"), }, { name: "DirectoryOverrideSymlink", apply: fstest.Apply( fstest.CreateDir("/etc/", 0755), fstest.CreateFile("/etc/passwd", []byte("inside"), 0644), fstest.Symlink("/etc", "localetc"), ), w: TarAll( tc.Dir("/localetc/", 0755), tc.Link("/etc/passwd", "/localetc/localpasswd"), ), validator: sameFile("/localetc/localpasswd", "/etc/passwd"), }, { name: "DirectoryOverrideSymlinkAndHardlink", apply: fstest.Apply( fstest.CreateDir("/etc/", 0755), fstest.CreateFile("/etc/passwd", []byte("inside"), 0644), fstest.Symlink("etc", "localetc"), fstest.Link("/etc/passwd", "/localetc/localpasswd"), ), w: TarAll( tc.Dir("/localetc/", 0755), tc.File("/localetc/localpasswd", []byte("different"), 0644), ), validator: notSameFile("/localetc/localpasswd", "/etc/passwd"), }, { name: "WhiteoutRootParent", apply: fstest.Apply( fstest.CreateDir("/etc/", 0755), fstest.CreateFile("/etc/passwd", []byte("inside"), 0644), ), w: TarAll( tc.File(".wh...", []byte{}, 0644), // Should wipe out whole directory ), err: errInvalidArchive, }, { name: "WhiteoutParent", apply: fstest.Apply( fstest.CreateDir("/etc/", 0755), fstest.CreateFile("/etc/passwd", []byte("inside"), 0644), ), w: TarAll( tc.File("etc/.wh...", []byte{}, 0644), ), err: errInvalidArchive, }, { name: "WhiteoutRoot", apply: fstest.Apply( fstest.CreateDir("/etc/", 0755), fstest.CreateFile("/etc/passwd", []byte("inside"), 0644), ), w: TarAll( tc.File(".wh..", []byte{}, 0644), ), err: errInvalidArchive, }, { name: "WhiteoutCurrentDirectory", apply: fstest.Apply( fstest.CreateDir("/etc/", 0755), fstest.CreateFile("/etc/passwd", []byte("inside"), 0644), ), w: TarAll( tc.File("etc/.wh..", []byte{}, 0644), // Should wipe out whole directory ), err: errInvalidArchive, }, { name: "WhiteoutSymlink", apply: fstest.Apply( fstest.CreateDir("/etc/", 0755), fstest.CreateFile("/etc/passwd", []byte("all users"), 0644), fstest.Symlink("/etc", "localetc"), ), w: TarAll( tc.File(".wh.localetc", []byte{}, 0644), // Should wipe out whole directory ), validator: all( fileValue("etc/passwd", []byte("all users")), fileNotExists("localetc"), ), }, { // TODO: This test should change once archive apply is disallowing // symlinks as parents in the name name: "WhiteoutSymlinkPath", apply: fstest.Apply( fstest.CreateDir("/etc/", 0755), fstest.CreateFile("/etc/passwd", []byte("all users"), 0644), fstest.CreateFile("/etc/whitedout", []byte("ahhhh whiteout"), 0644), fstest.Symlink("/etc", "localetc"), ), w: TarAll( tc.File("localetc/.wh.whitedout", []byte{}, 0644), ), validator: all( fileValue("etc/passwd", []byte("all users")), fileNotExists("etc/whitedout"), ), }, { name: "WhiteoutDirectoryName", apply: fstest.Apply( fstest.CreateDir("/etc/", 0755), fstest.CreateFile("/etc/passwd", []byte("all users"), 0644), fstest.CreateFile("/etc/whitedout", []byte("ahhhh whiteout"), 0644), fstest.Symlink("/etc", "localetc"), ), w: TarAll( tc.File(".wh.etc/somefile", []byte("non-empty"), 0644), ), validator: all( fileValue("etc/passwd", []byte("all users")), fileValue(".wh.etc/somefile", []byte("non-empty")), ), }, { name: "WhiteoutDeadSymlinkParent", apply: fstest.Apply( fstest.CreateDir("/etc/", 0755), fstest.CreateFile("/etc/passwd", []byte("all users"), 0644), fstest.Symlink("/dne", "localetc"), ), w: TarAll( tc.File("localetc/.wh.etc", []byte{}, 0644), ), // no-op, remove does not validator: fileValue("etc/passwd", []byte("all users")), }, { name: "WhiteoutRelativePath", apply: fstest.Apply( fstest.CreateDir("/etc/", 0755), fstest.CreateFile("/etc/passwd", []byte("all users"), 0644), fstest.Symlink("/dne", "localetc"), ), w: TarAll( tc.File("dne/../.wh.etc", []byte{}, 0644), ), // resolution ends up just removing etc validator: fileNotExists("etc/passwd"), }, } for _, bo := range breakouts { t.Run(bo.name, makeWriterToTarTest(bo.w, bo.apply, bo.validator, bo.err)) } } func TestDiffApply(t *testing.T) { fstest.FSSuite(t, diffApplier{}) } func TestApplyTar(t *testing.T) { tc := TarContext{}.WithUIDGID(os.Getuid(), os.Getgid()).WithModTime(time.Now().UTC()) directoriesExist := func(dirs ...string) func(string) error { return func(root string) error { for _, d := range dirs { p, err := fs.RootPath(root, d) if err != nil { return err } if _, err := os.Stat(p); err != nil { return errors.Wrapf(err, "failure checking existance for %v", d) } } return nil } } tests := []struct { name string w WriterToTar apply fstest.Applier validator func(string) error err error }{ { name: "DirectoryCreation", apply: fstest.Apply( fstest.CreateDir("/etc/", 0755), ), w: TarAll( tc.Dir("/etc/subdir", 0755), tc.Dir("/etc/subdir2/", 0755), tc.Dir("/etc/subdir2/more", 0755), tc.Dir("/other/noparent-1/1", 0755), tc.Dir("/other/noparent-2/2/", 0755), ), validator: directoriesExist( "etc/subdir", "etc/subdir2", "etc/subdir2/more", "other/noparent-1/1", "other/noparent-2/2", ), }, } for _, at := range tests { t.Run(at.name, makeWriterToTarTest(at.w, at.apply, at.validator, at.err)) } } func testApply(a fstest.Applier) error { td, err := ioutil.TempDir("", "test-apply-") if err != nil { return errors.Wrap(err, "failed to create temp dir") } defer os.RemoveAll(td) dest, err := ioutil.TempDir("", "test-apply-dest-") if err != nil { return errors.Wrap(err, "failed to create temp dir") } defer os.RemoveAll(dest) if err := a.Apply(td); err != nil { return errors.Wrap(err, "failed to apply filesystem changes") } tarArgs := []string{"c", "-C", td} names, err := readDirNames(td) if err != nil { return errors.Wrap(err, "failed to read directory names") } tarArgs = append(tarArgs, names...) cmd := exec.Command(tarCmd, tarArgs...) arch, err := cmd.StdoutPipe() if err != nil { return errors.Wrap(err, "failed to create stdout pipe") } if err := cmd.Start(); err != nil { return errors.Wrap(err, "failed to start command") } if _, err := Apply(context.Background(), dest, arch); err != nil { return errors.Wrap(err, "failed to apply tar stream") } return fstest.CheckDirectoryEqual(td, dest) } func testBaseDiff(a fstest.Applier) error { td, err := ioutil.TempDir("", "test-base-diff-") if err != nil { return errors.Wrap(err, "failed to create temp dir") } defer os.RemoveAll(td) dest, err := ioutil.TempDir("", "test-base-diff-dest-") if err != nil { return errors.Wrap(err, "failed to create temp dir") } defer os.RemoveAll(dest) if err := a.Apply(td); err != nil { return errors.Wrap(err, "failed to apply filesystem changes") } arch := Diff(context.Background(), "", td) cmd := exec.Command(tarCmd, "x", "-C", dest) cmd.Stdin = arch if err := cmd.Run(); err != nil { return errors.Wrap(err, "tar command failed") } return fstest.CheckDirectoryEqual(td, dest) } func testDiffApply(appliers ...fstest.Applier) error { td, err := ioutil.TempDir("", "test-diff-apply-") if err != nil { return errors.Wrap(err, "failed to create temp dir") } defer os.RemoveAll(td) dest, err := ioutil.TempDir("", "test-diff-apply-dest-") if err != nil { return errors.Wrap(err, "failed to create temp dir") } defer os.RemoveAll(dest) for _, a := range appliers { if err := a.Apply(td); err != nil { return errors.Wrap(err, "failed to apply filesystem changes") } } // Apply base changes before diff if len(appliers) > 1 { for _, a := range appliers[:len(appliers)-1] { if err := a.Apply(dest); err != nil { return errors.Wrap(err, "failed to apply base filesystem changes") } } } diffBytes, err := ioutil.ReadAll(Diff(context.Background(), dest, td)) if err != nil { return errors.Wrap(err, "failed to create diff") } if _, err := Apply(context.Background(), dest, bytes.NewReader(diffBytes)); err != nil { return errors.Wrap(err, "failed to apply tar stream") } return fstest.CheckDirectoryEqual(td, dest) } func makeWriterToTarTest(wt WriterToTar, a fstest.Applier, validate func(string) error, applyErr error) func(*testing.T) { return func(t *testing.T) { td, err := ioutil.TempDir("", "test-writer-to-tar-") if err != nil { t.Fatalf("Failed to create temp dir: %v", err) } defer os.RemoveAll(td) if a != nil { if err := a.Apply(td); err != nil { t.Fatalf("Failed to apply filesystem to directory: %v", err) } } tr := TarFromWriterTo(wt) if _, err := Apply(context.Background(), td, tr); err != nil { if applyErr == nil { t.Fatalf("Failed to apply tar: %v", err) } else if errors.Cause(err) != applyErr { t.Fatalf("Unexpected apply error: %v, expected %v", err, applyErr) } return } else if applyErr != nil { t.Fatalf("Expected apply error, got none: %v", applyErr) } if validate != nil { if err := validate(td); err != nil { t.Errorf("Validation failed: %v", err) } } } } func TestDiffTar(t *testing.T) { tests := []struct { name string validators []tarEntryValidator a fstest.Applier b fstest.Applier }{ { name: "EmptyDiff", validators: []tarEntryValidator{}, a: fstest.Apply( fstest.CreateDir("/etc/", 0755), ), b: fstest.Apply(), }, { name: "ParentInclusion", validators: []tarEntryValidator{ dirEntry("d1/", 0755), dirEntry("d1/d/", 0700), dirEntry("d2/", 0770), fileEntry("d2/f", []byte("ok"), 0644), }, a: fstest.Apply( fstest.CreateDir("/d1/", 0755), fstest.CreateDir("/d2/", 0770), ), b: fstest.Apply( fstest.CreateDir("/d1/d", 0700), fstest.CreateFile("/d2/f", []byte("ok"), 0644), ), }, { name: "HardlinkParentInclusion", validators: []tarEntryValidator{ dirEntry("d2/", 0755), fileEntry("d2/l1", []byte("link me"), 0644), // d1/f1 and its parent is included after the new link, // before the new link was included, these files would // not habe needed dirEntry("d1/", 0755), linkEntry("d1/f1", "d2/l1"), dirEntry("d3/", 0755), fileEntry("d3/l1", []byte("link me"), 0644), dirEntry("d4/", 0755), linkEntry("d4/f1", "d3/l1"), whiteoutEntry("d6/l1"), whiteoutEntry("d6/l2"), }, a: fstest.Apply( fstest.CreateDir("/d1/", 0755), fstest.CreateFile("/d1/f1", []byte("link me"), 0644), fstest.CreateDir("/d2/", 0755), fstest.CreateFile("/d2/f1", []byte("link me"), 0644), fstest.CreateDir("/d3/", 0755), fstest.CreateDir("/d4/", 0755), fstest.CreateFile("/d4/f1", []byte("link me"), 0644), fstest.CreateDir("/d5/", 0755), fstest.CreateFile("/d5/f1", []byte("link me"), 0644), fstest.CreateDir("/d6/", 0755), fstest.Link("/d1/f1", "/d6/l1"), fstest.Link("/d5/f1", "/d6/l2"), ), b: fstest.Apply( fstest.Link("/d1/f1", "/d2/l1"), fstest.Link("/d4/f1", "/d3/l1"), fstest.Remove("/d6/l1"), fstest.Remove("/d6/l2"), ), }, } for _, at := range tests { t.Run(at.name, makeDiffTarTest(at.validators, at.a, at.b)) } } type tarEntryValidator func(*tar.Header, []byte) error func dirEntry(name string, mode int) tarEntryValidator { return func(hdr *tar.Header, b []byte) error { if hdr.Typeflag != tar.TypeDir { return errors.New("not directory type") } if hdr.Name != name { return errors.Errorf("wrong name %q, expected %q", hdr.Name, name) } if hdr.Mode != int64(mode) { return errors.Errorf("wrong mode %o, expected %o", hdr.Mode, mode) } return nil } } func fileEntry(name string, expected []byte, mode int) tarEntryValidator { return func(hdr *tar.Header, b []byte) error { if hdr.Typeflag != tar.TypeReg { return errors.New("not file type") } if hdr.Name != name { return errors.Errorf("wrong name %q, expected %q", hdr.Name, name) } if hdr.Mode != int64(mode) { return errors.Errorf("wrong mode %o, expected %o", hdr.Mode, mode) } if bytes.Compare(b, expected) != 0 { return errors.Errorf("different file content") } return nil } } func linkEntry(name, link string) tarEntryValidator { return func(hdr *tar.Header, b []byte) error { if hdr.Typeflag != tar.TypeLink { return errors.New("not link type") } if hdr.Name != name { return errors.Errorf("wrong name %q, expected %q", hdr.Name, name) } if hdr.Linkname != link { return errors.Errorf("wrong link %q, expected %q", hdr.Linkname, link) } return nil } } func whiteoutEntry(name string) tarEntryValidator { whiteOutDir := filepath.Dir(name) whiteOutBase := filepath.Base(name) whiteOut := filepath.Join(whiteOutDir, whiteoutPrefix+whiteOutBase) return func(hdr *tar.Header, b []byte) error { if hdr.Typeflag != tar.TypeReg { return errors.Errorf("not file type: %q", hdr.Typeflag) } if hdr.Name != whiteOut { return errors.Errorf("wrong name %q, expected whiteout %q", hdr.Name, name) } return nil } } func makeDiffTarTest(validators []tarEntryValidator, a, b fstest.Applier) func(*testing.T) { return func(t *testing.T) { ad, err := ioutil.TempDir("", "test-make-diff-tar-") if err != nil { t.Fatalf("failed to create temp dir: %v", err) } defer os.RemoveAll(ad) if err := a.Apply(ad); err != nil { t.Fatalf("failed to apply a: %v", err) } bd, err := ioutil.TempDir("", "test-make-diff-tar-") if err != nil { t.Fatalf("failed to create temp dir: %v", err) } defer os.RemoveAll(bd) if err := fs.CopyDir(bd, ad); err != nil { t.Fatalf("failed to copy dir: %v", err) } if err := b.Apply(bd); err != nil { t.Fatalf("failed to apply b: %v", err) } rc := Diff(context.Background(), ad, bd) defer rc.Close() tr := tar.NewReader(rc) for i := 0; ; i++ { hdr, err := tr.Next() if err != nil { if err == io.EOF { break } t.Fatalf("tar read error: %v", err) } var b []byte if hdr.Typeflag == tar.TypeReg && hdr.Size > 0 { b, err = ioutil.ReadAll(tr) if err != nil { t.Fatalf("tar read file error: %v", err) } } if i >= len(validators) { t.Fatal("no validator for entry") } if err := validators[i](hdr, b); err != nil { t.Fatalf("tar entry[%d] validation fail: %#v", i, err) } } } } type diffApplier struct{} func (d diffApplier) TestContext(ctx context.Context) (context.Context, func(), error) { base, err := ioutil.TempDir("", "test-diff-apply-") if err != nil { return ctx, nil, errors.Wrap(err, "failed to create temp dir") } return context.WithValue(ctx, d, base), func() { os.RemoveAll(base) }, nil } func (d diffApplier) Apply(ctx context.Context, a fstest.Applier) (string, func(), error) { base := ctx.Value(d).(string) applyCopy, err := ioutil.TempDir("", "test-diffapply-apply-copy-") if err != nil { return "", nil, errors.Wrap(err, "failed to create temp dir") } defer os.RemoveAll(applyCopy) if err = fs.CopyDir(applyCopy, base); err != nil { return "", nil, errors.Wrap(err, "failed to copy base") } if err := a.Apply(applyCopy); err != nil { return "", nil, errors.Wrap(err, "failed to apply changes to copy of base") } diffBytes, err := ioutil.ReadAll(Diff(ctx, base, applyCopy)) if err != nil { return "", nil, errors.Wrap(err, "failed to create diff") } if _, err = Apply(ctx, base, bytes.NewReader(diffBytes)); err != nil { return "", nil, errors.Wrap(err, "failed to apply tar stream") } return base, nil, nil } func readDirNames(p string) ([]string, error) { fis, err := ioutil.ReadDir(p) if err != nil { return nil, err } names := make([]string, len(fis)) for i, fi := range fis { names[i] = fi.Name() } return names, nil } func requireTar(t *testing.T) { if _, err := exec.LookPath(tarCmd); err != nil { t.Skipf("%s not found, skipping", tarCmd) } } // WriterToTar is an type which writes to a tar writer type WriterToTar interface { WriteTo(*tar.Writer) error } type writerToFn func(*tar.Writer) error func (w writerToFn) WriteTo(tw *tar.Writer) error { return w(tw) } // TarAll creates a WriterToTar which calls all the provided writers // in the order in which they are provided. func TarAll(wt ...WriterToTar) WriterToTar { return writerToFn(func(tw *tar.Writer) error { for _, w := range wt { if err := w.WriteTo(tw); err != nil { return err } } return nil }) } // TarFromWriterTo is used to create a tar stream from a tar record // creator. This can be used to manifacture more specific tar records // which allow testing specific tar cases which may be encountered // by the untar process. func TarFromWriterTo(wt WriterToTar) io.ReadCloser { r, w := io.Pipe() go func() { tw := tar.NewWriter(w) if err := wt.WriteTo(tw); err != nil { w.CloseWithError(err) return } w.CloseWithError(tw.Close()) }() return r } // TarContext is used to create tar records type TarContext struct { UID int GID int // ModTime sets the modtimes for all files, if nil the current time // is used for each file when it was written ModTime *time.Time Xattrs map[string]string } func (tc TarContext) newHeader(mode os.FileMode, name, link string, size int64) *tar.Header { ti := tarInfo{ name: name, mode: mode, size: size, modt: tc.ModTime, hdr: &tar.Header{ Uid: tc.UID, Gid: tc.GID, Xattrs: tc.Xattrs, }, } if mode&os.ModeSymlink == 0 && link != "" { ti.hdr.Typeflag = tar.TypeLink ti.hdr.Linkname = link } hdr, err := tar.FileInfoHeader(ti, link) if err != nil { // Only returns an error on bad input mode panic(err) } return hdr } type tarInfo struct { name string mode os.FileMode size int64 modt *time.Time hdr *tar.Header } func (ti tarInfo) Name() string { return ti.name } func (ti tarInfo) Size() int64 { return ti.size } func (ti tarInfo) Mode() os.FileMode { return ti.mode } func (ti tarInfo) ModTime() time.Time { if ti.modt != nil { return *ti.modt } return time.Now().UTC() } func (ti tarInfo) IsDir() bool { return (ti.mode & os.ModeDir) != 0 } func (ti tarInfo) Sys() interface{} { return ti.hdr } func (tc TarContext) WithUIDGID(uid, gid int) TarContext { ntc := tc ntc.UID = uid ntc.GID = gid return ntc } func (tc TarContext) WithModTime(modtime time.Time) TarContext { ntc := tc ntc.ModTime = &modtime return ntc } // WithXattrs adds these xattrs to all files, merges with any // previously added xattrs func (tc TarContext) WithXattrs(xattrs map[string]string) TarContext { ntc := tc if ntc.Xattrs == nil { ntc.Xattrs = map[string]string{} } for k, v := range xattrs { ntc.Xattrs[k] = v } return ntc } func (tc TarContext) File(name string, content []byte, perm os.FileMode) WriterToTar { return writerToFn(func(tw *tar.Writer) error { return writeHeaderAndContent(tw, tc.newHeader(perm, name, "", int64(len(content))), content) }) } func (tc TarContext) Dir(name string, perm os.FileMode) WriterToTar { return writerToFn(func(tw *tar.Writer) error { return writeHeaderAndContent(tw, tc.newHeader(perm|os.ModeDir, name, "", 0), nil) }) } func (tc TarContext) Symlink(oldname, newname string) WriterToTar { return writerToFn(func(tw *tar.Writer) error { return writeHeaderAndContent(tw, tc.newHeader(0777|os.ModeSymlink, newname, oldname, 0), nil) }) } func (tc TarContext) Link(oldname, newname string) WriterToTar { return writerToFn(func(tw *tar.Writer) error { return writeHeaderAndContent(tw, tc.newHeader(0777, newname, oldname, 0), nil) }) } func writeHeaderAndContent(tw *tar.Writer, h *tar.Header, b []byte) error { if h.Size != int64(len(b)) { return errors.New("bad content length") } if err := tw.WriteHeader(h); err != nil { return err } if len(b) > 0 { if _, err := tw.Write(b); err != nil { return err } } return nil } docker-containerd-tags-docker-17.12.1/archive/tar_unix.go000066400000000000000000000055641322771672400233050ustar00rootroot00000000000000// +build !windows package archive import ( "os" "sync" "syscall" "github.com/containerd/continuity/sysx" "github.com/dmcgowan/go-tar" "github.com/opencontainers/runc/libcontainer/system" "github.com/pkg/errors" "golang.org/x/sys/unix" ) func tarName(p string) (string, error) { return p, nil } func chmodTarEntry(perm os.FileMode) os.FileMode { return perm } func setHeaderForSpecialDevice(hdr *tar.Header, name string, fi os.FileInfo) error { s, ok := fi.Sys().(*syscall.Stat_t) if !ok { return errors.New("unsupported stat type") } // Currently go does not fill in the major/minors if s.Mode&syscall.S_IFBLK != 0 || s.Mode&syscall.S_IFCHR != 0 { hdr.Devmajor = int64(unix.Major(uint64(s.Rdev))) hdr.Devminor = int64(unix.Minor(uint64(s.Rdev))) } return nil } func open(p string) (*os.File, error) { return os.Open(p) } func openFile(name string, flag int, perm os.FileMode) (*os.File, error) { f, err := os.OpenFile(name, flag, perm) if err != nil { return nil, err } // Call chmod to avoid permission mask if err := os.Chmod(name, perm); err != nil { return nil, err } return f, err } func mkdirAll(path string, perm os.FileMode) error { return os.MkdirAll(path, perm) } func mkdir(path string, perm os.FileMode) error { if err := os.Mkdir(path, perm); err != nil { return err } // Only final created directory gets explicit permission // call to avoid permission mask return os.Chmod(path, perm) } func skipFile(*tar.Header) bool { return false } var ( inUserNS bool nsOnce sync.Once ) func setInUserNS() { inUserNS = system.RunningInUserNS() } // handleTarTypeBlockCharFifo is an OS-specific helper function used by // createTarFile to handle the following types of header: Block; Char; Fifo func handleTarTypeBlockCharFifo(hdr *tar.Header, path string) error { nsOnce.Do(setInUserNS) if inUserNS { // cannot create a device if running in user namespace return nil } mode := uint32(hdr.Mode & 07777) switch hdr.Typeflag { case tar.TypeBlock: mode |= unix.S_IFBLK case tar.TypeChar: mode |= unix.S_IFCHR case tar.TypeFifo: mode |= unix.S_IFIFO } return unix.Mknod(path, mode, int(unix.Mkdev(uint32(hdr.Devmajor), uint32(hdr.Devminor)))) } func handleLChmod(hdr *tar.Header, path string, hdrInfo os.FileInfo) error { if hdr.Typeflag == tar.TypeLink { if fi, err := os.Lstat(hdr.Linkname); err == nil && (fi.Mode()&os.ModeSymlink == 0) { if err := os.Chmod(path, hdrInfo.Mode()); err != nil { return err } } } else if hdr.Typeflag != tar.TypeSymlink { if err := os.Chmod(path, hdrInfo.Mode()); err != nil { return err } } return nil } func getxattr(path, attr string) ([]byte, error) { b, err := sysx.LGetxattr(path, attr) if err == unix.ENOTSUP || err == sysx.ENODATA { return nil, nil } return b, err } func setxattr(path, key, value string) error { return sysx.LSetxattr(path, key, []byte(value), 0) } docker-containerd-tags-docker-17.12.1/archive/tar_windows.go000066400000000000000000000064551322771672400240140ustar00rootroot00000000000000package archive import ( "errors" "fmt" "os" "strings" "github.com/containerd/containerd/sys" "github.com/dmcgowan/go-tar" ) // tarName returns platform-specific filepath // to canonical posix-style path for tar archival. p is relative // path. func tarName(p string) (string, error) { // windows: convert windows style relative path with backslashes // into forward slashes. Since windows does not allow '/' or '\' // in file names, it is mostly safe to replace however we must // check just in case if strings.Contains(p, "/") { return "", fmt.Errorf("Windows path contains forward slash: %s", p) } return strings.Replace(p, string(os.PathSeparator), "/", -1), nil } // chmodTarEntry is used to adjust the file permissions used in tar header based // on the platform the archival is done. func chmodTarEntry(perm os.FileMode) os.FileMode { perm &= 0755 // Add the x bit: make everything +x from windows perm |= 0111 return perm } func setHeaderForSpecialDevice(*tar.Header, string, os.FileInfo) error { // do nothing. no notion of Rdev, Inode, Nlink in stat on Windows return nil } func open(p string) (*os.File, error) { // We use sys.OpenSequential to ensure we use sequential file // access on Windows to avoid depleting the standby list. return sys.OpenSequential(p) } func openFile(name string, flag int, perm os.FileMode) (*os.File, error) { // Source is regular file. We use sys.OpenFileSequential to use sequential // file access to avoid depleting the standby list on Windows. return sys.OpenFileSequential(name, flag, perm) } func mkdirAll(path string, perm os.FileMode) error { return sys.MkdirAll(path, perm) } func mkdir(path string, perm os.FileMode) error { return os.Mkdir(path, perm) } func skipFile(hdr *tar.Header) bool { // Windows does not support filenames with colons in them. Ignore // these files. This is not a problem though (although it might // appear that it is). Let's suppose a client is running docker pull. // The daemon it points to is Windows. Would it make sense for the // client to be doing a docker pull Ubuntu for example (which has files // with colons in the name under /usr/share/man/man3)? No, absolutely // not as it would really only make sense that they were pulling a // Windows image. However, for development, it is necessary to be able // to pull Linux images which are in the repository. // // TODO Windows. Once the registry is aware of what images are Windows- // specific or Linux-specific, this warning should be changed to an error // to cater for the situation where someone does manage to upload a Linux // image but have it tagged as Windows inadvertently. if strings.Contains(hdr.Name, ":") { return true } return false } // handleTarTypeBlockCharFifo is an OS-specific helper function used by // createTarFile to handle the following types of header: Block; Char; Fifo func handleTarTypeBlockCharFifo(hdr *tar.Header, path string) error { return nil } func handleLChmod(hdr *tar.Header, path string, hdrInfo os.FileInfo) error { return nil } func getxattr(path, attr string) ([]byte, error) { return nil, nil } func setxattr(path, key, value string) error { // Return not support error, do not wrap underlying not supported // since xattrs should not exist in windows diff archives return errors.New("xattrs not supported on Windows") } docker-containerd-tags-docker-17.12.1/archive/time.go000066400000000000000000000011041322771672400223740ustar00rootroot00000000000000package archive import ( "syscall" "time" "unsafe" ) var ( minTime = time.Unix(0, 0) maxTime time.Time ) func init() { if unsafe.Sizeof(syscall.Timespec{}.Nsec) == 8 { // This is a 64 bit timespec // os.Chtimes limits time to the following maxTime = time.Unix(0, 1<<63-1) } else { // This is a 32 bit timespec maxTime = time.Unix(1<<31-1, 0) } } func boundTime(t time.Time) time.Time { if t.Before(minTime) || t.After(maxTime) { return minTime } return t } func latestTime(t1, t2 time.Time) time.Time { if t1.Before(t2) { return t2 } return t1 } docker-containerd-tags-docker-17.12.1/archive/time_darwin.go000066400000000000000000000005441322771672400237470ustar00rootroot00000000000000package archive import ( "time" "github.com/pkg/errors" ) // as at MacOS 10.12 there is apparently no way to set timestamps // with nanosecond precision. We could fall back to utimes/lutimes // and lose the precision as a temporary workaround. func chtimes(path string, atime, mtime time.Time) error { return errors.New("OSX missing UtimesNanoAt") } docker-containerd-tags-docker-17.12.1/archive/time_unix.go000066400000000000000000000007511322771672400234460ustar00rootroot00000000000000// +build linux freebsd solaris package archive import ( "time" "golang.org/x/sys/unix" "github.com/pkg/errors" ) func chtimes(path string, atime, mtime time.Time) error { var utimes [2]unix.Timespec utimes[0] = unix.NsecToTimespec(atime.UnixNano()) utimes[1] = unix.NsecToTimespec(mtime.UnixNano()) if err := unix.UtimesNanoAt(unix.AT_FDCWD, path, utimes[0:], unix.AT_SYMLINK_NOFOLLOW); err != nil { return errors.Wrap(err, "failed call to UtimesNanoAt") } return nil } docker-containerd-tags-docker-17.12.1/archive/time_windows.go000066400000000000000000000013331322771672400241520ustar00rootroot00000000000000package archive import ( "time" "golang.org/x/sys/windows" ) // chtimes will set the create time on a file using the given modtime. // This requires calling SetFileTime and explicitly including the create time. func chtimes(path string, atime, mtime time.Time) error { ctimespec := windows.NsecToTimespec(mtime.UnixNano()) pathp, e := windows.UTF16PtrFromString(path) if e != nil { return e } h, e := windows.CreateFile(pathp, windows.FILE_WRITE_ATTRIBUTES, windows.FILE_SHARE_WRITE, nil, windows.OPEN_EXISTING, windows.FILE_FLAG_BACKUP_SEMANTICS, 0) if e != nil { return e } defer windows.Close(h) c := windows.NsecToFiletime(windows.TimespecToNsec(ctimespec)) return windows.SetFileTime(h, &c, nil, nil) } docker-containerd-tags-docker-17.12.1/benchmark_test.go000066400000000000000000000043271322771672400230200ustar00rootroot00000000000000package containerd import ( "fmt" "testing" "github.com/containerd/containerd/containers" "github.com/containerd/containerd/oci" ) func BenchmarkContainerCreate(b *testing.B) { client, err := newClient(b, address) if err != nil { b.Fatal(err) } defer client.Close() ctx, cancel := testContext() defer cancel() image, err := client.GetImage(ctx, testImage) if err != nil { b.Error(err) return } spec, err := oci.GenerateSpec(ctx, client, &containers.Container{ID: b.Name()}, oci.WithImageConfig(image), withTrue()) if err != nil { b.Error(err) return } var containers []Container defer func() { for _, c := range containers { if err := c.Delete(ctx, WithSnapshotCleanup); err != nil { b.Error(err) } } }() // reset the timer before creating containers b.ResetTimer() for i := 0; i < b.N; i++ { id := fmt.Sprintf("%s-%d", b.Name(), i) container, err := client.NewContainer(ctx, id, WithSpec(spec), WithNewSnapshot(id, image)) if err != nil { b.Error(err) return } containers = append(containers, container) } b.StopTimer() } func BenchmarkContainerStart(b *testing.B) { client, err := newClient(b, address) if err != nil { b.Fatal(err) } defer client.Close() ctx, cancel := testContext() defer cancel() image, err := client.GetImage(ctx, testImage) if err != nil { b.Error(err) return } spec, err := oci.GenerateSpec(ctx, client, &containers.Container{ID: b.Name()}, oci.WithImageConfig(image), withTrue()) if err != nil { b.Error(err) return } var containers []Container defer func() { for _, c := range containers { if err := c.Delete(ctx, WithSnapshotCleanup); err != nil { b.Error(err) } } }() for i := 0; i < b.N; i++ { id := fmt.Sprintf("%s-%d", b.Name(), i) container, err := client.NewContainer(ctx, id, WithSpec(spec), WithNewSnapshot(id, image)) if err != nil { b.Error(err) return } containers = append(containers, container) } // reset the timer before starting tasks b.ResetTimer() for _, c := range containers { task, err := c.NewTask(ctx, empty()) if err != nil { b.Error(err) return } defer task.Delete(ctx) if err := task.Start(ctx); err != nil { b.Error(err) return } } b.StopTimer() } docker-containerd-tags-docker-17.12.1/cio/000077500000000000000000000000001322771672400202445ustar00rootroot00000000000000docker-containerd-tags-docker-17.12.1/cio/io.go000066400000000000000000000077621322771672400212160ustar00rootroot00000000000000package cio import ( "context" "fmt" "io" "os" "sync" ) // Config holds the io configurations. type Config struct { // Terminal is true if one has been allocated Terminal bool // Stdin path Stdin string // Stdout path Stdout string // Stderr path Stderr string } // IO holds the io information for a task or process type IO interface { // Config returns the IO configuration. Config() Config // Cancel aborts all current io operations Cancel() // Wait blocks until all io copy operations have completed Wait() // Close cleans up all open io resources Close() error } // cio is a basic container IO implementation. type cio struct { config Config closer *wgCloser } func (c *cio) Config() Config { return c.config } func (c *cio) Cancel() { if c.closer == nil { return } c.closer.Cancel() } func (c *cio) Wait() { if c.closer == nil { return } c.closer.Wait() } func (c *cio) Close() error { if c.closer == nil { return nil } return c.closer.Close() } // Creation creates new IO sets for a task type Creation func(id string) (IO, error) // Attach allows callers to reattach to running tasks // // There should only be one reader for a task's IO set // because fifo's can only be read from one reader or the output // will be sent only to the first reads type Attach func(*FIFOSet) (IO, error) // NewIO returns an Creation that will provide IO sets without a terminal func NewIO(stdin io.Reader, stdout, stderr io.Writer) Creation { return NewIOWithTerminal(stdin, stdout, stderr, false) } // NewIOWithTerminal creates a new io set with the provied io.Reader/Writers for use with a terminal func NewIOWithTerminal(stdin io.Reader, stdout, stderr io.Writer, terminal bool) Creation { return func(id string) (_ IO, err error) { paths, err := NewFifos(id) if err != nil { return nil, err } defer func() { if err != nil && paths.Dir != "" { os.RemoveAll(paths.Dir) } }() cfg := Config{ Terminal: terminal, Stdout: paths.Out, Stderr: paths.Err, Stdin: paths.In, } i := &cio{config: cfg} set := &ioSet{ in: stdin, out: stdout, err: stderr, } closer, err := copyIO(paths, set, cfg.Terminal) if err != nil { return nil, err } i.closer = closer return i, nil } } // WithAttach attaches the existing io for a task to the provided io.Reader/Writers func WithAttach(stdin io.Reader, stdout, stderr io.Writer) Attach { return func(paths *FIFOSet) (IO, error) { if paths == nil { return nil, fmt.Errorf("cannot attach to existing fifos") } cfg := Config{ Terminal: paths.Terminal, Stdout: paths.Out, Stderr: paths.Err, Stdin: paths.In, } i := &cio{config: cfg} set := &ioSet{ in: stdin, out: stdout, err: stderr, } closer, err := copyIO(paths, set, cfg.Terminal) if err != nil { return nil, err } i.closer = closer return i, nil } } // Stdio returns an IO set to be used for a task // that outputs the container's IO as the current processes Stdio func Stdio(id string) (IO, error) { return NewIO(os.Stdin, os.Stdout, os.Stderr)(id) } // StdioTerminal will setup the IO for the task to use a terminal func StdioTerminal(id string) (IO, error) { return NewIOWithTerminal(os.Stdin, os.Stdout, os.Stderr, true)(id) } // NullIO redirects the container's IO into /dev/null func NullIO(id string) (IO, error) { return &cio{}, nil } // FIFOSet is a set of fifos for use with tasks type FIFOSet struct { // Dir is the directory holding the task fifos Dir string // In, Out, and Err fifo paths In, Out, Err string // Terminal returns true if a terminal is being used for the task Terminal bool } type ioSet struct { in io.Reader out, err io.Writer } type wgCloser struct { wg *sync.WaitGroup dir string set []io.Closer cancel context.CancelFunc } func (g *wgCloser) Wait() { g.wg.Wait() } func (g *wgCloser) Close() error { for _, f := range g.set { f.Close() } if g.dir != "" { return os.RemoveAll(g.dir) } return nil } func (g *wgCloser) Cancel() { g.cancel() } docker-containerd-tags-docker-17.12.1/cio/io_unix.go000066400000000000000000000076011322771672400222510ustar00rootroot00000000000000// +build !windows package cio import ( "context" "io" "io/ioutil" "os" "path/filepath" "sync" "syscall" "github.com/containerd/fifo" ) // NewFifos returns a new set of fifos for the task func NewFifos(id string) (*FIFOSet, error) { root := "/run/containerd/fifo" if err := os.MkdirAll(root, 0700); err != nil { return nil, err } dir, err := ioutil.TempDir(root, "") if err != nil { return nil, err } return &FIFOSet{ Dir: dir, In: filepath.Join(dir, id+"-stdin"), Out: filepath.Join(dir, id+"-stdout"), Err: filepath.Join(dir, id+"-stderr"), }, nil } func copyIO(fifos *FIFOSet, ioset *ioSet, tty bool) (_ *wgCloser, err error) { var ( f io.ReadWriteCloser set []io.Closer ctx, cancel = context.WithCancel(context.Background()) wg = &sync.WaitGroup{} ) defer func() { if err != nil { for _, f := range set { f.Close() } cancel() } }() if f, err = fifo.OpenFifo(ctx, fifos.In, syscall.O_WRONLY|syscall.O_CREAT|syscall.O_NONBLOCK, 0700); err != nil { return nil, err } set = append(set, f) go func(w io.WriteCloser) { io.Copy(w, ioset.in) w.Close() }(f) if f, err = fifo.OpenFifo(ctx, fifos.Out, syscall.O_RDONLY|syscall.O_CREAT|syscall.O_NONBLOCK, 0700); err != nil { return nil, err } set = append(set, f) wg.Add(1) go func(r io.ReadCloser) { io.Copy(ioset.out, r) r.Close() wg.Done() }(f) if f, err = fifo.OpenFifo(ctx, fifos.Err, syscall.O_RDONLY|syscall.O_CREAT|syscall.O_NONBLOCK, 0700); err != nil { return nil, err } set = append(set, f) if !tty { wg.Add(1) go func(r io.ReadCloser) { io.Copy(ioset.err, r) r.Close() wg.Done() }(f) } return &wgCloser{ wg: wg, dir: fifos.Dir, set: set, cancel: cancel, }, nil } // NewDirectIO returns an IO implementation that exposes the pipes directly func NewDirectIO(ctx context.Context, terminal bool) (*DirectIO, error) { set, err := NewFifos("") if err != nil { return nil, err } f := &DirectIO{ set: set, terminal: terminal, } defer func() { if err != nil { f.Delete() } }() if f.Stdin, err = fifo.OpenFifo(ctx, set.In, syscall.O_WRONLY|syscall.O_CREAT|syscall.O_NONBLOCK, 0700); err != nil { return nil, err } if f.Stdout, err = fifo.OpenFifo(ctx, set.Out, syscall.O_RDONLY|syscall.O_CREAT|syscall.O_NONBLOCK, 0700); err != nil { f.Stdin.Close() return nil, err } if f.Stderr, err = fifo.OpenFifo(ctx, set.Err, syscall.O_RDONLY|syscall.O_CREAT|syscall.O_NONBLOCK, 0700); err != nil { f.Stdin.Close() f.Stdout.Close() return nil, err } return f, nil } // DirectIO allows task IO to be handled externally by the caller type DirectIO struct { Stdin io.WriteCloser Stdout io.ReadCloser Stderr io.ReadCloser set *FIFOSet terminal bool } // IOCreate returns IO avaliable for use with task creation func (f *DirectIO) IOCreate(id string) (IO, error) { return f, nil } // IOAttach returns IO avaliable for use with task attachment func (f *DirectIO) IOAttach(set *FIFOSet) (IO, error) { return f, nil } // Config returns the Config func (f *DirectIO) Config() Config { return Config{ Terminal: f.terminal, Stdin: f.set.In, Stdout: f.set.Out, Stderr: f.set.Err, } } // Cancel stops any IO copy operations // // Not applicable for DirectIO func (f *DirectIO) Cancel() { // nothing to cancel as all operations are handled externally } // Wait on any IO copy operations // // Not applicable for DirectIO func (f *DirectIO) Wait() { // nothing to wait on as all operations are handled externally } // Close closes all open fds func (f *DirectIO) Close() error { err := f.Stdin.Close() if err2 := f.Stdout.Close(); err == nil { err = err2 } if err2 := f.Stderr.Close(); err == nil { err = err2 } return err } // Delete removes the underlying directory containing fifos func (f *DirectIO) Delete() error { if f.set.Dir == "" { return nil } return os.RemoveAll(f.set.Dir) } docker-containerd-tags-docker-17.12.1/cio/io_windows.go000066400000000000000000000043411322771672400227560ustar00rootroot00000000000000package cio import ( "fmt" "io" "net" "sync" winio "github.com/Microsoft/go-winio" "github.com/containerd/containerd/log" "github.com/pkg/errors" ) const pipeRoot = `\\.\pipe` // NewFifos returns a new set of fifos for the task func NewFifos(id string) (*FIFOSet, error) { return &FIFOSet{ In: fmt.Sprintf(`%s\ctr-%s-stdin`, pipeRoot, id), Out: fmt.Sprintf(`%s\ctr-%s-stdout`, pipeRoot, id), Err: fmt.Sprintf(`%s\ctr-%s-stderr`, pipeRoot, id), }, nil } func copyIO(fifos *FIFOSet, ioset *ioSet, tty bool) (_ *wgCloser, err error) { var ( wg sync.WaitGroup set []io.Closer ) if fifos.In != "" { l, err := winio.ListenPipe(fifos.In, nil) if err != nil { return nil, errors.Wrapf(err, "failed to create stdin pipe %s", fifos.In) } defer func(l net.Listener) { if err != nil { l.Close() } }(l) set = append(set, l) go func() { c, err := l.Accept() if err != nil { log.L.WithError(err).Errorf("failed to accept stdin connection on %s", fifos.In) return } io.Copy(c, ioset.in) c.Close() l.Close() }() } if fifos.Out != "" { l, err := winio.ListenPipe(fifos.Out, nil) if err != nil { return nil, errors.Wrapf(err, "failed to create stdin pipe %s", fifos.Out) } defer func(l net.Listener) { if err != nil { l.Close() } }(l) set = append(set, l) wg.Add(1) go func() { defer wg.Done() c, err := l.Accept() if err != nil { log.L.WithError(err).Errorf("failed to accept stdout connection on %s", fifos.Out) return } io.Copy(ioset.out, c) c.Close() l.Close() }() } if !tty && fifos.Err != "" { l, err := winio.ListenPipe(fifos.Err, nil) if err != nil { return nil, errors.Wrapf(err, "failed to create stderr pipe %s", fifos.Err) } defer func(l net.Listener) { if err != nil { l.Close() } }(l) set = append(set, l) wg.Add(1) go func() { defer wg.Done() c, err := l.Accept() if err != nil { log.L.WithError(err).Errorf("failed to accept stderr connection on %s", fifos.Err) return } io.Copy(ioset.err, c) c.Close() l.Close() }() } return &wgCloser{ wg: &wg, dir: fifos.Dir, set: set, cancel: func() { for _, l := range set { l.Close() } }, }, nil } docker-containerd-tags-docker-17.12.1/client.go000066400000000000000000000415371322771672400213110ustar00rootroot00000000000000package containerd import ( "context" "fmt" "io" "net/http" "runtime" "strconv" "strings" "sync" "time" containersapi "github.com/containerd/containerd/api/services/containers/v1" contentapi "github.com/containerd/containerd/api/services/content/v1" diffapi "github.com/containerd/containerd/api/services/diff/v1" eventsapi "github.com/containerd/containerd/api/services/events/v1" imagesapi "github.com/containerd/containerd/api/services/images/v1" introspectionapi "github.com/containerd/containerd/api/services/introspection/v1" namespacesapi "github.com/containerd/containerd/api/services/namespaces/v1" snapshotsapi "github.com/containerd/containerd/api/services/snapshots/v1" "github.com/containerd/containerd/api/services/tasks/v1" versionservice "github.com/containerd/containerd/api/services/version/v1" "github.com/containerd/containerd/containers" "github.com/containerd/containerd/content" "github.com/containerd/containerd/dialer" "github.com/containerd/containerd/diff" "github.com/containerd/containerd/errdefs" "github.com/containerd/containerd/images" "github.com/containerd/containerd/namespaces" "github.com/containerd/containerd/platforms" "github.com/containerd/containerd/plugin" "github.com/containerd/containerd/remotes" "github.com/containerd/containerd/remotes/docker" "github.com/containerd/containerd/remotes/docker/schema1" "github.com/containerd/containerd/snapshots" "github.com/containerd/typeurl" ptypes "github.com/gogo/protobuf/types" ocispec "github.com/opencontainers/image-spec/specs-go/v1" specs "github.com/opencontainers/runtime-spec/specs-go" "github.com/pkg/errors" "google.golang.org/grpc" "google.golang.org/grpc/health/grpc_health_v1" ) func init() { const prefix = "types.containerd.io" // register TypeUrls for commonly marshaled external types major := strconv.Itoa(specs.VersionMajor) typeurl.Register(&specs.Spec{}, prefix, "opencontainers/runtime-spec", major, "Spec") typeurl.Register(&specs.Process{}, prefix, "opencontainers/runtime-spec", major, "Process") typeurl.Register(&specs.LinuxResources{}, prefix, "opencontainers/runtime-spec", major, "LinuxResources") typeurl.Register(&specs.WindowsResources{}, prefix, "opencontainers/runtime-spec", major, "WindowsResources") } // New returns a new containerd client that is connected to the containerd // instance provided by address func New(address string, opts ...ClientOpt) (*Client, error) { var copts clientOpts for _, o := range opts { if err := o(&copts); err != nil { return nil, err } } gopts := []grpc.DialOption{ grpc.WithBlock(), grpc.WithInsecure(), grpc.WithTimeout(60 * time.Second), grpc.FailOnNonTempDialError(true), grpc.WithBackoffMaxDelay(3 * time.Second), grpc.WithDialer(dialer.Dialer), } if len(copts.dialOptions) > 0 { gopts = copts.dialOptions } if copts.defaultns != "" { unary, stream := newNSInterceptors(copts.defaultns) gopts = append(gopts, grpc.WithUnaryInterceptor(unary), grpc.WithStreamInterceptor(stream), ) } conn, err := grpc.Dial(dialer.DialAddress(address), gopts...) if err != nil { return nil, errors.Wrapf(err, "failed to dial %q", address) } return NewWithConn(conn, opts...) } // NewWithConn returns a new containerd client that is connected to the containerd // instance provided by the connection func NewWithConn(conn *grpc.ClientConn, opts ...ClientOpt) (*Client, error) { return &Client{ conn: conn, runtime: fmt.Sprintf("%s.%s", plugin.RuntimePlugin, runtime.GOOS), }, nil } // Client is the client to interact with containerd and its various services // using a uniform interface type Client struct { conn *grpc.ClientConn runtime string } // IsServing returns true if the client can successfully connect to the // containerd daemon and the healthcheck service returns the SERVING // response. // This call will block if a transient error is encountered during // connection. A timeout can be set in the context to ensure it returns // early. func (c *Client) IsServing(ctx context.Context) (bool, error) { r, err := c.HealthService().Check(ctx, &grpc_health_v1.HealthCheckRequest{}, grpc.FailFast(false)) if err != nil { return false, err } return r.Status == grpc_health_v1.HealthCheckResponse_SERVING, nil } // Containers returns all containers created in containerd func (c *Client) Containers(ctx context.Context, filters ...string) ([]Container, error) { r, err := c.ContainerService().List(ctx, filters...) if err != nil { return nil, err } var out []Container for _, container := range r { out = append(out, containerFromRecord(c, container)) } return out, nil } // NewContainer will create a new container in container with the provided id // the id must be unique within the namespace func (c *Client) NewContainer(ctx context.Context, id string, opts ...NewContainerOpts) (Container, error) { ctx, done, err := c.WithLease(ctx) if err != nil { return nil, err } defer done() container := containers.Container{ ID: id, Runtime: containers.RuntimeInfo{ Name: c.runtime, }, } for _, o := range opts { if err := o(ctx, c, &container); err != nil { return nil, err } } r, err := c.ContainerService().Create(ctx, container) if err != nil { return nil, err } return containerFromRecord(c, r), nil } // LoadContainer loads an existing container from metadata func (c *Client) LoadContainer(ctx context.Context, id string) (Container, error) { r, err := c.ContainerService().Get(ctx, id) if err != nil { return nil, err } return containerFromRecord(c, r), nil } // RemoteContext is used to configure object resolutions and transfers with // remote content stores and image providers. type RemoteContext struct { // Resolver is used to resolve names to objects, fetchers, and pushers. // If no resolver is provided, defaults to Docker registry resolver. Resolver remotes.Resolver // Unpack is done after an image is pulled to extract into a snapshotter. // If an image is not unpacked on pull, it can be unpacked any time // afterwards. Unpacking is required to run an image. Unpack bool // Snapshotter used for unpacking Snapshotter string // Labels to be applied to the created image Labels map[string]string // BaseHandlers are a set of handlers which get are called on dispatch. // These handlers always get called before any operation specific // handlers. BaseHandlers []images.Handler // ConvertSchema1 is whether to convert Docker registry schema 1 // manifests. If this option is false then any image which resolves // to schema 1 will return an error since schema 1 is not supported. ConvertSchema1 bool } func defaultRemoteContext() *RemoteContext { return &RemoteContext{ Resolver: docker.NewResolver(docker.ResolverOptions{ Client: http.DefaultClient, }), Snapshotter: DefaultSnapshotter, } } // Pull downloads the provided content into containerd's content store func (c *Client) Pull(ctx context.Context, ref string, opts ...RemoteOpt) (Image, error) { pullCtx := defaultRemoteContext() for _, o := range opts { if err := o(c, pullCtx); err != nil { return nil, err } } store := c.ContentStore() ctx, done, err := c.WithLease(ctx) if err != nil { return nil, err } defer done() name, desc, err := pullCtx.Resolver.Resolve(ctx, ref) if err != nil { return nil, err } fetcher, err := pullCtx.Resolver.Fetcher(ctx, name) if err != nil { return nil, err } var ( schema1Converter *schema1.Converter handler images.Handler ) if desc.MediaType == images.MediaTypeDockerSchema1Manifest && pullCtx.ConvertSchema1 { schema1Converter = schema1.NewConverter(store, fetcher) handler = images.Handlers(append(pullCtx.BaseHandlers, schema1Converter)...) } else { handler = images.Handlers(append(pullCtx.BaseHandlers, remotes.FetchHandler(store, fetcher), images.ChildrenHandler(store, platforms.Default()))..., ) } if err := images.Dispatch(ctx, handler, desc); err != nil { return nil, err } if schema1Converter != nil { desc, err = schema1Converter.Convert(ctx) if err != nil { return nil, err } } imgrec := images.Image{ Name: name, Target: desc, Labels: pullCtx.Labels, } is := c.ImageService() if created, err := is.Create(ctx, imgrec); err != nil { if !errdefs.IsAlreadyExists(err) { return nil, err } updated, err := is.Update(ctx, imgrec) if err != nil { return nil, err } imgrec = updated } else { imgrec = created } img := &image{ client: c, i: imgrec, } if pullCtx.Unpack { if err := img.Unpack(ctx, pullCtx.Snapshotter); err != nil { return nil, err } } return img, nil } // Push uploads the provided content to a remote resource func (c *Client) Push(ctx context.Context, ref string, desc ocispec.Descriptor, opts ...RemoteOpt) error { pushCtx := defaultRemoteContext() for _, o := range opts { if err := o(c, pushCtx); err != nil { return err } } pusher, err := pushCtx.Resolver.Pusher(ctx, ref) if err != nil { return err } var m sync.Mutex manifestStack := []ocispec.Descriptor{} filterHandler := images.HandlerFunc(func(ctx context.Context, desc ocispec.Descriptor) ([]ocispec.Descriptor, error) { switch desc.MediaType { case images.MediaTypeDockerSchema2Manifest, ocispec.MediaTypeImageManifest, images.MediaTypeDockerSchema2ManifestList, ocispec.MediaTypeImageIndex: m.Lock() manifestStack = append(manifestStack, desc) m.Unlock() return nil, images.ErrStopHandler default: return nil, nil } }) cs := c.ContentStore() pushHandler := remotes.PushHandler(cs, pusher) handlers := append(pushCtx.BaseHandlers, images.ChildrenHandler(cs, platforms.Default()), filterHandler, pushHandler, ) if err := images.Dispatch(ctx, images.Handlers(handlers...), desc); err != nil { return err } // Iterate in reverse order as seen, parent always uploaded after child for i := len(manifestStack) - 1; i >= 0; i-- { _, err := pushHandler(ctx, manifestStack[i]) if err != nil { // TODO(estesp): until we have a more complete method for index push, we need to report // missing dependencies in an index/manifest list by sensing the "400 Bad Request" // as a marker for this problem if (manifestStack[i].MediaType == ocispec.MediaTypeImageIndex || manifestStack[i].MediaType == images.MediaTypeDockerSchema2ManifestList) && errors.Cause(err) != nil && strings.Contains(errors.Cause(err).Error(), "400 Bad Request") { return errors.Wrap(err, "manifest list/index references to blobs and/or manifests are missing in your target registry") } return err } } return nil } // GetImage returns an existing image func (c *Client) GetImage(ctx context.Context, ref string) (Image, error) { i, err := c.ImageService().Get(ctx, ref) if err != nil { return nil, err } return &image{ client: c, i: i, }, nil } // ListImages returns all existing images func (c *Client) ListImages(ctx context.Context, filters ...string) ([]Image, error) { imgs, err := c.ImageService().List(ctx, filters...) if err != nil { return nil, err } images := make([]Image, len(imgs)) for i, img := range imgs { images[i] = &image{ client: c, i: img, } } return images, nil } // Subscribe to events that match one or more of the provided filters. // // Callers should listen on both the envelope channel and errs channel. If the // errs channel returns nil or an error, the subscriber should terminate. // // To cancel shutdown reciept of events, cancel the provided context. The errs // channel will be closed and return a nil error. func (c *Client) Subscribe(ctx context.Context, filters ...string) (ch <-chan *eventsapi.Envelope, errs <-chan error) { var ( evq = make(chan *eventsapi.Envelope) errq = make(chan error, 1) ) errs = errq ch = evq session, err := c.EventService().Subscribe(ctx, &eventsapi.SubscribeRequest{ Filters: filters, }) if err != nil { errq <- err close(errq) return } go func() { defer close(errq) for { ev, err := session.Recv() if err != nil { errq <- err return } select { case evq <- ev: case <-ctx.Done(): return } } }() return ch, errs } // Close closes the clients connection to containerd func (c *Client) Close() error { return c.conn.Close() } // NamespaceService returns the underlying Namespaces Store func (c *Client) NamespaceService() namespaces.Store { return NewNamespaceStoreFromClient(namespacesapi.NewNamespacesClient(c.conn)) } // ContainerService returns the underlying container Store func (c *Client) ContainerService() containers.Store { return NewRemoteContainerStore(containersapi.NewContainersClient(c.conn)) } // ContentStore returns the underlying content Store func (c *Client) ContentStore() content.Store { return NewContentStoreFromClient(contentapi.NewContentClient(c.conn)) } // SnapshotService returns the underlying snapshotter for the provided snapshotter name func (c *Client) SnapshotService(snapshotterName string) snapshots.Snapshotter { return NewSnapshotterFromClient(snapshotsapi.NewSnapshotsClient(c.conn), snapshotterName) } // TaskService returns the underlying TasksClient func (c *Client) TaskService() tasks.TasksClient { return tasks.NewTasksClient(c.conn) } // ImageService returns the underlying image Store func (c *Client) ImageService() images.Store { return NewImageStoreFromClient(imagesapi.NewImagesClient(c.conn)) } // DiffService returns the underlying Differ func (c *Client) DiffService() diff.Differ { return NewDiffServiceFromClient(diffapi.NewDiffClient(c.conn)) } // IntrospectionService returns the underlying Introspection Client func (c *Client) IntrospectionService() introspectionapi.IntrospectionClient { return introspectionapi.NewIntrospectionClient(c.conn) } // HealthService returns the underlying GRPC HealthClient func (c *Client) HealthService() grpc_health_v1.HealthClient { return grpc_health_v1.NewHealthClient(c.conn) } // EventService returns the underlying EventsClient func (c *Client) EventService() eventsapi.EventsClient { return eventsapi.NewEventsClient(c.conn) } // VersionService returns the underlying VersionClient func (c *Client) VersionService() versionservice.VersionClient { return versionservice.NewVersionClient(c.conn) } // Version of containerd type Version struct { // Version number Version string // Revision from git that was built Revision string } // Version returns the version of containerd that the client is connected to func (c *Client) Version(ctx context.Context) (Version, error) { response, err := c.VersionService().Version(ctx, &ptypes.Empty{}) if err != nil { return Version{}, err } return Version{ Version: response.Version, Revision: response.Revision, }, nil } type importOpts struct { } // ImportOpt allows the caller to specify import specific options type ImportOpt func(c *importOpts) error func resolveImportOpt(opts ...ImportOpt) (importOpts, error) { var iopts importOpts for _, o := range opts { if err := o(&iopts); err != nil { return iopts, err } } return iopts, nil } // Import imports an image from a Tar stream using reader. // Caller needs to specify importer. Future version may use oci.v1 as the default. // Note that unreferrenced blobs may be imported to the content store as well. func (c *Client) Import(ctx context.Context, importer images.Importer, reader io.Reader, opts ...ImportOpt) ([]Image, error) { _, err := resolveImportOpt(opts...) // unused now if err != nil { return nil, err } ctx, done, err := c.WithLease(ctx) if err != nil { return nil, err } defer done() imgrecs, err := importer.Import(ctx, c.ContentStore(), reader) if err != nil { // is.Update() is not called on error return nil, err } is := c.ImageService() var images []Image for _, imgrec := range imgrecs { if updated, err := is.Update(ctx, imgrec, "target"); err != nil { if !errdefs.IsNotFound(err) { return nil, err } created, err := is.Create(ctx, imgrec) if err != nil { return nil, err } imgrec = created } else { imgrec = updated } images = append(images, &image{ client: c, i: imgrec, }) } return images, nil } type exportOpts struct { } // ExportOpt allows the caller to specify export-specific options type ExportOpt func(c *exportOpts) error func resolveExportOpt(opts ...ExportOpt) (exportOpts, error) { var eopts exportOpts for _, o := range opts { if err := o(&eopts); err != nil { return eopts, err } } return eopts, nil } // Export exports an image to a Tar stream. // OCI format is used by default. // It is up to caller to put "org.opencontainers.image.ref.name" annotation to desc. // TODO(AkihiroSuda): support exporting multiple descriptors at once to a single archive stream. func (c *Client) Export(ctx context.Context, exporter images.Exporter, desc ocispec.Descriptor, opts ...ExportOpt) (io.ReadCloser, error) { _, err := resolveExportOpt(opts...) // unused now if err != nil { return nil, err } pr, pw := io.Pipe() go func() { pw.CloseWithError(exporter.Export(ctx, c.ContentStore(), desc, pw)) }() return pr, nil } docker-containerd-tags-docker-17.12.1/client_opts.go000066400000000000000000000053111322771672400223440ustar00rootroot00000000000000package containerd import ( "github.com/containerd/containerd/images" "github.com/containerd/containerd/remotes" "google.golang.org/grpc" ) type clientOpts struct { defaultns string dialOptions []grpc.DialOption } // ClientOpt allows callers to set options on the containerd client type ClientOpt func(c *clientOpts) error // WithDefaultNamespace sets the default namespace on the client // // Any operation that does not have a namespace set on the context will // be provided the default namespace func WithDefaultNamespace(ns string) ClientOpt { return func(c *clientOpts) error { c.defaultns = ns return nil } } // WithDialOpts allows grpc.DialOptions to be set on the connection func WithDialOpts(opts []grpc.DialOption) ClientOpt { return func(c *clientOpts) error { c.dialOptions = opts return nil } } // RemoteOpt allows the caller to set distribution options for a remote type RemoteOpt func(*Client, *RemoteContext) error // WithPullUnpack is used to unpack an image after pull. This // uses the snapshotter, content store, and diff service // configured for the client. func WithPullUnpack(_ *Client, c *RemoteContext) error { c.Unpack = true return nil } // WithPullSnapshotter specifies snapshotter name used for unpacking func WithPullSnapshotter(snapshotterName string) RemoteOpt { return func(_ *Client, c *RemoteContext) error { c.Snapshotter = snapshotterName return nil } } // WithPullLabel sets a label to be associated with a pulled reference func WithPullLabel(key, value string) RemoteOpt { return func(_ *Client, rc *RemoteContext) error { if rc.Labels == nil { rc.Labels = make(map[string]string) } rc.Labels[key] = value return nil } } // WithPullLabels associates a set of labels to a pulled reference func WithPullLabels(labels map[string]string) RemoteOpt { return func(_ *Client, rc *RemoteContext) error { if rc.Labels == nil { rc.Labels = make(map[string]string) } for k, v := range labels { rc.Labels[k] = v } return nil } } // WithSchema1Conversion is used to convert Docker registry schema 1 // manifests to oci manifests on pull. Without this option schema 1 // manifests will return a not supported error. func WithSchema1Conversion(client *Client, c *RemoteContext) error { c.ConvertSchema1 = true return nil } // WithResolver specifies the resolver to use. func WithResolver(resolver remotes.Resolver) RemoteOpt { return func(client *Client, c *RemoteContext) error { c.Resolver = resolver return nil } } // WithImageHandler adds a base handler to be called on dispatch. func WithImageHandler(h images.Handler) RemoteOpt { return func(client *Client, c *RemoteContext) error { c.BaseHandlers = append(c.BaseHandlers, h) return nil } } docker-containerd-tags-docker-17.12.1/client_test.go000066400000000000000000000105541322771672400223430ustar00rootroot00000000000000package containerd import ( "bytes" "context" "flag" "fmt" "io/ioutil" golog "log" "os" "os/exec" "runtime" "testing" "time" "google.golang.org/grpc/grpclog" "github.com/containerd/containerd/log" "github.com/containerd/containerd/namespaces" "github.com/containerd/containerd/testutil" "github.com/sirupsen/logrus" ) var ( address string noDaemon bool noCriu bool supportsCriu bool ctrd = &daemon{} ) func init() { // Discard grpc logs so that they don't mess with our stdio grpclog.SetLogger(golog.New(ioutil.Discard, "", golog.LstdFlags)) flag.StringVar(&address, "address", defaultAddress, "The address to the containerd socket for use in the tests") flag.BoolVar(&noDaemon, "no-daemon", false, "Do not start a dedicated daemon for the tests") flag.BoolVar(&noCriu, "no-criu", false, "Do not run the checkpoint tests") flag.Parse() } func testContext() (context.Context, context.CancelFunc) { ctx, cancel := context.WithCancel(context.Background()) ctx = namespaces.WithNamespace(ctx, "testing") return ctx, cancel } func TestMain(m *testing.M) { if testing.Short() { os.Exit(m.Run()) } testutil.RequiresRootM() // check if criu is installed on the system _, err := exec.LookPath("criu") supportsCriu = err == nil && !noCriu var ( buf = bytes.NewBuffer(nil) ctx, cancel = testContext() ) defer cancel() if !noDaemon { os.RemoveAll(defaultRoot) err := ctrd.start("containerd", address, []string{ "--root", defaultRoot, "--state", defaultState, "--log-level", "debug", }, buf, buf) if err != nil { fmt.Fprintf(os.Stderr, "%s: %s", err, buf.String()) os.Exit(1) } } waitCtx, waitCancel := context.WithTimeout(ctx, 2*time.Second) client, err := ctrd.waitForStart(waitCtx) waitCancel() if err != nil { ctrd.Kill() ctrd.Wait() fmt.Fprintf(os.Stderr, "%s: %s\n", err, buf.String()) os.Exit(1) } // print out the version in information version, err := client.Version(ctx) if err != nil { fmt.Fprintf(os.Stderr, "error getting version: %s\n", err) os.Exit(1) } // allow comparison with containerd under test log.G(ctx).WithFields(logrus.Fields{ "version": version.Version, "revision": version.Revision, }).Info("running tests against containerd") // pull a seed image if runtime.GOOS != "windows" { // TODO: remove once pull is supported on windows if _, err = client.Pull(ctx, testImage, WithPullUnpack); err != nil { ctrd.Stop() ctrd.Wait() fmt.Fprintf(os.Stderr, "%s: %s\n", err, buf.String()) os.Exit(1) } } if err := platformTestSetup(client); err != nil { fmt.Fprintln(os.Stderr, "platform test setup failed", err) os.Exit(1) } if err := client.Close(); err != nil { fmt.Fprintln(os.Stderr, "failed to close client", err) } // run the test status := m.Run() if !noDaemon { // tear down the daemon and resources created if err := ctrd.Stop(); err != nil { if err := ctrd.Kill(); err != nil { fmt.Fprintln(os.Stderr, "failed to signal containerd", err) } } if err := ctrd.Wait(); err != nil { if _, ok := err.(*exec.ExitError); !ok { fmt.Fprintln(os.Stderr, "failed to wait for containerd", err) } } if err := os.RemoveAll(defaultRoot); err != nil { fmt.Fprintln(os.Stderr, "failed to remove test root dir", err) os.Exit(1) } // only print containerd logs if the test failed if status != 0 { fmt.Fprintln(os.Stderr, buf.String()) } } os.Exit(status) } func newClient(t testing.TB, address string, opts ...ClientOpt) (*Client, error) { if testing.Short() { t.Skip() } // testutil.RequiresRoot(t) is not needed here (already called in TestMain) return New(address, opts...) } func TestNewClient(t *testing.T) { t.Parallel() client, err := newClient(t, address) if err != nil { t.Fatal(err) } if client == nil { t.Fatal("New() returned nil client") } if err := client.Close(); err != nil { t.Errorf("client closed returned errror %v", err) } } // All the container's tests depends on this, we need it to run first. func TestImagePull(t *testing.T) { if runtime.GOOS == "windows" { // TODO: remove once Windows has a snapshotter t.Skip("Windows does not have a snapshotter yet") } client, err := newClient(t, address) if err != nil { t.Fatal(err) } defer client.Close() ctx, cancel := testContext() defer cancel() _, err = client.Pull(ctx, testImage) if err != nil { t.Error(err) return } } docker-containerd-tags-docker-17.12.1/client_unix_test.go000066400000000000000000000013141322771672400234000ustar00rootroot00000000000000// +build !windows package containerd import ( "runtime" ) const ( defaultRoot = "/var/lib/containerd-test" defaultState = "/run/containerd-test" defaultAddress = "/run/containerd-test/containerd.sock" ) var ( testImage string ) func platformTestSetup(client *Client) error { return nil } func init() { switch runtime.GOARCH { case "386": testImage = "docker.io/i386/alpine:latest" case "arm": testImage = "docker.io/arm32v6/alpine:latest" case "arm64": testImage = "docker.io/arm64v8/alpine:latest" case "ppc64le": testImage = "docker.io/ppc64le/alpine:latest" case "s390x": testImage = "docker.io/s390x/alpine:latest" default: testImage = "docker.io/library/alpine:latest" } } docker-containerd-tags-docker-17.12.1/client_windows_test.go000066400000000000000000000042211322771672400241070ustar00rootroot00000000000000package containerd import ( "encoding/json" "fmt" "os" "path/filepath" "github.com/pkg/errors" ) const ( defaultAddress = `\\.\pipe\containerd-containerd-test` testImage = "docker.io/library/go:nanoserver" ) var ( dockerLayerFolders []string defaultRoot = filepath.Join(os.Getenv("programfiles"), "containerd", "root-test") defaultState = filepath.Join(os.Getenv("programfiles"), "containerd", "state-test") ) func platformTestSetup(client *Client) error { var ( roots []string layerChains = make(map[string]string) ) // Since we can't pull images yet, we'll piggyback on the default // docker's images wfPath := `C:\ProgramData\docker\windowsfilter` wf, err := os.Open(wfPath) if err != nil { return errors.Wrapf(err, "failed to access docker layers @ %s", wfPath) } defer wf.Close() entries, err := wf.Readdirnames(0) if err != nil { return errors.Wrapf(err, "failed to read %s entries", wfPath) } for _, fn := range entries { layerChainPath := filepath.Join(wfPath, fn, "layerchain.json") lfi, err := os.Stat(layerChainPath) switch { case err == nil && lfi.Mode().IsRegular(): f, err := os.OpenFile(layerChainPath, os.O_RDONLY, 0660) if err != nil { fmt.Fprintln(os.Stderr, errors.Wrapf(err, "failed to open %s", layerChainPath)) continue } defer f.Close() l := make([]string, 0) if err := json.NewDecoder(f).Decode(&l); err != nil { fmt.Fprintln(os.Stderr, errors.Wrapf(err, "failed to decode %s", layerChainPath)) continue } switch { case len(l) == 1: layerChains[l[0]] = filepath.Join(wfPath, fn) case len(l) > 1: fmt.Fprintf(os.Stderr, "Too many entries in %s: %d", layerChainPath, len(l)) case len(l) == 0: roots = append(roots, filepath.Join(wfPath, fn)) } case os.IsNotExist(err): // keep on going default: return errors.Wrapf(err, "error trying to access %s", layerChainPath) } } // They'll be 2 roots, just take the first one l := roots[0] dockerLayerFolders = append(dockerLayerFolders, l) for { l = layerChains[l] if l == "" { break } dockerLayerFolders = append([]string{l}, dockerLayerFolders...) } return nil } docker-containerd-tags-docker-17.12.1/cmd/000077500000000000000000000000001322771672400202355ustar00rootroot00000000000000docker-containerd-tags-docker-17.12.1/cmd/containerd-release/000077500000000000000000000000001322771672400240015ustar00rootroot00000000000000docker-containerd-tags-docker-17.12.1/cmd/containerd-release/main.go000066400000000000000000000055031322771672400252570ustar00rootroot00000000000000package main import ( "fmt" "os" "text/template" "github.com/sirupsen/logrus" "github.com/urfave/cli" ) const vendorConf = "vendor.conf" type note struct { Title string `toml:"title"` Description string `toml:"description"` } type change struct { Commit string `toml:"commit"` Description string `toml:"description"` } type dependency struct { Name string Commit string Previous string } type download struct { Filename string Hash string } type release struct { ProjectName string `toml:"project_name"` GithubRepo string `toml:"github_repo"` Commit string `toml:"commit"` Previous string `toml:"previous"` PreRelease bool `toml:"pre_release"` Preface string `toml:"preface"` Notes map[string]note `toml:"notes"` BreakingChanges map[string]change `toml:"breaking"` // generated fields Changes []change Contributors []string Dependencies []dependency Version string Downloads []download } func main() { app := cli.NewApp() app.Name = "release" app.Description = `release tooling. This tool should be ran from the root of the project repository for a new release. ` app.Flags = []cli.Flag{ cli.BoolFlag{ Name: "dry,n", Usage: "run the release tooling as a dry run to print the release notes to stdout", }, cli.StringFlag{ Name: "template,t", Usage: "template filepath to use in place of the default", Value: defaultTemplateFile, }, } app.Action = func(context *cli.Context) error { var ( path = context.Args().First() tag = parseTag(path) ) r, err := loadRelease(path) if err != nil { return err } logrus.Info("Welcome to the %s release tool...", r.ProjectName) previous, err := getPreviousDeps(r.Previous) if err != nil { return err } changes, err := changelog(r.Previous, r.Commit) if err != nil { return err } logrus.Infof("creating new release %s with %d new changes...", tag, len(changes)) rd, err := fileFromRev(r.Commit, vendorConf) if err != nil { return err } deps, err := parseDependencies(rd) if err != nil { return err } updatedDeps := updatedDeps(previous, deps) contributors, err := getContributors(r.Previous, r.Commit) if err != nil { return err } // update the release fields with generated data r.Contributors = contributors r.Dependencies = updatedDeps r.Changes = changes r.Version = tag tmpl, err := getTemplate(context) if err != nil { return err } if context.Bool("dry") { t, err := template.New("release-notes").Parse(tmpl) if err != nil { return err } return t.Execute(os.Stdout, r) } logrus.Info("release complete!") return nil } if err := app.Run(os.Args); err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(1) } } docker-containerd-tags-docker-17.12.1/cmd/containerd-release/template.go000066400000000000000000000015051322771672400261440ustar00rootroot00000000000000package main const ( defaultTemplateFile = "TEMPLATE" releaseNotes = `Welcome to the {{.Version}} release of {{.ProjectName}}! {{if .PreRelease -}} *This is a pre-release of {{.ProjectName}}* {{- end}} {{.Preface}} Please try out the release binaries and report any issues at https://github.com/{{.GithubRepo}}/issues. {{range $note := .Notes}} ### {{$note.Title}} {{$note.Description}} {{- end}} ### Contributors {{range $contributor := .Contributors}} * {{$contributor}} {{- end}} ### Changes {{range $change := .Changes}} * {{$change.Commit}} {{$change.Description}} {{- end}} ### Dependency Changes Previous release can be found at [{{.Previous}}](https://github.com/{{.GithubRepo}}/releases/tag/{{.Previous}}) {{range $dep := .Dependencies}} * {{$dep.Previous}} -> {{$dep.Commit}} **{{$dep.Name}}** {{- end}} ` ) docker-containerd-tags-docker-17.12.1/cmd/containerd-release/util.go000066400000000000000000000077761322771672400253260ustar00rootroot00000000000000package main import ( "bufio" "bytes" "errors" "fmt" "io" "io/ioutil" "os" "os/exec" "path/filepath" "sort" "strings" "github.com/BurntSushi/toml" "github.com/urfave/cli" ) func loadRelease(path string) (*release, error) { var r release if _, err := toml.DecodeFile(path, &r); err != nil { if os.IsNotExist(err) { return nil, errors.New("please specify the release file as the first argument") } return nil, err } return &r, nil } func parseTag(path string) string { return strings.TrimSuffix(filepath.Base(path), ".toml") } func parseDependencies(r io.Reader) ([]dependency, error) { var deps []dependency s := bufio.NewScanner(r) for s.Scan() { ln := strings.TrimSpace(s.Text()) if strings.HasPrefix(ln, "#") || ln == "" { continue } cidx := strings.Index(ln, "#") if cidx > 0 { ln = ln[:cidx] } ln = strings.TrimSpace(ln) parts := strings.Fields(ln) if len(parts) != 2 && len(parts) != 3 { return nil, fmt.Errorf("invalid config format: %s", ln) } deps = append(deps, dependency{ Name: parts[0], Commit: parts[1], }) } if err := s.Err(); err != nil { return nil, err } return deps, nil } func getPreviousDeps(previous string) ([]dependency, error) { r, err := fileFromRev(previous, vendorConf) if err != nil { return nil, err } return parseDependencies(r) } func changelog(previous, commit string) ([]change, error) { raw, err := getChangelog(previous, commit) if err != nil { return nil, err } return parseChangelog(raw) } func getChangelog(previous, commit string) ([]byte, error) { return git("log", "--oneline", fmt.Sprintf("%s..%s", previous, commit)) } func parseChangelog(changelog []byte) ([]change, error) { var ( changes []change s = bufio.NewScanner(bytes.NewReader(changelog)) ) for s.Scan() { fields := strings.Fields(s.Text()) changes = append(changes, change{ Commit: fields[0], Description: strings.Join(fields[1:], " "), }) } if err := s.Err(); err != nil { return nil, err } return changes, nil } func fileFromRev(rev, file string) (io.Reader, error) { p, err := git("show", fmt.Sprintf("%s:%s", rev, file)) if err != nil { return nil, err } return bytes.NewReader(p), nil } func git(args ...string) ([]byte, error) { o, err := exec.Command("git", args...).CombinedOutput() if err != nil { return nil, fmt.Errorf("%s: %s", err, o) } return o, nil } func updatedDeps(previous, deps []dependency) []dependency { var updated []dependency pm, cm := toDepMap(previous), toDepMap(deps) for name, c := range cm { d, ok := pm[name] if !ok { // it is a new dep and should be noted updated = append(updated, c) continue } // it exists, see if its updated if d.Commit != c.Commit { // set the previous commit c.Previous = d.Commit updated = append(updated, c) } } return updated } func toDepMap(deps []dependency) map[string]dependency { out := make(map[string]dependency) for _, d := range deps { out[d.Name] = d } return out } func getContributors(previous, commit string) ([]string, error) { raw, err := git("log", "--format=%aN", fmt.Sprintf("%s..%s", previous, commit)) if err != nil { return nil, err } var ( set = make(map[string]struct{}) s = bufio.NewScanner(bytes.NewReader(raw)) out []string ) for s.Scan() { set[s.Text()] = struct{}{} } if err := s.Err(); err != nil { return nil, err } for name := range set { out = append(out, name) } sort.Strings(out) return out, nil } // getTemplate will use a builtin template if the template is not specified on the cli func getTemplate(context *cli.Context) (string, error) { path := context.GlobalString("template") f, err := os.Open(path) if err != nil { // if the template file does not exist and the path is for the default template then // return the compiled in template if os.IsNotExist(err) && path == defaultTemplateFile { return releaseNotes, nil } return "", err } defer f.Close() data, err := ioutil.ReadAll(f) if err != nil { return "", err } return string(data), nil } docker-containerd-tags-docker-17.12.1/cmd/containerd-shim/000077500000000000000000000000001322771672400233215ustar00rootroot00000000000000docker-containerd-tags-docker-17.12.1/cmd/containerd-shim/main_unix.go000066400000000000000000000136701322771672400256460ustar00rootroot00000000000000// +build !windows package main import ( "bytes" "context" "flag" "fmt" "net" "os" "os/exec" "os/signal" "runtime" "strings" "sync" "syscall" "github.com/containerd/containerd/events" "github.com/containerd/containerd/linux/proc" "github.com/containerd/containerd/linux/shim" shimapi "github.com/containerd/containerd/linux/shim/v1" "github.com/containerd/containerd/namespaces" "github.com/containerd/containerd/reaper" "github.com/containerd/typeurl" ptypes "github.com/gogo/protobuf/types" "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com/stevvooe/ttrpc" "golang.org/x/sys/unix" ) var ( debugFlag bool namespaceFlag string socketFlag string addressFlag string workdirFlag string runtimeRootFlag string criuFlag string systemdCgroupFlag bool containerdBinaryFlag string ) func init() { flag.BoolVar(&debugFlag, "debug", false, "enable debug output in logs") flag.StringVar(&namespaceFlag, "namespace", "", "namespace that owns the shim") flag.StringVar(&socketFlag, "socket", "", "abstract socket path to serve") flag.StringVar(&addressFlag, "address", "", "grpc address back to main containerd") flag.StringVar(&workdirFlag, "workdir", "", "path used to storge large temporary data") flag.StringVar(&runtimeRootFlag, "runtime-root", proc.RuncRoot, "root directory for the runtime") flag.StringVar(&criuFlag, "criu", "", "path to criu binary") flag.BoolVar(&systemdCgroupFlag, "systemd-cgroup", false, "set runtime to use systemd-cgroup") // currently, the `containerd publish` utility is embedded in the daemon binary. // The daemon invokes `containerd-shim -containerd-binary ...` with its own os.Executable() path. flag.StringVar(&containerdBinaryFlag, "containerd-binary", "containerd", "path to containerd binary (used for `containerd publish`)") flag.Parse() } func main() { if debugFlag { logrus.SetLevel(logrus.DebugLevel) } if os.Getenv("GOMAXPROCS") == "" { // If GOMAXPROCS hasn't been set, we default to a value of 2 to reduce // the number of Go stacks present in the shim. runtime.GOMAXPROCS(2) } if err := executeShim(); err != nil { fmt.Fprintf(os.Stderr, "containerd-shim: %s\n", err) os.Exit(1) } } func executeShim() error { // start handling signals as soon as possible so that things are properly reaped // or if runtime exits before we hit the handler signals, err := setupSignals() if err != nil { return err } dump := make(chan os.Signal, 32) signal.Notify(dump, syscall.SIGUSR1) path, err := os.Getwd() if err != nil { return err } server, err := newServer() if err != nil { return errors.Wrap(err, "failed creating server") } sv, err := shim.NewService( shim.Config{ Path: path, Namespace: namespaceFlag, WorkDir: workdirFlag, Criu: criuFlag, SystemdCgroup: systemdCgroupFlag, RuntimeRoot: runtimeRootFlag, }, &remoteEventsPublisher{address: addressFlag}, ) if err != nil { return err } logrus.Debug("registering ttrpc server") shimapi.RegisterShimService(server, sv) socket := socketFlag if err := serve(server, socket); err != nil { return err } logger := logrus.WithFields(logrus.Fields{ "pid": os.Getpid(), "path": path, "namespace": namespaceFlag, }) go func() { for range dump { dumpStacks(logger) } }() return handleSignals(logger, signals, server, sv) } // serve serves the ttrpc API over a unix socket at the provided path // this function does not block func serve(server *ttrpc.Server, path string) error { var ( l net.Listener err error ) if path == "" { l, err = net.FileListener(os.NewFile(3, "socket")) path = "[inherited from parent]" } else { l, err = net.Listen("unix", "\x00"+path) } if err != nil { return err } logrus.WithField("socket", path).Debug("serving api on unix socket") go func() { defer l.Close() if err := server.Serve(l); err != nil && !strings.Contains(err.Error(), "use of closed network connection") { logrus.WithError(err).Fatal("containerd-shim: ttrpc server failure") } }() return nil } func handleSignals(logger *logrus.Entry, signals chan os.Signal, server *ttrpc.Server, sv *shim.Service) error { var ( termOnce sync.Once done = make(chan struct{}) ) for { select { case <-done: return nil case s := <-signals: switch s { case unix.SIGCHLD: if err := reaper.Reap(); err != nil { logger.WithError(err).Error("reap exit status") } case unix.SIGTERM, unix.SIGINT: go termOnce.Do(func() { ctx := context.TODO() if err := server.Shutdown(ctx); err != nil { logger.WithError(err).Error("failed to shutdown server") } // Ensure our child is dead if any sv.Kill(ctx, &shimapi.KillRequest{ Signal: uint32(syscall.SIGKILL), All: true, }) sv.Delete(context.Background(), &ptypes.Empty{}) close(done) }) } } } } func dumpStacks(logger *logrus.Entry) { var ( buf []byte stackSize int ) bufferLen := 16384 for stackSize == len(buf) { buf = make([]byte, bufferLen) stackSize = runtime.Stack(buf, true) bufferLen *= 2 } buf = buf[:stackSize] logger.Infof("=== BEGIN goroutine stack dump ===\n%s\n=== END goroutine stack dump ===", buf) } type remoteEventsPublisher struct { address string } func (l *remoteEventsPublisher) Publish(ctx context.Context, topic string, event events.Event) error { ns, _ := namespaces.Namespace(ctx) encoded, err := typeurl.MarshalAny(event) if err != nil { return err } data, err := encoded.Marshal() if err != nil { return err } cmd := exec.CommandContext(ctx, containerdBinaryFlag, "--address", l.address, "publish", "--topic", topic, "--namespace", ns) cmd.Stdin = bytes.NewReader(data) c, err := reaper.Default.Start(cmd) if err != nil { return err } status, err := reaper.Default.Wait(cmd, c) if err != nil { return err } if status != 0 { return errors.New("failed to publish event") } return nil } docker-containerd-tags-docker-17.12.1/cmd/containerd-shim/shim_darwin.go000066400000000000000000000015131322771672400261540ustar00rootroot00000000000000// +build darwin package main import ( "os" "os/signal" "github.com/containerd/containerd/reaper" runc "github.com/containerd/go-runc" "github.com/stevvooe/ttrpc" ) // setupSignals creates a new signal handler for all signals and sets the shim as a // sub-reaper so that the container processes are reparented func setupSignals() (chan os.Signal, error) { signals := make(chan os.Signal, 2048) signal.Notify(signals) // make sure runc is setup to use the monitor // for waiting on processes runc.Monitor = reaper.Default return signals, nil } func newServer() (*ttrpc.Server, error) { // for darwin, we omit the socket credentials because these syscalls are // slightly different. since we don't have darwin support yet, this can be // implemented later and the build can continue without issue. return ttrpc.NewServer() } docker-containerd-tags-docker-17.12.1/cmd/containerd-shim/shim_linux.go000066400000000000000000000016351322771672400260340ustar00rootroot00000000000000package main import ( "os" "os/signal" "syscall" "github.com/containerd/containerd/reaper" "github.com/containerd/containerd/sys" runc "github.com/containerd/go-runc" "github.com/stevvooe/ttrpc" ) // setupSignals creates a new signal handler for all signals and sets the shim as a // sub-reaper so that the container processes are reparented func setupSignals() (chan os.Signal, error) { signals := make(chan os.Signal, 2048) signal.Notify(signals, syscall.SIGTERM, syscall.SIGINT, syscall.SIGCHLD) // make sure runc is setup to use the monitor // for waiting on processes runc.Monitor = reaper.Default // set the shim as the subreaper for all orphaned processes created by the container if err := sys.SetSubreaper(1); err != nil { return nil, err } return signals, nil } func newServer() (*ttrpc.Server, error) { return ttrpc.NewServer(ttrpc.WithServerHandshaker(ttrpc.UnixSocketRequireSameUser())) } docker-containerd-tags-docker-17.12.1/cmd/containerd-shim/shim_unix.go000066400000000000000000000013031322771672400256500ustar00rootroot00000000000000// +build !linux,!windows,!darwin package main import ( "os" "os/signal" "github.com/containerd/containerd/reaper" runc "github.com/containerd/go-runc" "github.com/stevvooe/ttrpc" ) // setupSignals creates a new signal handler for all signals and sets the shim as a // sub-reaper so that the container processes are reparented func setupSignals() (chan os.Signal, error) { signals := make(chan os.Signal, 2048) signal.Notify(signals) // make sure runc is setup to use the monitor // for waiting on processes runc.Monitor = reaper.Default return signals, nil } func newServer() (*ttrpc.Server, error) { return ttrpc.NewServer(ttrpc.WithServerHandshaker(ttrpc.UnixSocketRequireSameUser())) } docker-containerd-tags-docker-17.12.1/cmd/containerd-stress/000077500000000000000000000000001322771672400237045ustar00rootroot00000000000000docker-containerd-tags-docker-17.12.1/cmd/containerd-stress/main.go000066400000000000000000000144461322771672400251700ustar00rootroot00000000000000package main import ( "context" "fmt" "os" "os/signal" "path/filepath" "runtime" "strconv" "strings" "sync" "syscall" "time" "github.com/containerd/containerd" "github.com/containerd/containerd/cio" "github.com/containerd/containerd/containers" "github.com/containerd/containerd/namespaces" "github.com/containerd/containerd/oci" specs "github.com/opencontainers/runtime-spec/specs-go" "github.com/sirupsen/logrus" "github.com/urfave/cli" ) const imageName = "docker.io/library/alpine:latest" func main() { // morr power! runtime.GOMAXPROCS(runtime.NumCPU()) app := cli.NewApp() app.Name = "containerd-stress" app.Description = "stress test a containerd daemon" app.Flags = []cli.Flag{ cli.BoolFlag{ Name: "debug", Usage: "set debug output in the logs", }, cli.StringFlag{ Name: "address,a", Value: "/run/containerd/containerd.sock", Usage: "path to the containerd socket", }, cli.IntFlag{ Name: "concurrent,c", Value: 1, Usage: "set the concurrency of the stress test", }, cli.DurationFlag{ Name: "duration,d", Value: 1 * time.Minute, Usage: "set the duration of the stress test", }, cli.BoolFlag{ Name: "exec", Usage: "add execs to the stress tests", }, } app.Before = func(context *cli.Context) error { if context.GlobalBool("debug") { logrus.SetLevel(logrus.DebugLevel) } return nil } app.Action = func(context *cli.Context) error { config := config{ Address: context.GlobalString("address"), Duration: context.GlobalDuration("duration"), Concurrency: context.GlobalInt("concurrent"), Exec: context.GlobalBool("exec"), } return test(config) } if err := app.Run(os.Args); err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(1) } } type config struct { Concurrency int Duration time.Duration Address string Exec bool } func (c config) newClient() (*containerd.Client, error) { return containerd.New(c.Address) } func test(c config) error { var ( wg sync.WaitGroup ctx = namespaces.WithNamespace(context.Background(), "stress") ) client, err := c.newClient() if err != nil { return err } defer client.Close() if err := cleanup(ctx, client); err != nil { return err } logrus.Infof("pulling %s", imageName) image, err := client.Pull(ctx, imageName, containerd.WithPullUnpack) if err != nil { return err } logrus.Info("generating spec from image") tctx, cancel := context.WithTimeout(ctx, c.Duration) go func() { s := make(chan os.Signal, 1) signal.Notify(s, syscall.SIGTERM, syscall.SIGINT) <-s cancel() }() var ( workers []*worker start = time.Now() ) logrus.Info("starting stress test run...") args := oci.WithProcessArgs("true") if c.Exec { args = oci.WithProcessArgs("sleep", "10") } for i := 0; i < c.Concurrency; i++ { wg.Add(1) spec, err := oci.GenerateSpec(ctx, client, &containers.Container{}, oci.WithImageConfig(image), args, ) if err != nil { return err } w := &worker{ id: i, wg: &wg, spec: spec, image: image, client: client, doExec: c.Exec, } workers = append(workers, w) go w.run(ctx, tctx) } wg.Wait() var ( total int failures int end = time.Now().Sub(start).Seconds() ) logrus.Infof("ending test run in %0.3f seconds", end) for _, w := range workers { total += w.count failures += w.failures } logrus.WithField("failures", failures).Infof( "create/start/delete %d containers in %0.3f seconds (%0.3f c/sec) or (%0.3f sec/c)", total, end, float64(total)/end, end/float64(total), ) return nil } type worker struct { id int wg *sync.WaitGroup count int failures int client *containerd.Client image containerd.Image spec *specs.Spec doExec bool } func (w *worker) run(ctx, tctx context.Context) { defer func() { w.wg.Done() logrus.Infof("worker %d finished", w.id) }() for { select { case <-tctx.Done(): return default: } w.count++ id := w.getID() logrus.Debugf("starting container %s", id) if err := w.runContainer(ctx, id); err != nil { if err != context.DeadlineExceeded || !strings.Contains(err.Error(), context.DeadlineExceeded.Error()) { w.failures++ logrus.WithError(err).Errorf("running container %s", id) } } } } func (w *worker) runContainer(ctx context.Context, id string) error { // fix up cgroups path for a default config w.spec.Linux.CgroupsPath = filepath.Join("/", "stress", id) c, err := w.client.NewContainer(ctx, id, containerd.WithNewSnapshot(id, w.image), containerd.WithSpec(w.spec, oci.WithUsername("games")), ) if err != nil { return err } defer c.Delete(ctx, containerd.WithSnapshotCleanup) task, err := c.NewTask(ctx, cio.NullIO) if err != nil { return err } defer task.Delete(ctx, containerd.WithProcessKill) statusC, err := task.Wait(ctx) if err != nil { return err } if err := task.Start(ctx); err != nil { return err } if w.doExec { for i := 0; i < 256; i++ { if err := w.exec(ctx, i, task); err != nil { w.failures++ logrus.WithError(err).Error("exec failure") } } if err := task.Kill(ctx, syscall.SIGKILL); err != nil { return err } } status := <-statusC _, _, err = status.Result() if err != nil { if err == context.DeadlineExceeded || err == context.Canceled { return nil } w.failures++ } return nil } func (w *worker) exec(ctx context.Context, i int, t containerd.Task) error { pSpec := *w.spec.Process pSpec.Args = []string{"true"} process, err := t.Exec(ctx, strconv.Itoa(i), &pSpec, cio.NullIO) if err != nil { return err } defer process.Delete(ctx) status, err := process.Wait(ctx) if err != nil { return err } if err := process.Start(ctx); err != nil { return err } <-status return nil } func (w *worker) getID() string { return fmt.Sprintf("%d-%d", w.id, w.count) } // cleanup cleans up any containers in the "stress" namespace before the test run func cleanup(ctx context.Context, client *containerd.Client) error { containers, err := client.Containers(ctx) if err != nil { return err } for _, c := range containers { task, err := c.Task(ctx, nil) if err == nil { task.Delete(ctx, containerd.WithProcessKill) } if err := c.Delete(ctx, containerd.WithSnapshotCleanup); err != nil { if derr := c.Delete(ctx); derr == nil { continue } return err } } return nil } docker-containerd-tags-docker-17.12.1/cmd/containerd/000077500000000000000000000000001322771672400223635ustar00rootroot00000000000000docker-containerd-tags-docker-17.12.1/cmd/containerd/builtins.go000066400000000000000000000015021322771672400245410ustar00rootroot00000000000000package main // register containerd builtins here import ( _ "github.com/containerd/containerd/diff/walking" _ "github.com/containerd/containerd/gc/scheduler" _ "github.com/containerd/containerd/services/containers" _ "github.com/containerd/containerd/services/content" _ "github.com/containerd/containerd/services/diff" _ "github.com/containerd/containerd/services/events" _ "github.com/containerd/containerd/services/healthcheck" _ "github.com/containerd/containerd/services/images" _ "github.com/containerd/containerd/services/introspection" _ "github.com/containerd/containerd/services/leases" _ "github.com/containerd/containerd/services/namespaces" _ "github.com/containerd/containerd/services/snapshots" _ "github.com/containerd/containerd/services/tasks" _ "github.com/containerd/containerd/services/version" ) docker-containerd-tags-docker-17.12.1/cmd/containerd/builtins_btrfs_linux.go000066400000000000000000000001371322771672400271630ustar00rootroot00000000000000// +build !no_btrfs package main import _ "github.com/containerd/containerd/snapshots/btrfs" docker-containerd-tags-docker-17.12.1/cmd/containerd/builtins_linux.go000066400000000000000000000002631322771672400257630ustar00rootroot00000000000000package main import ( _ "github.com/containerd/containerd/linux" _ "github.com/containerd/containerd/metrics/cgroups" _ "github.com/containerd/containerd/snapshots/overlay" ) docker-containerd-tags-docker-17.12.1/cmd/containerd/builtins_unix.go000066400000000000000000000001611322771672400256040ustar00rootroot00000000000000// +build darwin freebsd solaris package main import ( _ "github.com/containerd/containerd/snapshots/naive" ) docker-containerd-tags-docker-17.12.1/cmd/containerd/builtins_windows.go000066400000000000000000000001771322771672400263220ustar00rootroot00000000000000package main import ( _ "github.com/containerd/containerd/snapshots/windows" _ "github.com/containerd/containerd/windows" ) docker-containerd-tags-docker-17.12.1/cmd/containerd/config.go000066400000000000000000000006041322771672400241570ustar00rootroot00000000000000package main import ( "os" "github.com/urfave/cli" ) var configCommand = cli.Command{ Name: "config", Usage: "information on the containerd config", Subcommands: []cli.Command{ { Name: "default", Usage: "see the output of the default config", Action: func(context *cli.Context) error { _, err := defaultConfig().WriteTo(os.Stdout) return err }, }, }, } docker-containerd-tags-docker-17.12.1/cmd/containerd/config_linux.go000066400000000000000000000006311322771672400253760ustar00rootroot00000000000000package main import ( "github.com/containerd/containerd/defaults" "github.com/containerd/containerd/server" ) func defaultConfig() *server.Config { return &server.Config{ Root: defaults.DefaultRootDir, State: defaults.DefaultStateDir, GRPC: server.GRPCConfig{ Address: defaults.DefaultAddress, }, Debug: server.Debug{ Level: "info", Address: defaults.DefaultDebugAddress, }, } } docker-containerd-tags-docker-17.12.1/cmd/containerd/config_unsupported.go000066400000000000000000000006751322771672400266370ustar00rootroot00000000000000// +build !linux,!windows,!solaris package main import ( "github.com/containerd/containerd/defaults" "github.com/containerd/containerd/server" ) func defaultConfig() *server.Config { return &server.Config{ Root: defaults.DefaultRootDir, State: defaults.DefaultStateDir, GRPC: server.GRPCConfig{ Address: defaults.DefaultAddress, }, Debug: server.Debug{ Level: "info", Address: defaults.DefaultDebugAddress, }, } } docker-containerd-tags-docker-17.12.1/cmd/containerd/config_windows.go000066400000000000000000000006311322771672400257310ustar00rootroot00000000000000package main import ( "github.com/containerd/containerd/defaults" "github.com/containerd/containerd/server" ) func defaultConfig() *server.Config { return &server.Config{ Root: defaults.DefaultRootDir, State: defaults.DefaultStateDir, GRPC: server.GRPCConfig{ Address: defaults.DefaultAddress, }, Debug: server.Debug{ Level: "info", Address: defaults.DefaultDebugAddress, }, } } docker-containerd-tags-docker-17.12.1/cmd/containerd/main.go000066400000000000000000000115221322771672400236370ustar00rootroot00000000000000package main import ( "context" "fmt" "io/ioutil" golog "log" "net" "os" "os/signal" "time" "google.golang.org/grpc/grpclog" gocontext "golang.org/x/net/context" "github.com/containerd/containerd/log" "github.com/containerd/containerd/server" "github.com/containerd/containerd/sys" "github.com/containerd/containerd/version" "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com/urfave/cli" ) const usage = ` __ _ __ _________ ____ / /_____ _(_)___ ___ _________/ / / ___/ __ \/ __ \/ __/ __ ` + "`" + `/ / __ \/ _ \/ ___/ __ / / /__/ /_/ / / / / /_/ /_/ / / / / / __/ / / /_/ / \___/\____/_/ /_/\__/\__,_/_/_/ /_/\___/_/ \__,_/ high performance container runtime ` func init() { // Discard grpc logs so that they don't mess with our stdio grpclog.SetLogger(golog.New(ioutil.Discard, "", golog.LstdFlags)) cli.VersionPrinter = func(c *cli.Context) { fmt.Println(c.App.Name, version.Package, c.App.Version, version.Revision) } } func main() { app := cli.NewApp() app.Name = "containerd" app.Version = version.Version app.Usage = usage app.Flags = []cli.Flag{ cli.StringFlag{ Name: "config,c", Usage: "path to the configuration file", Value: defaultConfigPath, }, cli.StringFlag{ Name: "log-level,l", Usage: "set the logging level [debug, info, warn, error, fatal, panic]", }, cli.StringFlag{ Name: "address,a", Usage: "address for containerd's GRPC server", }, cli.StringFlag{ Name: "root", Usage: "containerd root directory", }, cli.StringFlag{ Name: "state", Usage: "containerd state directory", }, } app.Commands = []cli.Command{ configCommand, publishCommand, } app.Action = func(context *cli.Context) error { var ( start = time.Now() signals = make(chan os.Signal, 2048) serverC = make(chan *server.Server, 1) ctx = log.WithModule(gocontext.Background(), "containerd") config = defaultConfig() ) done := handleSignals(ctx, signals, serverC) // start the signal handler as soon as we can to make sure that // we don't miss any signals during boot signal.Notify(signals, handledSignals...) if err := server.LoadConfig(context.GlobalString("config"), config); err != nil && !os.IsNotExist(err) { return err } // apply flags to the config if err := applyFlags(context, config); err != nil { return err } address := config.GRPC.Address if address == "" { return errors.New("grpc address cannot be empty") } log.G(ctx).WithFields(logrus.Fields{ "version": version.Version, "revision": version.Revision, }).Info("starting containerd") server, err := server.New(ctx, config) if err != nil { return err } serverC <- server if config.Debug.Address != "" { l, err := sys.GetLocalListener(config.Debug.Address, config.Debug.UID, config.Debug.GID) if err != nil { return errors.Wrapf(err, "failed to get listener for debug endpoint") } serve(log.WithModule(ctx, "debug"), l, server.ServeDebug) } if config.Metrics.Address != "" { l, err := net.Listen("tcp", config.Metrics.Address) if err != nil { return errors.Wrapf(err, "failed to get listener for metrics endpoint") } serve(log.WithModule(ctx, "metrics"), l, server.ServeMetrics) } l, err := sys.GetLocalListener(address, config.GRPC.UID, config.GRPC.GID) if err != nil { return errors.Wrapf(err, "failed to get listener for main endpoint") } serve(log.WithModule(ctx, "grpc"), l, server.ServeGRPC) log.G(ctx).Infof("containerd successfully booted in %fs", time.Since(start).Seconds()) <-done return nil } if err := app.Run(os.Args); err != nil { fmt.Fprintf(os.Stderr, "containerd: %s\n", err) os.Exit(1) } } func serve(ctx context.Context, l net.Listener, serveFunc func(net.Listener) error) { path := l.Addr().String() log.G(ctx).WithField("address", path).Info("serving...") go func() { defer l.Close() if err := serveFunc(l); err != nil { log.G(ctx).WithError(err).WithField("address", path).Fatal("serve failure") } }() } func applyFlags(context *cli.Context, config *server.Config) error { // the order for config vs flag values is that flags will always override // the config values if they are set if err := setLevel(context, config); err != nil { return err } for _, v := range []struct { name string d *string }{ { name: "root", d: &config.Root, }, { name: "state", d: &config.State, }, { name: "address", d: &config.GRPC.Address, }, } { if s := context.GlobalString(v.name); s != "" { *v.d = s } } return nil } func setLevel(context *cli.Context, config *server.Config) error { l := context.GlobalString("log-level") if l == "" { l = config.Debug.Level } if l != "" { lvl, err := logrus.ParseLevel(l) if err != nil { return err } logrus.SetLevel(lvl) } return nil } docker-containerd-tags-docker-17.12.1/cmd/containerd/main_unix.go000066400000000000000000000024001322771672400246750ustar00rootroot00000000000000// +build linux darwin freebsd solaris package main import ( "context" "os" "runtime" "github.com/sirupsen/logrus" "golang.org/x/sys/unix" "github.com/containerd/containerd/log" "github.com/containerd/containerd/server" ) const defaultConfigPath = "/etc/containerd/config.toml" var handledSignals = []os.Signal{ unix.SIGTERM, unix.SIGINT, unix.SIGUSR1, unix.SIGPIPE, } func handleSignals(ctx context.Context, signals chan os.Signal, serverC chan *server.Server) chan struct{} { done := make(chan struct{}, 1) go func() { var server *server.Server for { select { case s := <-serverC: server = s case s := <-signals: log.G(ctx).WithField("signal", s).Debug("received signal") switch s { case unix.SIGUSR1: dumpStacks() case unix.SIGPIPE: continue default: if server == nil { close(done) return } server.Stop() close(done) } } } }() return done } func dumpStacks() { var ( buf []byte stackSize int ) bufferLen := 16384 for stackSize == len(buf) { buf = make([]byte, bufferLen) stackSize = runtime.Stack(buf, true) bufferLen *= 2 } buf = buf[:stackSize] logrus.Infof("=== BEGIN goroutine stack dump ===\n%s\n=== END goroutine stack dump ===", buf) } docker-containerd-tags-docker-17.12.1/cmd/containerd/main_windows.go000066400000000000000000000014311322771672400254070ustar00rootroot00000000000000package main import ( "context" "os" "path/filepath" "github.com/containerd/containerd/log" "github.com/containerd/containerd/server" "golang.org/x/sys/windows" ) var ( defaultConfigPath = filepath.Join(os.Getenv("programfiles"), "containerd", "config.toml") handledSignals = []os.Signal{ windows.SIGTERM, windows.SIGINT, } ) func handleSignals(ctx context.Context, signals chan os.Signal, serverC chan *server.Server) chan struct{} { done := make(chan struct{}) go func() { var server *server.Server for { select { case s := <-serverC: server = s case s := <-signals: log.G(ctx).WithField("signal", s).Debug("received signal") if server == nil { close(done) return } server.Stop() close(done) } } }() return done } docker-containerd-tags-docker-17.12.1/cmd/containerd/publish.go000066400000000000000000000043101322771672400243560ustar00rootroot00000000000000package main import ( gocontext "context" "io" "io/ioutil" "net" "os" "time" eventsapi "github.com/containerd/containerd/api/services/events/v1" "github.com/containerd/containerd/dialer" "github.com/containerd/containerd/errdefs" "github.com/containerd/containerd/namespaces" "github.com/gogo/protobuf/types" "github.com/pkg/errors" "github.com/urfave/cli" "google.golang.org/grpc" ) var publishCommand = cli.Command{ Name: "publish", Usage: "binary to publish events to containerd", Flags: []cli.Flag{ cli.StringFlag{ Name: "namespace", Usage: "namespace to publish to", }, cli.StringFlag{ Name: "topic", Usage: "topic of the event", }, }, Action: func(context *cli.Context) error { ctx := namespaces.WithNamespace(gocontext.Background(), context.String("namespace")) topic := context.String("topic") if topic == "" { return errors.New("topic required to publish event") } payload, err := getEventPayload(os.Stdin) if err != nil { return err } client, err := connectEvents(context.GlobalString("address")) if err != nil { return err } if _, err := client.Publish(ctx, &eventsapi.PublishRequest{ Topic: topic, Event: payload, }); err != nil { return errdefs.FromGRPC(err) } return nil }, } func getEventPayload(r io.Reader) (*types.Any, error) { data, err := ioutil.ReadAll(r) if err != nil { return nil, err } var any types.Any if err := any.Unmarshal(data); err != nil { return nil, err } return &any, nil } func connectEvents(address string) (eventsapi.EventsClient, error) { conn, err := connect(address, dialer.Dialer) if err != nil { return nil, errors.Wrapf(err, "failed to dial %q", address) } return eventsapi.NewEventsClient(conn), nil } func connect(address string, d func(string, time.Duration) (net.Conn, error)) (*grpc.ClientConn, error) { gopts := []grpc.DialOption{ grpc.WithBlock(), grpc.WithInsecure(), grpc.WithTimeout(60 * time.Second), grpc.WithDialer(d), grpc.FailOnNonTempDialError(true), grpc.WithBackoffMaxDelay(3 * time.Second), } conn, err := grpc.Dial(dialer.DialAddress(address), gopts...) if err != nil { return nil, errors.Wrapf(err, "failed to dial %q", address) } return conn, nil } docker-containerd-tags-docker-17.12.1/cmd/ctr/000077500000000000000000000000001322771672400210255ustar00rootroot00000000000000docker-containerd-tags-docker-17.12.1/cmd/ctr/commands/000077500000000000000000000000001322771672400226265ustar00rootroot00000000000000docker-containerd-tags-docker-17.12.1/cmd/ctr/commands/client.go000066400000000000000000000021771322771672400244420ustar00rootroot00000000000000package commands import ( gocontext "context" "github.com/containerd/containerd" "github.com/containerd/containerd/namespaces" "github.com/urfave/cli" ) // AppContext returns the context for a command. Should only be called once per // command, near the start. // // This will ensure the namespace is picked up and set the timeout, if one is // defined. func AppContext(context *cli.Context) (gocontext.Context, gocontext.CancelFunc) { var ( ctx = gocontext.Background() timeout = context.GlobalDuration("timeout") namespace = context.GlobalString("namespace") cancel gocontext.CancelFunc ) ctx = namespaces.WithNamespace(ctx, namespace) if timeout > 0 { ctx, cancel = gocontext.WithTimeout(ctx, timeout) } else { ctx, cancel = gocontext.WithCancel(ctx) } return ctx, cancel } // NewClient returns a new containerd client func NewClient(context *cli.Context) (*containerd.Client, gocontext.Context, gocontext.CancelFunc, error) { client, err := containerd.New(context.GlobalString("address")) if err != nil { return nil, nil, nil, err } ctx, cancel := AppContext(context) return client, ctx, cancel, nil } docker-containerd-tags-docker-17.12.1/cmd/ctr/commands/commands.go000066400000000000000000000036521322771672400247640ustar00rootroot00000000000000package commands import ( "encoding/json" "fmt" "os" "strings" "github.com/containerd/containerd" "github.com/urfave/cli" ) var ( // SnapshotterFlags are cli flags specifying snapshotter names SnapshotterFlags = []cli.Flag{ cli.StringFlag{ Name: "snapshotter", Usage: "snapshotter name. Empty value stands for the default value.", Value: containerd.DefaultSnapshotter, EnvVar: "CONTAINERD_SNAPSHOTTER", }, } // LabelFlag is a cli flag specifying labels LabelFlag = cli.StringSliceFlag{ Name: "label", Usage: "labels to attach to the image", } // RegistryFlags are cli flags specifying registry options RegistryFlags = []cli.Flag{ cli.BoolFlag{ Name: "skip-verify,k", Usage: "skip SSL certificate validation", }, cli.BoolFlag{ Name: "plain-http", Usage: "allow connections using plain HTTP", }, cli.StringFlag{ Name: "user,u", Usage: "user[:password] Registry user and password", }, cli.StringFlag{ Name: "refresh", Usage: "refresh token for authorization server", }, } ) // ObjectWithLabelArgs returns the first arg and a LabelArgs object func ObjectWithLabelArgs(clicontext *cli.Context) (string, map[string]string) { var ( first = clicontext.Args().First() labelStrings = clicontext.Args().Tail() ) return first, LabelArgs(labelStrings) } // LabelArgs returns a map of label key,value pairs func LabelArgs(labelStrings []string) map[string]string { labels := make(map[string]string, len(labelStrings)) for _, label := range labelStrings { parts := strings.SplitN(label, "=", 2) key := parts[0] value := "true" if len(parts) > 1 { value = parts[1] } labels[key] = value } return labels } // PrintAsJSON prints input in JSON format func PrintAsJSON(x interface{}) { b, err := json.MarshalIndent(x, "", " ") if err != nil { fmt.Fprintf(os.Stderr, "can't marshal %+v as a JSON string: %v\n", x, err) } fmt.Println(string(b)) } docker-containerd-tags-docker-17.12.1/cmd/ctr/commands/containers/000077500000000000000000000000001322771672400247735ustar00rootroot00000000000000docker-containerd-tags-docker-17.12.1/cmd/ctr/commands/containers/containers.go000066400000000000000000000113261322771672400274720ustar00rootroot00000000000000package containers import ( "context" "errors" "fmt" "os" "strings" "text/tabwriter" "github.com/containerd/containerd" "github.com/containerd/containerd/cmd/ctr/commands" "github.com/containerd/containerd/log" "github.com/urfave/cli" ) // Command is the cli command for managing containers var Command = cli.Command{ Name: "containers", Usage: "manage containers", Aliases: []string{"c", "container"}, Subcommands: []cli.Command{ deleteCommand, infoCommand, listCommand, setLabelsCommand, }, } var listCommand = cli.Command{ Name: "list", Aliases: []string{"ls"}, Usage: "list containers", ArgsUsage: "[flags] [, ...]", Flags: []cli.Flag{ cli.BoolFlag{ Name: "quiet, q", Usage: "print only the container id", }, }, Action: func(context *cli.Context) error { var ( filters = context.Args() quiet = context.Bool("quiet") ) client, ctx, cancel, err := commands.NewClient(context) if err != nil { return err } defer cancel() containers, err := client.Containers(ctx, filters...) if err != nil { return err } if quiet { for _, c := range containers { fmt.Printf("%s\n", c.ID()) } return nil } w := tabwriter.NewWriter(os.Stdout, 4, 8, 4, ' ', 0) fmt.Fprintln(w, "CONTAINER\tIMAGE\tRUNTIME\t") for _, c := range containers { info, err := c.Info(ctx) if err != nil { return err } imageName := info.Image if imageName == "" { imageName = "-" } if _, err := fmt.Fprintf(w, "%s\t%s\t%s\t\n", c.ID(), imageName, info.Runtime.Name, ); err != nil { return err } } return w.Flush() }, } var deleteCommand = cli.Command{ Name: "delete", Usage: "delete one or more existing containers", ArgsUsage: "[flags] CONTAINER [CONTAINER, ...]", Aliases: []string{"del", "rm"}, Flags: []cli.Flag{ cli.BoolFlag{ Name: "keep-snapshot", Usage: "do not clean up snapshot with container", }, }, Action: func(context *cli.Context) error { var exitErr error client, ctx, cancel, err := commands.NewClient(context) if err != nil { return err } defer cancel() deleteOpts := []containerd.DeleteOpts{} if !context.Bool("keep-snapshot") { deleteOpts = append(deleteOpts, containerd.WithSnapshotCleanup) } if context.NArg() == 0 { return errors.New("must specify at least one container to delete") } for _, arg := range context.Args() { if err := deleteContainer(ctx, client, arg, deleteOpts...); err != nil { if exitErr == nil { exitErr = err } log.G(ctx).WithError(err).Errorf("failed to delete container %q", arg) } } return exitErr }, } func deleteContainer(ctx context.Context, client *containerd.Client, id string, opts ...containerd.DeleteOpts) error { container, err := client.LoadContainer(ctx, id) if err != nil { return err } task, err := container.Task(ctx, nil) if err != nil { return container.Delete(ctx, opts...) } status, err := task.Status(ctx) if err != nil { return err } if status.Status == containerd.Stopped || status.Status == containerd.Created { if _, err := task.Delete(ctx); err != nil { return err } return container.Delete(ctx, opts...) } return fmt.Errorf("cannot delete a non stopped container: %v", status) } var setLabelsCommand = cli.Command{ Name: "label", Usage: "set and clear labels for a container", ArgsUsage: "[flags] [=, ...]", Description: "set and clear labels for a container", Flags: []cli.Flag{}, Action: func(context *cli.Context) error { containerID, labels := commands.ObjectWithLabelArgs(context) if containerID == "" { return errors.New("please specify a container") } client, ctx, cancel, err := commands.NewClient(context) if err != nil { return err } defer cancel() container, err := client.LoadContainer(ctx, containerID) if err != nil { return err } setlabels, err := container.SetLabels(ctx, labels) if err != nil { return err } var labelStrings []string for k, v := range setlabels { labelStrings = append(labelStrings, fmt.Sprintf("%s=%s", k, v)) } fmt.Println(strings.Join(labelStrings, ",")) return nil }, } var infoCommand = cli.Command{ Name: "info", Usage: "get info about a container", ArgsUsage: "CONTAINER", Action: func(context *cli.Context) error { id := context.Args().First() if id == "" { return errors.New("container id must be provided") } client, ctx, cancel, err := commands.NewClient(context) if err != nil { return err } defer cancel() container, err := client.LoadContainer(ctx, id) if err != nil { return err } info, err := container.Info(ctx) if err != nil { return err } commands.PrintAsJSON(info) return nil }, } docker-containerd-tags-docker-17.12.1/cmd/ctr/commands/content/000077500000000000000000000000001322771672400243005ustar00rootroot00000000000000docker-containerd-tags-docker-17.12.1/cmd/ctr/commands/content/content.go000066400000000000000000000304531322771672400263060ustar00rootroot00000000000000package content import ( "fmt" "io" "io/ioutil" "os" "os/exec" "strings" "text/tabwriter" "time" "github.com/containerd/containerd/cmd/ctr/commands" "github.com/containerd/containerd/content" "github.com/containerd/containerd/errdefs" "github.com/containerd/containerd/log" units "github.com/docker/go-units" digest "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" "github.com/pkg/errors" "github.com/urfave/cli" ) var ( // Command is the cli command for managing content Command = cli.Command{ Name: "content", Usage: "manage content", Subcommands: cli.Commands{ activeIngestCommand, deleteCommand, editCommand, fetchCommand, fetchObjectCommand, getCommand, ingestCommand, listCommand, pushObjectCommand, setLabelsCommand, }, } getCommand = cli.Command{ Name: "get", Usage: "get the data for an object", ArgsUsage: "[, ...]", Description: "display the image object", Action: func(context *cli.Context) error { dgst, err := digest.Parse(context.Args().First()) if err != nil { return err } client, ctx, cancel, err := commands.NewClient(context) if err != nil { return err } defer cancel() cs := client.ContentStore() ra, err := cs.ReaderAt(ctx, dgst) if err != nil { return err } defer ra.Close() _, err = io.Copy(os.Stdout, content.NewReader(ra)) return err }, } ingestCommand = cli.Command{ Name: "ingest", Usage: "accept content into the store", ArgsUsage: "[flags] ", Description: "ingest objects into the local content store", Flags: []cli.Flag{ cli.Int64Flag{ Name: "expected-size", Usage: "validate against provided size", }, cli.StringFlag{ Name: "expected-digest", Usage: "verify content against expected digest", }, }, Action: func(context *cli.Context) error { var ( ref = context.Args().First() expectedSize = context.Int64("expected-size") expectedDigest = digest.Digest(context.String("expected-digest")) ) if err := expectedDigest.Validate(); expectedDigest != "" && err != nil { return err } if ref == "" { return errors.New("must specify a transaction reference") } client, ctx, cancel, err := commands.NewClient(context) if err != nil { return err } defer cancel() cs := client.ContentStore() // TODO(stevvooe): Allow ingest to be reentrant. Currently, we expect // all data to be written in a single invocation. Allow multiple writes // to the same transaction key followed by a commit. return content.WriteBlob(ctx, cs, ref, os.Stdin, expectedSize, expectedDigest) }, } activeIngestCommand = cli.Command{ Name: "active", Usage: "display active transfers", ArgsUsage: "[flags] []", Description: "display the ongoing transfers", Flags: []cli.Flag{ cli.DurationFlag{ Name: "timeout, t", Usage: "total timeout for fetch", EnvVar: "CONTAINERD_FETCH_TIMEOUT", }, cli.StringFlag{ Name: "root", Usage: "path to content store root", Value: "/tmp/content", // TODO(stevvooe): for now, just use the PWD/.content }, }, Action: func(context *cli.Context) error { match := context.Args().First() client, ctx, cancel, err := commands.NewClient(context) if err != nil { return err } defer cancel() cs := client.ContentStore() active, err := cs.ListStatuses(ctx, match) if err != nil { return err } tw := tabwriter.NewWriter(os.Stdout, 1, 8, 1, '\t', 0) fmt.Fprintln(tw, "REF\tSIZE\tAGE\t") for _, active := range active { fmt.Fprintf(tw, "%s\t%s\t%s\t\n", active.Ref, units.HumanSize(float64(active.Offset)), units.HumanDuration(time.Since(active.StartedAt))) } return tw.Flush() }, } listCommand = cli.Command{ Name: "list", Aliases: []string{"ls"}, Usage: "list all blobs in the store", ArgsUsage: "[flags]", Description: "list blobs in the content store", Flags: []cli.Flag{ cli.BoolFlag{ Name: "quiet, q", Usage: "print only the blob digest", }, }, Action: func(context *cli.Context) error { var ( quiet = context.Bool("quiet") args = []string(context.Args()) ) client, ctx, cancel, err := commands.NewClient(context) if err != nil { return err } defer cancel() cs := client.ContentStore() var walkFn content.WalkFunc if quiet { walkFn = func(info content.Info) error { fmt.Println(info.Digest) return nil } } else { tw := tabwriter.NewWriter(os.Stdout, 1, 8, 1, '\t', 0) defer tw.Flush() fmt.Fprintln(tw, "DIGEST\tSIZE\tAGE\tLABELS") walkFn = func(info content.Info) error { var labelStrings []string for k, v := range info.Labels { labelStrings = append(labelStrings, strings.Join([]string{k, v}, "=")) } labels := strings.Join(labelStrings, ",") if labels == "" { labels = "-" } fmt.Fprintf(tw, "%s\t%s\t%s\t%s\n", info.Digest, units.HumanSize(float64(info.Size)), units.HumanDuration(time.Since(info.CreatedAt)), labels) return nil } } return cs.Walk(ctx, walkFn, args...) }, } setLabelsCommand = cli.Command{ Name: "label", Usage: "add labels to content", ArgsUsage: " [