Showing preview only (1,088K chars total). Download the full file or copy to clipboard to get everything.
Repository: containerd/rust-extensions
Branch: main
Commit: 1471c147e24f
Files: 264
Total size: 991.7 KB
Directory structure:
gitextract__mh1hr60/
├── .gitattributes
├── .github/
│ ├── dependabot.yml
│ ├── labeler.yml
│ ├── release.yml
│ └── workflows/
│ ├── ci.yml
│ ├── cover.yml
│ ├── labeler.yml
│ ├── publish.yml
│ └── stale.yml
├── .gitignore
├── Cargo.toml
├── LICENSE
├── MAINTAINERS
├── README.md
├── clippy.toml
├── codecov.yml
├── crates/
│ ├── client/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── build.rs
│ │ ├── examples/
│ │ │ ├── container.rs
│ │ │ ├── container_events.rs
│ │ │ ├── container_pull.rs
│ │ │ ├── container_spec.json
│ │ │ └── version.rs
│ │ ├── rsync.txt
│ │ ├── src/
│ │ │ └── lib.rs
│ │ └── vendor/
│ │ ├── README.md
│ │ ├── github.com/
│ │ │ └── containerd/
│ │ │ └── containerd/
│ │ │ ├── api/
│ │ │ │ ├── events/
│ │ │ │ │ ├── container.proto
│ │ │ │ │ ├── content.proto
│ │ │ │ │ ├── image.proto
│ │ │ │ │ ├── namespace.proto
│ │ │ │ │ ├── sandbox.proto
│ │ │ │ │ ├── snapshot.proto
│ │ │ │ │ └── task.proto
│ │ │ │ ├── services/
│ │ │ │ │ ├── containers/
│ │ │ │ │ │ └── v1/
│ │ │ │ │ │ └── containers.proto
│ │ │ │ │ ├── content/
│ │ │ │ │ │ └── v1/
│ │ │ │ │ │ └── content.proto
│ │ │ │ │ ├── diff/
│ │ │ │ │ │ └── v1/
│ │ │ │ │ │ └── diff.proto
│ │ │ │ │ ├── events/
│ │ │ │ │ │ └── v1/
│ │ │ │ │ │ └── events.proto
│ │ │ │ │ ├── images/
│ │ │ │ │ │ └── v1/
│ │ │ │ │ │ └── images.proto
│ │ │ │ │ ├── introspection/
│ │ │ │ │ │ └── v1/
│ │ │ │ │ │ └── introspection.proto
│ │ │ │ │ ├── leases/
│ │ │ │ │ │ └── v1/
│ │ │ │ │ │ └── leases.proto
│ │ │ │ │ ├── mounts/
│ │ │ │ │ │ └── v1/
│ │ │ │ │ │ └── mounts.proto
│ │ │ │ │ ├── namespaces/
│ │ │ │ │ │ └── v1/
│ │ │ │ │ │ └── namespace.proto
│ │ │ │ │ ├── sandbox/
│ │ │ │ │ │ └── v1/
│ │ │ │ │ │ └── sandbox.proto
│ │ │ │ │ ├── snapshots/
│ │ │ │ │ │ └── v1/
│ │ │ │ │ │ └── snapshots.proto
│ │ │ │ │ ├── streaming/
│ │ │ │ │ │ └── v1/
│ │ │ │ │ │ └── streaming.proto
│ │ │ │ │ ├── tasks/
│ │ │ │ │ │ └── v1/
│ │ │ │ │ │ └── tasks.proto
│ │ │ │ │ ├── transfer/
│ │ │ │ │ │ └── v1/
│ │ │ │ │ │ └── transfer.proto
│ │ │ │ │ ├── ttrpc/
│ │ │ │ │ │ └── events/
│ │ │ │ │ │ └── v1/
│ │ │ │ │ │ └── events.proto
│ │ │ │ │ └── version/
│ │ │ │ │ └── v1/
│ │ │ │ │ └── version.proto
│ │ │ │ └── types/
│ │ │ │ ├── descriptor.proto
│ │ │ │ ├── event.proto
│ │ │ │ ├── fieldpath.proto
│ │ │ │ ├── introspection.proto
│ │ │ │ ├── metrics.proto
│ │ │ │ ├── mount.proto
│ │ │ │ ├── platform.proto
│ │ │ │ ├── runc/
│ │ │ │ │ └── options/
│ │ │ │ │ └── oci.proto
│ │ │ │ ├── runtimeoptions/
│ │ │ │ │ └── v1/
│ │ │ │ │ └── api.proto
│ │ │ │ ├── sandbox.proto
│ │ │ │ ├── task/
│ │ │ │ │ └── task.proto
│ │ │ │ └── transfer/
│ │ │ │ ├── container.proto
│ │ │ │ ├── imagestore.proto
│ │ │ │ ├── importexport.proto
│ │ │ │ ├── progress.proto
│ │ │ │ ├── registry.proto
│ │ │ │ └── streaming.proto
│ │ │ └── vendor/
│ │ │ └── github.com/
│ │ │ └── containerd/
│ │ │ └── containerd/
│ │ │ └── api/
│ │ │ ├── events/
│ │ │ │ ├── container.proto
│ │ │ │ ├── content.proto
│ │ │ │ ├── image.proto
│ │ │ │ ├── namespace.proto
│ │ │ │ ├── sandbox.proto
│ │ │ │ ├── snapshot.proto
│ │ │ │ └── task.proto
│ │ │ ├── services/
│ │ │ │ ├── containers/
│ │ │ │ │ └── v1/
│ │ │ │ │ └── containers.proto
│ │ │ │ ├── content/
│ │ │ │ │ └── v1/
│ │ │ │ │ └── content.proto
│ │ │ │ ├── diff/
│ │ │ │ │ └── v1/
│ │ │ │ │ └── diff.proto
│ │ │ │ ├── events/
│ │ │ │ │ └── v1/
│ │ │ │ │ └── events.proto
│ │ │ │ ├── images/
│ │ │ │ │ └── v1/
│ │ │ │ │ └── images.proto
│ │ │ │ ├── introspection/
│ │ │ │ │ └── v1/
│ │ │ │ │ └── introspection.proto
│ │ │ │ ├── leases/
│ │ │ │ │ └── v1/
│ │ │ │ │ └── leases.proto
│ │ │ │ ├── mounts/
│ │ │ │ │ └── v1/
│ │ │ │ │ └── mounts.proto
│ │ │ │ ├── namespaces/
│ │ │ │ │ └── v1/
│ │ │ │ │ └── namespace.proto
│ │ │ │ ├── sandbox/
│ │ │ │ │ └── v1/
│ │ │ │ │ └── sandbox.proto
│ │ │ │ ├── snapshots/
│ │ │ │ │ └── v1/
│ │ │ │ │ └── snapshots.proto
│ │ │ │ ├── streaming/
│ │ │ │ │ └── v1/
│ │ │ │ │ └── streaming.proto
│ │ │ │ ├── tasks/
│ │ │ │ │ └── v1/
│ │ │ │ │ └── tasks.proto
│ │ │ │ ├── transfer/
│ │ │ │ │ └── v1/
│ │ │ │ │ └── transfer.proto
│ │ │ │ ├── ttrpc/
│ │ │ │ │ └── events/
│ │ │ │ │ └── v1/
│ │ │ │ │ └── events.proto
│ │ │ │ └── version/
│ │ │ │ └── v1/
│ │ │ │ └── version.proto
│ │ │ └── types/
│ │ │ ├── descriptor.proto
│ │ │ ├── event.proto
│ │ │ ├── fieldpath.proto
│ │ │ ├── introspection.proto
│ │ │ ├── metrics.proto
│ │ │ ├── mount.proto
│ │ │ ├── platform.proto
│ │ │ ├── runc/
│ │ │ │ └── options/
│ │ │ │ └── oci.proto
│ │ │ ├── runtimeoptions/
│ │ │ │ └── v1/
│ │ │ │ └── api.proto
│ │ │ ├── sandbox.proto
│ │ │ ├── task/
│ │ │ │ └── task.proto
│ │ │ └── transfer/
│ │ │ ├── container.proto
│ │ │ ├── imagestore.proto
│ │ │ ├── importexport.proto
│ │ │ ├── progress.proto
│ │ │ ├── registry.proto
│ │ │ └── streaming.proto
│ │ └── google/
│ │ ├── protobuf/
│ │ │ ├── any.proto
│ │ │ ├── descriptor.proto
│ │ │ ├── empty.proto
│ │ │ ├── field_mask.proto
│ │ │ └── timestamp.proto
│ │ └── rpc/
│ │ └── status.proto
│ ├── logging/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── examples/
│ │ │ └── journal.rs
│ │ └── src/
│ │ └── lib.rs
│ ├── runc/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── asynchronous/
│ │ │ ├── io.rs
│ │ │ ├── mod.rs
│ │ │ ├── pipe.rs
│ │ │ └── runc.rs
│ │ ├── container.rs
│ │ ├── error.rs
│ │ ├── events.rs
│ │ ├── lib.rs
│ │ ├── monitor.rs
│ │ ├── options.rs
│ │ ├── synchronous/
│ │ │ ├── io.rs
│ │ │ ├── mod.rs
│ │ │ ├── pipe.rs
│ │ │ └── runc.rs
│ │ └── utils.rs
│ ├── runc-shim/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── build.rs
│ │ └── src/
│ │ ├── cgroup_memory.rs
│ │ ├── common.rs
│ │ ├── console.rs
│ │ ├── container.rs
│ │ ├── io.rs
│ │ ├── main.rs
│ │ ├── processes.rs
│ │ ├── runc.rs
│ │ ├── service.rs
│ │ └── task.rs
│ ├── shim/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── examples/
│ │ │ ├── publish.rs
│ │ │ ├── skeleton.rs
│ │ │ ├── skeleton_async.rs
│ │ │ └── windows_log_reader.rs
│ │ └── src/
│ │ ├── args.rs
│ │ ├── asynchronous/
│ │ │ ├── mod.rs
│ │ │ ├── monitor.rs
│ │ │ ├── publisher.rs
│ │ │ └── util.rs
│ │ ├── cgroup.rs
│ │ ├── error.rs
│ │ ├── event.rs
│ │ ├── lib.rs
│ │ ├── logger.rs
│ │ ├── monitor.rs
│ │ ├── mount_linux.rs
│ │ ├── mount_other.rs
│ │ ├── reap.rs
│ │ ├── synchronous/
│ │ │ ├── mod.rs
│ │ │ ├── monitor.rs
│ │ │ ├── publisher.rs
│ │ │ └── util.rs
│ │ └── util.rs
│ ├── shim-protos/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── build.rs
│ │ ├── examples/
│ │ │ ├── connect-async.rs
│ │ │ ├── connect.rs
│ │ │ ├── ttrpc-client-async.rs
│ │ │ ├── ttrpc-client.rs
│ │ │ ├── ttrpc-server-async.rs
│ │ │ └── ttrpc-server.rs
│ │ ├── rsync.txt
│ │ ├── src/
│ │ │ ├── cgroups.rs
│ │ │ ├── cgroups_v2.rs
│ │ │ ├── events.rs
│ │ │ ├── lib.rs
│ │ │ ├── sandbox.rs
│ │ │ ├── shim.rs
│ │ │ ├── topics.rs
│ │ │ ├── types.rs
│ │ │ └── windows.rs
│ │ ├── tests/
│ │ │ └── ttrpc.rs
│ │ └── vendor/
│ │ ├── README.md
│ │ ├── github.com/
│ │ │ └── containerd/
│ │ │ ├── cgroups/
│ │ │ │ ├── cgroup2/
│ │ │ │ │ └── stats/
│ │ │ │ │ └── metrics.proto
│ │ │ │ ├── stats/
│ │ │ │ │ └── v1/
│ │ │ │ │ └── metrics.proto
│ │ │ │ └── v3/
│ │ │ │ └── cgroup1/
│ │ │ │ └── stats/
│ │ │ │ └── metrics.proto
│ │ │ └── containerd/
│ │ │ ├── api/
│ │ │ │ ├── events/
│ │ │ │ │ ├── container.proto
│ │ │ │ │ ├── content.proto
│ │ │ │ │ ├── image.proto
│ │ │ │ │ ├── namespace.proto
│ │ │ │ │ ├── sandbox.proto
│ │ │ │ │ ├── snapshot.proto
│ │ │ │ │ └── task.proto
│ │ │ │ ├── runtime/
│ │ │ │ │ ├── sandbox/
│ │ │ │ │ │ └── v1/
│ │ │ │ │ │ └── sandbox.proto
│ │ │ │ │ └── task/
│ │ │ │ │ └── v2/
│ │ │ │ │ └── shim.proto
│ │ │ │ ├── services/
│ │ │ │ │ └── ttrpc/
│ │ │ │ │ └── events/
│ │ │ │ │ └── v1/
│ │ │ │ │ └── events.proto
│ │ │ │ └── types/
│ │ │ │ ├── descriptor.proto
│ │ │ │ ├── event.proto
│ │ │ │ ├── fieldpath.proto
│ │ │ │ ├── introspection.proto
│ │ │ │ ├── metrics.proto
│ │ │ │ ├── mount.proto
│ │ │ │ ├── platform.proto
│ │ │ │ ├── runc/
│ │ │ │ │ └── options/
│ │ │ │ │ └── oci.proto
│ │ │ │ ├── sandbox.proto
│ │ │ │ └── task/
│ │ │ │ └── task.proto
│ │ │ └── vendor/
│ │ │ └── github.com/
│ │ │ └── containerd/
│ │ │ └── containerd/
│ │ │ └── api/
│ │ │ ├── events/
│ │ │ │ ├── container.proto
│ │ │ │ ├── content.proto
│ │ │ │ ├── image.proto
│ │ │ │ ├── namespace.proto
│ │ │ │ ├── sandbox.proto
│ │ │ │ ├── snapshot.proto
│ │ │ │ └── task.proto
│ │ │ ├── runtime/
│ │ │ │ ├── sandbox/
│ │ │ │ │ └── v1/
│ │ │ │ │ └── sandbox.proto
│ │ │ │ └── task/
│ │ │ │ └── v2/
│ │ │ │ └── shim.proto
│ │ │ ├── services/
│ │ │ │ └── ttrpc/
│ │ │ │ └── events/
│ │ │ │ └── v1/
│ │ │ │ └── events.proto
│ │ │ └── types/
│ │ │ ├── descriptor.proto
│ │ │ ├── event.proto
│ │ │ ├── fieldpath.proto
│ │ │ ├── introspection.proto
│ │ │ ├── metrics.proto
│ │ │ ├── mount.proto
│ │ │ ├── platform.proto
│ │ │ ├── runc/
│ │ │ │ └── options/
│ │ │ │ └── oci.proto
│ │ │ ├── sandbox.proto
│ │ │ └── task/
│ │ │ └── task.proto
│ │ ├── gogoproto/
│ │ │ └── gogo.proto
│ │ ├── google/
│ │ │ └── protobuf/
│ │ │ ├── any.proto
│ │ │ ├── descriptor.proto
│ │ │ ├── empty.proto
│ │ │ └── timestamp.proto
│ │ └── microsoft/
│ │ └── hcsshim/
│ │ └── cmd/
│ │ └── containerd-shim-runhcs-v1/
│ │ └── stats/
│ │ └── stats.proto
│ └── snapshots/
│ ├── Cargo.toml
│ ├── README.md
│ ├── build.rs
│ ├── examples/
│ │ └── snapshotter.rs
│ ├── rsync.txt
│ ├── src/
│ │ ├── convert.rs
│ │ ├── lib.rs
│ │ └── wrap.rs
│ └── vendor/
│ ├── github.com/
│ │ └── containerd/
│ │ └── containerd/
│ │ ├── api/
│ │ │ ├── services/
│ │ │ │ └── snapshots/
│ │ │ │ └── v1/
│ │ │ │ └── snapshots.proto
│ │ │ └── types/
│ │ │ └── mount.proto
│ │ └── vendor/
│ │ └── github.com/
│ │ └── containerd/
│ │ └── containerd/
│ │ └── api/
│ │ ├── services/
│ │ │ └── snapshots/
│ │ │ └── v1/
│ │ │ └── snapshots.proto
│ │ └── types/
│ │ └── mount.proto
│ ├── gogoproto/
│ │ └── gogo.proto
│ └── google/
│ └── protobuf/
│ ├── descriptor.proto
│ ├── empty.proto
│ ├── field_mask.proto
│ └── timestamp.proto
├── deny.toml
├── rust-toolchain.toml
├── rustfmt.toml
└── scripts/
├── install-protobuf.sh
└── update-vendor.sh
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitattributes
================================================
* text=auto eol=lf
================================================
FILE: .github/dependabot.yml
================================================
version: 2
updates:
- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "daily"
labels:
- T-dependencies
# Ensure that references to actions in a repository's workflow.yml file are kept up to date.
# See https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/keeping-your-actions-up-to-date-with-dependabot
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
labels:
# Mark PRs as CI related change.
- T-CI
================================================
FILE: .github/labeler.yml
================================================
# Automatically assign labels to PRs.
# `C-` project crate(s) affected.
# `T-` change type (CI, docs, etc).
C-client:
- changed-files:
- any-glob-to-any-file: crates/client/**
C-logging:
- changed-files:
- any-glob-to-any-file: crates/logging/**
C-runc:
- changed-files:
- any-glob-to-any-file: crates/runc/**
C-runc-shim:
- changed-files:
- any-glob-to-any-file: crates/runc-shim/**
C-shim:
- changed-files:
- any-glob-to-any-file: crates/shim/**
C-shim-protos:
- changed-files:
- any-glob-to-any-file: crates/shim-protos/**
C-snapshots:
- changed-files:
- any-glob-to-any-file: crates/snapshots/**
T-CI:
- changed-files:
- any-glob-to-any-file: [".github/**", "*.toml"]
T-docs:
- changed-files:
- any-glob-to-any-file: "**/*.md"
================================================
FILE: .github/release.yml
================================================
changelog:
categories:
- title: Runc crate
labels:
- C-runc
- title: Runc shim crate
labels:
- C-runc-shim
- title: Shim crate
labels:
- C-shim
- title: Shim protos crate
labels:
- C-shim-protos
- title: Snapshots crate
labels:
- C-snapshots
- title: Client crate
labels:
- C-client
- title: Logging crate
labels:
- C-logging
- title: Other changes
labels:
- T-CI
- T-docs
================================================
FILE: .github/workflows/ci.yml
================================================
name: CI
on:
pull_request:
push:
merge_group:
schedule:
- cron: '0 0 * * *' # Every day at midnight
jobs:
checks:
name: Checks
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
- os: macos-latest
target: aarch64-apple-darwin
steps:
- uses: actions/checkout@v6
- run: ./scripts/install-protobuf.sh
shell: bash
- if: matrix.target == 'x86_64-unknown-linux-musl'
run: sudo apt-get update && sudo apt-get install -y musl-tools && rustup target add x86_64-unknown-linux-musl
- run: rustup toolchain install nightly --component rustfmt --target ${{ matrix.target }}
- run: cargo +nightly fmt --all -- --check
# the "runc" and "containerd-shim" crates have `sync` code that is not covered by the workspace
- run: cargo check -p runc --all-targets --target ${{ matrix.target }}
- run: cargo clippy -p runc --all-targets --target ${{ matrix.target }} -- -D warnings
- run: cargo check -p containerd-shim --all-targets --target ${{ matrix.target }}
- run: cargo clippy -p containerd-shim --all-targets --target ${{ matrix.target }} -- -D warnings
# check the workspace
- run: cargo check --examples --tests --all-targets --target ${{ matrix.target }}
- run: cargo check --examples --tests --all-targets --all-features --target ${{ matrix.target }}
- run: cargo clippy --all-targets --target ${{ matrix.target }} -- -D warnings
- run: cargo clippy --all-targets --all-features --target ${{ matrix.target }} -- -D warnings
- run: cargo doc --no-deps --features docs
env:
RUSTDOCFLAGS: -Dwarnings
- name: check unused dependencies
uses: bnjbvr/cargo-machete@v0.9.2
env:
RUSTUP_TOOLCHAIN: "stable"
# TODO: Merge this with the checks job above
windows-checks:
name: Windows Checks
runs-on: windows-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v6
- run: ./scripts/install-protobuf.sh
shell: bash
- run: cargo check --examples --tests -p containerd-shim -p containerd-shim-protos -p containerd-client
- run: rustup toolchain install nightly --component rustfmt
- run: cargo +nightly fmt -p containerd-shim -p containerd-shim-protos -p containerd-client -- --check
- run: cargo clippy -p containerd-shim -p containerd-shim-protos -- -D warnings
- run: cargo doc --no-deps -p containerd-shim -p containerd-shim-protos -p containerd-client
env:
RUSTDOCFLAGS: -Dwarnings
tests:
name: Tests
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v6
- run: ./scripts/install-protobuf.sh
shell: bash
- run: |
# runc-shim::cgroup::test_add_cgroup needs root permission to set cgroup
mkdir -p /tmp/dummy-xdr
sudo -E $(command -v cargo) test
sudo -E $(command -v cargo) test --all-features
# the shim has sync code that is not covered when running with --all-features
sudo -E $(command -v cargo) test -p containerd-shim
if: ${{ !contains(matrix.os, 'windows') }}
env:
# runc::tests::test_exec needs $XDG_RUNTIME_DIR to be set
XDG_RUNTIME_DIR: /tmp/dummy-xdr
- run: cargo test -p containerd-shim -p containerd-shim-protos -p containerd-client
if: ${{ contains(matrix.os, 'windows') }}
# Collect build timings
# See https://blog.rust-lang.org/2022/04/07/Rust-1.60.0.html#cargo---timings
timings:
name: Timings
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v6
- run: ./scripts/install-protobuf.sh
shell: bash
- run: cargo build --all-features --timings
- uses: actions/upload-artifact@v7
with:
name: timings
path: target/cargo-timings/cargo-timing.html
if-no-files-found: error
deny:
name: Deny
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v6
- uses: EmbarkStudios/cargo-deny-action@v2
linux-integration:
name: Linux Integration
runs-on: ${{ matrix.os }}
timeout-minutes: 40
strategy:
matrix:
os: [ubuntu-latest]
containerd: [v1.7.30, v2.1.6, v2.2.1]
steps:
- name: Checkout extensions
uses: actions/checkout@v6
- name: Download containerd archive
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release download ${{ matrix.containerd }} \
--repo containerd/containerd \
--pattern 'containerd-1.*-linux-amd64.tar.gz' \
--pattern 'containerd-2.*-linux-amd64.tar.gz' \
--output containerd.tar.gz
- name: Extract containerd binaries to $HOME/.local/bin
run: |
mkdir -p $HOME/.local/bin
echo "$HOME/.local/bin" >> $GITHUB_PATH
tar -xf containerd.tar.gz -C $HOME/.local
- name: Checkout containerd
uses: actions/checkout@v6
with:
repository: containerd/containerd
path: src/github.com/containerd/containerd
ref: ${{ matrix.containerd }}
- name: Install shim
run: |
cargo build --release --bin containerd-shim-runc-v2-rs
sudo install -D ./target/release/containerd-shim-runc-v2-rs /usr/local/bin/
## get latest go version for integrations tests so we can skip runnings tests
- uses: actions/setup-go@v6
- name: Integration
env:
TEST_RUNTIME: "io.containerd.runc.v2-rs"
TESTFLAGS_PARALLEL: 1
EXTRA_TESTFLAGS: "-no-criu -test.skip='(TestContainerPTY|TestContainerExecLargeOutputWithTTY|TestTaskUpdate|TestTaskResize|TestContainerAttach|TestContainerAttachProcess|TestRuntimeInfo)'"
TESTFLAGS_RACE: "-race"
# Pretend crun for now, remove after https://github.com/containerd/containerd/pull/9829
RUNC_FLAVOR: "crun"
run: |
sudo -E PATH=$PATH make integration
working-directory: src/github.com/containerd/containerd
windows-integration:
name: Windows Integration
runs-on: ${{ matrix.os }}
timeout-minutes: 40
strategy:
matrix:
os: [windows-latest]
containerd: [1.7.0]
steps:
- name: Checkout extensions
uses: actions/checkout@v6
- run: ./scripts/install-protobuf.sh
shell: bash
- name: Install containerd
run: |
$ErrorActionPreference = "Stop"
# Install containerd https://github.com/containerd/containerd/blob/v1.7.0/docs/getting-started.md#installing-containerd-on-windows
# Download and extract desired containerd Windows binaries
curl.exe -L https://github.com/containerd/containerd/releases/download/v${{ matrix.containerd }}/containerd-${{ matrix.containerd }}-windows-amd64.tar.gz -o containerd-windows-amd64.tar.gz
tar.exe xvf .\containerd-windows-amd64.tar.gz
# Copy and configure
mkdir "$Env:ProgramFiles\containerd"
Copy-Item -Path ".\bin\*" -Destination "$Env:ProgramFiles\containerd" -Recurse -Force
cd $Env:ProgramFiles\containerd\
.\containerd.exe config default | Out-File config.toml -Encoding ascii
# Review the configuration. Depending on setup you may want to adjust:
# - the sandbox_image (Kubernetes pause image)
# - cni bin_dir and conf_dir locations
Get-Content config.toml
# Register and start service
.\containerd.exe --register-service
Start-Service containerd
working-directory: ${{ runner.temp }}
- name: Run integration test
run: |
$ErrorActionPreference = "Stop"
get-service containerd
$env:TTRPC_ADDRESS="\\.\pipe\containerd-containerd.ttrpc"
# run the example
cargo run -p containerd-shim --example skeleton -- -namespace default -id 1234 -address "\\.\pipe\containerd-containerd" -publish-binary ./bin/containerd start
ps skeleton
cargo run -p containerd-shim-protos --example shim-proto-connect \\.\pipe\containerd-shim-bc764c65e177434fcefe8257dc440be8b8acf7c96156320d965938f7e9ae1a35-pipe
$skeleton = get-process skeleton -ErrorAction SilentlyContinue
if ($skeleton) { exit 1 }
- name: Run client
run: |
$ErrorActionPreference = "Stop"
get-service containerd
cargo run -p containerd-client --example version
# Currently Github actions UI supports no masks to mark matrix jobs as required to pass status checks.
# This means that every time version of Go, containerd, or OS is changed, a corresponding job should
# be added to the list of required checks. Which is not very convenient.
# To workaround this, a special job is added to report statuses of all other jobs, with fixed title.
# So it needs to be added to the list of required checks only once.
#
# See https://github.com/orgs/community/discussions/26822
results:
name: Report required job statuses
runs-on: ubuntu-latest
# List job dependencies which are required to pass status checks in order to be merged via merge queue.
needs: [checks, windows-checks, tests, deny, linux-integration, windows-integration]
if: ${{ always() }}
steps:
- run: exit 1
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
================================================
FILE: .github/workflows/cover.yml
================================================
name: Coverage
on:
push:
branches: "main"
pull_request:
branches: "main"
jobs:
coverage:
name: Collect
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
statuses: write
steps:
- uses: actions/checkout@v6
- run: |
sudo apt-get install protobuf-compiler
- name: Install grcov
run: |
cargo install --locked grcov@0.8.24
grcov --version
- name: Tests
env:
RUSTFLAGS: "-Cinstrument-coverage"
LLVM_PROFILE_FILE: "target/coverage/%p-%m.profraw"
run: |
sudo -E $(command -v cargo) test --all-features
# Fix permissions after sudo.
sudo chown -R $(whoami) target/coverage/
- name: Collect coverage data
run: |
grcov . \
--source-dir . \
--binary-path ./target/debug/ \
--branch \
--ignore-not-existing \
--output-types markdown,lcov \
--keep-only 'crates/*' \
--output-path ./target/coverage/
- name: Upload coverage data
uses: codecov/codecov-action@v6
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
files: ./target/coverage/lcov
verbose: true
- name: Publish job summary
run: |
echo "# Coverage" >> $GITHUB_STEP_SUMMARY
cat target/coverage/markdown.md >> $GITHUB_STEP_SUMMARY
================================================
FILE: .github/workflows/labeler.yml
================================================
name: PR Labeler
on:
# Runs workflow when activity on a PR in the workflow's repository occurs.
pull_request_target:
jobs:
triage:
permissions:
contents: read
pull-requests: write
name: Assign labels
runs-on: ubuntu-latest
timeout-minutes: 5
# Required by gh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_URL: ${{ github.event.pull_request.html_url }}
steps:
- uses: actions/labeler@v6
with:
# Auto-include paths starting with dot (e.g. .github)
dot: true
# Remove labels when matching files are reverted or no longer changed by the PR
sync-labels: true
# Apply OS-windows label if PR title contains 'Windows'
- run: gh pr edit $PR_URL --add-label OS-windows
if: contains(github.event.pull_request.title, 'Windows')
================================================
FILE: .github/workflows/publish.yml
================================================
# Automates crate publishing
# - Specify crate and version from the menu.
# - Launch the job:
# + Updates Cargo.toml with the specified version
# + Commits and pushes the version bump
# + Publishes to crates.io
# + Adds and pushes a git tag "<crate>-v<version>"
name: Release
on:
workflow_dispatch:
inputs:
crate:
description: "Crate to publish"
required: true
type: choice
options:
- client
- logging
- runc
- runc-shim
- shim
- shim-protos
- snapshots
version:
description: "Version to publish (e.g. 0.8.1)"
required: true
type: string
dryrun:
description: "Dry run"
required: false
type: boolean
default: false
jobs:
publish:
name: "Publish ${{ inputs.crate }} v${{ inputs.version }}"
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write
env:
CARGO_FILE: "crates/${{ inputs.crate }}/Cargo.toml"
steps:
- uses: actions/checkout@v6
- name: Validate version
env:
VERSION: ${{ inputs.version }}
run: |
if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.]+)?$ ]]; then
echo "::error::Invalid version: $VERSION (expected semver, e.g. 0.8.1 or 1.0.0-rc.1)"
exit 1
fi
- name: Update crate version
env:
VERSION: ${{ inputs.version }}
run: sed -i "s/^version = \".*\"/version = \"$VERSION\"/" $CARGO_FILE
- name: Commit version bump
env:
CRATE: ${{ inputs.crate }}
VERSION: ${{ inputs.version }}
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git add $CARGO_FILE
git commit -m "Bump $CRATE to v$VERSION"
- name: Install protobuf
if: ${{ contains(fromJSON('["client","snapshots"]'), inputs.crate) }}
run: |
sudo apt update
sudo apt install protobuf-compiler
- name: Publish on crates.io
run: cargo publish $DRYRUN --manifest-path $CARGO_FILE
env:
DRYRUN: ${{ inputs.dryrun && '--dry-run' || '' }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Push commit and tag
if: ${{ !inputs.dryrun }}
env:
TAG: ${{ inputs.crate }}-v${{ inputs.version }}
run: |
git tag $TAG
git push --atomic origin HEAD $TAG
================================================
FILE: .github/workflows/stale.yml
================================================
name: 'Close stale issues and PRs'
on:
schedule:
- cron: "0 0 * * *" # Every day at midnight
pull_request:
paths:
- '.github/workflows/stale.yml'
permissions: read-all
jobs:
stale:
runs-on: ubuntu-latest
permissions:
actions: write
contents: write # only for delete-branch option
issues: write
pull-requests: write
steps:
- uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f # v10.2.0
# All stale bot options: https://github.com/actions/stale#all-options
with:
# Idle number of days before marking issues/PRs stale
days-before-stale: 90
# Idle number of days before closing stale issues/PRs
days-before-close: 7
# Comment on the staled issues
stale-issue-message: 'This issue is stale because it has been open 90 days with no activity. This issue will be closed in 7 days unless new comments are made or the stale label is removed.'
# Comment on the staled PRs
stale-pr-message: 'This PR is stale because it has been open 90 days with no activity. This PR will be closed in 7 days unless new comments are made or the stale label is removed.'
# Comment on the staled issues while closed
close-issue-message: 'This issue was closed because it has been stalled for 7 days with no activity.'
# Comment on the staled PRs while closed
close-pr-message: 'This PR was closed because it has been stalled for 7 days with no activity.'
# Enable dry-run when changing this file from a PR.
debug-only: ${{ github.event_name == 'pull_request' }}
================================================
FILE: .gitignore
================================================
# Generated by Cargo
# will have compiled files and executables
/target/
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock
# These are backup files generated by rustfmt
**/*.rs.bk
log
.vscode
================================================
FILE: Cargo.toml
================================================
[workspace]
members = [
"crates/client",
"crates/logging",
"crates/runc",
"crates/runc-shim",
"crates/shim",
"crates/shim-protos",
"crates/snapshots",
]
resolver = "2"
[profile.release]
# Keep binary as small as possible
# https://doc.rust-lang.org/book/ch09-01-unrecoverable-errors-with-panic.html
panic = 'abort'
# Common for all crates
# See https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#inheriting-a-dependency-from-a-workspace
[workspace.package]
license = "Apache-2.0"
repository = "https://github.com/containerd/rust-extensions"
homepage = "https://containerd.io"
edition = "2021"
# Common dependencies for all crates
[workspace.dependencies]
async-trait = "0.1.89"
cgroups-rs = { version = "0.5", default-features = false }
crossbeam = { version = "0.8", default-features = false }
futures = { version = "0.3", default-features = false }
libc = { version = "0.2", default-features = false }
log = { version = "0.4", default-features = false }
nix = { version = "0.31", default-features = false }
oci-spec = { version = "0.9", default-features = false }
prost = { version = "0.14", default-features = false }
prost-build = { version = "0.14", default-features = false }
prost-types = { version = "0.14", default-features = false }
serde = { version = "1.0", default-features = false }
serde_json = { version = "1.0", default-features = false }
simple_logger = { version = "5.2", default-features = false }
tempfile = "3.27"
thiserror = "2.0"
time = { version = "0.3", default-features = false }
tokio = { version = "1.50", default-features = false }
tonic = { version = "0.14", default-features = false }
tonic-prost = "0.14"
tonic-prost-build = { version = "0.14", default-features = false }
tower = { version = "0.5", default-features = false }
uuid = { version = "1.22", default-features = false }
================================================
FILE: LICENSE
================================================
Apache License
Version 2.0, January 2004
http://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
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
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
http://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.
================================================
FILE: MAINTAINERS
================================================
# rust-extensions maintainers
#
# As a containerd sub-project, containerd maintainers are also included from https://github.com/containerd/project/blob/main/MAINTAINERS.
# See https://github.com/containerd/project/blob/main/GOVERNANCE.md for description of maintainer role
#
# REVIEWERS
# GitHub ID, Name, Email address
"Burning1020","Zhang Tianyang","burning9699@gmail.com"
"jsturtevant","James Sturtevant","jstur@microsoft.com"
"mossaka","Jiaxiao Zhou","jiazho@microsoft.com"
"jokemanfire","Dingyang Hu","hu.dingyang@zte.com.cn"
================================================
FILE: README.md
================================================
# Rust extensions for containerd
[](https://github.com/mxpv/shim-rs/actions/workflows/ci.yml)
[](https://codecov.io/gh/containerd/rust-extensions)
[](https://github.com/containerd/rust-extensions/blob/main/LICENSE)
[](https://deps.rs/repo/github/containerd/rust-extensions)
A collection of Rust crates to extend containerd.
This repository contains the following crates:
| Name | Description | Links |
| --- | --- | --- |
| [containerd-shim-protos](crates/shim-protos) | TTRPC bindings to shim interfaces | [](https://crates.io/crates/containerd-shim-protos) [](https://docs.rs/containerd-shim-protos/latest/containerd_shim_protos/) |
| [containerd-shim-logging](crates/logging) | Shim logger plugins | [](https://crates.io/crates/containerd-shim-logging) [](https://docs.rs/containerd-shim-logging/latest/containerd_shim_logging/) |
| [containerd-shim](crates/shim) | Runtime v2 shim wrapper | [](https://crates.io/crates/containerd-shim) [](https://docs.rs/containerd-shim/latest/containerd_shim/) |
| [containerd-client](crates/client) | GRPC bindings to containerd APIs | [](https://crates.io/crates/containerd-client) [](https://docs.rs/containerd-client/latest/containerd_client/) |
| [containerd-snapshots](crates/snapshots) | Remote snapshotter for containerd | [](https://crates.io/crates/containerd-snapshots) [](https://docs.rs/containerd-snapshots/latest/containerd_snapshots/) |
| [runc](crates/runc) | Rust wrapper for runc CLI | [](https://crates.io/crates/runc) [](https://docs.rs/runc/latest/runc/) |
| [containerd-runc-shim](crates/runc-shim) | Runtime v2 runc shim implementation | [](https://crates.io/crates/containerd-runc-shim) |
## How to build
The build process as easy as:
```bash
cargo build --release
```
## Minimum supported Rust version (MSRV)
The project typically targets the latest stable Rust version.
Please refer to [rust-toolchain.toml](./rust-toolchain.toml) for exact version currently used by our CIs.
================================================
FILE: clippy.toml
================================================
msrv = "1.91"
================================================
FILE: codecov.yml
================================================
comment: false
================================================
FILE: crates/client/Cargo.toml
================================================
[package]
name = "containerd-client"
version = "0.9.0"
authors = [
"Maksym Pavlenko <pavlenko.maksym@gmail.com>",
"The containerd Authors",
]
description = "GRPC bindings to containerd APIs"
keywords = ["containerd", "client", "grpc", "containers"]
categories = ["api-bindings", "asynchronous"]
edition.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
[[example]]
name = "container"
path = "examples/container.rs"
[[example]]
name = "version"
path = "examples/version.rs"
[dependencies]
hyper-util = { version = "0.1.20", default-features = false, features = ["tokio"] }
prost = { workspace = true, features = ["derive", "std"] }
prost-types = { workspace = true, features = ["std"] }
tokio = { workspace = true, features = ["net"], optional = true }
tonic = { workspace = true, features = ["codegen", "channel"] }
tonic-prost.workspace = true
tower = { workspace = true, features = ["util"], optional = true }
[build-dependencies]
tonic-prost-build.workspace = true
[dev-dependencies]
tokio = { workspace = true, features = ["rt", "macros", "net"] }
[features]
connect = ["tokio", "tower"]
docs = []
# Technically Tonic doesn't require Tokio and Tower dependencies here.
# However we need them to implement `connect` helper and it's highly unlikely
# that Tonic will be used with any other async runtime (see https://github.com/hyperium/tonic/issues/152)
# So we enable `connect` feature by default (use `--no-default-features` otherwise).
default = ["connect"]
[package.metadata.docs.rs]
features = ["docs"]
[package.metadata.cargo-machete]
ignored = ["prost", "tonic-prost"]
================================================
FILE: crates/client/README.md
================================================
# containerd GRPC client
[](https://crates.io/crates/containerd-client)
[](https://docs.rs/containerd-client/latest/containerd_client/)
[](https://github.com/containerd/rust-extensions/blob/main/LICENSE)
[](https://github.com/containerd/rust-extensions/actions/workflows/ci.yml)
This crate implements a GRPC client to query containerd APIs.
## Example
Run with `cargo run --example version`
```rust
use containerd_client::{connect, services::v1::version_client::VersionClient};
async fn query_version() {
// Launch containerd at /run/containerd/containerd.sock
let channel = connect("/run/containerd/containerd.sock").await.unwrap();
let mut client = VersionClient::new(channel);
let resp = client.version(()).await.unwrap();
println!("Response: {:?}", resp.get_ref());
}
```
================================================
FILE: crates/client/build.rs
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
use std::{env, fs, io};
const PROTO_FILES: &[&str] = &[
// Types
"types/descriptor.proto",
"types/metrics.proto",
"types/mount.proto",
"types/platform.proto",
"types/sandbox.proto",
"types/task/task.proto",
"types/transfer/imagestore.proto",
"types/transfer/importexport.proto",
"types/transfer/progress.proto",
"types/transfer/registry.proto",
"types/transfer/streaming.proto",
// Services
"services/containers/v1/containers.proto",
"services/content/v1/content.proto",
"services/diff/v1/diff.proto",
"services/events/v1/events.proto",
"services/images/v1/images.proto",
"services/introspection/v1/introspection.proto",
"services/leases/v1/leases.proto",
"services/namespaces/v1/namespace.proto",
"services/sandbox/v1/sandbox.proto",
"services/snapshots/v1/snapshots.proto",
"services/streaming/v1/streaming.proto",
"services/tasks/v1/tasks.proto",
"services/transfer/v1/transfer.proto",
"services/version/v1/version.proto",
// Events
"events/container.proto",
"events/content.proto",
"events/image.proto",
"events/namespace.proto",
"events/snapshot.proto",
"events/task.proto",
];
const FIXUP_MODULES: &[&str] = &[
"containerd.services.diff.v1",
"containerd.services.images.v1",
"containerd.services.introspection.v1",
"containerd.services.sandbox.v1",
"containerd.services.snapshots.v1",
"containerd.services.tasks.v1",
"containerd.services.containers.v1",
"containerd.services.content.v1",
"containerd.services.events.v1",
];
fn main() {
let mut config = tonic_prost_build::Config::new();
config.protoc_arg("--experimental_allow_proto3_optional");
config.enable_type_names();
tonic_prost_build::configure()
.build_server(false)
.compile_with_config(
config,
PROTO_FILES,
&["vendor/github.com/containerd/containerd/api/", "vendor/"],
)
.expect("Failed to generate GRPC bindings");
for module in FIXUP_MODULES {
fixup_imports(module).expect("Failed to fixup module");
}
}
// Original containerd's protobuf files contain Go style imports:
// import "github.com/containerd/containerd/api/types/mount.proto";
//
// Tonic produces invalid code for these imports:
// error[E0433]: failed to resolve: there are too many leading `super` keywords
// --> /containerd-rust-extensions/target/debug/build/containerd-client-protos-0a328c0c63f60cd0/out/containerd.services.diff.v1.rs:47:52
// |
// 47 | pub diff: ::core::option::Option<super::super::super::types::Descriptor>,
// | ^^^^^ there are too many leading `super` keywords
//
// This func fixes imports to crate level ones, like `crate::types::Mount`
fn fixup_imports(path: &str) -> Result<(), io::Error> {
let out_dir = env::var("OUT_DIR").unwrap();
let path = format!("{}/{}.rs", out_dir, path);
let contents = fs::read_to_string(&path)?
.replace("super::super::super::v1::types", "crate::types::v1") // for tasks service
.replace("super::super::super::super::types", "crate::types")
.replace("super::super::super::types", "crate::types")
.replace("super::super::super::super::google", "crate::google")
.replace(
"/// filters\\[0\\] or filters\\[1\\] or ... or filters\\[n-1\\] or filters\\[n\\]",
r#"
/// ```notrust
/// filters[0] or filters[1] or ... or filters[n-1] or filters[n]
/// ```"#,
);
fs::write(path, contents)?;
Ok(())
}
================================================
FILE: crates/client/examples/container.rs
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
use std::{fs, fs::File};
use client::{
services::v1::{
container::Runtime, containers_client::ContainersClient, tasks_client::TasksClient,
Container, CreateContainerRequest, CreateTaskRequest, DeleteContainerRequest,
DeleteTaskRequest, StartRequest, WaitRequest,
},
with_namespace,
};
use containerd_client as client;
use prost_types::Any;
use tonic::Request;
const CID: &str = "abc123";
const NAMESPACE: &str = "default";
/// Make sure you run containerd before running this example.
/// NOTE: to run this example, you must prepare a rootfs.
#[tokio::main(flavor = "current_thread")]
async fn main() {
let channel = client::connect("/run/containerd/containerd.sock")
.await
.expect("Connect Failed");
let mut client = ContainersClient::new(channel.clone());
let rootfs = "/tmp/busybox/bundle/rootfs";
// the container will run with command `echo $output`
let output = "hello rust client";
let spec = include_str!("container_spec.json");
let spec = spec
.to_string()
.replace("$ROOTFS", rootfs)
.replace("$OUTPUT", output);
let spec = Any {
type_url: "types.containerd.io/opencontainers/runtime-spec/1/Spec".to_string(),
value: spec.into_bytes(),
};
let container = Container {
id: CID.to_string(),
image: "docker.io/library/alpine:latest".to_string(),
runtime: Some(Runtime {
name: "io.containerd.runc.v2".to_string(),
options: None,
}),
spec: Some(spec),
..Default::default()
};
let req = CreateContainerRequest {
container: Some(container),
};
let req = with_namespace!(req, NAMESPACE);
let _resp = client
.create(req)
.await
.expect("Failed to create container");
println!("Container: {:?} created", CID);
// create temp dir for stdin/stdout/stderr
let tmp = std::env::temp_dir().join("containerd-client-test");
fs::create_dir_all(&tmp).expect("Failed to create temp directory");
let stdin = tmp.join("stdin");
let stdout = tmp.join("stdout");
let stderr = tmp.join("stderr");
File::create(&stdin).expect("Failed to create stdin");
File::create(&stdout).expect("Failed to create stdout");
File::create(&stderr).expect("Failed to create stderr");
// creat and start task
let mut client = TasksClient::new(channel.clone());
let req = CreateTaskRequest {
container_id: CID.to_string(),
stdin: stdin.to_str().unwrap().to_string(),
stdout: stdout.to_str().unwrap().to_string(),
stderr: stderr.to_str().unwrap().to_string(),
..Default::default()
};
let req = with_namespace!(req, NAMESPACE);
let _resp = client.create(req).await.expect("Failed to create task");
println!("Task: {:?} created", CID);
let req = StartRequest {
container_id: CID.to_string(),
..Default::default()
};
let req = with_namespace!(req, NAMESPACE);
let _resp = client.start(req).await.expect("Failed to start task");
println!("Task: {:?} started", CID);
// wait task
let req = WaitRequest {
container_id: CID.to_string(),
..Default::default()
};
let req = with_namespace!(req, NAMESPACE);
let _resp = client.wait(req).await.expect("Failed to wait task");
println!("Task: {:?} stopped", CID);
// delete task
let req = DeleteTaskRequest {
container_id: CID.to_string(),
};
let req = with_namespace!(req, NAMESPACE);
let _resp = client.delete(req).await.expect("Failed to delete task");
println!("Task: {:?} deleted", CID);
// delete container
let mut client = ContainersClient::new(channel);
let req = DeleteContainerRequest {
id: CID.to_string(),
};
let req = with_namespace!(req, NAMESPACE);
let _resp = client
.delete(req)
.await
.expect("Failed to delete container");
println!("Container: {:?} deleted", CID);
// test container output
let actual_stdout = fs::read_to_string(stdout).expect("read stdout actual");
assert_eq!(actual_stdout.strip_suffix('\n').unwrap(), output);
// clear stdin/stdout/stderr
let _ = fs::remove_dir_all(tmp);
}
================================================
FILE: crates/client/examples/container_events.rs
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
use client::{
events::{ContainerCreate, ContainerDelete},
services::v1::{events_client::EventsClient, SubscribeRequest},
};
use containerd_client as client;
/// Make sure you run containerd before running this example.
#[tokio::main(flavor = "current_thread")]
async fn main() {
let channel = client::connect("/run/containerd/containerd.sock")
.await
.expect("Connect Failed");
let mut client = EventsClient::new(channel.clone());
let request = SubscribeRequest::default();
let mut response = client
.subscribe(request)
.await
.expect("failed to subscribe to events")
.into_inner();
loop {
match response.message().await {
Ok(event) => {
if let Some(event) = event {
match event.topic.as_str() {
"/containers/create" => {
if let Some(mut payload) = event.event {
// Containerd doesn't send event payloads with a leading slash on the type URL, which is
// required by the `Any` type specification. We add it manually here so that `prost` can
// properly decode the payload.
if !payload.type_url.starts_with('/') {
payload.type_url.insert(0, '/');
}
let payload: ContainerCreate = payload
.to_msg()
.expect("failed to parse ContainerCreate payload");
println!(
"container created: id={} payload={:?}",
payload.id, payload
);
}
}
"/containers/delete" => {
if let Some(mut payload) = event.event {
// Containerd doesn't send event payloads with a leading slash on the type URL, which is
// required by the `Any` type specification. We add it manually here so that `prost` can
// properly decode the payload.
if !payload.type_url.starts_with('/') {
payload.type_url.insert(0, '/');
}
let payload: ContainerDelete = payload
.to_msg()
.expect("failed to parse ContainerDelete payload");
println!(
"container deleted: id={} payload={:?}",
payload.id, payload
);
}
}
_ => {}
}
}
}
Err(e) => {
eprintln!("error while streaming events: {:?}", e);
break;
}
}
}
}
================================================
FILE: crates/client/examples/container_pull.rs
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
use std::env::consts;
use client::{
services::v1::{transfer_client::TransferClient, TransferOptions, TransferRequest},
to_any,
types::{
transfer::{ImageStore, OciRegistry, UnpackConfiguration},
Platform,
},
with_namespace,
};
use containerd_client as client;
use tonic::Request;
const IMAGE: &str = "docker.io/library/alpine:latest";
const NAMESPACE: &str = "default";
/// Make sure you run containerd before running this example.
/// NOTE: to run this example, you must prepare a rootfs.
#[tokio::main(flavor = "current_thread")]
async fn main() {
let arch = match consts::ARCH {
"x86_64" => "amd64",
"aarch64" => "arm64",
_ => consts::ARCH,
};
let channel = client::connect("/run/containerd/containerd.sock")
.await
.expect("Connect Failed");
let mut client = TransferClient::new(channel.clone());
// Create the source (OCIRegistry)
let source = OciRegistry {
reference: IMAGE.to_string(),
resolver: Default::default(),
};
let platform = Platform {
os: "linux".to_string(),
architecture: arch.to_string(),
variant: "".to_string(),
os_version: "".to_string(),
os_features: vec![],
};
// Create the destination (ImageStore)
let destination = ImageStore {
name: IMAGE.to_string(),
platforms: vec![platform.clone()],
unpacks: vec![UnpackConfiguration {
platform: Some(platform),
..Default::default()
}],
..Default::default()
};
let anys = to_any(&source);
let anyd = to_any(&destination);
println!("Pulling image for linux/{} from source: {:?}", arch, source);
// Create the transfer request
let request = TransferRequest {
source: Some(anys),
destination: Some(anyd),
options: Some(TransferOptions {
..Default::default()
}),
};
// Execute the transfer (pull)
client
.transfer(with_namespace!(request, NAMESPACE))
.await
.expect("unable to transfer image");
}
================================================
FILE: crates/client/examples/container_spec.json
================================================
{
"ociVersion": "1.0.0-rc2-dev",
"platform": {
"os": "linux",
"arch": "amd64"
},
"process": {
"terminal": false,
"consoleSize": {
"height": 0,
"width": 0
},
"user": {
"uid": 0,
"gid": 0
},
"args": [ "echo", "$OUTPUT" ],
"env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"TERM=xterm"
],
"cwd": "/",
"rlimits": [{
"type": "RLIMIT_NOFILE",
"hard": 1024,
"soft": 1024
}],
"noNewPrivileges": true
},
"root": {
"path": "$ROOTFS",
"readonly": false
},
"hostname": "test",
"mounts": [{
"destination": "/proc",
"type": "proc",
"source": "proc"
},
{
"destination": "/dev",
"type": "tmpfs",
"source": "tmpfs",
"options": [
"nosuid",
"strictatime",
"mode=755",
"size=65536k"
]
},
{
"destination": "/dev/pts",
"type": "devpts",
"source": "devpts",
"options": [
"nosuid",
"noexec",
"newinstance",
"ptmxmode=0666",
"mode=0620",
"gid=5"
]
},
{
"destination": "/dev/shm",
"type": "tmpfs",
"source": "shm",
"options": [
"nosuid",
"noexec",
"nodev",
"mode=1777",
"size=65536k"
]
},
{
"destination": "/dev/mqueue",
"type": "mqueue",
"source": "mqueue",
"options": [
"nosuid",
"noexec",
"nodev"
]
},
{
"destination": "/sys",
"type": "sysfs",
"source": "sysfs",
"options": [
"nosuid",
"noexec",
"nodev",
"ro"
]
},
{
"destination": "/sys/fs/cgroup",
"type": "cgroup",
"source": "cgroup",
"options": [
"nosuid",
"noexec",
"nodev",
"relatime",
"ro"
]
}
],
"hooks": {},
"linux": {
"devices": [],
"cgroupsPath": "kata/vfiotest",
"resources": {
"devices": [
{"allow":false,"access":"rwm"},
{"allow":true,"type":"c","major":1,"minor":3,"access":"rwm"},
{"allow":true,"type":"c","major":1,"minor":5,"access":"rwm"},
{"allow":true,"type":"c","major":1,"minor":8,"access":"rwm"},
{"allow":true,"type":"c","major":1,"minor":9,"access":"rwm"},
{"allow":true,"type":"c","major":5,"minor":0,"access":"rwm"},
{"allow":true,"type":"c","major":5,"minor":1,"access":"rwm"}
]
},
"namespaces": [{
"type": "pid"
},
{
"type": "network"
},
{
"type": "ipc"
},
{
"type": "uts"
},
{
"type": "mount"
}
],
"maskedPaths": [
"/proc/kcore",
"/proc/latency_stats",
"/proc/timer_list",
"/proc/timer_stats",
"/proc/sched_debug",
"/sys/firmware"
],
"readonlyPaths": [
"/proc/asound",
"/proc/bus",
"/proc/fs",
"/proc/irq",
"/proc/sys",
"/proc/sysrq-trigger"
]
}
}
================================================
FILE: crates/client/examples/version.rs
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
use containerd_client::Client;
/// Make sure you run containerd before running this example.
#[tokio::main(flavor = "current_thread")]
async fn main() {
#[cfg(unix)]
let path = "/var/run/containerd/containerd.sock";
#[cfg(windows)]
let path = r"\\.\pipe\containerd-containerd";
let client = Client::from_path(path).await.expect("Connect failed");
let resp = client
.version()
.version(())
.await
.expect("Failed to query version");
println!("Response: {:?}", resp.get_ref());
}
================================================
FILE: crates/client/rsync.txt
================================================
api/events/*.proto
api/services/**/*.proto
api/types/*.proto
api/types/**/*.proto
protobuf/plugin/fieldpath.proto
================================================
FILE: crates/client/src/lib.rs
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
#![cfg_attr(feature = "docs", doc = include_str!("../README.md"))]
// No way to derive Eq with tonic :(
// See https://github.com/hyperium/tonic/issues/1056
#![allow(clippy::derive_partial_eq_without_eq)]
pub use tonic;
/// Generated `containerd.types` types.
pub mod types {
tonic::include_proto!("containerd.types");
pub mod v1 {
tonic::include_proto!("containerd.v1.types");
}
pub mod transfer {
tonic::include_proto!("containerd.types.transfer");
}
}
/// Generated `google.rpc` types, containerd services typically use some of these types.
pub mod google {
#[allow(rustdoc::broken_intra_doc_links)]
pub mod rpc {
tonic::include_proto!("google.rpc");
}
}
/// Generated `containerd.services.*` services.
pub mod services {
#[allow(clippy::tabs_in_doc_comments)]
#[allow(rustdoc::invalid_rust_codeblocks)]
#[allow(rustdoc::invalid_html_tags)]
pub mod v1 {
tonic::include_proto!("containerd.services.containers.v1");
tonic::include_proto!("containerd.services.content.v1");
tonic::include_proto!("containerd.services.diff.v1");
tonic::include_proto!("containerd.services.events.v1");
tonic::include_proto!("containerd.services.images.v1");
tonic::include_proto!("containerd.services.introspection.v1");
tonic::include_proto!("containerd.services.leases.v1");
tonic::include_proto!("containerd.services.namespaces.v1");
tonic::include_proto!("containerd.services.streaming.v1");
tonic::include_proto!("containerd.services.tasks.v1");
tonic::include_proto!("containerd.services.transfer.v1");
// Sandbox services (Controller and Store) don't make it clear that they are for sandboxes.
// Wrap these into a sub module to make the names more clear.
pub mod sandbox {
tonic::include_proto!("containerd.services.sandbox.v1");
}
// Snapshot's `Info` conflicts with Content's `Info`, so wrap it into a separate sub module.
pub mod snapshots {
tonic::include_proto!("containerd.services.snapshots.v1");
}
tonic::include_proto!("containerd.services.version.v1");
}
}
/// Generated event types.
pub mod events {
tonic::include_proto!("containerd.events");
}
/// Connect creates a unix channel to containerd GRPC socket.
///
/// This helper intended to be used in conjunction with [Tokio](https://tokio.rs) runtime.
#[cfg(feature = "connect")]
pub async fn connect(
path: impl AsRef<std::path::Path>,
) -> Result<tonic::transport::Channel, tonic::transport::Error> {
use tonic::transport::Endpoint;
let path = path.as_ref().to_path_buf();
// Taken from https://github.com/hyperium/tonic/blob/71fca362d7ffbb230547f23b3f2fb75c414063a8/examples/src/uds/client.rs#L21-L28
// There will ignore this uri because uds do not use it
// and make connection with UnixStream::connect.
let channel = Endpoint::try_from("http://[::]")?
.connect_with_connector(tower::service_fn(move |_| {
let path = path.clone();
async move {
#[cfg(unix)]
{
Ok::<_, std::io::Error>(hyper_util::rt::TokioIo::new(
tokio::net::UnixStream::connect(path).await?,
))
}
#[cfg(windows)]
{
let client = tokio::net::windows::named_pipe::ClientOptions::new()
.open(&path)
.map_err(|e| std::io::Error::from(e))?;
Ok::<_, std::io::Error>(hyper_util::rt::TokioIo::new(client))
}
}
}))
.await?;
Ok(channel)
}
use prost::{Message, Name};
use prost_types::Any;
// to_any provides a helper to match the current use of the protobuf "fullname" trait
// in the Go code on the gRPC server side in containerd when handling matching of Any
// types to registered types on the server. Further discussion on future direction
// of typeurl in this issue: https://github.com/containerd/rust-extensions/issues/362
pub fn to_any<T: Message + Name>(m: &T) -> Any {
let mut anyt = Any::from_msg(m).unwrap();
anyt.type_url = T::full_name();
anyt
}
/// Help to inject namespace into request.
///
/// To use this macro, the `tonic::Request` is needed.
#[macro_export]
macro_rules! with_namespace {
($req:expr, $ns:expr) => {{
let mut req = Request::new($req);
let md = req.metadata_mut();
// https://github.com/containerd/containerd/blob/main/pkg/namespaces/grpc.go#L27
md.insert("containerd-namespace", $ns.parse().unwrap());
req
}};
}
use services::v1::{
containers_client::ContainersClient,
content_client::ContentClient,
diff_client::DiffClient,
events_client::EventsClient,
images_client::ImagesClient,
introspection_client::IntrospectionClient,
leases_client::LeasesClient,
namespaces_client::NamespacesClient,
sandbox::{controller_client::ControllerClient, store_client::StoreClient},
snapshots::snapshots_client::SnapshotsClient,
streaming_client::StreamingClient,
tasks_client::TasksClient,
transfer_client::TransferClient,
version_client::VersionClient,
};
use tonic::transport::{Channel, Error};
/// Client to containerd's APIs.
pub struct Client {
channel: Channel,
}
impl From<Channel> for Client {
fn from(value: Channel) -> Self {
Self { channel: value }
}
}
impl Client {
/// Create a new client from UDS socket.
#[cfg(feature = "connect")]
pub async fn from_path(path: impl AsRef<std::path::Path>) -> Result<Self, Error> {
let channel = connect(path).await?;
Ok(Self { channel })
}
/// Access to the underlying Tonic channel.
#[inline]
pub fn channel(&self) -> Channel {
self.channel.clone()
}
/// Version service.
#[inline]
pub fn version(&self) -> VersionClient<Channel> {
VersionClient::new(self.channel())
}
/// Task service client.
#[inline]
pub fn tasks(&self) -> TasksClient<Channel> {
TasksClient::new(self.channel())
}
/// Transfer service client.
#[inline]
pub fn transfer(&self) -> TransferClient<Channel> {
TransferClient::new(self.channel())
}
/// Sandbox store client.
#[inline]
pub fn sandbox_store(&self) -> StoreClient<Channel> {
StoreClient::new(self.channel())
}
/// Streaming services client.
#[inline]
pub fn streaming(&self) -> StreamingClient<Channel> {
StreamingClient::new(self.channel())
}
/// Sandbox controller client.
#[inline]
pub fn sandbox_controller(&self) -> ControllerClient<Channel> {
ControllerClient::new(self.channel())
}
/// Snapshots service.
#[inline]
pub fn snapshots(&self) -> SnapshotsClient<Channel> {
SnapshotsClient::new(self.channel())
}
/// Namespaces service.
#[inline]
pub fn namespaces(&self) -> NamespacesClient<Channel> {
NamespacesClient::new(self.channel())
}
/// Leases service.
#[inline]
pub fn leases(&self) -> LeasesClient<Channel> {
LeasesClient::new(self.channel())
}
/// Intropection service.
#[inline]
pub fn introspection(&self) -> IntrospectionClient<Channel> {
IntrospectionClient::new(self.channel())
}
/// Image service.
#[inline]
pub fn images(&self) -> ImagesClient<Channel> {
ImagesClient::new(self.channel())
}
/// Event service.
#[inline]
pub fn events(&self) -> EventsClient<Channel> {
EventsClient::new(self.channel())
}
/// Diff service.
#[inline]
pub fn diff(&self) -> DiffClient<Channel> {
DiffClient::new(self.channel())
}
/// Content service.
#[inline]
pub fn content(&self) -> ContentClient<Channel> {
ContentClient::new(self.channel())
}
/// Container service.
#[inline]
pub fn containers(&self) -> ContainersClient<Channel> {
ContainersClient::new(self.channel())
}
}
#[cfg(test)]
mod tests {
use prost_types::Any;
use crate::events::ContainerCreate;
#[test]
fn any_roundtrip() {
let original = ContainerCreate {
id: "test".to_string(),
image: "test".to_string(),
runtime: None,
};
let any = Any::from_msg(&original).expect("should not fail to encode");
let decoded: ContainerCreate = any.to_msg().expect("should not fail to decode");
assert_eq!(original, decoded)
}
}
================================================
FILE: crates/client/vendor/README.md
================================================
# Vendor
This directory contains vendor dependencies needed to generate protobuf bindings.
Proto files are copy-pasted directly from upstream repos:
+ https://github.com/containerd/containerd
+ https://github.com/protocolbuffers/protobuf
+ https://github.com/gogo/protobuf
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/api/events/container.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.events;
import "google/protobuf/any.proto";
import "types/fieldpath.proto";
option go_package = "github.com/containerd/containerd/api/events;events";
option (containerd.types.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<string, string> labels = 3;
string snapshot_key = 4;
}
message ContainerDelete {
string id = 1;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/api/events/content.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.events;
import "types/fieldpath.proto";
option go_package = "github.com/containerd/containerd/api/events;events";
option (containerd.types.fieldpath_all) = true;
message ContentCreate {
string digest = 1;
int64 size = 2;
}
message ContentDelete {
string digest = 1;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/api/events/image.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.services.images.v1;
import "types/fieldpath.proto";
option go_package = "github.com/containerd/containerd/api/events;events";
option (containerd.types.fieldpath_all) = true;
message ImageCreate {
string name = 1;
map<string, string> labels = 2;
}
message ImageUpdate {
string name = 1;
map<string, string> labels = 2;
}
message ImageDelete {
string name = 1;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/api/events/namespace.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.events;
import "types/fieldpath.proto";
option go_package = "github.com/containerd/containerd/api/events;events";
option (containerd.types.fieldpath_all) = true;
message NamespaceCreate {
string name = 1;
map<string, string> labels = 2;
}
message NamespaceUpdate {
string name = 1;
map<string, string> labels = 2;
}
message NamespaceDelete {
string name = 1;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/api/events/sandbox.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.events;
import "google/protobuf/timestamp.proto";
option go_package = "github.com/containerd/containerd/api/events;events";
message SandboxCreate {
string sandbox_id = 1;
}
message SandboxStart {
string sandbox_id = 1;
}
message SandboxExit {
string sandbox_id = 1;
uint32 exit_status = 2;
google.protobuf.Timestamp exited_at = 3;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/api/events/snapshot.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.events;
import "types/fieldpath.proto";
option go_package = "github.com/containerd/containerd/api/events;events";
option (containerd.types.fieldpath_all) = true;
message SnapshotPrepare {
string key = 1;
string parent = 2;
string snapshotter = 5;
}
message SnapshotCommit {
string key = 1;
string name = 2;
string snapshotter = 5;
}
message SnapshotRemove {
string key = 1;
string snapshotter = 5;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/api/events/task.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.events;
import "google/protobuf/timestamp.proto";
import "types/fieldpath.proto";
import "types/mount.proto";
option go_package = "github.com/containerd/containerd/api/events;events";
option (containerd.types.fieldpath_all) = true;
message TaskCreate {
string container_id = 1;
string bundle = 2;
repeated containerd.types.Mount rootfs = 3;
TaskIO io = 4;
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;
// id is the specific exec. By default if omitted will be `""` thus matches
// the init exec of the task matching `container_id`.
string id = 5;
}
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;
}
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;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/api/services/containers/v1/containers.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.services.containers.v1;
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 ListStream(ListContainersRequest) returns (stream ListContainerMessage);
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<string, string> 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;
// UpdatedAt is the last time the container was mutated.
google.protobuf.Timestamp updated_at = 9;
// 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<string, google.protobuf.Any> extensions = 10;
// Sandbox ID this container belongs to.
string sandbox = 11;
}
message GetContainerRequest {
string id = 1;
}
message GetContainerResponse {
Container container = 1;
}
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;
}
message CreateContainerRequest {
Container container = 1;
}
message CreateContainerResponse {
Container container = 1;
}
// 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;
// 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;
}
message DeleteContainerRequest {
string id = 1;
}
message ListContainerMessage {
Container container = 1;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/api/services/content/v1/content.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.services.content.v1;
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/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 omitted 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;
// 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;
// UpdatedAt provides the time the info was last updated.
google.protobuf.Timestamp updated_at = 4;
// Labels are arbitrary data on snapshots.
//
// The combined size of a key/value pair cannot exceed 4096 bytes.
map<string, string> labels = 5;
}
message InfoRequest {
string digest = 1;
}
message InfoResponse {
Info info = 1;
}
message UpdateRequest {
Info info = 1;
// 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;
}
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;
}
message DeleteContentRequest {
// Digest specifies which content to delete.
string digest = 1;
}
// 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;
// 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;
google.protobuf.Timestamp updated_at = 2;
string ref = 3;
int64 offset = 4;
int64 total = 5;
string expected = 6;
}
message StatusRequest {
string ref = 1;
}
message StatusResponse {
Status status = 1;
}
message ListStatusesRequest {
repeated string filters = 1;
}
message ListStatusesResponse {
repeated Status statuses = 1;
}
// WriteAction defines the behavior of a WriteRequest.
enum WriteAction {
// WriteActionStat instructs the writer to return the current status while
// holding the lock on the write.
STAT = 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.
WRITE = 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.
COMMIT = 2;
}
// 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;
// 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<string, string> 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;
// 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;
// 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;
}
message AbortRequest {
string ref = 1;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/api/services/diff/v1/diff.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.services.diff.v1;
import "google/protobuf/any.proto";
import "google/protobuf/timestamp.proto";
import "types/descriptor.proto";
import "types/mount.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;
map<string, google.protobuf.Any> payloads = 3;
// SyncFs is to synchronize the underlying filesystem containing files.
bool sync_fs = 4;
}
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<string, string> labels = 5;
// SourceDateEpoch specifies the timestamp used to provide control for reproducibility.
// See also https://reproducible-builds.org/docs/source-date-epoch/ .
//
// Since containerd v2.0, the whiteout timestamps are set to zero (1970-01-01),
// not to the source date epoch.
google.protobuf.Timestamp source_date_epoch = 6;
}
message DiffResponse {
// Diff is the descriptor of the diff which can be applied
containerd.types.Descriptor diff = 3;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/api/services/events/v1/events.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.services.events.v1;
import "google/protobuf/any.proto";
import "google/protobuf/empty.proto";
import "types/event.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 forwarding 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==<namespace>' to
// restrict the received events.
rpc Subscribe(SubscribeRequest) returns (stream containerd.types.Envelope);
}
message PublishRequest {
string topic = 1;
google.protobuf.Any event = 2;
}
message ForwardRequest {
containerd.types.Envelope envelope = 1;
}
message SubscribeRequest {
repeated string filters = 1;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/api/services/images/v1/images.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.services.images.v1;
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto";
import "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<string, string> labels = 2;
// Target describes the content entry point of the image.
containerd.types.Descriptor target = 3;
// CreatedAt is the time the image was first created.
google.protobuf.Timestamp created_at = 7;
// UpdatedAt is the last time the image was mutated.
google.protobuf.Timestamp updated_at = 8;
}
message GetImageRequest {
string name = 1;
}
message GetImageResponse {
Image image = 1;
}
message CreateImageRequest {
Image image = 1;
google.protobuf.Timestamp source_date_epoch = 2;
}
message CreateImageResponse {
Image image = 1;
}
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;
// UpdateMask specifies which fields to perform the update on. If empty,
// the operation applies to all fields.
google.protobuf.FieldMask update_mask = 2;
google.protobuf.Timestamp source_date_epoch = 3;
}
message UpdateImageResponse {
Image image = 1;
}
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;
}
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;
// Target value for image to be deleted
//
// If image descriptor does not match the same digest,
// the delete operation will return "not found" error.
optional containerd.types.Descriptor target = 3;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/api/services/introspection/v1/introspection.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.services.introspection.v1;
import "google/protobuf/any.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/timestamp.proto";
import "google/rpc/status.proto";
import "types/introspection.proto";
import "types/platform.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);
// Server returns information about the containerd server
rpc Server(google.protobuf.Empty) returns (ServerResponse);
// PluginInfo returns information directly from a plugin if the plugin supports it
rpc PluginInfo(PluginInfoRequest) returns (PluginInfoResponse);
}
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;
// 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<string, string> 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;
}
message ServerResponse {
string uuid = 1;
uint64 pid = 2;
uint64 pidns = 3; // PID namespace, such as 4026531836
repeated DeprecationWarning deprecations = 4;
}
message DeprecationWarning {
string id = 1;
string message = 2;
google.protobuf.Timestamp last_occurrence = 3;
}
message PluginInfoRequest {
string type = 1;
string id = 2;
// Options may be used to request extra dynamic information from
// a plugin.
// This object is determined by the plugin and the plugin may return
// NotImplemented or InvalidArgument if it is not supported
google.protobuf.Any options = 3;
}
message PluginInfoResponse {
Plugin plugin = 1;
google.protobuf.Any extra = 2;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/api/services/leases/v1/leases.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.services.leases.v1;
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);
// AddResource references the resource by the provided lease.
rpc AddResource(AddResourceRequest) returns (google.protobuf.Empty);
// DeleteResource dereferences the resource by the provided lease.
rpc DeleteResource(DeleteResourceRequest) returns (google.protobuf.Empty);
// ListResources lists all the resources referenced by the lease.
rpc ListResources(ListResourcesRequest) returns (ListResourcesResponse);
}
// Lease is an object which retains resources while it exists.
message Lease {
string id = 1;
google.protobuf.Timestamp created_at = 2;
map<string, string> 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<string, string> labels = 3;
}
message CreateResponse {
Lease lease = 1;
}
message DeleteRequest {
string id = 1;
// Sync indicates that the delete and cleanup should be done
// synchronously before returning to the caller
//
// Default is false
bool sync = 2;
}
message ListRequest {
repeated string filters = 1;
}
message ListResponse {
repeated Lease leases = 1;
}
message Resource {
string id = 1;
// For snapshotter resource, there are many snapshotter types here, like
// overlayfs, devmapper etc. The type will be formatted with type,
// like "snapshotter/overlayfs".
string type = 2;
}
message AddResourceRequest {
string id = 1;
Resource resource = 2;
}
message DeleteResourceRequest {
string id = 1;
Resource resource = 2;
}
message ListResourcesRequest {
string id = 1;
}
message ListResourcesResponse {
repeated Resource resources = 1;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/api/services/mounts/v1/mounts.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.services.mounts.v1;
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
import "types/mount.proto";
option go_package = "github.com/containerd/containerd/api/services/mounts/v1;mounts";
// Mounts service manages mounts
service Mounts {
rpc Activate(ActivateRequest) returns (ActivateResponse);
rpc Deactivate(DeactivateRequest) returns (google.protobuf.Empty);
rpc Info(InfoRequest) returns (InfoResponse);
rpc Update(UpdateRequest) returns (UpdateResponse);
rpc List(ListRequest) returns (stream ListMessage);
}
message ActivateRequest {
string name = 1;
repeated containerd.types.Mount mounts = 2;
map<string, string> labels = 3;
bool temporary = 4;
}
message ActivateResponse {
containerd.types.ActivationInfo info = 1;
}
message DeactivateRequest {
string name = 1;
}
message InfoRequest {
string name = 1;
}
message InfoResponse {
containerd.types.ActivationInfo info = 1;
}
message UpdateRequest {
containerd.types.ActivationInfo info = 1;
google.protobuf.FieldMask update_mask = 2;
}
message UpdateResponse {
containerd.types.ActivationInfo info = 1;
}
message ListRequest {
repeated string filters = 1;
}
message ListMessage {
containerd.types.ActivationInfo info = 1;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/api/services/namespaces/v1/namespace.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.services.namespaces.v1;
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<string, string> labels = 2;
}
message GetNamespaceRequest {
string name = 1;
}
message GetNamespaceResponse {
Namespace namespace = 1;
}
message ListNamespacesRequest {
string filter = 1;
}
message ListNamespacesResponse {
repeated Namespace namespaces = 1;
}
message CreateNamespaceRequest {
Namespace namespace = 1;
}
message CreateNamespaceResponse {
Namespace namespace = 1;
}
// 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;
// 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;
}
message DeleteNamespaceRequest {
string name = 1;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/api/services/sandbox/v1/sandbox.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
// Sandbox is a v2 runtime extension that allows more complex execution environments for containers.
// This adds a notion of groups of containers that share same lifecycle and/or resources.
// A few good fits for sandbox can be:
// - A "pause" container in k8s, that acts as a parent process for child containers to hold network namespace.
// - (micro)VMs that launch a VM process and executes containers inside guest OS.
// containerd in this case remains implementation agnostic and delegates sandbox handling to runtimes.
// See proposal and discussion here: https://github.com/containerd/containerd/issues/4131
package containerd.services.sandbox.v1;
import "google/protobuf/any.proto";
import "google/protobuf/timestamp.proto";
import "types/metrics.proto";
import "types/mount.proto";
import "types/platform.proto";
import "types/sandbox.proto";
option go_package = "github.com/containerd/containerd/api/services/sandbox/v1;sandbox";
// Store provides a metadata storage interface for sandboxes. Similarly to `Containers`,
// sandbox object includes info required to start a new instance, but no runtime state.
// When running a new sandbox instance, store objects are used as base type to create from.
service Store {
rpc Create(StoreCreateRequest) returns (StoreCreateResponse);
rpc Update(StoreUpdateRequest) returns (StoreUpdateResponse);
rpc Delete(StoreDeleteRequest) returns (StoreDeleteResponse);
rpc List(StoreListRequest) returns (StoreListResponse);
rpc Get(StoreGetRequest) returns (StoreGetResponse);
}
message StoreCreateRequest {
containerd.types.Sandbox sandbox = 1;
}
message StoreCreateResponse {
containerd.types.Sandbox sandbox = 1;
}
message StoreUpdateRequest {
containerd.types.Sandbox sandbox = 1;
repeated string fields = 2;
}
message StoreUpdateResponse {
containerd.types.Sandbox sandbox = 1;
}
message StoreDeleteRequest {
string sandbox_id = 1;
}
message StoreDeleteResponse {}
message StoreListRequest {
repeated string filters = 1;
}
message StoreListResponse {
repeated containerd.types.Sandbox list = 1;
}
message StoreGetRequest {
string sandbox_id = 1;
}
message StoreGetResponse {
containerd.types.Sandbox sandbox = 1;
}
// Controller is an interface to manage runtime sandbox instances.
service Controller {
rpc Create(ControllerCreateRequest) returns (ControllerCreateResponse);
rpc Start(ControllerStartRequest) returns (ControllerStartResponse);
rpc Platform(ControllerPlatformRequest) returns (ControllerPlatformResponse);
rpc Stop(ControllerStopRequest) returns (ControllerStopResponse);
rpc Wait(ControllerWaitRequest) returns (ControllerWaitResponse);
rpc Status(ControllerStatusRequest) returns (ControllerStatusResponse);
rpc Shutdown(ControllerShutdownRequest) returns (ControllerShutdownResponse);
rpc Metrics(ControllerMetricsRequest) returns (ControllerMetricsResponse);
rpc Update(ControllerUpdateRequest) returns (ControllerUpdateResponse);
}
message ControllerCreateRequest {
string sandbox_id = 1;
repeated containerd.types.Mount rootfs = 2;
google.protobuf.Any options = 3;
string netns_path = 4;
map<string, string> annotations = 5;
containerd.types.Sandbox sandbox = 6;
string sandboxer = 10;
}
message ControllerCreateResponse {
string sandbox_id = 1;
}
message ControllerStartRequest {
string sandbox_id = 1;
string sandboxer = 10;
}
message ControllerStartResponse {
string sandbox_id = 1;
uint32 pid = 2;
google.protobuf.Timestamp created_at = 3;
map<string, string> labels = 4;
// Address of the sandbox for containerd to connect,
// for calling Task or other APIs serving in the sandbox.
// it is in the form of ttrpc+unix://path/to/uds or grpc+vsock://<vsock cid>:<port>.
string address = 5;
uint32 version = 6;
google.protobuf.Any spec = 7;
}
message ControllerPlatformRequest {
string sandbox_id = 1;
string sandboxer = 10;
}
message ControllerPlatformResponse {
containerd.types.Platform platform = 1;
}
message ControllerStopRequest {
string sandbox_id = 1;
uint32 timeout_secs = 2;
string sandboxer = 10;
}
message ControllerStopResponse {}
message ControllerWaitRequest {
string sandbox_id = 1;
string sandboxer = 10;
}
message ControllerWaitResponse {
uint32 exit_status = 1;
google.protobuf.Timestamp exited_at = 2;
}
message ControllerStatusRequest {
string sandbox_id = 1;
bool verbose = 2;
string sandboxer = 10;
}
message ControllerStatusResponse {
string sandbox_id = 1;
uint32 pid = 2;
string state = 3;
map<string, string> info = 4;
google.protobuf.Timestamp created_at = 5;
google.protobuf.Timestamp exited_at = 6;
google.protobuf.Any extra = 7;
// Address of the sandbox for containerd to connect,
// for calling Task or other APIs serving in the sandbox.
// it is in the form of ttrpc+unix://path/to/uds or grpc+vsock://<vsock cid>:<port>.
string address = 8;
uint32 version = 9;
}
message ControllerShutdownRequest {
string sandbox_id = 1;
string sandboxer = 10;
}
message ControllerShutdownResponse {}
message ControllerMetricsRequest {
string sandbox_id = 1;
string sandboxer = 10;
}
message ControllerMetricsResponse {
types.Metric metrics = 1;
}
message ControllerUpdateRequest {
string sandbox_id = 1;
string sandboxer = 2;
containerd.types.Sandbox sandbox = 3;
repeated string fields = 4;
}
message ControllerUpdateResponse {}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/api/services/snapshots/v1/snapshots.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.services.snapshots.v1;
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto";
import "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);
rpc Cleanup(CleanupRequest) returns (google.protobuf.Empty);
}
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<string, string> 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<string, string> 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<string, string> labels = 4;
string parent = 5;
}
message StatSnapshotRequest {
string snapshotter = 1;
string key = 2;
}
enum Kind {
UNKNOWN = 0;
VIEW = 1;
ACTIVE = 2;
COMMITTED = 3;
}
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;
// UpdatedAt provides the time the info was last updated.
google.protobuf.Timestamp updated_at = 5;
// Labels are arbitrary data on snapshots.
//
// The combined size of a key/value pair cannot exceed 4096 bytes.
map<string, string> labels = 6;
}
message StatSnapshotResponse {
Info info = 1;
}
message UpdateSnapshotRequest {
string snapshotter = 1;
Info info = 2;
// 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;
}
message ListSnapshotsRequest {
string snapshotter = 1;
// 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 = 2;
}
message ListSnapshotsResponse {
repeated Info info = 1;
}
message UsageRequest {
string snapshotter = 1;
string key = 2;
}
message UsageResponse {
int64 size = 1;
int64 inodes = 2;
}
message CleanupRequest {
string snapshotter = 1;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/api/services/streaming/v1/streaming.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.services.streaming.v1;
import "google/protobuf/any.proto";
option go_package = "github.com/containerd/containerd/api/services/streaming/v1;streaming";
service Streaming {
rpc Stream(stream google.protobuf.Any) returns (stream google.protobuf.Any);
}
message StreamInit {
string id = 1;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/api/services/tasks/v1/tasks.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.services.tasks.v1;
import "google/protobuf/any.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/timestamp.proto";
import "types/descriptor.proto";
import "types/metrics.proto";
import "types/mount.proto";
import "types/task/task.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;
string runtime_path = 10;
}
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;
}
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;
google.protobuf.Any options = 3;
}
message CheckpointTaskResponse {
repeated containerd.types.Descriptor descriptors = 1;
}
message UpdateTaskRequest {
string container_id = 1;
google.protobuf.Any resources = 2;
map<string, string> annotations = 3;
}
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;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/api/services/transfer/v1/transfer.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.services.transfer.v1;
import "google/protobuf/any.proto";
import "google/protobuf/empty.proto";
option go_package = "github.com/containerd/containerd/api/services/transfer/v1;transfer";
service Transfer {
rpc Transfer(TransferRequest) returns (google.protobuf.Empty);
}
message TransferRequest {
google.protobuf.Any source = 1;
google.protobuf.Any destination = 2;
TransferOptions options = 3;
}
message TransferOptions {
string progress_stream = 1;
// Progress min interval
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/api/services/ttrpc/events/v1/events.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.services.events.ttrpc.v1;
import "google/protobuf/empty.proto";
import "types/event.proto";
option go_package = "github.com/containerd/containerd/api/services/ttrpc/events/v1;events";
service Events {
// 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 forwarding on
// behalf of another component, namespace or publisher.
rpc Forward(ForwardRequest) returns (google.protobuf.Empty);
}
message ForwardRequest {
containerd.types.Envelope envelope = 1;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/api/services/version/v1/version.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.services.version.v1;
import "google/protobuf/empty.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;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/api/types/descriptor.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.types;
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;
int64 size = 3;
map<string, string> annotations = 5;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/api/types/event.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.types;
import "google/protobuf/any.proto";
import "google/protobuf/timestamp.proto";
import "types/fieldpath.proto";
option go_package = "github.com/containerd/containerd/api/types;types";
message Envelope {
option (containerd.types.fieldpath) = true;
google.protobuf.Timestamp timestamp = 1;
string namespace = 2;
string topic = 3;
google.protobuf.Any event = 4;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/api/types/fieldpath.proto
================================================
// Protocol Buffers for Go with Gadgets
//
// Copyright (c) 2013, The GoGo Authors. All rights reserved.
// http://github.com/gogo/protobuf
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
syntax = "proto3";
package containerd.types;
import "google/protobuf/descriptor.proto";
option go_package = "github.com/containerd/containerd/api/types;types";
extend google.protobuf.FileOptions {
optional bool fieldpath_all = 63300;
}
extend google.protobuf.MessageOptions {
optional bool fieldpath = 64400;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/api/types/introspection.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.types;
import "google/protobuf/any.proto";
option go_package = "github.com/containerd/containerd/api/types;types";
message RuntimeRequest {
string runtime_path = 1;
// Options correspond to CreateTaskRequest.options.
// This is needed to pass the runc binary path, etc.
google.protobuf.Any options = 2;
}
message RuntimeVersion {
string version = 1;
string revision = 2;
}
message RuntimeInfo {
string name = 1;
RuntimeVersion version = 2;
// Options correspond to RuntimeInfoRequest.Options (contains runc binary path, etc.)
google.protobuf.Any options = 3;
// OCI-compatible runtimes should use https://github.com/opencontainers/runtime-spec/blob/main/features.md
google.protobuf.Any features = 4;
// Annotations of the shim. Irrelevant to features.Annotations.
map<string, string> annotations = 5;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/api/types/metrics.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.types;
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;
string id = 2;
google.protobuf.Any data = 3;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/api/types/mount.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.types;
import "google/protobuf/timestamp.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;
}
message ActiveMount {
Mount mount = 1;
google.protobuf.Timestamp mounted_at = 2;
string mount_point = 3;
map<string, string> data = 4;
}
message ActivationInfo {
string name = 1;
repeated ActiveMount active = 2;
repeated Mount system = 3;
map<string, string> labels = 4;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/api/types/platform.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.types;
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;
string architecture = 2;
string variant = 3;
string os_version = 4;
repeated string os_features = 5;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/api/types/runc/options/oci.proto
================================================
syntax = "proto3";
package containerd.runc.v1;
option go_package = "github.com/containerd/containerd/api/types/runc/options;options";
message Options {
// disable pivot root when creating a container
bool no_pivot_root = 1;
// create a new keyring for the container
bool no_new_keyring = 2;
// place the shim in a cgroup
string shim_cgroup = 3;
// set the I/O's pipes uid
uint32 io_uid = 4;
// set the I/O's pipes gid
uint32 io_gid = 5;
// binary name of the runc binary
string binary_name = 6;
// runc root directory
string root = 7;
// criu binary path.
//
// Removed in containerd v2.0: string criu_path = 8;
reserved 8;
// enable systemd cgroups
bool systemd_cgroup = 9;
// criu image path
string criu_image_path = 10;
// criu work path
string criu_work_path = 11;
// task api address, can be a unix domain socket, or vsock address.
// it is in the form of ttrpc+unix://path/to/uds or grpc+vsock://<vsock cid>:<port>.
string task_api_address = 12;
// task api version, currently supported value is 2 and 3.
uint32 task_api_version = 13;
}
message CheckpointOptions {
// exit the container after a checkpoint
bool exit = 1;
// checkpoint open tcp connections
bool open_tcp = 2;
// checkpoint external unix sockets
bool external_unix_sockets = 3;
// checkpoint terminals (ptys)
bool terminal = 4;
// allow checkpointing of file locks
bool file_locks = 5;
// restore provided namespaces as empty namespaces
repeated string empty_namespaces = 6;
// set the cgroups mode, soft, full, strict
string cgroups_mode = 7;
// checkpoint image path
string image_path = 8;
// checkpoint work path
string work_path = 9;
}
message ProcessDetails {
// exec process id if the process is managed by a shim
string exec_id = 1;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/api/types/runtimeoptions/v1/api.proto
================================================
// To regenerate api.pb.go run `make protos`
syntax = "proto3";
package runtimeoptions.v1;
option go_package = "github.com/containerd/containerd/api/types/runtimeoptions/v1;runtimeoptions";
message Options {
// TypeUrl specifies the type of the content inside the config file.
string type_url = 1;
// ConfigPath specifies the filesystem location of the config file
// used by the runtime.
string config_path = 2;
// Blob specifies an in-memory TOML blob passed from containerd's configuration section
// for this runtime. This will be used if config_path is not specified.
bytes config_body = 3;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/api/types/sandbox.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.types;
import "google/protobuf/any.proto";
import "google/protobuf/timestamp.proto";
option go_package = "github.com/containerd/containerd/api/types;types";
// Sandbox represents a sandbox metadata object that keeps all info required by controller to
// work with a particular instance.
message Sandbox {
// SandboxID is a unique instance identifier within namespace
string sandbox_id = 1;
message Runtime {
// Name is the name of the runtime.
string name = 1;
// Options specify additional runtime initialization options for the shim (this data will be available in StartShim).
// Typically this data expected to be runtime shim implementation specific.
google.protobuf.Any options = 2;
}
// Runtime specifies which runtime to use for executing this container.
Runtime runtime = 2;
// Spec is sandbox configuration (kin of OCI runtime spec), spec's data will be written to a config.json file in the
// bundle directory (similary to OCI spec).
google.protobuf.Any spec = 3;
// Labels provides an area to include arbitrary data on containers.
map<string, string> labels = 4;
// CreatedAt is the time the container was first created.
google.protobuf.Timestamp created_at = 5;
// UpdatedAt is the last time the container was mutated.
google.protobuf.Timestamp updated_at = 6;
// Extensions allow clients to provide optional blobs that can be handled by runtime.
map<string, google.protobuf.Any> extensions = 7;
// Sandboxer is the name of the sandbox controller who manages the sandbox.
string sandboxer = 10;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/api/types/task/task.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.v1.types;
import "google/protobuf/any.proto";
import "google/protobuf/timestamp.proto";
option go_package = "github.com/containerd/containerd/api/types/task";
enum Status {
UNKNOWN = 0;
CREATED = 1;
RUNNING = 2;
STOPPED = 3;
PAUSED = 4;
PAUSING = 5;
}
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;
}
message ProcessInfo {
// PID is the process ID.
uint32 pid = 1;
// Info contains additional process information.
//
// Info varies by platform.
google.protobuf.Any info = 2;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/api/types/transfer/container.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.types.transfer;
option go_package = "github.com/containerd/containerd/api/types/transfer";
// ContainerPath represents a path within an active container's
// filesystem. It acts as either a source or destination in a transfer
// operation, identifying the container and path for archive operations.
message ContainerPath {
string container_id = 1;
string path = 2;
// When true and path is a directory, return only the directory entry
// itself without walking into its contents. This is useful for
// stat-like operations where only the directory's metadata is needed.
bool no_walk = 3;
// When true, preserve the UID/GID from tar headers when extracting
// files. When false, extracted files are owned by the extracting
// process.
bool preserve_ownership = 4;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/api/types/transfer/imagestore.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.types.transfer;
import "types/platform.proto";
option go_package = "github.com/containerd/containerd/api/types/transfer";
message ImageStore {
string name = 1;
map<string, string> labels = 2;
// Content filters
repeated types.Platform platforms = 3;
bool all_metadata = 4;
uint32 manifest_limit = 5;
// Import naming
// extra_references are used to set image names on imports of sub-images from the index
repeated ImageReference extra_references = 6;
// Unpack Configuration, multiple allowed
repeated UnpackConfiguration unpacks = 10;
}
message UnpackConfiguration {
// platform is the platform to unpack for, used for resolving manifest and snapshotter
// if not provided
types.Platform platform = 1;
// snapshotter to unpack to, if not provided default for platform shoudl be used
string snapshotter = 2;
}
// ImageReference is used to create or find a reference for an image
message ImageReference {
string name = 1;
// is_prefix determines whether the Name should be considered
// a prefix (without tag or digest).
// For lookup, this may allow matching multiple tags.
// For store, this must have a tag or digest added.
bool is_prefix = 2;
// allow_overwrite allows overwriting or ignoring the name if
// another reference is provided (such as through an annotation).
// Only used if IsPrefix is true.
bool allow_overwrite = 3;
// add_digest adds the manifest digest to the reference.
// For lookup, this allows matching tags with any digest.
// For store, this allows adding the digest to the name.
// Only used if IsPrefix is true.
bool add_digest = 4;
// skip_named_digest only considers digest references which do not
// have a non-digested named reference.
// For lookup, this will deduplicate digest references when there is a named match.
// For store, this only adds this digest reference when there is no matching full
// name reference from the prefix.
// Only used if IsPrefix is true.
bool skip_named_digest = 5;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/api/types/transfer/importexport.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.types.transfer;
import "types/platform.proto";
option go_package = "github.com/containerd/containerd/api/types/transfer";
message ImageImportStream {
// Stream is used to identify the binary input stream for the import operation.
// The stream uses the transfer binary stream protocol with the client as the sender.
// The binary data is expected to be a raw tar stream.
string stream = 1;
string media_type = 2;
bool force_compress = 3;
}
message ImageExportStream {
// Stream is used to identify the binary output stream for the export operation.
// The stream uses the transfer binary stream protocol with the server as the sender.
// The binary data is expected to be a raw tar stream.
string stream = 1;
string media_type = 2;
// The specified platforms
repeated types.Platform platforms = 3;
// Whether to include all platforms
bool all_platforms = 4;
// Skips the creation of the Docker compatible manifest.json file
bool skip_compatibility_manifest = 5;
// Excludes non-distributable blobs such as Windows base layers.
bool skip_non_distributable = 6;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/api/types/transfer/progress.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.types.transfer;
import "types/descriptor.proto";
option go_package = "github.com/containerd/containerd/api/types/transfer";
message Progress {
string event = 1;
string name = 2;
repeated string parents = 3;
int64 progress = 4;
int64 total = 5;
containerd.types.Descriptor desc = 6;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/api/types/transfer/registry.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.types.transfer;
import "google/protobuf/timestamp.proto";
option go_package = "github.com/containerd/containerd/api/types/transfer";
message OCIRegistry {
string reference = 1;
RegistryResolver resolver = 2;
}
enum HTTPDebug {
DISABLED = 0;
// Enable HTTP debugging
DEBUG = 1;
// Enable HTTP requests tracing
TRACE = 2;
// Enable both HTTP debugging and requests tracing
BOTH = 3;
}
message RegistryResolver {
// auth_stream is used to refer to a stream which auth callbacks may be
// made on.
string auth_stream = 1;
// Headers
map<string, string> headers = 2;
string host_dir = 3;
string default_scheme = 4;
// Force skip verify
// CA callback? Client TLS callback?
// Whether to debug/trace HTTP requests to OCI registry.
HTTPDebug http_debug = 5;
// Stream ID to use for HTTP logs (when logs are streamed to client).
// When empty, logs are written to containerd logs.
string logs_stream = 6;
}
// AuthRequest is sent as a callback on a stream
message AuthRequest {
// host is the registry host
string host = 1;
// reference is the namespace and repository name requested from the registry
string reference = 2;
// wwwauthenticate is the HTTP WWW-Authenticate header values returned from the registry
repeated string wwwauthenticate = 3;
}
enum AuthType {
NONE = 0;
// CREDENTIALS is used to exchange username/password for access token
// using an oauth or "Docker Registry Token" server
CREDENTIALS = 1;
// REFRESH is used to exchange secret for access token using an oauth
// or "Docker Registry Token" server
REFRESH = 2;
// HEADER is used to set the HTTP Authorization header to secret
// directly for the registry.
// Value should be `<auth-scheme> <authorization-parameters>`
HEADER = 3;
}
message AuthResponse {
AuthType authType = 1;
string secret = 2;
string username = 3;
google.protobuf.Timestamp expire_at = 4;
// TODO: Stream error
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/api/types/transfer/streaming.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.types.transfer;
option go_package = "github.com/containerd/containerd/api/types/transfer";
message Data {
bytes data = 1;
}
message WindowUpdate {
int32 update = 1;
}
// ReadStream carries data from the client to the server (import
// direction). The client sends data through the stream and the
// server reads it.
message ReadStream {
string stream = 1;
string media_type = 2;
}
// WriteStream carries data from the server to the client (export
// direction). The server writes data into the stream and the
// client receives it.
message WriteStream {
string stream = 1;
string media_type = 2;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/events/container.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.events;
import "google/protobuf/any.proto";
import "types/fieldpath.proto";
option go_package = "github.com/containerd/containerd/api/events;events";
option (containerd.types.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<string, string> labels = 3;
string snapshot_key = 4;
}
message ContainerDelete {
string id = 1;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/events/content.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.events;
import "types/fieldpath.proto";
option go_package = "github.com/containerd/containerd/api/events;events";
option (containerd.types.fieldpath_all) = true;
message ContentCreate {
string digest = 1;
int64 size = 2;
}
message ContentDelete {
string digest = 1;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/events/image.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.services.images.v1;
import "types/fieldpath.proto";
option go_package = "github.com/containerd/containerd/api/events;events";
option (containerd.types.fieldpath_all) = true;
message ImageCreate {
string name = 1;
map<string, string> labels = 2;
}
message ImageUpdate {
string name = 1;
map<string, string> labels = 2;
}
message ImageDelete {
string name = 1;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/events/namespace.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.events;
import "types/fieldpath.proto";
option go_package = "github.com/containerd/containerd/api/events;events";
option (containerd.types.fieldpath_all) = true;
message NamespaceCreate {
string name = 1;
map<string, string> labels = 2;
}
message NamespaceUpdate {
string name = 1;
map<string, string> labels = 2;
}
message NamespaceDelete {
string name = 1;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/events/sandbox.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.events;
import "google/protobuf/timestamp.proto";
option go_package = "github.com/containerd/containerd/api/events;events";
message SandboxCreate {
string sandbox_id = 1;
}
message SandboxStart {
string sandbox_id = 1;
}
message SandboxExit {
string sandbox_id = 1;
uint32 exit_status = 2;
google.protobuf.Timestamp exited_at = 3;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/events/snapshot.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.events;
import "types/fieldpath.proto";
option go_package = "github.com/containerd/containerd/api/events;events";
option (containerd.types.fieldpath_all) = true;
message SnapshotPrepare {
string key = 1;
string parent = 2;
string snapshotter = 5;
}
message SnapshotCommit {
string key = 1;
string name = 2;
string snapshotter = 5;
}
message SnapshotRemove {
string key = 1;
string snapshotter = 5;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/events/task.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.events;
import "google/protobuf/timestamp.proto";
import "types/fieldpath.proto";
import "types/mount.proto";
option go_package = "github.com/containerd/containerd/api/events;events";
option (containerd.types.fieldpath_all) = true;
message TaskCreate {
string container_id = 1;
string bundle = 2;
repeated containerd.types.Mount rootfs = 3;
TaskIO io = 4;
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;
// id is the specific exec. By default if omitted will be `""` thus matches
// the init exec of the task matching `container_id`.
string id = 5;
}
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;
}
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;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/services/containers/v1/containers.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.services.containers.v1;
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 ListStream(ListContainersRequest) returns (stream ListContainerMessage);
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<string, string> 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;
// UpdatedAt is the last time the container was mutated.
google.protobuf.Timestamp updated_at = 9;
// 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<string, google.protobuf.Any> extensions = 10;
// Sandbox ID this container belongs to.
string sandbox = 11;
}
message GetContainerRequest {
string id = 1;
}
message GetContainerResponse {
Container container = 1;
}
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;
}
message CreateContainerRequest {
Container container = 1;
}
message CreateContainerResponse {
Container container = 1;
}
// 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;
// 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;
}
message DeleteContainerRequest {
string id = 1;
}
message ListContainerMessage {
Container container = 1;
}
================================================
FILE: crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/services/content/v1/content.proto
================================================
/*
Copyright The containerd Authors.
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
http://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.
*/
syntax = "proto3";
package containerd.services.content.v1;
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/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 omitted 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;
// 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;
// UpdatedAt provides the time the info was last updated.
google.protobuf.Timestamp updated_at = 4;
// Labels are arbitrary data on snapshots.
//
// The combined size of a key/value pair cannot exceed 4096 bytes.
map<string, string> labels = 5;
}
message InfoRequest {
string digest = 1;
}
message InfoResponse {
Info info = 1;
}
message UpdateRequest {
Info info = 1;
// 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;
}
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;
}
message DeleteContentRequest {
// Digest specifies which content to delete.
string digest = 1;
}
// 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;
// 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;
google.protobuf.Timestamp updated_at = 2;
string ref = 3;
int64 offset = 4;
int64 total = 5;
string expected = 6;
}
message StatusRequest {
string ref = 1;
}
message StatusResponse {
Status status = 1;
}
message ListStatusesRequest {
repeated string filters = 1;
}
message ListStatusesResponse {
repeated Status statuses = 1;
}
// WriteAction defines the behavior of a WriteRequest.
enum WriteAction {
// WriteActionStat instructs the writer to return the current status while
// holding the lock on the write.
STAT = 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.
WRITE = 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.
COMMIT = 2;
}
// 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;
// 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<string, string> 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;
// UpdatedAt provides the last time of a successful write.
//
gitextract__mh1hr60/
├── .gitattributes
├── .github/
│ ├── dependabot.yml
│ ├── labeler.yml
│ ├── release.yml
│ └── workflows/
│ ├── ci.yml
│ ├── cover.yml
│ ├── labeler.yml
│ ├── publish.yml
│ └── stale.yml
├── .gitignore
├── Cargo.toml
├── LICENSE
├── MAINTAINERS
├── README.md
├── clippy.toml
├── codecov.yml
├── crates/
│ ├── client/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── build.rs
│ │ ├── examples/
│ │ │ ├── container.rs
│ │ │ ├── container_events.rs
│ │ │ ├── container_pull.rs
│ │ │ ├── container_spec.json
│ │ │ └── version.rs
│ │ ├── rsync.txt
│ │ ├── src/
│ │ │ └── lib.rs
│ │ └── vendor/
│ │ ├── README.md
│ │ ├── github.com/
│ │ │ └── containerd/
│ │ │ └── containerd/
│ │ │ ├── api/
│ │ │ │ ├── events/
│ │ │ │ │ ├── container.proto
│ │ │ │ │ ├── content.proto
│ │ │ │ │ ├── image.proto
│ │ │ │ │ ├── namespace.proto
│ │ │ │ │ ├── sandbox.proto
│ │ │ │ │ ├── snapshot.proto
│ │ │ │ │ └── task.proto
│ │ │ │ ├── services/
│ │ │ │ │ ├── containers/
│ │ │ │ │ │ └── v1/
│ │ │ │ │ │ └── containers.proto
│ │ │ │ │ ├── content/
│ │ │ │ │ │ └── v1/
│ │ │ │ │ │ └── content.proto
│ │ │ │ │ ├── diff/
│ │ │ │ │ │ └── v1/
│ │ │ │ │ │ └── diff.proto
│ │ │ │ │ ├── events/
│ │ │ │ │ │ └── v1/
│ │ │ │ │ │ └── events.proto
│ │ │ │ │ ├── images/
│ │ │ │ │ │ └── v1/
│ │ │ │ │ │ └── images.proto
│ │ │ │ │ ├── introspection/
│ │ │ │ │ │ └── v1/
│ │ │ │ │ │ └── introspection.proto
│ │ │ │ │ ├── leases/
│ │ │ │ │ │ └── v1/
│ │ │ │ │ │ └── leases.proto
│ │ │ │ │ ├── mounts/
│ │ │ │ │ │ └── v1/
│ │ │ │ │ │ └── mounts.proto
│ │ │ │ │ ├── namespaces/
│ │ │ │ │ │ └── v1/
│ │ │ │ │ │ └── namespace.proto
│ │ │ │ │ ├── sandbox/
│ │ │ │ │ │ └── v1/
│ │ │ │ │ │ └── sandbox.proto
│ │ │ │ │ ├── snapshots/
│ │ │ │ │ │ └── v1/
│ │ │ │ │ │ └── snapshots.proto
│ │ │ │ │ ├── streaming/
│ │ │ │ │ │ └── v1/
│ │ │ │ │ │ └── streaming.proto
│ │ │ │ │ ├── tasks/
│ │ │ │ │ │ └── v1/
│ │ │ │ │ │ └── tasks.proto
│ │ │ │ │ ├── transfer/
│ │ │ │ │ │ └── v1/
│ │ │ │ │ │ └── transfer.proto
│ │ │ │ │ ├── ttrpc/
│ │ │ │ │ │ └── events/
│ │ │ │ │ │ └── v1/
│ │ │ │ │ │ └── events.proto
│ │ │ │ │ └── version/
│ │ │ │ │ └── v1/
│ │ │ │ │ └── version.proto
│ │ │ │ └── types/
│ │ │ │ ├── descriptor.proto
│ │ │ │ ├── event.proto
│ │ │ │ ├── fieldpath.proto
│ │ │ │ ├── introspection.proto
│ │ │ │ ├── metrics.proto
│ │ │ │ ├── mount.proto
│ │ │ │ ├── platform.proto
│ │ │ │ ├── runc/
│ │ │ │ │ └── options/
│ │ │ │ │ └── oci.proto
│ │ │ │ ├── runtimeoptions/
│ │ │ │ │ └── v1/
│ │ │ │ │ └── api.proto
│ │ │ │ ├── sandbox.proto
│ │ │ │ ├── task/
│ │ │ │ │ └── task.proto
│ │ │ │ └── transfer/
│ │ │ │ ├── container.proto
│ │ │ │ ├── imagestore.proto
│ │ │ │ ├── importexport.proto
│ │ │ │ ├── progress.proto
│ │ │ │ ├── registry.proto
│ │ │ │ └── streaming.proto
│ │ │ └── vendor/
│ │ │ └── github.com/
│ │ │ └── containerd/
│ │ │ └── containerd/
│ │ │ └── api/
│ │ │ ├── events/
│ │ │ │ ├── container.proto
│ │ │ │ ├── content.proto
│ │ │ │ ├── image.proto
│ │ │ │ ├── namespace.proto
│ │ │ │ ├── sandbox.proto
│ │ │ │ ├── snapshot.proto
│ │ │ │ └── task.proto
│ │ │ ├── services/
│ │ │ │ ├── containers/
│ │ │ │ │ └── v1/
│ │ │ │ │ └── containers.proto
│ │ │ │ ├── content/
│ │ │ │ │ └── v1/
│ │ │ │ │ └── content.proto
│ │ │ │ ├── diff/
│ │ │ │ │ └── v1/
│ │ │ │ │ └── diff.proto
│ │ │ │ ├── events/
│ │ │ │ │ └── v1/
│ │ │ │ │ └── events.proto
│ │ │ │ ├── images/
│ │ │ │ │ └── v1/
│ │ │ │ │ └── images.proto
│ │ │ │ ├── introspection/
│ │ │ │ │ └── v1/
│ │ │ │ │ └── introspection.proto
│ │ │ │ ├── leases/
│ │ │ │ │ └── v1/
│ │ │ │ │ └── leases.proto
│ │ │ │ ├── mounts/
│ │ │ │ │ └── v1/
│ │ │ │ │ └── mounts.proto
│ │ │ │ ├── namespaces/
│ │ │ │ │ └── v1/
│ │ │ │ │ └── namespace.proto
│ │ │ │ ├── sandbox/
│ │ │ │ │ └── v1/
│ │ │ │ │ └── sandbox.proto
│ │ │ │ ├── snapshots/
│ │ │ │ │ └── v1/
│ │ │ │ │ └── snapshots.proto
│ │ │ │ ├── streaming/
│ │ │ │ │ └── v1/
│ │ │ │ │ └── streaming.proto
│ │ │ │ ├── tasks/
│ │ │ │ │ └── v1/
│ │ │ │ │ └── tasks.proto
│ │ │ │ ├── transfer/
│ │ │ │ │ └── v1/
│ │ │ │ │ └── transfer.proto
│ │ │ │ ├── ttrpc/
│ │ │ │ │ └── events/
│ │ │ │ │ └── v1/
│ │ │ │ │ └── events.proto
│ │ │ │ └── version/
│ │ │ │ └── v1/
│ │ │ │ └── version.proto
│ │ │ └── types/
│ │ │ ├── descriptor.proto
│ │ │ ├── event.proto
│ │ │ ├── fieldpath.proto
│ │ │ ├── introspection.proto
│ │ │ ├── metrics.proto
│ │ │ ├── mount.proto
│ │ │ ├── platform.proto
│ │ │ ├── runc/
│ │ │ │ └── options/
│ │ │ │ └── oci.proto
│ │ │ ├── runtimeoptions/
│ │ │ │ └── v1/
│ │ │ │ └── api.proto
│ │ │ ├── sandbox.proto
│ │ │ ├── task/
│ │ │ │ └── task.proto
│ │ │ └── transfer/
│ │ │ ├── container.proto
│ │ │ ├── imagestore.proto
│ │ │ ├── importexport.proto
│ │ │ ├── progress.proto
│ │ │ ├── registry.proto
│ │ │ └── streaming.proto
│ │ └── google/
│ │ ├── protobuf/
│ │ │ ├── any.proto
│ │ │ ├── descriptor.proto
│ │ │ ├── empty.proto
│ │ │ ├── field_mask.proto
│ │ │ └── timestamp.proto
│ │ └── rpc/
│ │ └── status.proto
│ ├── logging/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── examples/
│ │ │ └── journal.rs
│ │ └── src/
│ │ └── lib.rs
│ ├── runc/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── asynchronous/
│ │ │ ├── io.rs
│ │ │ ├── mod.rs
│ │ │ ├── pipe.rs
│ │ │ └── runc.rs
│ │ ├── container.rs
│ │ ├── error.rs
│ │ ├── events.rs
│ │ ├── lib.rs
│ │ ├── monitor.rs
│ │ ├── options.rs
│ │ ├── synchronous/
│ │ │ ├── io.rs
│ │ │ ├── mod.rs
│ │ │ ├── pipe.rs
│ │ │ └── runc.rs
│ │ └── utils.rs
│ ├── runc-shim/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── build.rs
│ │ └── src/
│ │ ├── cgroup_memory.rs
│ │ ├── common.rs
│ │ ├── console.rs
│ │ ├── container.rs
│ │ ├── io.rs
│ │ ├── main.rs
│ │ ├── processes.rs
│ │ ├── runc.rs
│ │ ├── service.rs
│ │ └── task.rs
│ ├── shim/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── examples/
│ │ │ ├── publish.rs
│ │ │ ├── skeleton.rs
│ │ │ ├── skeleton_async.rs
│ │ │ └── windows_log_reader.rs
│ │ └── src/
│ │ ├── args.rs
│ │ ├── asynchronous/
│ │ │ ├── mod.rs
│ │ │ ├── monitor.rs
│ │ │ ├── publisher.rs
│ │ │ └── util.rs
│ │ ├── cgroup.rs
│ │ ├── error.rs
│ │ ├── event.rs
│ │ ├── lib.rs
│ │ ├── logger.rs
│ │ ├── monitor.rs
│ │ ├── mount_linux.rs
│ │ ├── mount_other.rs
│ │ ├── reap.rs
│ │ ├── synchronous/
│ │ │ ├── mod.rs
│ │ │ ├── monitor.rs
│ │ │ ├── publisher.rs
│ │ │ └── util.rs
│ │ └── util.rs
│ ├── shim-protos/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── build.rs
│ │ ├── examples/
│ │ │ ├── connect-async.rs
│ │ │ ├── connect.rs
│ │ │ ├── ttrpc-client-async.rs
│ │ │ ├── ttrpc-client.rs
│ │ │ ├── ttrpc-server-async.rs
│ │ │ └── ttrpc-server.rs
│ │ ├── rsync.txt
│ │ ├── src/
│ │ │ ├── cgroups.rs
│ │ │ ├── cgroups_v2.rs
│ │ │ ├── events.rs
│ │ │ ├── lib.rs
│ │ │ ├── sandbox.rs
│ │ │ ├── shim.rs
│ │ │ ├── topics.rs
│ │ │ ├── types.rs
│ │ │ └── windows.rs
│ │ ├── tests/
│ │ │ └── ttrpc.rs
│ │ └── vendor/
│ │ ├── README.md
│ │ ├── github.com/
│ │ │ └── containerd/
│ │ │ ├── cgroups/
│ │ │ │ ├── cgroup2/
│ │ │ │ │ └── stats/
│ │ │ │ │ └── metrics.proto
│ │ │ │ ├── stats/
│ │ │ │ │ └── v1/
│ │ │ │ │ └── metrics.proto
│ │ │ │ └── v3/
│ │ │ │ └── cgroup1/
│ │ │ │ └── stats/
│ │ │ │ └── metrics.proto
│ │ │ └── containerd/
│ │ │ ├── api/
│ │ │ │ ├── events/
│ │ │ │ │ ├── container.proto
│ │ │ │ │ ├── content.proto
│ │ │ │ │ ├── image.proto
│ │ │ │ │ ├── namespace.proto
│ │ │ │ │ ├── sandbox.proto
│ │ │ │ │ ├── snapshot.proto
│ │ │ │ │ └── task.proto
│ │ │ │ ├── runtime/
│ │ │ │ │ ├── sandbox/
│ │ │ │ │ │ └── v1/
│ │ │ │ │ │ └── sandbox.proto
│ │ │ │ │ └── task/
│ │ │ │ │ └── v2/
│ │ │ │ │ └── shim.proto
│ │ │ │ ├── services/
│ │ │ │ │ └── ttrpc/
│ │ │ │ │ └── events/
│ │ │ │ │ └── v1/
│ │ │ │ │ └── events.proto
│ │ │ │ └── types/
│ │ │ │ ├── descriptor.proto
│ │ │ │ ├── event.proto
│ │ │ │ ├── fieldpath.proto
│ │ │ │ ├── introspection.proto
│ │ │ │ ├── metrics.proto
│ │ │ │ ├── mount.proto
│ │ │ │ ├── platform.proto
│ │ │ │ ├── runc/
│ │ │ │ │ └── options/
│ │ │ │ │ └── oci.proto
│ │ │ │ ├── sandbox.proto
│ │ │ │ └── task/
│ │ │ │ └── task.proto
│ │ │ └── vendor/
│ │ │ └── github.com/
│ │ │ └── containerd/
│ │ │ └── containerd/
│ │ │ └── api/
│ │ │ ├── events/
│ │ │ │ ├── container.proto
│ │ │ │ ├── content.proto
│ │ │ │ ├── image.proto
│ │ │ │ ├── namespace.proto
│ │ │ │ ├── sandbox.proto
│ │ │ │ ├── snapshot.proto
│ │ │ │ └── task.proto
│ │ │ ├── runtime/
│ │ │ │ ├── sandbox/
│ │ │ │ │ └── v1/
│ │ │ │ │ └── sandbox.proto
│ │ │ │ └── task/
│ │ │ │ └── v2/
│ │ │ │ └── shim.proto
│ │ │ ├── services/
│ │ │ │ └── ttrpc/
│ │ │ │ └── events/
│ │ │ │ └── v1/
│ │ │ │ └── events.proto
│ │ │ └── types/
│ │ │ ├── descriptor.proto
│ │ │ ├── event.proto
│ │ │ ├── fieldpath.proto
│ │ │ ├── introspection.proto
│ │ │ ├── metrics.proto
│ │ │ ├── mount.proto
│ │ │ ├── platform.proto
│ │ │ ├── runc/
│ │ │ │ └── options/
│ │ │ │ └── oci.proto
│ │ │ ├── sandbox.proto
│ │ │ └── task/
│ │ │ └── task.proto
│ │ ├── gogoproto/
│ │ │ └── gogo.proto
│ │ ├── google/
│ │ │ └── protobuf/
│ │ │ ├── any.proto
│ │ │ ├── descriptor.proto
│ │ │ ├── empty.proto
│ │ │ └── timestamp.proto
│ │ └── microsoft/
│ │ └── hcsshim/
│ │ └── cmd/
│ │ └── containerd-shim-runhcs-v1/
│ │ └── stats/
│ │ └── stats.proto
│ └── snapshots/
│ ├── Cargo.toml
│ ├── README.md
│ ├── build.rs
│ ├── examples/
│ │ └── snapshotter.rs
│ ├── rsync.txt
│ ├── src/
│ │ ├── convert.rs
│ │ ├── lib.rs
│ │ └── wrap.rs
│ └── vendor/
│ ├── github.com/
│ │ └── containerd/
│ │ └── containerd/
│ │ ├── api/
│ │ │ ├── services/
│ │ │ │ └── snapshots/
│ │ │ │ └── v1/
│ │ │ │ └── snapshots.proto
│ │ │ └── types/
│ │ │ └── mount.proto
│ │ └── vendor/
│ │ └── github.com/
│ │ └── containerd/
│ │ └── containerd/
│ │ └── api/
│ │ ├── services/
│ │ │ └── snapshots/
│ │ │ └── v1/
│ │ │ └── snapshots.proto
│ │ └── types/
│ │ └── mount.proto
│ ├── gogoproto/
│ │ └── gogo.proto
│ └── google/
│ └── protobuf/
│ ├── descriptor.proto
│ ├── empty.proto
│ ├── field_mask.proto
│ └── timestamp.proto
├── deny.toml
├── rust-toolchain.toml
├── rustfmt.toml
└── scripts/
├── install-protobuf.sh
└── update-vendor.sh
SYMBOL INDEX (912 symbols across 71 files)
FILE: crates/client/build.rs
constant PROTO_FILES (line 19) | const PROTO_FILES: &[&str] = &[
constant FIXUP_MODULES (line 56) | const FIXUP_MODULES: &[&str] = &[
function main (line 68) | fn main() {
function fixup_imports (line 98) | fn fixup_imports(path: &str) -> Result<(), io::Error> {
FILE: crates/client/examples/container.rs
constant CID (line 31) | const CID: &str = "abc123";
constant NAMESPACE (line 32) | const NAMESPACE: &str = "default";
function main (line 37) | async fn main() {
FILE: crates/client/examples/container_events.rs
function main (line 25) | async fn main() {
FILE: crates/client/examples/container_pull.rs
constant IMAGE (line 31) | const IMAGE: &str = "docker.io/library/alpine:latest";
constant NAMESPACE (line 32) | const NAMESPACE: &str = "default";
function main (line 37) | async fn main() {
FILE: crates/client/examples/version.rs
function main (line 21) | async fn main() {
FILE: crates/client/src/lib.rs
function connect (line 86) | pub async fn connect(
function to_any (line 130) | pub fn to_any<T: Message + Name>(m: &T) -> Any {
type Client (line 169) | pub struct Client {
method from (line 174) | fn from(value: Channel) -> Self {
method from_path (line 182) | pub async fn from_path(path: impl AsRef<std::path::Path>) -> Result<Se...
method channel (line 189) | pub fn channel(&self) -> Channel {
method version (line 195) | pub fn version(&self) -> VersionClient<Channel> {
method tasks (line 201) | pub fn tasks(&self) -> TasksClient<Channel> {
method transfer (line 207) | pub fn transfer(&self) -> TransferClient<Channel> {
method sandbox_store (line 213) | pub fn sandbox_store(&self) -> StoreClient<Channel> {
method streaming (line 219) | pub fn streaming(&self) -> StreamingClient<Channel> {
method sandbox_controller (line 225) | pub fn sandbox_controller(&self) -> ControllerClient<Channel> {
method snapshots (line 231) | pub fn snapshots(&self) -> SnapshotsClient<Channel> {
method namespaces (line 237) | pub fn namespaces(&self) -> NamespacesClient<Channel> {
method leases (line 243) | pub fn leases(&self) -> LeasesClient<Channel> {
method introspection (line 249) | pub fn introspection(&self) -> IntrospectionClient<Channel> {
method images (line 255) | pub fn images(&self) -> ImagesClient<Channel> {
method events (line 261) | pub fn events(&self) -> EventsClient<Channel> {
method diff (line 267) | pub fn diff(&self) -> DiffClient<Channel> {
method content (line 273) | pub fn content(&self) -> ContentClient<Channel> {
method containers (line 279) | pub fn containers(&self) -> ContainersClient<Channel> {
function any_roundtrip (line 291) | fn any_roundtrip() {
FILE: crates/logging/examples/journal.rs
function pump (line 22) | fn pump(reader: fs::File) {
type Journal (line 33) | struct Journal {
type Error (line 39) | type Error = String;
method new (line 41) | fn new(config: Config) -> Result<Self, Self::Error> {
method wait (line 51) | fn wait(self) -> Result<(), Self::Error> {
function main (line 62) | fn main() {
FILE: crates/logging/src/lib.rs
type Config (line 23) | pub struct Config {
method new (line 43) | fn new() -> Config {
type Ready (line 73) | struct Ready(fs::File);
method new (line 76) | fn new() -> Ready {
method signal (line 81) | fn signal(self) {
type Driver (line 112) | pub trait Driver: Sized {
method new (line 120) | fn new(config: Config) -> Result<Self, Self::Error>;
method wait (line 125) | fn wait(self) -> Result<(), Self::Error>;
function run (line 131) | pub fn run<D: Driver>() {
function handle_err (line 153) | fn handle_err(err: impl fmt::Debug) -> ! {
FILE: crates/runc-shim/build.rs
function main (line 19) | fn main() {
FILE: crates/runc-shim/src/cgroup_memory.rs
function get_path_from_cgorup (line 32) | pub async fn get_path_from_cgorup(pid: u32) -> Result<String> {
function get_existing_cgroup_mem_path (line 48) | pub async fn get_existing_cgroup_mem_path(pid_path: String) -> Result<(S...
function get_path_from_mountinfo (line 57) | async fn get_path_from_mountinfo() -> Result<(String, String)> {
function parse_memory_mountroot (line 74) | fn parse_memory_mountroot(line: &str) -> Result<(String, String)> {
function register_memory_event (line 85) | pub async fn register_memory_event(
function test_cgroupv1_oom_monitor (line 140) | async fn test_cgroupv1_oom_monitor() {
FILE: crates/runc-shim/src/common.rs
constant GROUP_LABELS (line 55) | pub const GROUP_LABELS: [&str; 2] = [
constant INIT_PID_FILE (line 59) | pub const INIT_PID_FILE: &str = "init.pid";
constant LOG_JSON_FILE (line 60) | pub const LOG_JSON_FILE: &str = "log.json";
constant FIFO_SCHEME (line 61) | pub const FIFO_SCHEME: &str = "fifo";
constant TIMEOUT_DURATION (line 63) | const TIMEOUT_DURATION: std::time::Duration = Duration::from_secs(3);
type Log (line 66) | pub struct Log {
type ProcessIO (line 72) | pub struct ProcessIO {
function create_io (line 78) | pub fn create_io(
type ShimExecutor (line 122) | pub struct ShimExecutor {}
function get_spec_from_request (line 124) | pub fn get_spec_from_request(
function check_kill_error (line 136) | pub fn check_kill_error(emsg: String) -> Error {
constant DEFAULT_RUNC_ROOT (line 150) | const DEFAULT_RUNC_ROOT: &str = "/run/containerd/runc";
constant DEFAULT_COMMAND (line 151) | const DEFAULT_COMMAND: &str = "runc";
function create_runc (line 153) | pub fn create_runc(
type CreateConfig (line 189) | pub(crate) struct CreateConfig {}
function receive_socket (line 191) | pub fn receive_socket(stream_fd: RawFd) -> containerd_shim::Result<Owned...
function has_shared_pid_namespace (line 229) | pub fn has_shared_pid_namespace(spec: &Spec) -> bool {
function xdg_runtime_dir (line 248) | pub(crate) fn xdg_runtime_dir() -> String {
function handle_file_open (line 253) | pub async fn handle_file_open<F, Fut>(file_op: F) -> Result<tokio::fs::F...
FILE: crates/runc-shim/src/console.rs
type ConsoleSocket (line 26) | pub struct ConsoleSocket {
method new (line 33) | pub async fn new() -> Result<ConsoleSocket> {
method accept (line 49) | pub async fn accept(&self) -> Result<UnixStream> {
method clean (line 59) | pub async fn clean(self) {
FILE: crates/runc-shim/src/container.rs
type Container (line 39) | pub trait Container {
method start (line 40) | async fn start(&mut self, exec_id: Option<&str>) -> Result<i32>;
method state (line 41) | async fn state(&self, exec_id: Option<&str>) -> Result<StateResponse>;
method kill (line 42) | async fn kill(&mut self, exec_id: Option<&str>, signal: u32, all: bool...
method wait_channel (line 43) | async fn wait_channel(&mut self, exec_id: Option<&str>) -> Result<Rece...
method get_exit_info (line 44) | async fn get_exit_info(
method delete (line 48) | async fn delete(
method exec (line 52) | async fn exec(&mut self, req: ExecProcessRequest) -> Result<()>;
method resize_pty (line 53) | async fn resize_pty(&mut self, exec_id: Option<&str>, height: u32, wid...
method pid (line 54) | async fn pid(&self) -> i32;
method id (line 55) | async fn id(&self) -> String;
method update (line 56) | async fn update(&mut self, resources: &LinuxResources) -> Result<()>;
method stats (line 57) | async fn stats(&self) -> Result<Metrics>;
method all_processes (line 58) | async fn all_processes(&self) -> Result<Vec<ProcessInfo>>;
method close_io (line 59) | async fn close_io(&mut self, exec_id: Option<&str>) -> Result<()>;
method pause (line 60) | async fn pause(&mut self) -> Result<()>;
method resume (line 61) | async fn resume(&mut self) -> Result<()>;
method init_state (line 62) | async fn init_state(&self) -> EnumOrUnknown<Status>;
method init_state (line 100) | async fn init_state(&self) -> EnumOrUnknown<Status> {
method start (line 105) | async fn start(&mut self, exec_id: Option<&str>) -> Result<i32> {
method state (line 111) | async fn state(&self, exec_id: Option<&str>) -> Result<StateResponse> {
method kill (line 125) | async fn kill(&mut self, exec_id: Option<&str>, signal: u32, all: bool...
method wait_channel (line 130) | async fn wait_channel(&mut self, exec_id: Option<&str>) -> Result<Rece...
method get_exit_info (line 135) | async fn get_exit_info(
method delete (line 147) | async fn delete(
method exec (line 163) | async fn exec(&mut self, req: ExecProcessRequest) -> Result<()> {
method resize_pty (line 170) | async fn resize_pty(&mut self, exec_id: Option<&str>, height: u32, wid...
method pid (line 175) | async fn pid(&self) -> i32 {
method id (line 179) | async fn id(&self) -> String {
method update (line 184) | async fn update(&mut self, resources: &LinuxResources) -> Result<()> {
method update (line 189) | async fn update(&mut self, _resources: &LinuxResources) -> Result<()> {
method stats (line 194) | async fn stats(&self) -> Result<Metrics> {
method stats (line 199) | async fn stats(&self) -> Result<Metrics> {
method all_processes (line 203) | async fn all_processes(&self) -> Result<Vec<ProcessInfo>> {
method close_io (line 225) | async fn close_io(&mut self, exec_id: Option<&str>) -> Result<()> {
method pause (line 230) | async fn pause(&mut self) -> Result<()> {
method resume (line 234) | async fn resume(&mut self) -> Result<()> {
type ContainerFactory (line 66) | pub trait ContainerFactory<C> {
method create (line 67) | async fn create(&self, ns: &str, req: &CreateTaskRequest) -> Result<C>;
method cleanup (line 68) | async fn cleanup(&self, ns: &str, c: &C) -> Result<()>;
type ProcessFactory (line 72) | pub trait ProcessFactory<E> {
method create (line 73) | async fn create(&self, req: &ExecProcessRequest) -> Result<E>;
type ContainerTemplate (line 80) | pub struct ContainerTemplate<T, E, P> {
function get_process (line 244) | pub fn get_process(&self, exec_id: Option<&str>) -> Result<&(dyn Process...
function get_mut_process (line 256) | pub fn get_mut_process(
FILE: crates/runc-shim/src/io.rs
type Stdio (line 18) | pub struct Stdio {
method new (line 26) | pub fn new(stdin: &str, stdout: &str, stderr: &str, terminal: bool) ->...
method is_null (line 35) | pub fn is_null(&self) -> bool {
FILE: crates/runc-shim/src/main.rs
function parse_version (line 38) | fn parse_version() {
function main (line 82) | async fn main() {
FILE: crates/runc-shim/src/processes.rs
type Process (line 40) | pub trait Process {
method start (line 41) | async fn start(&mut self) -> Result<()>;
method set_exited (line 42) | async fn set_exited(&mut self, exit_code: i32);
method pid (line 43) | async fn pid(&self) -> i32;
method state (line 44) | async fn state(&self) -> Result<StateResponse>;
method kill (line 45) | async fn kill(&mut self, signal: u32, all: bool) -> Result<()>;
method delete (line 46) | async fn delete(&mut self) -> Result<()>;
method wait_channel (line 47) | async fn wait_channel(&mut self) -> Result<Receiver<()>>;
method exit_code (line 48) | async fn exit_code(&self) -> i32;
method exited_at (line 49) | async fn exited_at(&self) -> Option<OffsetDateTime>;
method resize_pty (line 50) | async fn resize_pty(&mut self, height: u32, width: u32) -> Result<()>;
method update (line 51) | async fn update(&mut self, resources: &LinuxResources) -> Result<()>;
method stats (line 52) | async fn stats(&self) -> Result<Metrics>;
method ps (line 53) | async fn ps(&self) -> Result<Vec<ProcessInfo>>;
method close_io (line 54) | async fn close_io(&mut self) -> Result<()>;
method pause (line 55) | async fn pause(&mut self) -> Result<()>;
method resume (line 56) | async fn resume(&mut self) -> Result<()>;
method id (line 57) | async fn id(&self) -> &str;
method start (line 107) | async fn start(&mut self) -> Result<()> {
method set_exited (line 112) | async fn set_exited(&mut self, exit_code: i32) {
method pid (line 120) | async fn pid(&self) -> i32 {
method id (line 124) | async fn id(&self) -> &str {
method state (line 128) | async fn state(&self) -> Result<StateResponse> {
method kill (line 147) | async fn kill(&mut self, signal: u32, all: bool) -> Result<()> {
method delete (line 151) | async fn delete(&mut self) -> Result<()> {
method wait_channel (line 155) | async fn wait_channel(&mut self) -> Result<Receiver<()>> {
method exit_code (line 163) | async fn exit_code(&self) -> i32 {
method exited_at (line 167) | async fn exited_at(&self) -> Option<OffsetDateTime> {
method resize_pty (line 171) | async fn resize_pty(&mut self, height: u32, width: u32) -> Result<()> {
method update (line 185) | async fn update(&mut self, resources: &LinuxResources) -> Result<()> {
method stats (line 189) | async fn stats(&self) -> Result<Metrics> {
method ps (line 193) | async fn ps(&self) -> Result<Vec<ProcessInfo>> {
method close_io (line 197) | async fn close_io(&mut self) -> Result<()> {
method pause (line 205) | async fn pause(&mut self) -> Result<()> {
method resume (line 209) | async fn resume(&mut self) -> Result<()> {
type ProcessLifecycle (line 61) | pub trait ProcessLifecycle<P: Process> {
method start (line 62) | async fn start(&self, p: &mut P) -> Result<()>;
method kill (line 63) | async fn kill(&self, p: &mut P, signal: u32, all: bool) -> Result<()>;
method delete (line 64) | async fn delete(&self, p: &mut P) -> Result<()>;
method update (line 65) | async fn update(&self, p: &mut P, resources: &LinuxResources) -> Resul...
method stats (line 66) | async fn stats(&self, p: &P) -> Result<Metrics>;
method ps (line 67) | async fn ps(&self, p: &P) -> Result<Vec<ProcessInfo>>;
method pause (line 68) | async fn pause(&self, p: &mut P) -> Result<()>;
method resume (line 69) | async fn resume(&self, p: &mut P) -> Result<()>;
type ProcessTemplate (line 72) | pub struct ProcessTemplate<S> {
function new (line 86) | pub fn new(id: &str, stdio: Stdio, lifecycle: S) -> Self {
FILE: crates/runc-shim/src/runc.rs
type ExecProcess (line 73) | pub type ExecProcess = ProcessTemplate<RuncExecLifecycle>;
type InitProcess (line 74) | pub type InitProcess = ProcessTemplate<RuncInitLifecycle>;
type RuncContainer (line 76) | pub type RuncContainer = ContainerTemplate<InitProcess, ExecProcess, Run...
type RuncFactory (line 79) | pub(crate) struct RuncFactory {}
method create (line 83) | async fn create(
method cleanup (line 155) | async fn cleanup(&self, _ns: &str, _c: &RuncContainer) -> containerd_s...
method do_create (line 161) | async fn do_create(&self, init: &mut InitProcess, _config: CreateConfi...
function runtime_error (line 201) | pub async fn runtime_error(bundle: &str, e: runc::error::Error, msg: &st...
type RuncExecFactory (line 227) | pub struct RuncExecFactory {
method create (line 236) | async fn create(&self, req: &ExecProcessRequest) -> Result<ExecProcess> {
type RuncInitLifecycle (line 266) | pub struct RuncInitLifecycle {
method start (line 278) | async fn start(&self, p: &mut InitProcess) -> containerd_shim::Result<...
method kill (line 286) | async fn kill(
method delete (line 302) | async fn delete(&self, p: &mut InitProcess) -> containerd_shim::Result...
method update (line 323) | async fn update(&self, p: &mut InitProcess, resources: &LinuxResources...
method update (line 346) | async fn update(&self, _p: &mut InitProcess, _resources: &LinuxResourc...
method stats (line 351) | async fn stats(&self, p: &InitProcess) -> Result<Metrics> {
method stats (line 374) | async fn stats(&self, _p: &InitProcess) -> Result<Metrics> {
method ps (line 378) | async fn ps(&self, p: &InitProcess) -> Result<Vec<ProcessInfo>> {
method pause (line 394) | async fn pause(&self, p: &mut InitProcess) -> Result<()> {
method pause (line 410) | async fn pause(&self, _p: &mut InitProcess) -> Result<()> {
method resume (line 415) | async fn resume(&self, p: &mut InitProcess) -> Result<()> {
method resume (line 429) | async fn resume(&self, _p: &mut InitProcess) -> Result<()> {
method new (line 435) | pub fn new(runtime: Runc, opts: Options, bundle: &str) -> Self {
method ensure_init_cgroup_exists (line 449) | async fn ensure_init_cgroup_exists(&self) -> bool {
type RuncExecLifecycle (line 459) | pub struct RuncExecLifecycle {
method start (line 471) | async fn start(&self, p: &mut ExecProcess) -> containerd_shim::Result<...
method kill (line 525) | async fn kill(
method delete (line 568) | async fn delete(&self, p: &mut ExecProcess) -> Result<()> {
method update (line 575) | async fn update(&self, _p: &mut ExecProcess, _resources: &LinuxResourc...
method stats (line 579) | async fn stats(&self, _p: &ExecProcess) -> Result<Metrics> {
method ps (line 583) | async fn ps(&self, _p: &ExecProcess) -> Result<Vec<ProcessInfo>> {
method pause (line 587) | async fn pause(&self, _p: &mut ExecProcess) -> Result<()> {
method resume (line 591) | async fn resume(&self, _p: &mut ExecProcess) -> Result<()> {
function copy_console (line 596) | async fn copy_console(
function copy_io (line 649) | pub async fn copy_io(pio: &ProcessIO, stdio: &Stdio, exit_signal: Arc<Ex...
function spawn_copy (line 737) | fn spawn_copy<R, W, F>(from: R, to: W, exit_signal: Arc<ExitSignal>, on_...
function copy_io_or_console (line 762) | async fn copy_io_or_console<P>(
method execute (line 789) | async fn execute(&self, cmd: Command) -> runc::Result<(ExitStatus, u32, ...
function read_std (line 814) | async fn read_std<T>(std: Option<T>) -> String
function wait_pid (line 830) | async fn wait_pid(pid: i32, s: Subscription) -> i32 {
function test_runtime_error (line 857) | async fn test_runtime_error() {
FILE: crates/runc-shim/src/service.rs
type Service (line 49) | pub(crate) struct Service {
type T (line 57) | type T = TaskService<RuncFactory, RuncContainer>;
method new (line 59) | async fn new(_runtime_id: &str, args: &Flags, _config: &mut Config) -> S...
method start_shim (line 69) | async fn start_shim(&mut self, opts: StartOpts) -> containerd_shim::Resu...
method delete_shim (line 105) | async fn delete_shim(&mut self) -> containerd_shim::Result<DeleteRespons...
method wait (line 135) | async fn wait(&mut self) {
method create_task_service (line 139) | async fn create_task_service(&self, publisher: RemotePublisher) -> Self:...
function process_exits (line 152) | async fn process_exits(
function forward (line 220) | async fn forward(
function should_kill_all_on_exit (line 238) | async fn should_kill_all_on_exit(bundle_path: &str) -> bool {
FILE: crates/runc-shim/src/task.rs
type EventSender (line 47) | type EventSender = Sender<(String, Box<dyn MessageDyn>)>;
type TaskService (line 75) | pub struct TaskService<F, C> {
function new (line 90) | pub fn new(ns: &str, exit: Arc<ExitSignal>, tx: EventSender) -> Self {
function container_mut (line 102) | pub async fn container_mut(&self, id: &str) -> TtrpcResult<RwLockMappedW...
function container (line 114) | pub async fn container(&self, id: &str) -> TtrpcResult<RwLockReadGuard<'...
function send_event (line 126) | pub async fn send_event(&self, event: impl Event) {
function run_oom_monitor (line 136) | fn run_oom_monitor(mut rx: Receiver<String>, id: String, tx: EventSender) {
function monitor_oom (line 153) | async fn monitor_oom(id: &String, pid: u32, tx: EventSender) -> Result<(...
method state (line 179) | async fn state(&self, _ctx: &TtrpcContext, req: StateRequest) -> TtrpcRe...
method create (line 186) | async fn create(
method start (line 227) | async fn start(&self, _ctx: &TtrpcContext, req: StartRequest) -> TtrpcRe...
method delete (line 271) | async fn delete(&self, _ctx: &TtrpcContext, req: DeleteRequest) -> Ttrpc...
method pids (line 309) | async fn pids(&self, _ctx: &TtrpcContext, req: PidsRequest) -> TtrpcResu...
method pause (line 319) | async fn pause(&self, _ctx: &TtrpcContext, req: PauseRequest) -> TtrpcRe...
method resume (line 331) | async fn resume(&self, _ctx: &TtrpcContext, req: ResumeRequest) -> Ttrpc...
method kill (line 343) | async fn kill(&self, _ctx: &TtrpcContext, req: KillRequest) -> TtrpcResu...
method exec (line 353) | async fn exec(&self, _ctx: &TtrpcContext, req: ExecProcessRequest) -> Tt...
method resize_pty (line 373) | async fn resize_pty(&self, _ctx: &TtrpcContext, req: ResizePtyRequest) -...
method close_io (line 385) | async fn close_io(&self, _ctx: &TtrpcContext, req: CloseIORequest) -> Tt...
method update (line 393) | async fn update(&self, _ctx: &TtrpcContext, mut req: UpdateTaskRequest) ...
method wait (line 415) | async fn wait(&self, _ctx: &TtrpcContext, req: WaitRequest) -> TtrpcResu...
method stats (line 446) | async fn stats(&self, _ctx: &TtrpcContext, req: StatsRequest) -> TtrpcRe...
method connect (line 454) | async fn connect(
method shutdown (line 474) | async fn shutdown(&self, _ctx: &TtrpcContext, _req: ShutdownRequest) -> ...
FILE: crates/runc/src/asynchronous/io.rs
type IOOption (line 27) | pub struct IOOption {
method default (line 34) | fn default() -> Self {
method new (line 44) | pub fn new(uid: u32, gid: u32, opts: &IOOption) -> std::io::Result<Self> {
method create_pipe (line 64) | fn create_pipe(uid: u32, gid: u32, stdin: bool) -> std::io::Result<Optio...
type NullIo (line 85) | pub struct NullIo {
method new (line 90) | pub fn new() -> std::io::Result<Self> {
method set (line 99) | async fn set(&self, cmd: &mut Command) -> std::io::Result<()> {
method close_after_start (line 107) | async fn close_after_start(&self) {
type InheritedStdIo (line 117) | pub struct InheritedStdIo {}
method new (line 120) | pub fn new() -> std::io::Result<Self> {
method set (line 127) | async fn set(&self, cmd: &mut Command) -> std::io::Result<()> {
method close_after_start (line 134) | async fn close_after_start(&self) {}
type PipedStdIo (line 141) | pub struct PipedStdIo {}
method new (line 144) | pub fn new() -> std::io::Result<Self> {
method set (line 150) | async fn set(&self, cmd: &mut Command) -> std::io::Result<()> {
method close_after_start (line 157) | async fn close_after_start(&self) {}
type FIFO (line 162) | pub struct FIFO {
method set (line 169) | async fn set(&self, cmd: &mut Command) -> Result<()> {
method close_after_start (line 192) | async fn close_after_start(&self) {}
function test_io_option (line 201) | fn test_io_option() {
function test_null_io (line 215) | async fn test_null_io() {
FILE: crates/runc/src/asynchronous/mod.rs
type Io (line 28) | pub trait Io: Debug + Send + Sync {
method stdin (line 29) | fn stdin(&self) -> Option<Box<dyn AsyncWrite + Send + Sync + Unpin>> {
method stdout (line 33) | fn stdout(&self) -> Option<Box<dyn AsyncRead + Send + Sync + Unpin>> {
method stderr (line 37) | fn stderr(&self) -> Option<Box<dyn AsyncRead + Send + Sync + Unpin>> {
method set (line 43) | async fn set(&self, cmd: &mut Command) -> Result<()>;
method close_after_start (line 46) | async fn close_after_start(&self);
method stdin (line 57) | fn stdin(&self) -> Option<Box<dyn AsyncWrite + Send + Sync + Unpin>> {
method stdout (line 67) | fn stdout(&self) -> Option<Box<dyn AsyncRead + Send + Sync + Unpin>> {
method stderr (line 76) | fn stderr(&self) -> Option<Box<dyn AsyncRead + Send + Sync + Unpin>> {
method set (line 87) | async fn set(&self, cmd: &mut Command) -> std::io::Result<()> {
method close_after_start (line 110) | async fn close_after_start(&self) {
type PipedIo (line 50) | pub struct PipedIo {
FILE: crates/runc/src/asynchronous/pipe.rs
type Pipe (line 27) | pub struct Pipe {
method new (line 33) | pub fn new() -> std::io::Result<Self> {
method wr_as_raw_fd (line 42) | pub fn wr_as_raw_fd(&self) -> Option<RawFd> {
method try_clone_wr (line 47) | pub fn try_clone_wr(&self) -> Option<OwnedFd> {
method close_wr (line 56) | pub fn close_wr(&self) {
method take_wr (line 61) | pub fn take_wr(&self) -> Option<OwnedFd> {
function test_pipe_creation (line 78) | async fn test_pipe_creation() {
function test_pipe_write_read (line 89) | async fn test_pipe_write_read() {
function test_pipe_async_write_read (line 113) | async fn test_pipe_async_write_read() {
FILE: crates/runc/src/asynchronous/runc.rs
method launch (line 53) | pub(crate) async fn launch(&self, mut cmd: Command, combined_output: boo...
method create (line 98) | pub async fn create<P>(
method delete (line 129) | pub async fn delete(&self, id: &str, opts: Option<&DeleteOpts>) -> Resul...
method events (line 140) | pub async fn events(&self, _id: &str, _interval: &std::time::Duration) -...
method exec (line 145) | pub async fn exec(&self, id: &str, spec: &Process, opts: Option<&ExecOpt...
method kill (line 173) | pub async fn kill(&self, id: &str, sig: u32, opts: Option<&KillOpts>) ->...
method list (line 185) | pub async fn list(&self) -> Result<Vec<Container>> {
method pause (line 199) | pub async fn pause(&self, id: &str) -> Result<()> {
method resume (line 206) | pub async fn resume(&self, id: &str) -> Result<()> {
method checkpoint (line 212) | pub async fn checkpoint(&self) -> Result<()> {
method restore (line 216) | pub async fn restore(&self) -> Result<()> {
method ps (line 221) | pub async fn ps(&self, id: &str) -> Result<Vec<usize>> {
method run (line 239) | pub async fn run<P>(&self, id: &str, bundle: P, opts: Option<&CreateOpts...
method start (line 263) | pub async fn start(&self, id: &str) -> Result<()> {
method state (line 270) | pub async fn state(&self, id: &str) -> Result<Container> {
method stats (line 277) | pub async fn stats(&self, id: &str) -> Result<events::Stats> {
method update (line 290) | pub async fn update(&self, id: &str, resources: &LinuxResources) -> Resu...
type Spawner (line 305) | pub trait Spawner: Debug {
method execute (line 306) | async fn execute(&self, cmd: Command) -> Result<(ExitStatus, u32, Stri...
method execute (line 314) | async fn execute(&self, cmd: Command) -> Result<(ExitStatus, u32, Stri...
type DefaultExecutor (line 310) | pub struct DefaultExecutor {}
function ok_client (line 341) | fn ok_client() -> Runc {
function fail_client (line 348) | fn fail_client() -> Runc {
function echo_client (line 355) | fn echo_client() -> Runc {
function test_async_create (line 363) | async fn test_async_create() {
function test_async_start (line 404) | async fn test_async_start() {
function test_async_run (line 435) | async fn test_async_run() {
function test_async_delete (line 473) | async fn test_async_delete() {
function test_async_output (line 508) | async fn test_async_output() {
FILE: crates/runc/src/container.rs
type Container (line 43) | pub struct Container {
function serde_test (line 59) | fn serde_test() {
FILE: crates/runc/src/error.rs
type Error (line 41) | pub enum Error {
FILE: crates/runc/src/events.rs
type EventType (line 43) | pub enum EventType {
type Event (line 51) | pub struct Event {
type Stats (line 60) | pub struct Stats {
type HugeTLB (line 71) | pub struct HugeTLB {
type BlkIOEntry (line 79) | pub struct BlkIOEntry {
type BlkIO (line 87) | pub struct BlkIO {
type Pids (line 115) | pub struct Pids {
type Throttling (line 123) | pub struct Throttling {
type CpuUsage (line 136) | pub struct CpuUsage {
type Cpu (line 148) | pub struct Cpu {
type MemoryEntry (line 154) | pub struct MemoryEntry {
type Memory (line 167) | pub struct Memory {
FILE: crates/runc/src/lib.rs
constant JSON (line 65) | const JSON: &str = "json";
constant TEXT (line 66) | const TEXT: &str = "text";
type Result (line 68) | pub type Result<T> = std::result::Result<T, crate::error::Error>;
type Response (line 72) | pub struct Response {
type Version (line 79) | pub struct Version {
type LogFormat (line 86) | pub enum LogFormat {
method fmt (line 93) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
type Command (line 102) | pub type Command = std::process::Command;
type Command (line 105) | pub type Command = tokio::process::Command;
type Runc (line 108) | pub struct Runc {
method command (line 115) | fn command(&self, args: &[String]) -> Result<Command> {
FILE: crates/runc/src/monitor.rs
type ProcessMonitor (line 36) | pub trait ProcessMonitor {
method start (line 44) | async fn start(&self, mut cmd: Command, tx: Sender<Exit>) -> std::io::...
method wait (line 66) | async fn wait(&self, rx: Receiver<Exit>) -> std::io::Result<Exit> {
type DefaultMonitor (line 76) | pub struct DefaultMonitor {}
method new (line 81) | pub const fn new() -> Self {
type Exit (line 88) | pub struct Exit {
type ExecuteResult (line 95) | pub struct ExecuteResult {
function execute (line 107) | pub async fn execute<T: ProcessMonitor + Send + Sync>(
function test_start_wait_without_output (line 142) | async fn test_start_wait_without_output() {
function test_start_wait_with_output (line 155) | async fn test_start_wait_with_output() {
function test_execute (line 169) | async fn test_execute() {
FILE: crates/runc/src/options.rs
constant JSON (line 45) | pub const JSON: &str = "json";
constant TEXT (line 46) | pub const TEXT: &str = "text";
constant DEBUG (line 49) | const DEBUG: &str = "--debug";
constant LOG (line 50) | const LOG: &str = "--log";
constant LOG_FORMAT (line 51) | const LOG_FORMAT: &str = "--log-format";
constant ROOT (line 52) | const ROOT: &str = "--root";
constant ROOTLESS (line 53) | const ROOTLESS: &str = "--rootless";
constant SYSTEMD_CGROUP (line 54) | const SYSTEMD_CGROUP: &str = "--systemd-cgroup";
constant CONSOLE_SOCKET (line 57) | const CONSOLE_SOCKET: &str = "--console-socket";
constant DETACH (line 58) | const DETACH: &str = "--detach";
constant NO_NEW_KEYRING (line 59) | const NO_NEW_KEYRING: &str = "--no-new-keyring";
constant NO_PIVOT (line 60) | const NO_PIVOT: &str = "--no-pivot";
constant PID_FILE (line 61) | const PID_FILE: &str = "--pid-file";
constant ALL (line 64) | const ALL: &str = "--all";
constant FORCE (line 67) | const FORCE: &str = "--force";
constant DEFAULT_COMMAND (line 70) | pub const DEFAULT_COMMAND: &str = "runc";
type Args (line 72) | pub trait Args {
method args (line 75) | fn args(&self) -> Self::Output;
type Output (line 252) | type Output = Result<Runc, Error>;
method args (line 254) | fn args(&self) -> Self::Output {
type Output (line 285) | type Output = Result<Vec<String>, Error>;
method args (line 287) | fn args(&self) -> Self::Output {
type Output (line 365) | type Output = Result<Vec<String>, Error>;
method args (line 367) | fn args(&self) -> Self::Output {
type Output (line 424) | type Output = Vec<String>;
method args (line 426) | fn args(&self) -> Self::Output {
type Output (line 454) | type Output = Vec<String>;
method args (line 456) | fn args(&self) -> Self::Output {
type GlobalOpts (line 83) | pub struct GlobalOpts {
method new (line 116) | pub fn new() -> Self {
method command (line 120) | pub fn command(mut self, command: impl AsRef<Path>) -> Self {
method root (line 129) | pub fn root(mut self, root: impl AsRef<Path>) -> Self {
method debug (line 135) | pub fn debug(mut self, debug: bool) -> Self {
method log (line 143) | pub fn log(mut self, log: impl AsRef<Path>) -> Self {
method log_format (line 149) | pub fn log_format(mut self, log_format: LogFormat) -> Self {
method log_json (line 155) | pub fn log_json(self) -> Self {
method log_text (line 160) | pub fn log_text(self) -> Self {
method systemd_cgroup (line 168) | pub fn systemd_cgroup(mut self, systemd_cgroup: bool) -> Self {
method rootless (line 176) | pub fn rootless(mut self, rootless: bool) -> Self {
method rootless_auto (line 182) | pub fn rootless_auto(mut self) -> Self {
method set_pgid (line 187) | pub fn set_pgid(mut self, set_pgid: bool) -> Self {
method timeout (line 192) | pub fn timeout(&mut self, millis: u64) -> &mut Self {
method custom_spawner (line 197) | pub fn custom_spawner(&mut self, executor: Arc<dyn Spawner + Send + Sy...
method build (line 202) | pub fn build(self) -> Result<Runc, Error> {
method output (line 206) | fn output(&self) -> Result<(PathBuf, Vec<String>), Error> {
type CreateOpts (line 270) | pub struct CreateOpts {
method new (line 311) | pub fn new() -> Self {
method io (line 315) | pub fn io(mut self, io: Arc<dyn Io>) -> Self {
method pid_file (line 320) | pub fn pid_file<P>(mut self, pid_file: P) -> Self
method console_socket (line 328) | pub fn console_socket<P>(mut self, console_socket: P) -> Self
method detach (line 336) | pub fn detach(mut self, detach: bool) -> Self {
method no_pivot (line 341) | pub fn no_pivot(mut self, no_pivot: bool) -> Self {
method no_new_keyring (line 346) | pub fn no_new_keyring(mut self, no_new_keyring: bool) -> Self {
type ExecOpts (line 354) | pub struct ExecOpts {
method new (line 385) | pub fn new() -> Self {
method io (line 389) | pub fn io(mut self, io: Arc<dyn Io>) -> Self {
method pid_file (line 394) | pub fn pid_file<P>(mut self, pid_file: P) -> Self
method console_socket (line 402) | pub fn console_socket<P>(mut self, console_socket: P) -> Self
method detach (line 410) | pub fn detach(mut self, detach: bool) -> Self {
type DeleteOpts (line 418) | pub struct DeleteOpts {
method new (line 436) | pub fn new() -> Self {
method force (line 440) | pub fn force(mut self, force: bool) -> Self {
type KillOpts (line 448) | pub struct KillOpts {
method new (line 466) | pub fn new() -> Self {
method all (line 470) | pub fn all(mut self, all: bool) -> Self {
constant ARGS_FAIL_MSG (line 482) | const ARGS_FAIL_MSG: &str = "Args.args() failed.";
function create_opts_test (line 485) | fn create_opts_test() {
function exec_opts_test (line 536) | fn exec_opts_test() {
function delete_opts_test (line 578) | fn delete_opts_test() {
function kill_opts_test (line 588) | fn kill_opts_test() {
function global_opts_test (line 596) | fn global_opts_test() {
FILE: crates/runc/src/synchronous/io.rs
type IOOption (line 32) | pub struct IOOption {
method default (line 39) | fn default() -> Self {
method new (line 49) | pub fn new(uid: u32, gid: u32, opts: &IOOption) -> std::io::Result<Self> {
method create_pipe (line 69) | fn create_pipe(uid: u32, gid: u32, stdin: bool) -> std::io::Result<Optio...
type NullIo (line 90) | pub struct NullIo {
method new (line 95) | pub fn new() -> std::io::Result<Self> {
method set (line 103) | fn set(&self, cmd: &mut Command) -> std::io::Result<()> {
method close_after_start (line 111) | fn close_after_start(&self) {
type InheritedStdIo (line 121) | pub struct InheritedStdIo {}
method new (line 124) | pub fn new() -> std::io::Result<Self> {
method set (line 130) | fn set(&self, cmd: &mut Command) -> std::io::Result<()> {
method close_after_start (line 137) | fn close_after_start(&self) {}
type PipedStdIo (line 144) | pub struct PipedStdIo {}
method new (line 147) | pub fn new() -> std::io::Result<Self> {
method set (line 153) | fn set(&self, cmd: &mut Command) -> std::io::Result<()> {
method close_after_start (line 160) | fn close_after_start(&self) {}
type FIFO (line 165) | pub struct FIFO {
method set (line 172) | fn set(&self, cmd: &mut Command) -> Result<()> {
method close_after_start (line 194) | fn close_after_start(&self) {}
function test_io_option (line 203) | fn test_io_option() {
function test_create_piped_io (line 218) | fn test_create_piped_io() {
function test_null_io (line 260) | fn test_null_io() {
FILE: crates/runc/src/synchronous/mod.rs
type Io (line 29) | pub trait Io: Debug + Send + Sync {
method stdin (line 31) | fn stdin(&self) -> Option<Box<dyn Write + Send + Sync>> {
method stdout (line 36) | fn stdout(&self) -> Option<Box<dyn Read + Send>> {
method stderr (line 41) | fn stderr(&self) -> Option<Box<dyn Read + Send>> {
method set (line 47) | fn set(&self, cmd: &mut Command) -> Result<()>;
method close_after_start (line 50) | fn close_after_start(&self);
method stdin (line 61) | fn stdin(&self) -> Option<Box<dyn Write + Send + Sync>> {
method stdout (line 68) | fn stdout(&self) -> Option<Box<dyn Read + Send>> {
method stderr (line 77) | fn stderr(&self) -> Option<Box<dyn Read + Send>> {
method set (line 87) | fn set(&self, cmd: &mut Command) -> std::io::Result<()> {
method close_after_start (line 110) | fn close_after_start(&self) {
type PipedIo (line 54) | pub struct PipedIo {
FILE: crates/runc/src/synchronous/pipe.rs
type Pipe (line 23) | pub struct Pipe {
method new (line 29) | pub fn new() -> std::io::Result<Self> {
method try_clone_wr (line 38) | pub fn try_clone_wr(&self) -> Option<PipeWriter> {
method close_wr (line 47) | pub fn close_wr(&self) {
FILE: crates/runc/src/synchronous/runc.rs
method launch (line 31) | pub(crate) fn launch(&self, cmd: Command, combined_output: bool) -> Resu...
method create (line 54) | pub fn create<P>(&self, id: &str, bundle: P, opts: Option<&CreateOpts>) ...
method delete (line 80) | pub fn delete(&self, id: &str, opts: Option<&DeleteOpts>) -> Result<()> {
method exec (line 91) | pub fn exec(&self, id: &str, spec: &Process, opts: Option<&ExecOpts>) ->...
method kill (line 113) | pub fn kill(&self, id: &str, sig: u32, opts: Option<&KillOpts>) -> Resul...
method list (line 125) | pub fn list(&self) -> Result<Vec<Container>> {
method pause (line 139) | pub fn pause(&self, id: &str) -> Result<()> {
method resume (line 146) | pub fn resume(&self, id: &str) -> Result<()> {
method checkpoint (line 152) | pub fn checkpoint(&self) -> Result<()> {
method restore (line 156) | pub fn restore(&self) -> Result<()> {
method ps (line 161) | pub fn ps(&self, id: &str) -> Result<Vec<usize>> {
method run (line 179) | pub fn run<P>(&self, id: &str, bundle: P, opts: Option<&CreateOpts>) -> ...
method start (line 200) | pub fn start(&self, id: &str) -> Result<Response> {
method state (line 206) | pub fn state(&self, id: &str) -> Result<Container> {
method stats (line 213) | pub fn stats(&self, id: &str) -> Result<events::Stats> {
method update (line 226) | pub fn update(&self, id: &str, resources: &LinuxResources) -> Result<()> {
type Spawner (line 239) | pub trait Spawner: Debug {
method execute (line 240) | fn execute(&self, cmd: Command) -> Result<(ExitStatus, u32, String, St...
method execute (line 247) | fn execute(&self, cmd: Command) -> Result<(ExitStatus, u32, String, St...
type DefaultExecutor (line 244) | pub struct DefaultExecutor {}
function ok_client (line 273) | fn ok_client() -> Runc {
function fail_client (line 280) | fn fail_client() -> Runc {
function echo_client (line 287) | fn echo_client() -> Runc {
function dummy_process (line 294) | fn dummy_process() -> Process {
function test_create (line 309) | fn test_create() {
function test_run (line 338) | fn test_run() {
function test_exec (line 367) | fn test_exec() {
function test_delete (line 395) | fn test_delete() {
function test_output (line 422) | fn test_output() {
FILE: crates/runc/src/utils.rs
function abs_path_buf (line 34) | pub fn abs_path_buf<P>(path: P) -> Result<PathBuf, Error>
function path_to_string (line 52) | fn path_to_string(path: impl AsRef<Path>) -> Result<String, Error> {
function abs_string (line 64) | pub fn abs_string<P>(path: P) -> Result<String, Error>
function xdg_runtime_dir (line 73) | fn xdg_runtime_dir() -> String {
function write_value_to_temp_file (line 80) | pub fn write_value_to_temp_file<T: Serialize>(value: &T) -> Result<(Name...
function write_value_to_temp_file (line 102) | pub async fn write_value_to_temp_file<T: Serialize>(value: &T) -> Result...
function binary_path (line 124) | pub fn binary_path<P>(path: P) -> Option<PathBuf>
FILE: crates/shim-protos/build.rs
function main (line 26) | fn main() {
function genmodule (line 122) | fn genmodule(name: &str, inputs: &[&str], async_all: bool) {
FILE: crates/shim-protos/examples/connect-async.rs
function main (line 24) | async fn main() {
FILE: crates/shim-protos/examples/connect.rs
function main (line 23) | fn main() {
FILE: crates/shim-protos/examples/ttrpc-client-async.rs
function default_ctx (line 22) | fn default_ctx() -> Context {
function main (line 32) | async fn main() {
FILE: crates/shim-protos/examples/ttrpc-client.rs
function main (line 22) | fn main() {
function default_ctx (line 44) | fn default_ctx() -> Context {
FILE: crates/shim-protos/examples/ttrpc-server-async.rs
type FakeServer (line 26) | struct FakeServer {
method new (line 31) | fn new() -> Self {
method create (line 38) | async fn create(
function main (line 60) | async fn main() {
FILE: crates/shim-protos/examples/ttrpc-server.rs
type FakeServer (line 25) | struct FakeServer {
method new (line 30) | fn new() -> Self {
method create (line 36) | fn create(
function main (line 57) | fn main() {
FILE: crates/shim-protos/src/topics.rs
constant TASK_CREATE_EVENT_TOPIC (line 19) | pub const TASK_CREATE_EVENT_TOPIC: &str = "/tasks/create";
constant TASK_START_EVENT_TOPIC (line 20) | pub const TASK_START_EVENT_TOPIC: &str = "/tasks/start";
constant TASK_OOM_EVENT_TOPIC (line 21) | pub const TASK_OOM_EVENT_TOPIC: &str = "/tasks/oom";
constant TASK_EXIT_EVENT_TOPIC (line 22) | pub const TASK_EXIT_EVENT_TOPIC: &str = "/tasks/exit";
constant TASK_DELETE_EVENT_TOPIC (line 23) | pub const TASK_DELETE_EVENT_TOPIC: &str = "/tasks/delete";
constant TASK_EXEC_ADDED_EVENT_TOPIC (line 24) | pub const TASK_EXEC_ADDED_EVENT_TOPIC: &str = "/tasks/exec-added";
constant TASK_EXEC_STARTED_EVENT_TOPIC (line 25) | pub const TASK_EXEC_STARTED_EVENT_TOPIC: &str = "/tasks/exec-started";
constant TASK_PAUSED_EVENT_TOPIC (line 26) | pub const TASK_PAUSED_EVENT_TOPIC: &str = "/tasks/paused";
constant TASK_RESUMED_EVENT_TOPIC (line 27) | pub const TASK_RESUMED_EVENT_TOPIC: &str = "/tasks/resumed";
constant TASK_CHECKPOINTED_EVENT_TOPIC (line 28) | pub const TASK_CHECKPOINTED_EVENT_TOPIC: &str = "/tasks/checkpointed";
constant TASK_UNKNOWN_TOPIC (line 29) | pub const TASK_UNKNOWN_TOPIC: &str = "/tasks/?";
FILE: crates/shim-protos/tests/ttrpc.rs
constant MESSAGE_TYPE_REQUEST (line 19) | const MESSAGE_TYPE_REQUEST: u8 = 0x1;
constant MESSAGE_TYPE_RESPONSE (line 20) | const MESSAGE_TYPE_RESPONSE: u8 = 0x2;
type FakeServer (line 23) | struct FakeServer {
method new (line 28) | fn new() -> Self {
method create (line 34) | fn create(
function create_ttrpc_context (line 49) | fn create_ttrpc_context() -> (
function test_task_method_num (line 74) | fn test_task_method_num() {
function test_create_task (line 80) | fn test_create_task() {
function test_delete_task (line 121) | fn test_delete_task() {
FILE: crates/shim/examples/publish.rs
function main (line 22) | fn main() {
function main (line 51) | async fn main() {
FILE: crates/shim/examples/skeleton.rs
type Service (line 31) | pub(crate) struct Service {
type T (line 36) | type T = Service;
method new (line 38) | fn new(_runtime_id: &str, _args: &Flags, _config: &mut Config) -> Self {
method start_shim (line 44) | fn start_shim(&mut self, opts: shim::StartOpts) -> Result<String, shim...
method delete_shim (line 50) | fn delete_shim(&mut self) -> Result<DeleteResponse, shim::Error> {
method wait (line 54) | fn wait(&mut self) {
method create_task_service (line 58) | fn create_task_service(&self, _publisher: RemotePublisher) -> Self::T {
method connect (line 64) | fn connect(
method shutdown (line 76) | fn shutdown(
function main (line 88) | fn main() {
FILE: crates/shim/examples/skeleton_async.rs
type Service (line 31) | struct Service {
type T (line 37) | type T = Service;
method new (line 39) | async fn new(_runtime_id: &str, _args: &Flags, _config: &mut Config) -> ...
method start_shim (line 45) | async fn start_shim(&mut self, opts: StartOpts) -> Result<String, Error> {
method delete_shim (line 51) | async fn delete_shim(&mut self) -> Result<DeleteResponse, Error> {
method wait (line 55) | async fn wait(&mut self) {
method create_task_service (line 59) | async fn create_task_service(&self, _publisher: RemotePublisher) -> Self...
method connect (line 66) | async fn connect(
method shutdown (line 78) | async fn shutdown(
function main (line 90) | async fn main() {
FILE: crates/shim/examples/windows_log_reader.rs
function main (line 20) | fn main() -> Result<(), Box<dyn Error>> {
function main (line 69) | fn main() {
FILE: crates/shim/src/args.rs
type Flags (line 24) | pub struct Flags {
function parse (line 50) | pub fn parse<S: AsRef<OsStr>>(args: &[S]) -> Result<Flags> {
function parse_all (line 83) | fn parse_all() {
function parse_flags (line 115) | fn parse_flags() {
function parse_action (line 127) | fn parse_action() {
function parse_version_long_flag (line 136) | fn parse_version_long_flag() {
function parse_version_short_flag (line 142) | fn parse_version_short_flag() {
FILE: crates/shim/src/asynchronous/mod.rs
constant DEFAULT_BINARY_NAME (line 54) | const DEFAULT_BINARY_NAME: &str = "runc";
type Shim (line 73) | pub trait Shim {
method new (line 84) | async fn new(runtime_id: &str, args: &Flags, config: &mut Config) -> S...
method start_shim (line 92) | async fn start_shim(&mut self, opts: StartOpts) -> Result<String>;
method delete_shim (line 96) | async fn delete_shim(&mut self) -> Result<DeleteResponse>;
method wait (line 99) | async fn wait(&mut self);
method create_task_service (line 102) | async fn create_task_service(&self, publisher: RemotePublisher) -> Sel...
function run (line 107) | pub async fn run<T>(runtime_id: &str, opts: Option<Config>)
function run_info (line 117) | pub fn run_info() -> Result<RuntimeInfo> {
function bootstrap (line 163) | async fn bootstrap<T>(runtime_id: &str, opts: Option<Config>) -> Result<()>
type ExitSignal (line 269) | pub struct ExitSignal {
method signal (line 285) | pub fn signal(&self) {
method wait (line 291) | pub async fn wait(&self) {
method default (line 275) | fn default() -> Self {
function spawn (line 305) | pub async fn spawn(opts: StartOpts, grouping: &str, vars: Vec<(&str, &st...
function create_server (line 351) | async fn create_server(flags: &args::Flags) -> Result<Server> {
function create_server_with_retry (line 359) | async fn create_server_with_retry(flags: &args::Flags) -> Result<Option<...
function signal_server_started (line 379) | fn signal_server_started() {
function signal_stream (line 390) | fn signal_stream(kind: i32) -> std::io::Result<BoxStream<'static, i32>> {
function signal_stream (line 407) | fn signal_stream(kind: i32) -> std::io::Result<BoxStream<'static, i32>> {
type Signals (line 433) | type Signals = SelectAll<BoxStream<'static, i32>>;
function setup_signals_tokio (line 436) | fn setup_signals_tokio(config: &Config) -> Signals {
function handle_signals (line 462) | async fn handle_signals(signals: Signals) {
function remove_socket_silently (line 509) | async fn remove_socket_silently(address: &str) {
function remove_socket (line 516) | async fn remove_socket(address: &str) -> Result<()> {
function start_listener (line 531) | async fn start_listener(address: &str) -> Result<UnixListener> {
function wait_socket_working (line 543) | async fn wait_socket_working(address: &str, interval_in_ms: u64, count: ...
function test_exit_signal (line 564) | async fn test_exit_signal() {
function test_start_listener (line 580) | async fn test_start_listener() {
FILE: crates/shim/src/asynchronous/monitor.rs
function monitor_subscribe (line 38) | pub async fn monitor_subscribe(topic: Topic) -> Result<Subscription> {
function monitor_unsubscribe (line 44) | pub async fn monitor_unsubscribe(sub_id: i64) -> Result<()> {
function monitor_notify_by_pid (line 49) | pub async fn monitor_notify_by_pid(pid: i32, exit_code: i32) -> Result<(...
function monitor_notify_by_exec (line 54) | pub async fn monitor_notify_by_exec(id: &str, exec_id: &str, exit_code: ...
type Monitor (line 59) | pub struct Monitor {
method subscribe (line 76) | pub fn subscribe(&mut self, topic: Topic) -> Result<Subscription> {
method notify_by_pid (line 90) | pub async fn notify_by_pid(&self, pid: i32, exit_code: i32) -> Result<...
method notify_by_exec (line 97) | pub async fn notify_by_exec(&self, cid: &str, exec_id: &str, exit_code...
method notify_topic (line 105) | async fn notify_topic(&self, topic: &Topic, subject: &Subject, exit_co...
method unsubscribe (line 126) | pub fn unsubscribe(&mut self, id: i64) -> Result<()> {
type Subscriber (line 65) | pub(crate) struct Subscriber {
type Subscription (line 70) | pub struct Subscription {
function test_monitor (line 149) | async fn test_monitor() {
FILE: crates/shim/src/asynchronous/publisher.rs
constant QUEUE_SIZE (line 41) | const QUEUE_SIZE: i64 = 1024;
constant MAX_REQUEUE (line 43) | const MAX_REQUEUE: i64 = 5;
type RemotePublisher (line 46) | pub struct RemotePublisher {
method new (line 62) | pub async fn new(address: impl AsRef<str>) -> Result<RemotePublisher> {
method process_queue (line 77) | pub async fn process_queue(&self, ttrpc_client: Client, mut receiver: ...
method connect (line 129) | async fn connect(address: impl AsRef<str>) -> Result<Client> {
method publish (line 145) | pub async fn publish(
type Item (line 52) | pub struct Item {
method forward (line 176) | async fn forward(
type FakeServer (line 216) | struct FakeServer {
method forward (line 222) | async fn forward(&self, _ctx: &TtrpcContext, req: ForwardRequest) -> ttr...
function test_connect (line 234) | async fn test_connect() {
FILE: crates/shim/src/asynchronous/util.rs
function asyncify (line 34) | pub async fn asyncify<F, T>(f: F) -> Result<T>
function read_file_to_str (line 44) | pub async fn read_file_to_str(path: impl AsRef<Path>) -> Result<String> {
function write_str_to_file (line 60) | pub async fn write_str_to_file(filename: impl AsRef<Path>, s: impl AsRef...
function read_pid_from_file (line 90) | pub async fn read_pid_from_file(pid_path: &Path) -> Result<i32> {
function read_spec (line 96) | pub async fn read_spec(bundle: impl AsRef<Path>) -> Result<Spec> {
function read_options (line 104) | pub async fn read_options(bundle: impl AsRef<Path>) -> Result<Options> {
function read_runtime (line 115) | pub async fn read_runtime(bundle: impl AsRef<Path>) -> Result<String> {
function write_options (line 119) | pub async fn write_options(bundle: impl AsRef<Path>, opt: &Options) -> R...
function write_runtime (line 126) | pub async fn write_runtime(bundle: impl AsRef<Path>, binary_name: &str) ...
function mount_rootfs (line 130) | pub async fn mount_rootfs(m: &Mount, target: impl AsRef<Path>) -> Result...
function mkdir (line 143) | pub async fn mkdir(path: impl AsRef<Path>, mode: mode_t) -> Result<()> {
function test_read_write_str (line 160) | async fn test_read_write_str() {
FILE: crates/shim/src/cgroup.rs
constant OOM_SCORE_ADJ_MAX (line 43) | const OOM_SCORE_ADJ_MAX: i64 = 1000;
function set_cgroup_and_oom_score (line 46) | pub fn set_cgroup_and_oom_score(pid: u32) -> Result<()> {
function add_task_to_cgroup (line 72) | pub fn add_task_to_cgroup(path: &str, pid: u32) -> Result<()> {
function adjust_oom_score (line 85) | pub fn adjust_oom_score(pid: u32) -> Result<()> {
function read_process_oom_score (line 94) | fn read_process_oom_score(pid: u32) -> Result<i64> {
function write_process_oom_score (line 105) | fn write_process_oom_score(pid: u32, score: i64) -> Result<()> {
function collect_metrics (line 112) | pub fn collect_metrics(cgroup: &Cgroup) -> Result<Metrics> {
function get_cgroup (line 205) | pub fn get_cgroup(pid: u32) -> Result<Cgroup> {
function get_cgroups_v2_path_by_pid (line 221) | pub fn get_cgroups_v2_path_by_pid(pid: u32) -> Result<PathBuf> {
function parse_cgroups_v2_path (line 235) | fn parse_cgroups_v2_path(content: &str) -> Result<PathBuf> {
function update_resources (line 251) | pub fn update_resources(cgroup: &Cgroup, resources: &LinuxResources) -> ...
function test_add_cgroup (line 366) | fn test_add_cgroup() {
function test_adjust_oom_score (line 384) | fn test_adjust_oom_score() {
function test_parse_cgroups_v2_path (line 398) | fn test_parse_cgroups_v2_path() {
function test_parse_cgroups_v2_path_empty (line 407) | fn test_parse_cgroups_v2_path_empty() {
function test_parse_cgroups_v2_path_kube (line 416) | fn test_parse_cgroups_v2_path_kube() {
FILE: crates/shim/src/error.rs
type Result (line 24) | pub type Result<T> = std::result::Result<T, Error>;
type Error (line 27) | pub enum Error {
function from (line 93) | fn from(e: Error) -> Self {
FILE: crates/shim/src/event.rs
type Event (line 3) | pub trait Event: MessageDyn {
method topic (line 4) | fn topic(&self) -> String;
method topic (line 8) | fn topic(&self) -> String {
method topic (line 14) | fn topic(&self) -> String {
method topic (line 20) | fn topic(&self) -> String {
method topic (line 26) | fn topic(&self) -> String {
method topic (line 32) | fn topic(&self) -> String {
method topic (line 38) | fn topic(&self) -> String {
method topic (line 44) | fn topic(&self) -> String {
method topic (line 50) | fn topic(&self) -> String {
method topic (line 56) | fn topic(&self) -> String {
method topic (line 62) | fn topic(&self) -> String {
FILE: crates/shim/src/lib.rs
constant TTRPC_ADDRESS (line 105) | const TTRPC_ADDRESS: &str = "TTRPC_ADDRESS";
type Config (line 109) | pub struct Config {
method default (line 121) | fn default() -> Self {
type StartOpts (line 135) | pub struct StartOpts {
constant SOCKET_ROOT (line 151) | pub const SOCKET_ROOT: &str = "/run/containerd";
constant SOCKET_ROOT (line 154) | pub const SOCKET_ROOT: &str = "/var/run/containerd";
constant SOCKET_ROOT (line 157) | pub const SOCKET_ROOT: &str = r"\\.\pipe\containerd-containerd";
function socket_address (line 161) | pub fn socket_address(socket_path: &str, namespace: &str, id: &str) -> S...
function parse_sockaddr (line 182) | fn parse_sockaddr(addr: &str) -> &str {
function start_listener (line 195) | fn start_listener(address: &str) -> std::io::Result<()> {
function start_listener (line 214) | fn start_listener(address: &str) -> std::io::Result<UnixListener> {
type Console (line 223) | pub struct Console {
function test_start_listener (line 233) | fn test_start_listener() {
function test_start_listener_windows (line 258) | fn test_start_listener_windows() {
FILE: crates/shim/src/logger.rs
constant LOG_ENV (line 35) | pub const LOG_ENV: &str = "RUST_LOG";
type FifoLogger (line 37) | pub struct FifoLogger {
method new (line 42) | pub fn new(_namespace: &str, _id: &str) -> io::Result<FifoLogger> {
method with_path (line 56) | pub fn with_path(path: impl AsRef<Path>) -> io::Result<FifoLogger> {
method with_file (line 66) | pub fn with_file(file: File) -> FifoLogger {
method with_named_pipe (line 72) | pub fn with_named_pipe(name: &str) -> io::Result<FifoLogger> {
method enabled (line 155) | fn enabled(&self, metadata: &Metadata) -> bool {
method log (line 159) | fn log(&self, record: &Record) {
method flush (line 185) | fn flush(&self) {
type SimpleWriteVistor (line 131) | pub(crate) struct SimpleWriteVistor {
method visit_pair (line 136) | fn visit_pair(&mut self, k: kv::Key<'kvs>, v: kv::Value<'kvs>) -> Resu...
method new (line 143) | pub(crate) fn new() -> SimpleWriteVistor {
method as_str (line 149) | pub(crate) fn as_str(&self) -> &str {
function init (line 191) | pub fn init(debug: bool, default_log_level: &str, namespace: &str, id: &...
function configure_logging_level (line 198) | fn configure_logging_level(debug: bool, default_log_level: &str) {
function rfc3339_formated (line 209) | pub(crate) fn rfc3339_formated() -> String {
function test_init_log_level (line 225) | fn test_init_log_level() -> Result<(), Error> {
function test_fifo_log (line 274) | fn test_fifo_log() {
function test_supports_structured_logging (line 314) | fn test_supports_structured_logging() {
function test_namedpipe_log_can_write_before_client_connected (line 368) | fn test_namedpipe_log_can_write_before_client_connected() {
function test_namedpipe_log (line 386) | fn test_namedpipe_log() {
function read_message (line 433) | fn read_message(client: &mut NamedPipe, length: usize) -> Vec<u8> {
function create_client (line 462) | fn create_client(pipe_name: &str) -> mio::windows::NamedPipe {
FILE: crates/shim/src/monitor.rs
type Topic (line 24) | pub enum Topic {
type ExitEvent (line 31) | pub struct ExitEvent {
method fmt (line 38) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
type Subject (line 55) | pub enum Subject {
FILE: crates/shim/src/mount_linux.rs
type Flag (line 39) | struct Flag {
type LoopParams (line 46) | pub struct LoopParams {
type LoopInfo (line 54) | pub struct LoopInfo {
method default (line 71) | fn default() -> Self {
constant LOOP_CONTROL_PATH (line 90) | const LOOP_CONTROL_PATH: &str = "/dev/loop-control";
constant LOOP_DEV_FORMAT (line 92) | const LOOP_DEV_FORMAT: &str = "/dev/loop";
constant EBUSY_STRING (line 94) | const EBUSY_STRING: &str = "device or resource busy";
constant OVERLAY_LOWERDIR_PREFIX (line 95) | const OVERLAY_LOWERDIR_PREFIX: &str = "lowerdir=";
type MountInfo (line 99) | struct MountInfo {
constant PROPAGATION_TYPES (line 312) | const PROPAGATION_TYPES: MsFlags = MsFlags::MS_SHARED
constant MS_PROPAGATION (line 317) | const MS_PROPAGATION: MsFlags = PROPAGATION_TYPES
constant MS_BIND_RO (line 321) | const MS_BIND_RO: MsFlags = MsFlags::MS_BIND.union(MsFlags::MS_RDONLY);
function page_size (line 323) | fn page_size() -> usize {
function options_size (line 329) | fn options_size(options: &[String]) -> usize {
function longest_common_prefix (line 333) | fn longest_common_prefix(dirs: &[String]) -> &str {
function trim_flawed_dir (line 360) | fn trim_flawed_dir(s: &str) -> String {
type LowerdirCompactor (line 365) | struct LowerdirCompactor {
method new (line 372) | fn new(options: &[String]) -> Self {
method lowerdirs (line 379) | fn lowerdirs(&mut self) -> &mut Self {
method lowerdir_prefix (line 392) | fn lowerdir_prefix(&mut self) -> &mut Self {
method compact (line 403) | fn compact(&mut self) -> (Option<String>, Vec<String>) {
type MountExitCode (line 434) | enum MountExitCode {
method from (line 442) | fn from(code: i32) -> Self {
method from (line 464) | fn from(err: nix::errno::Errno) -> Self {
function from (line 453) | fn from(code: MountExitCode) -> Self {
function from (line 473) | fn from(code: MountExitCode) -> Self {
function from (line 482) | fn from(code: MountExitCode) -> Self {
function mount_rootfs (line 499) | pub fn mount_rootfs(
function mount_rootfs (line 613) | pub fn mount_rootfs(
function setup_loop (line 712) | fn setup_loop(source: Option<&str>, params: LoopParams) -> Result<String> {
function get_free_loop_dev (line 733) | pub fn get_free_loop_dev() -> Result<i32> {
function setup_loop_dev (line 761) | pub fn setup_loop_dev(backing_file: &str, loop_dev: &str, params: &LoopP...
function umount_recursive (line 886) | pub fn umount_recursive(target: Option<&str>, flags: i32) -> Result<()> {
function umount_all (line 897) | fn umount_all(target: Option<String>, flags: i32) -> Result<()> {
function prefix_filter (line 919) | fn prefix_filter(prefix: String) -> impl Fn(MountInfo) -> bool {
function get_mounts (line 923) | fn get_mounts<F>(f: Option<F>) -> Result<Vec<MountInfo>>
function test_trim_flawed_dir (line 1017) | fn test_trim_flawed_dir() {
function test_longest_common_prefix (line 1032) | fn test_longest_common_prefix() {
function test_compact_lowerdir_option (line 1056) | fn test_compact_lowerdir_option() {
function test_mount_rootfs_umount_recursive (line 1122) | fn test_mount_rootfs_umount_recursive() {
function test_setup_loop_dev (line 1170) | fn test_setup_loop_dev() {
FILE: crates/shim/src/mount_other.rs
function mount_rootfs (line 22) | pub fn mount_rootfs(
function umount_recursive (line 33) | pub fn umount_recursive(target: Option<&str>, flags: i32) -> Result<()> {
FILE: crates/shim/src/reap.rs
function set_subreaper (line 28) | pub fn set_subreaper() -> Result<()> {
function set_subreaper (line 41) | pub fn set_subreaper() -> Result<()> {
function test_set_subreaper (line 51) | fn test_set_subreaper() {
FILE: crates/shim/src/synchronous/mod.rs
type ExitSignal (line 122) | pub struct ExitSignal(Mutex<bool>, Condvar);
method signal (line 133) | pub fn signal(&self) {
method wait (line 141) | pub fn wait(&self) {
type AppSignals (line 125) | struct AppSignals {
type Shim (line 153) | pub trait Shim {
method new (line 163) | fn new(runtime_id: &str, args: &Flags, config: &mut Config) -> Self;
method start_shim (line 171) | fn start_shim(&mut self, opts: StartOpts) -> Result<String>;
method delete_shim (line 174) | fn delete_shim(&mut self) -> Result<DeleteResponse>;
method wait (line 177) | fn wait(&mut self);
method create_task_service (line 180) | fn create_task_service(&self, publisher: RemotePublisher) -> Self::T;
type T (line 615) | type T = NopTask;
method new (line 617) | fn new(_runtime_id: &str, _args: &Flags, _config: &mut Config) -> Self {
method start_shim (line 621) | fn start_shim(&mut self, _opts: StartOpts) -> Result<String> {
method delete_shim (line 625) | fn delete_shim(&mut self) -> Result<DeleteResponse> {
method wait (line 629) | fn wait(&mut self) {}
method create_task_service (line 631) | fn create_task_service(&self, _publisher: RemotePublisher) -> Self::T {
function run (line 185) | pub fn run<T>(runtime_id: &str, opts: Option<Config>)
function bootstrap (line 196) | fn bootstrap<T>(runtime_id: &str, opts: Option<Config>) -> Result<()>
function create_server (line 304) | fn create_server(flags: &args::Flags) -> Result<Server> {
function create_server (line 313) | fn create_server(flags: &args::Flags) -> Result<Server> {
function create_server_with_retry (line 322) | fn create_server_with_retry(flags: &args::Flags) -> Result<Option<Server...
function setup_signals (line 343) | fn setup_signals(_config: &Config) -> Option<AppSignals> {
function signal_handler (line 373) | unsafe extern "system" fn signal_handler(_: u32) -> i32 {
function handle_signals (line 379) | fn handle_signals(mut _signals: Option<AppSignals>) {
function wait_socket_working (line 441) | fn wait_socket_working(address: &str, interval_in_ms: u64, count: u32) -...
function remove_socket_silently (line 456) | fn remove_socket_silently(address: &str) {
function remove_socket (line 461) | fn remove_socket(address: &str) -> Result<()> {
function spawn (line 490) | pub fn spawn(opts: StartOpts, grouping: &str, vars: Vec<(&str, &str)>) -...
function disable_handle_inheritance (line 539) | fn disable_handle_inheritance() {
function signal_server_started (line 561) | fn signal_server_started() {
function signal_server_started (line 577) | fn signal_server_started() {
function exit_signal (line 594) | fn exit_signal() {
type Nop (line 609) | struct Nop {}
type NopTask (line 611) | struct NopTask {}
function no_namespace (line 637) | fn no_namespace() {
FILE: crates/shim/src/synchronous/monitor.rs
function monitor_subscribe (line 40) | pub fn monitor_subscribe(topic: Topic) -> Result<Subscription> {
function monitor_notify_by_pid (line 46) | pub fn monitor_notify_by_pid(pid: i32, exit_code: i32) -> Result<()> {
function monitor_notify_by_exec (line 51) | pub fn monitor_notify_by_exec(id: &str, exec_id: &str, exit_code: i32) -...
type Monitor (line 56) | pub struct Monitor {
method subscribe (line 73) | pub fn subscribe(&mut self, topic: Topic) -> Result<Subscription> {
method notify_by_pid (line 86) | pub fn notify_by_pid(&self, pid: i32, exit_code: i32) -> Result<()> {
method notify_by_exec (line 93) | pub fn notify_by_exec(&self, cid: &str, exec_id: &str, exit_code: i32)...
method notify_topic (line 100) | fn notify_topic(&self, topic: &Topic, subject: &Subject, exit_code: i3...
method unsubscribe (line 116) | pub fn unsubscribe(&mut self, id: i64) -> Result<()> {
type Subscriber (line 62) | pub(crate) struct Subscriber {
type Subscription (line 67) | pub struct Subscription {
method drop (line 130) | fn drop(&mut self) {
function wait_pid (line 138) | pub fn wait_pid(pid: i32, s: Subscription) -> i32 {
FILE: crates/shim/src/synchronous/publisher.rs
constant RETRY_COUNT (line 38) | const RETRY_COUNT: i32 = 3;
type RemotePublisher (line 41) | pub struct RemotePublisher {
method new (line 49) | pub fn new(address: impl AsRef<str>) -> Result<RemotePublisher> {
method connect (line 57) | fn connect(address: impl AsRef<str>) -> Result<Client> {
method publish (line 87) | pub fn publish(
method forward (line 110) | fn forward(
type FakeServer (line 133) | struct FakeServer {}
method forward (line 136) | fn forward(&self, _ctx: &ttrpc::TtrpcContext, req: ForwardRequest) -> tt...
function test_connect (line 144) | fn test_connect() {
function create_server (line 185) | fn create_server(server_address: &str) -> Server {
FILE: crates/shim/src/synchronous/util.rs
function read_file_to_str (line 36) | pub fn read_file_to_str<P: AsRef<Path>>(filename: P) -> crate::Result<St...
function read_options (line 51) | pub fn read_options(bundle: impl AsRef<Path>) -> crate::Result<Options> {
function read_runtime (line 58) | pub fn read_runtime(bundle: impl AsRef<Path>) -> crate::Result<String> {
function read_address (line 63) | pub fn read_address() -> crate::Result<String> {
function read_pid_from_file (line 68) | pub fn read_pid_from_file(pid_path: &Path) -> crate::Result<i32> {
function write_str_to_path (line 74) | pub fn write_str_to_path(filename: &Path, s: &str) -> crate::Result<()> {
function write_options (line 100) | pub fn write_options(bundle: &str, opt: &Options) -> crate::Result<()> {
function write_runtime (line 107) | pub fn write_runtime(bundle: &str, binary_name: &str) -> crate::Result<(...
function write_address (line 112) | pub fn write_address(address: &str) -> crate::Result<()> {
function read_spec_from_file (line 117) | pub fn read_spec_from_file(bundle: &str) -> crate::Result<Spec> {
function mkdir (line 123) | pub fn mkdir(path: impl AsRef<Path>, mode: mode_t) -> crate::Result<()> {
type HelperRemoveFile (line 133) | pub struct HelperRemoveFile {
method new (line 138) | pub fn new(path: String) -> Self {
method drop (line 144) | fn drop(&mut self) {
function setup_debugger_event (line 154) | pub(crate) fn setup_debugger_event() {
function create_event (line 187) | fn create_event(name: String) -> crate::Result<isize> {
FILE: crates/shim/src/util.rs
constant CONFIG_FILE_NAME (line 37) | pub const CONFIG_FILE_NAME: &str = "config.json";
constant OPTIONS_FILE_NAME (line 38) | pub const OPTIONS_FILE_NAME: &str = "options.json";
constant RUNTIME_FILE_NAME (line 39) | pub const RUNTIME_FILE_NAME: &str = "runtime";
type JsonOptions (line 46) | pub struct JsonOptions {
method from (line 69) | fn from(o: Options) -> Self {
method from (line 88) | fn from(j: JsonOptions) -> Self {
function connect (line 108) | pub fn connect(address: impl AsRef<str>) -> Result<RawFd> {
function timestamp (line 145) | pub fn timestamp() -> Result<Timestamp> {
function convert_to_timestamp (line 157) | pub fn convert_to_timestamp(exited_at: Option<OffsetDateTime>) -> Timest...
function convert_to_any (line 166) | pub fn convert_to_any(obj: Box<dyn MessageDyn>) -> Result<Any> {
type IntoOption (line 177) | pub trait IntoOption
method none_if (line 181) | fn none_if<F>(self, callback: F) -> Option<Self>
type AsOption (line 195) | pub trait AsOption {
method as_option (line 196) | fn as_option(&self) -> Option<&Self>;
method as_option (line 200) | fn as_option(&self) -> Option<&Self> {
function test_timestamp (line 214) | fn test_timestamp() {
FILE: crates/snapshots/build.rs
constant PROTO_FILES (line 19) | const PROTO_FILES: &[&str] = &["types/mount.proto", "services/snapshots/...
constant FIXUP_MODULES (line 21) | const FIXUP_MODULES: &[&str] = &["containerd.services.snapshots.v1"];
function main (line 23) | fn main() {
function fixup_imports (line 48) | fn fixup_imports(path: &str) -> Result<(), io::Error> {
FILE: crates/snapshots/examples/snapshotter.rs
type Example (line 34) | struct Example;
type Error (line 38) | type Error = snapshots::tonic::Status;
method stat (line 40) | async fn stat(&self, key: String) -> Result<Info, Self::Error> {
method update (line 45) | async fn update(
method usage (line 54) | async fn usage(&self, key: String) -> Result<Usage, Self::Error> {
method mounts (line 59) | async fn mounts(&self, key: String) -> Result<Vec<api::types::Mount>, ...
method prepare (line 64) | async fn prepare(
method view (line 77) | async fn view(
method commit (line 87) | async fn commit(
method remove (line 97) | async fn remove(&self, key: String) -> Result<(), Self::Error> {
type InfoStream (line 102) | type InfoStream = EmptyStream;
method list (line 103) | async fn list(
type EmptyStream (line 114) | struct EmptyStream;
type Item (line 116) | type Item = Result<Info, snapshots::tonic::Status>;
method poll_next (line 117) | fn poll_next(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<Option...
function main (line 124) | async fn main() {
type UnixStream (line 169) | pub struct UnixStream(pub tokio::net::UnixStream);
type ConnectInfo (line 172) | type ConnectInfo = UdsConnectInfo;
method connect_info (line 174) | fn connect_info(&self) -> Self::ConnectInfo {
type UdsConnectInfo (line 184) | pub struct UdsConnectInfo {
method poll_read (line 190) | fn poll_read(
method poll_write (line 200) | fn poll_write(
method poll_flush (line 208) | fn poll_flush(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<st...
method poll_shutdown (line 212) | fn poll_shutdown(
function main (line 222) | fn main() {
FILE: crates/snapshots/src/convert.rs
function from (line 27) | fn from(kind: Kind) -> i32 {
type Error (line 38) | type Error = Error;
method try_from (line 40) | fn try_from(value: i32) -> Result<Self, Self::Error> {
type Error (line 52) | type Error = Error;
method try_from (line 54) | fn try_from(info: grpc::Info) -> Result<Self, Self::Error> {
function from (line 67) | fn from(info: Info) -> Self {
type Error (line 80) | pub enum Error {
function from (line 89) | fn from(err: Error) -> Self {
FILE: crates/snapshots/src/lib.rs
type Kind (line 53) | pub enum Kind {
type Info (line 63) | pub struct Info {
method default (line 79) | fn default() -> Self {
type Usage (line 96) | pub struct Usage {
method add_assign (line 105) | fn add_assign(&mut self, rhs: Self) {
type Snapshotter (line 119) | pub trait Snapshotter: Send + Sync + 'static {
method stat (line 129) | async fn stat(&self, key: String) -> Result<Info, Self::Error>;
method update (line 134) | async fn update(
method usage (line 146) | async fn usage(&self, key: String) -> Result<Usage, Self::Error>;
method mounts (line 155) | async fn mounts(&self, key: String) -> Result<Vec<api::types::Mount>, ...
method prepare (line 169) | async fn prepare(
method view (line 188) | async fn view(
method commit (line 203) | async fn commit(
method remove (line 216) | async fn remove(&self, key: String) -> Result<(), Self::Error>;
method clear (line 226) | async fn clear(&self) -> Result<(), Self::Error> {
method list (line 250) | async fn list(
FILE: crates/snapshots/src/wrap.rs
type Wrapper (line 31) | pub struct Wrapper<S: Snapshotter> {
function server (line 36) | pub fn server<S: Snapshotter>(snapshotter: Arc<S>) -> SnapshotsServer<Wr...
method prepare (line 42) | async fn prepare(
method view (line 57) | async fn view(
method mounts (line 71) | async fn mounts(
method commit (line 85) | async fn commit(
method remove (line 97) | async fn remove(
method stat (line 109) | async fn stat(
method update (line 125) | async fn update(
type ListStream (line 157) | type ListStream = BoxStream<Result<ListSnapshotsResponse, tonic::Status>...
method list (line 159) | async fn list(
method usage (line 183) | async fn usage(
method cleanup (line 202) | async fn cleanup(
Condensed preview — 264 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,080K chars).
[
{
"path": ".gitattributes",
"chars": 19,
"preview": "* text=auto eol=lf\n"
},
{
"path": ".github/dependabot.yml",
"chars": 567,
"preview": "version: 2\nupdates:\n - package-ecosystem: \"cargo\"\n directory: \"/\"\n schedule:\n interval: \"daily\"\n labels:\n"
},
{
"path": ".github/labeler.yml",
"chars": 812,
"preview": "# Automatically assign labels to PRs.\n# `C-` project crate(s) affected.\n# `T-` change type (CI, docs, etc).\n\nC-client:\n "
},
{
"path": ".github/release.yml",
"chars": 527,
"preview": "changelog:\n categories:\n - title: Runc crate\n labels:\n - C-runc\n - title: Runc shim crate\n label"
},
{
"path": ".github/workflows/ci.yml",
"chars": 9857,
"preview": "name: CI\non:\n pull_request:\n push:\n merge_group:\n schedule:\n - cron: '0 0 * * *' # Every day at midnight\n\njobs:\n "
},
{
"path": ".github/workflows/cover.yml",
"chars": 1469,
"preview": "name: Coverage\non:\n push:\n branches: \"main\"\n pull_request:\n branches: \"main\"\n\njobs:\n coverage:\n name: Collec"
},
{
"path": ".github/workflows/labeler.yml",
"chars": 839,
"preview": "name: PR Labeler\non:\n # Runs workflow when activity on a PR in the workflow's repository occurs.\n pull_request_target:"
},
{
"path": ".github/workflows/publish.yml",
"chars": 2557,
"preview": "# Automates crate publishing\n# - Specify crate and version from the menu.\n# - Launch the job:\n# + Updates Cargo.toml w"
},
{
"path": ".github/workflows/stale.yml",
"chars": 1664,
"preview": "name: 'Close stale issues and PRs'\non:\n schedule:\n - cron: \"0 0 * * *\" # Every day at midnight\n pull_request:\n p"
},
{
"path": ".gitignore",
"chars": 333,
"preview": "# Generated by Cargo\n# will have compiled files and executables\n/target/\n\n# Remove Cargo.lock from gitignore if creating"
},
{
"path": "Cargo.toml",
"chars": 1850,
"preview": "[workspace]\nmembers = [\n \"crates/client\",\n \"crates/logging\",\n \"crates/runc\",\n \"crates/runc-shim\",\n \"crates/shim\",\n "
},
{
"path": "LICENSE",
"chars": 11357,
"preview": " Apache License\n Version 2.0, January 2004\n "
},
{
"path": "MAINTAINERS",
"chars": 532,
"preview": "# rust-extensions maintainers\n#\n# As a containerd sub-project, containerd maintainers are also included from https://git"
},
{
"path": "README.md",
"chars": 3072,
"preview": "# Rust extensions for containerd\n\n["
},
{
"path": "clippy.toml",
"chars": 14,
"preview": "msrv = \"1.91\"\n"
},
{
"path": "codecov.yml",
"chars": 15,
"preview": "comment: false\n"
},
{
"path": "crates/client/Cargo.toml",
"chars": 1639,
"preview": "[package]\nname = \"containerd-client\"\nversion = \"0.9.0\"\nauthors = [\n \"Maksym Pavlenko <pavlenko.maksym@gmail.com>\",\n \"T"
},
{
"path": "crates/client/README.md",
"chars": 1088,
"preview": "# containerd GRPC client\n\n[](https://crates.io/crates/con"
},
{
"path": "crates/client/build.rs",
"chars": 4251,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/examples/container.rs",
"chars": 4891,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/examples/container_events.rs",
"chars": 3807,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/examples/container_pull.rs",
"chars": 2708,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/examples/container_spec.json",
"chars": 4002,
"preview": "{\n \"ociVersion\": \"1.0.0-rc2-dev\",\n \"platform\": {\n \"os\": \"linux\",\n \"arch\": \"amd64\"\n },\n \"proces"
},
{
"path": "crates/client/examples/version.rs",
"chars": 1139,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/rsync.txt",
"chars": 114,
"preview": "api/events/*.proto\napi/services/**/*.proto\napi/types/*.proto\napi/types/**/*.proto\nprotobuf/plugin/fieldpath.proto\n"
},
{
"path": "crates/client/src/lib.rs",
"chars": 9278,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/README.md",
"chars": 275,
"preview": "# Vendor\n\nThis directory contains vendor dependencies needed to generate protobuf bindings.\n\nProto files are copy-pasted"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/api/events/container.proto",
"chars": 1180,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/api/events/content.proto",
"chars": 914,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/api/events/image.proto",
"chars": 1012,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/api/events/namespace.proto",
"chars": 1012,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/api/events/sandbox.proto",
"chars": 984,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/api/events/snapshot.proto",
"chars": 1057,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/api/events/task.proto",
"chars": 2066,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/api/services/containers/v1/containers.proto",
"chars": 6315,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/api/services/content/v1/content.proto",
"chars": 10887,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/api/services/diff/v1/diff.proto",
"chars": 3039,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/api/services/events/v1/events.proto",
"chars": 2098,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/api/services/images/v1/images.proto",
"chars": 4472,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/api/services/introspection/v1/introspection.proto",
"chars": 4239,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/api/services/leases/v1/leases.proto",
"chars": 3213,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/api/services/mounts/v1/mounts.proto",
"chars": 1895,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/api/services/namespaces/v1/namespace.proto",
"chars": 3367,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/api/services/sandbox/v1/sandbox.proto",
"chars": 6028,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/api/services/snapshots/v1/snapshots.proto",
"chars": 4642,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/api/services/streaming/v1/streaming.proto",
"chars": 932,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/api/services/tasks/v1/tasks.proto",
"chars": 5162,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/api/services/transfer/v1/transfer.proto",
"chars": 1130,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/api/services/ttrpc/events/v1/events.proto",
"chars": 1229,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/api/services/version/v1/version.proto",
"chars": 1009,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/api/types/descriptor.proto",
"chars": 1081,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/api/types/event.proto",
"chars": 1015,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/api/types/fieldpath.proto",
"chars": 1767,
"preview": "// Protocol Buffers for Go with Gadgets\n//\n// Copyright (c) 2013, The GoGo Authors. All rights reserved.\n// http://githu"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/api/types/introspection.proto",
"chars": 1472,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/api/types/metrics.proto",
"chars": 907,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/api/types/mount.proto",
"chars": 1728,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/api/types/platform.proto",
"chars": 954,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/api/types/runc/options/oci.proto",
"chars": 1816,
"preview": "syntax = \"proto3\";\n\npackage containerd.runc.v1;\n\noption go_package = \"github.com/containerd/containerd/api/types/runc/op"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/api/types/runtimeoptions/v1/api.proto",
"chars": 617,
"preview": "// To regenerate api.pb.go run `make protos`\nsyntax = \"proto3\";\n\npackage runtimeoptions.v1;\n\noption go_package = \"github"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/api/types/sandbox.proto",
"chars": 2206,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/api/types/task/task.proto",
"chars": 1349,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/api/types/transfer/container.proto",
"chars": 1391,
"preview": "/*\n\tCopyright The containerd Authors.\n\n\tLicensed under the Apache License, Version 2.0 (the \"License\");\n\tyou may not use"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/api/types/transfer/imagestore.proto",
"chars": 2661,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/api/types/transfer/importexport.proto",
"chars": 1744,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/api/types/transfer/progress.proto",
"chars": 935,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/api/types/transfer/registry.proto",
"chars": 2595,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/api/types/transfer/streaming.proto",
"chars": 1247,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/events/container.proto",
"chars": 1180,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/events/content.proto",
"chars": 914,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/events/image.proto",
"chars": 1012,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/events/namespace.proto",
"chars": 1012,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/events/sandbox.proto",
"chars": 984,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/events/snapshot.proto",
"chars": 1057,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/events/task.proto",
"chars": 2066,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/services/containers/v1/containers.proto",
"chars": 6315,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/services/content/v1/content.proto",
"chars": 10887,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/services/diff/v1/diff.proto",
"chars": 3039,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/services/events/v1/events.proto",
"chars": 2098,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/services/images/v1/images.proto",
"chars": 4472,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/services/introspection/v1/introspection.proto",
"chars": 4239,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/services/leases/v1/leases.proto",
"chars": 3213,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/services/mounts/v1/mounts.proto",
"chars": 1895,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/services/namespaces/v1/namespace.proto",
"chars": 3367,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/services/sandbox/v1/sandbox.proto",
"chars": 6028,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/services/snapshots/v1/snapshots.proto",
"chars": 4642,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/services/streaming/v1/streaming.proto",
"chars": 932,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/services/tasks/v1/tasks.proto",
"chars": 5162,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/services/transfer/v1/transfer.proto",
"chars": 1130,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/services/ttrpc/events/v1/events.proto",
"chars": 1229,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/services/version/v1/version.proto",
"chars": 1009,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/types/descriptor.proto",
"chars": 1081,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/types/event.proto",
"chars": 1015,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/types/fieldpath.proto",
"chars": 1767,
"preview": "// Protocol Buffers for Go with Gadgets\n//\n// Copyright (c) 2013, The GoGo Authors. All rights reserved.\n// http://githu"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/types/introspection.proto",
"chars": 1472,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/types/metrics.proto",
"chars": 907,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/types/mount.proto",
"chars": 1728,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/types/platform.proto",
"chars": 954,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/types/runc/options/oci.proto",
"chars": 1816,
"preview": "syntax = \"proto3\";\n\npackage containerd.runc.v1;\n\noption go_package = \"github.com/containerd/containerd/api/types/runc/op"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/types/runtimeoptions/v1/api.proto",
"chars": 617,
"preview": "// To regenerate api.pb.go run `make protos`\nsyntax = \"proto3\";\n\npackage runtimeoptions.v1;\n\noption go_package = \"github"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/types/sandbox.proto",
"chars": 2206,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/types/task/task.proto",
"chars": 1349,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/types/transfer/container.proto",
"chars": 1391,
"preview": "/*\n\tCopyright The containerd Authors.\n\n\tLicensed under the Apache License, Version 2.0 (the \"License\");\n\tyou may not use"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/types/transfer/imagestore.proto",
"chars": 2661,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/types/transfer/importexport.proto",
"chars": 1744,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/types/transfer/progress.proto",
"chars": 935,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/types/transfer/registry.proto",
"chars": 2595,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/github.com/containerd/containerd/vendor/github.com/containerd/containerd/api/types/transfer/streaming.proto",
"chars": 1247,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/client/vendor/google/protobuf/any.proto",
"chars": 5916,
"preview": "// Protocol Buffers - Google's data interchange format\n// Copyright 2008 Google Inc. All rights reserved.\n// https://de"
},
{
"path": "crates/client/vendor/google/protobuf/descriptor.proto",
"chars": 38043,
"preview": "// Protocol Buffers - Google's data interchange format\n// Copyright 2008 Google Inc. All rights reserved.\n// https://de"
},
{
"path": "crates/client/vendor/google/protobuf/empty.proto",
"chars": 2429,
"preview": "// Protocol Buffers - Google's data interchange format\n// Copyright 2008 Google Inc. All rights reserved.\n// https://de"
},
{
"path": "crates/client/vendor/google/protobuf/field_mask.proto",
"chars": 8185,
"preview": "// Protocol Buffers - Google's data interchange format\n// Copyright 2008 Google Inc. All rights reserved.\n// https://de"
},
{
"path": "crates/client/vendor/google/protobuf/timestamp.proto",
"chars": 6459,
"preview": "// Protocol Buffers - Google's data interchange format\n// Copyright 2008 Google Inc. All rights reserved.\n// https://de"
},
{
"path": "crates/client/vendor/google/rpc/status.proto",
"chars": 1924,
"preview": "// Copyright 2020 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use th"
},
{
"path": "crates/logging/Cargo.toml",
"chars": 480,
"preview": "[package]\nname = \"containerd-shim-logging\"\nversion = \"0.1.1\"\nauthors = [\n \"Maksym Pavlenko <pavlenko.maksym@gmail.com>\""
},
{
"path": "crates/logging/README.md",
"chars": 2047,
"preview": "# Shim logging binaries for containerd\n\n[](https://"
},
{
"path": "crates/logging/examples/journal.rs",
"chars": 1761,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/logging/src/lib.rs",
"chars": 4497,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/runc/Cargo.toml",
"chars": 1245,
"preview": "[package]\nname = \"runc\"\nversion = \"0.3.0\"\nauthors = [\"Yuna Tomida <ytomida.mmm@gmail.com>\", \"The containerd Authors\"]\nde"
},
{
"path": "crates/runc/README.md",
"chars": 1774,
"preview": "# Rust bindings for runc CLI\n\n[](https://crates.io/crates/runc)\n[![doc"
},
{
"path": "crates/runc/src/asynchronous/io.rs",
"chars": 6000,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/runc/src/asynchronous/mod.rs",
"chars": 3736,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/runc/src/asynchronous/pipe.rs",
"chars": 4124,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/runc/src/asynchronous/runc.rs",
"chars": 17916,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/runc/src/container.rs",
"chars": 2777,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/runc/src/error.rs",
"chars": 3663,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/runc/src/events.rs",
"chars": 5828,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/runc/src/lib.rs",
"chars": 3652,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/runc/src/monitor.rs",
"chars": 6071,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/runc/src/options.rs",
"chars": 17453,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/runc/src/synchronous/io.rs",
"chars": 7100,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/runc/src/synchronous/mod.rs",
"chars": 3340,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/runc/src/synchronous/pipe.rs",
"chars": 1343,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/runc/src/synchronous/runc.rs",
"chars": 14570,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/runc/src/utils.rs",
"chars": 4695,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/runc-shim/Cargo.toml",
"chars": 1928,
"preview": "[package]\nname = \"containerd-runc-shim\"\nversion = \"0.2.0\"\nauthors = [\n \"Shaobao Feng <fshb1988@gmail.com>\",\n \"Tian"
},
{
"path": "crates/runc-shim/README.md",
"chars": 2472,
"preview": "# Rust containerd shim v2 for runc container\n\n[](https"
},
{
"path": "crates/runc-shim/build.rs",
"chars": 1212,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/runc-shim/src/cgroup_memory.rs",
"chars": 6563,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/runc-shim/src/common.rs",
"chars": 7651,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/runc-shim/src/console.rs",
"chars": 2285,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/runc-shim/src/container.rs",
"chars": 9039,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/runc-shim/src/io.rs",
"chars": 1139,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/runc-shim/src/main.rs",
"chars": 2425,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/runc-shim/src/processes.rs",
"chars": 6612,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/runc-shim/src/runc.rs",
"chars": 29729,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/runc-shim/src/service.rs",
"chars": 9620,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/runc-shim/src/task.rs",
"chars": 17018,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/shim/Cargo.toml",
"chars": 2346,
"preview": "[package]\nname = \"containerd-shim\"\nversion = \"0.11.0\"\nauthors = [\n \"Maksym Pavlenko <pavlenko.maksym@gmail.com>\",\n "
},
{
"path": "crates/shim/README.md",
"chars": 6417,
"preview": "# Shim extension for containerd\n\n[](https://crates.io/crate"
},
{
"path": "crates/shim/examples/publish.rs",
"chars": 2118,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/shim/examples/skeleton.rs",
"chars": 2615,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/shim/examples/skeleton_async.rs",
"chars": 2419,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/shim/examples/windows_log_reader.rs",
"chars": 2109,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/shim/src/args.rs",
"chars": 4408,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/shim/src/asynchronous/mod.rs",
"chars": 20438,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/shim/src/asynchronous/monitor.rs",
"chars": 6615,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/shim/src/asynchronous/publisher.rs",
"chars": 9602,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/shim/src/asynchronous/util.rs",
"chars": 5593,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/shim/src/cgroup.rs",
"chars": 16060,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/shim/src/error.rs",
"chars": 3633,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/shim/src/event.rs",
"chars": 1203,
"preview": "use containerd_shim_protos::{events::task::*, protobuf::MessageDyn};\n\npub trait Event: MessageDyn {\n fn topic(&self) "
},
{
"path": "crates/shim/src/lib.rs",
"chars": 7439,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/shim/src/logger.rs",
"chars": 15765,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/shim/src/monitor.rs",
"chars": 1689,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/shim/src/mount_linux.rs",
"chars": 36753,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/shim/src/mount_other.rs",
"chars": 1008,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/shim/src/reap.rs",
"chars": 2153,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/shim/src/synchronous/mod.rs",
"chars": 21410,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/shim/src/synchronous/monitor.rs",
"chars": 4327,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/shim/src/synchronous/publisher.rs",
"chars": 6283,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/shim/src/synchronous/util.rs",
"chars": 6352,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/shim/src/util.rs",
"chars": 5970,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/shim-protos/Cargo.toml",
"chars": 1712,
"preview": "[package]\nname = \"containerd-shim-protos\"\nversion = \"0.11.0\"\nauthors = [\n \"Maksym Pavlenko <pavlenko.maksym@gmail.com"
},
{
"path": "crates/shim-protos/README.md",
"chars": 3414,
"preview": "# Shim protos and client for containerd\n\n[](https://"
},
{
"path": "crates/shim-protos/build.rs",
"chars": 6156,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/shim-protos/examples/connect-async.rs",
"chars": 1938,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/shim-protos/examples/connect.rs",
"chars": 1817,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/shim-protos/examples/ttrpc-client-async.rs",
"chars": 1737,
"preview": "// Copyright (c) 2019 Ant Financial\n// Copyright (c) 2021 Ant Group\n//\n// Licensed under the Apache License, Version 2.0"
},
{
"path": "crates/shim-protos/examples/ttrpc-client.rs",
"chars": 1648,
"preview": "// Copyright (c) 2019 Ant Financial\n// Copyright (c) 2021 Ant Group\n//\n// Licensed under the Apache License, Version 2.0"
},
{
"path": "crates/shim-protos/examples/ttrpc-server-async.rs",
"chars": 2297,
"preview": "// Copyright (c) 2019 Ant Financial\n// Copyright (c) 2021 Ant Group\n//\n// Licensed under the Apache License, Version 2.0"
},
{
"path": "crates/shim-protos/examples/ttrpc-server.rs",
"chars": 2165,
"preview": "// Copyright (c) 2019 Ant Financial\n// Copyright (c) 2021 Ant Group\n//\n// Licensed under the Apache License, Version 2.0"
},
{
"path": "crates/shim-protos/rsync.txt",
"chars": 198,
"preview": "api/events/*.proto\napi/types/*.proto\napi/types/task/*.proto\napi/services/ttrpc/events/v1/*.proto\napi/types/runc/options/"
},
{
"path": "crates/shim-protos/src/cgroups.rs",
"chars": 728,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/shim-protos/src/cgroups_v2.rs",
"chars": 682,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/shim-protos/src/events.rs",
"chars": 1335,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/shim-protos/src/lib.rs",
"chars": 2057,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/shim-protos/src/sandbox.rs",
"chars": 1117,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/shim-protos/src/shim.rs",
"chars": 1786,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/shim-protos/src/topics.rs",
"chars": 1319,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/shim-protos/src/types.rs",
"chars": 1194,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/shim-protos/src/windows.rs",
"chars": 759,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/shim-protos/tests/ttrpc.rs",
"chars": 4287,
"preview": "// Copyright (c) 2021 Alibaba Cloud\n//\n// SPDX-License-Identifier: Apache-2.0\n//\n\nuse std::{\n collections::HashMap,\n "
},
{
"path": "crates/shim-protos/vendor/README.md",
"chars": 354,
"preview": "# Vendor\n\nThis directory contains vendor dependencies needed to generate protobuf bindings.\n\nProto files are copy-pasted"
},
{
"path": "crates/shim-protos/vendor/github.com/containerd/cgroups/cgroup2/stats/metrics.proto",
"chars": 2655,
"preview": "syntax = \"proto3\";\n\npackage io.containerd.cgroups.v2;\n\noption go_package = \"github.com/containerd/cgroups/cgroup2/stats\""
},
{
"path": "crates/shim-protos/vendor/github.com/containerd/cgroups/stats/v1/metrics.proto",
"chars": 3607,
"preview": "syntax = \"proto3\";\n\npackage io.containerd.cgroups.v1;\n\nimport \"gogoproto/gogo.proto\";\n\nmessage Metrics {\n\trepeated Huget"
},
{
"path": "crates/shim-protos/vendor/github.com/containerd/cgroups/v3/cgroup1/stats/metrics.proto",
"chars": 3385,
"preview": "syntax = \"proto3\";\n\npackage io.containerd.cgroups.v1;\n\noption go_package = \"github.com/containerd/cgroups/cgroup1/stats\""
},
{
"path": "crates/shim-protos/vendor/github.com/containerd/containerd/api/events/container.proto",
"chars": 1180,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/shim-protos/vendor/github.com/containerd/containerd/api/events/content.proto",
"chars": 914,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/shim-protos/vendor/github.com/containerd/containerd/api/events/image.proto",
"chars": 1012,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
},
{
"path": "crates/shim-protos/vendor/github.com/containerd/containerd/api/events/namespace.proto",
"chars": 1012,
"preview": "/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may n"
}
]
// ... and 64 more files (download for full content)
About this extraction
This page contains the full source code of the containerd/rust-extensions GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 264 files (991.7 KB), approximately 250.9k tokens, and a symbol index with 912 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.