diff --git a/crates/shim-protos/Cargo.toml b/crates/shim-protos/Cargo.toml index 4f15bf4f..a51216e7 100644 --- a/crates/shim-protos/Cargo.toml +++ b/crates/shim-protos/Cargo.toml @@ -13,10 +13,10 @@ homepage = "https://containerd.io" [dependencies] protobuf = "3.1" ttrpc = "0.7" -async-trait = { version = "0.1.48", optional = true} +async-trait = { version = "0.1.48", optional = true } [build-dependencies] -ttrpc-codegen = { version = "0.4", optional = true } +ttrpc-codegen = "0.4" [dev-dependencies] ctrlc = { version = "3.0", features = ["termination"] } @@ -27,11 +27,6 @@ tokio = { version = "1.18", features = ["full"] } [features] default = [] async = ["ttrpc/async", "async-trait"] -# In current implementation we check in all generated TTRPC code because of the following Rust limitations: -# - `include!` doesn't handle well .rs files with attributes: https://github.com/rust-lang/rust/issues/18810 -# - `cargo publish` will complain on modified `src` directory if it's modified from `build.rs` - https://github.com/rust-lang/cargo/issues/5073 -# - There is now way to include the whole module from `OUT_DIR`, not just individual files. -generate_bindings = ["ttrpc-codegen", "async-trait", "ttrpc/async"] [[example]] name = "shim-proto-server" diff --git a/crates/shim-protos/README.md b/crates/shim-protos/README.md index 71d225fd..bd8402fa 100644 --- a/crates/shim-protos/README.md +++ b/crates/shim-protos/README.md @@ -13,13 +13,6 @@ The `containerd-shim-protos` crate provides [Protobuf](https://github.com/protoc and [TTRPC](https://github.com/containerd/ttrpc.git) service definitions for the [Containerd shim v2](https://github.com/containerd/containerd/blob/main/runtime/v2/task/shim.proto) protocol. -The message and service definitions are auto-generated from protobuf source files under `vendor/` -by using [ttrpc-codegen](https://github.com/containerd/ttrpc-rust/tree/master/ttrpc-codegen). So please do not -edit those auto-generated source files. If upgrading/modification is needed, please follow the steps: -- Synchronize the latest protobuf source files from the upstream projects into directory 'vendor/'. -- Re-generate the source files by `cargo build --features=generate_bindings`. -- Commit the synchronized protobuf source files and auto-generated source files, keeping them in synchronization. - ## Usage Add `containerd-shim-client` as a dependency in your `Cargo.toml` diff --git a/crates/shim-protos/build.rs b/crates/shim-protos/build.rs index b853ada9..8ab6dfcc 100644 --- a/crates/shim-protos/build.rs +++ b/crates/shim-protos/build.rs @@ -14,34 +14,36 @@ limitations under the License. */ -#![allow(unused_imports)] +use std::fs::File; +use std::io::{BufRead, BufReader}; +use std::path::PathBuf; +use std::{env, fs}; -use std::fs; -use std::io::Write; -use std::path::Path; -#[cfg(feature = "generate_bindings")] use ttrpc_codegen::{Codegen, Customize, ProtobufCustomize}; -#[cfg(not(feature = "generate_bindings"))] -fn main() {} - -#[cfg(feature = "generate_bindings")] fn main() { - codegen( - "src/cgroups", + genmodule( + "types", &[ "vendor/gogoproto/gogo.proto", - "vendor/github.com/containerd/cgroups/stats/v1/metrics.proto", + "vendor/google/protobuf/empty.proto", + "vendor/github.com/containerd/containerd/protobuf/plugin/fieldpath.proto", + "vendor/github.com/containerd/containerd/api/types/mount.proto", + "vendor/github.com/containerd/containerd/api/types/task/task.proto", ], - true, false, ); - codegen( - "src/events", + genmodule( + "cgroups", + &["vendor/github.com/containerd/cgroups/stats/v1/metrics.proto"], + false, + ); + + genmodule( + "events", &[ - "vendor/gogoproto/gogo.proto", - "vendor/github.com/containerd/containerd/protobuf/plugin/fieldpath.proto", + "vendor/github.com/containerd/containerd/api/types/mount.proto", "vendor/github.com/containerd/containerd/api/events/container.proto", "vendor/github.com/containerd/containerd/api/events/content.proto", "vendor/github.com/containerd/containerd/api/events/image.proto", @@ -50,58 +52,36 @@ fn main() { "vendor/github.com/containerd/containerd/api/events/task.proto", ], false, - false, ); - // generate async service - codegen( - "src/shim", - &[ - "vendor/gogoproto/gogo.proto", - "vendor/github.com/containerd/containerd/protobuf/plugin/fieldpath.proto", - "vendor/github.com/containerd/containerd/runtime/v2/task/shim.proto", - "vendor/github.com/containerd/containerd/api/services/ttrpc/events/v1/events.proto", - ], - false, - true, - ); - fs::rename("src/shim/shim_ttrpc.rs", "src/shim/shim_ttrpc_async.rs").unwrap(); - fs::rename("src/shim/events_ttrpc.rs", "src/shim/events_ttrpc_async.rs").unwrap(); - - codegen( - "src/shim", + genmodule( + "shim", &[ "vendor/github.com/containerd/containerd/runtime/v2/runc/options/oci.proto", "vendor/github.com/containerd/containerd/runtime/v2/task/shim.proto", "vendor/github.com/containerd/containerd/api/services/ttrpc/events/v1/events.proto", ], false, - false, ); - codegen( - "src/types", - &[ - "vendor/gogoproto/gogo.proto", - "vendor/github.com/containerd/containerd/api/types/mount.proto", - "vendor/github.com/containerd/containerd/api/types/task/task.proto", - "vendor/google/protobuf/empty.proto", - ], - true, - false, - ); + #[cfg(feature = "async")] + { + genmodule( + "shim_async", + &[ + "vendor/github.com/containerd/containerd/runtime/v2/task/shim.proto", + "vendor/github.com/containerd/containerd/api/services/ttrpc/events/v1/events.proto", + ], + true, + ); + } } -#[cfg(feature = "generate_bindings")] -fn codegen( - path: impl AsRef, - inputs: impl IntoIterator>, - gen_mod_rs: bool, - async_all: bool, -) { - let path = path.as_ref(); +fn genmodule(name: &str, inputs: &[&str], async_all: bool) { + let mut out_path = PathBuf::from(env::var("OUT_DIR").unwrap()); + out_path.push(name); - fs::create_dir_all(&path).unwrap(); + fs::create_dir_all(&out_path).unwrap(); Codegen::new() .inputs(inputs) @@ -109,14 +89,53 @@ fn codegen( .rust_protobuf() .rust_protobuf_customize( ProtobufCustomize::default() - .gen_mod_rs(gen_mod_rs) + .gen_mod_rs(true) .generate_accessors(true), ) .customize(Customize { async_all, ..Default::default() }) - .out_dir(path) + .out_dir(&out_path) .run() .expect("Failed to generate protos"); + + // Find all *.rs files generated by TTRPC codegen + let files = fs::read_dir(&out_path) + .unwrap() + .filter_map(|entry| { + let entry = entry.unwrap(); + if !entry.file_type().unwrap().is_file() { + None + } else { + Some(entry.path()) + } + }) + .collect::>(); + + // `include!` doesn't handle files with attributes: + // - https://github.com/rust-lang/rust/issues/18810 + // - https://github.com/rust-lang/rfcs/issues/752 + // Remove all lines that start with: + // - #![allow(unknown_lints)] + // - #![cfg_attr(rustfmt, rustfmt::skip)] + // + for path in files { + let file = File::open(&path).unwrap(); + + let joined = BufReader::new(file) + .lines() + .filter_map(|line| { + let line = line.unwrap(); + if line.starts_with("#!") || line.starts_with("//!") { + None + } else { + Some(line) + } + }) + .collect::>() + .join("\r\n"); + + fs::write(&path, joined).unwrap(); + } } diff --git a/crates/shim-protos/src/cgroups.rs b/crates/shim-protos/src/cgroups.rs new file mode 100644 index 00000000..68ab9c05 --- /dev/null +++ b/crates/shim-protos/src/cgroups.rs @@ -0,0 +1,23 @@ +/* + 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. +*/ + +pub mod metrics { + include!(concat!(env!("OUT_DIR"), "/cgroups/metrics.rs")); +} + +mod gogo { + pub use crate::types::gogo::*; +} diff --git a/crates/shim-protos/src/cgroups/gogo.rs b/crates/shim-protos/src/cgroups/gogo.rs deleted file mode 100644 index a05967a9..00000000 --- a/crates/shim-protos/src/cgroups/gogo.rs +++ /dev/null @@ -1,327 +0,0 @@ -// This file is generated by rust-protobuf 3.1.0. Do not edit -// .proto file is parsed by pure -// @generated - -// https://github.com/rust-lang/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![allow(unused_attributes)] -#![cfg_attr(rustfmt, rustfmt::skip)] - -#![allow(box_pointers)] -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unused_results)] -#![allow(unused_mut)] - -//! Generated file from `gogoproto/gogo.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_1_0; - -/// Extension fields -pub mod exts { - - pub const goproto_enum_prefix: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(62001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_enum_stringer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(62021, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const enum_stringer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(62022, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const enum_customname: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(62023, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); - - pub const enumdecl: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(62024, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const enumvalue_customname: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumValueOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(66001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); - - pub const goproto_getters_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_enum_prefix_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63002, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_stringer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63003, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const verbose_equal_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63004, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const face_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63005, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const gostring_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63006, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const populate_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63007, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const stringer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63008, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const onlyone_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63009, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const equal_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63013, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const description_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63014, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const testgen_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63015, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const benchgen_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63016, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const marshaler_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63017, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const unmarshaler_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63018, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const stable_marshaler_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63019, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const sizer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63020, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_enum_stringer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63021, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const enum_stringer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63022, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const unsafe_marshaler_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63023, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const unsafe_unmarshaler_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63024, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_extensions_map_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63025, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_unrecognized_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63026, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const gogoproto_import: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63027, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const protosizer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63028, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const compare_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63029, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const typedecl_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63030, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const enumdecl_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63031, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_registration: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63032, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const messagename_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63033, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_sizecache_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63034, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_unkeyed_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63035, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_getters: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_stringer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64003, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const verbose_equal: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64004, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const face: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64005, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const gostring: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64006, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const populate: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64007, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const stringer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(67008, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const onlyone: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64009, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const equal: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64013, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const description: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64014, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const testgen: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64015, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const benchgen: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64016, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const marshaler: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64017, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const unmarshaler: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64018, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const stable_marshaler: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64019, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const sizer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64020, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const unsafe_marshaler: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64023, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const unsafe_unmarshaler: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64024, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_extensions_map: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64025, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_unrecognized: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64026, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const protosizer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64028, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const compare: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64029, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const typedecl: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64030, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const messagename: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64033, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_sizecache: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64034, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_unkeyed: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64035, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const nullable: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(65001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const embed: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(65002, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const customtype: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65003, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); - - pub const customname: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65004, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); - - pub const jsontag: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65005, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); - - pub const moretags: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65006, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); - - pub const casttype: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65007, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); - - pub const castkey: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65008, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); - - pub const castvalue: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65009, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); - - pub const stdtime: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(65010, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const stdduration: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(65011, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const wktpointer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(65012, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); -} - -static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x14gogoproto/gogo.proto\x12\tgogoproto\x1a\x20google/protobuf/descrip\ - tor.proto:N\n\x13goproto_enum_prefix\x18\xb1\xe4\x03\x20\x01(\x08\x12\ - \x1c.google.protobuf.EnumOptionsR\x11goprotoEnumPrefix:R\n\x15goproto_en\ - um_stringer\x18\xc5\xe4\x03\x20\x01(\x08\x12\x1c.google.protobuf.EnumOpt\ - ionsR\x13goprotoEnumStringer:C\n\renum_stringer\x18\xc6\xe4\x03\x20\x01(\ - \x08\x12\x1c.google.protobuf.EnumOptionsR\x0cenumStringer:G\n\x0fenum_cu\ - stomname\x18\xc7\xe4\x03\x20\x01(\t\x12\x1c.google.protobuf.EnumOptionsR\ - \x0eenumCustomname::\n\x08enumdecl\x18\xc8\xe4\x03\x20\x01(\x08\x12\x1c.\ - google.protobuf.EnumOptionsR\x08enumdecl:V\n\x14enumvalue_customname\x18\ - \xd1\x83\x04\x20\x01(\t\x12!.google.protobuf.EnumValueOptionsR\x13enumva\ - lueCustomname:N\n\x13goproto_getters_all\x18\x99\xec\x03\x20\x01(\x08\ - \x12\x1c.google.protobuf.FileOptionsR\x11goprotoGettersAll:U\n\x17goprot\ - o_enum_prefix_all\x18\x9a\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.F\ - ileOptionsR\x14goprotoEnumPrefixAll:P\n\x14goproto_stringer_all\x18\x9b\ - \xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x12goprotoStr\ - ingerAll:J\n\x11verbose_equal_all\x18\x9c\xec\x03\x20\x01(\x08\x12\x1c.g\ - oogle.protobuf.FileOptionsR\x0fverboseEqualAll:9\n\x08face_all\x18\x9d\ - \xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x07faceAll:A\ - \n\x0cgostring_all\x18\x9e\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.\ - FileOptionsR\x0bgostringAll:A\n\x0cpopulate_all\x18\x9f\xec\x03\x20\x01(\ - \x08\x12\x1c.google.protobuf.FileOptionsR\x0bpopulateAll:A\n\x0cstringer\ - _all\x18\xa0\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\ - \x0bstringerAll:?\n\x0bonlyone_all\x18\xa1\xec\x03\x20\x01(\x08\x12\x1c.\ - google.protobuf.FileOptionsR\nonlyoneAll:;\n\tequal_all\x18\xa5\xec\x03\ - \x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x08equalAll:G\n\x0fde\ - scription_all\x18\xa6\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileO\ - ptionsR\x0edescriptionAll:?\n\x0btestgen_all\x18\xa7\xec\x03\x20\x01(\ - \x08\x12\x1c.google.protobuf.FileOptionsR\ntestgenAll:A\n\x0cbenchgen_al\ - l\x18\xa8\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x0bb\ - enchgenAll:C\n\rmarshaler_all\x18\xa9\xec\x03\x20\x01(\x08\x12\x1c.googl\ - e.protobuf.FileOptionsR\x0cmarshalerAll:G\n\x0funmarshaler_all\x18\xaa\ - \xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x0eunmarshale\ - rAll:P\n\x14stable_marshaler_all\x18\xab\xec\x03\x20\x01(\x08\x12\x1c.go\ - ogle.protobuf.FileOptionsR\x12stableMarshalerAll:;\n\tsizer_all\x18\xac\ - \xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x08sizerAll:Y\ - \n\x19goproto_enum_stringer_all\x18\xad\xec\x03\x20\x01(\x08\x12\x1c.goo\ - gle.protobuf.FileOptionsR\x16goprotoEnumStringerAll:J\n\x11enum_stringer\ - _all\x18\xae\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\ - \x0fenumStringerAll:P\n\x14unsafe_marshaler_all\x18\xaf\xec\x03\x20\x01(\ - \x08\x12\x1c.google.protobuf.FileOptionsR\x12unsafeMarshalerAll:T\n\x16u\ - nsafe_unmarshaler_all\x18\xb0\xec\x03\x20\x01(\x08\x12\x1c.google.protob\ - uf.FileOptionsR\x14unsafeUnmarshalerAll:[\n\x1agoproto_extensions_map_al\ - l\x18\xb1\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x17g\ - oprotoExtensionsMapAll:X\n\x18goproto_unrecognized_all\x18\xb2\xec\x03\ - \x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x16goprotoUnrecognize\ - dAll:I\n\x10gogoproto_import\x18\xb3\xec\x03\x20\x01(\x08\x12\x1c.google\ - .protobuf.FileOptionsR\x0fgogoprotoImport:E\n\x0eprotosizer_all\x18\xb4\ - \xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\rprotosizerAl\ - l:?\n\x0bcompare_all\x18\xb5\xec\x03\x20\x01(\x08\x12\x1c.google.protobu\ - f.FileOptionsR\ncompareAll:A\n\x0ctypedecl_all\x18\xb6\xec\x03\x20\x01(\ - \x08\x12\x1c.google.protobuf.FileOptionsR\x0btypedeclAll:A\n\x0cenumdecl\ - _all\x18\xb7\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\ - \x0benumdeclAll:Q\n\x14goproto_registration\x18\xb8\xec\x03\x20\x01(\x08\ - \x12\x1c.google.protobuf.FileOptionsR\x13goprotoRegistration:G\n\x0fmess\ - agename_all\x18\xb9\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOpt\ - ionsR\x0emessagenameAll:R\n\x15goproto_sizecache_all\x18\xba\xec\x03\x20\ - \x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x13goprotoSizecacheAll:N\ - \n\x13goproto_unkeyed_all\x18\xbb\xec\x03\x20\x01(\x08\x12\x1c.google.pr\ - otobuf.FileOptionsR\x11goprotoUnkeyedAll:J\n\x0fgoproto_getters\x18\x81\ - \xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x0egoproto\ - Getters:L\n\x10goproto_stringer\x18\x83\xf4\x03\x20\x01(\x08\x12\x1f.goo\ - gle.protobuf.MessageOptionsR\x0fgoprotoStringer:F\n\rverbose_equal\x18\ - \x84\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x0cver\ - boseEqual:5\n\x04face\x18\x85\xf4\x03\x20\x01(\x08\x12\x1f.google.protob\ - uf.MessageOptionsR\x04face:=\n\x08gostring\x18\x86\xf4\x03\x20\x01(\x08\ - \x12\x1f.google.protobuf.MessageOptionsR\x08gostring:=\n\x08populate\x18\ - \x87\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x08pop\ - ulate:=\n\x08stringer\x18\xc0\x8b\x04\x20\x01(\x08\x12\x1f.google.protob\ - uf.MessageOptionsR\x08stringer:;\n\x07onlyone\x18\x89\xf4\x03\x20\x01(\ - \x08\x12\x1f.google.protobuf.MessageOptionsR\x07onlyone:7\n\x05equal\x18\ - \x8d\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x05equ\ - al:C\n\x0bdescription\x18\x8e\xf4\x03\x20\x01(\x08\x12\x1f.google.protob\ - uf.MessageOptionsR\x0bdescription:;\n\x07testgen\x18\x8f\xf4\x03\x20\x01\ - (\x08\x12\x1f.google.protobuf.MessageOptionsR\x07testgen:=\n\x08benchgen\ - \x18\x90\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\ - \x08benchgen:?\n\tmarshaler\x18\x91\xf4\x03\x20\x01(\x08\x12\x1f.google.\ - protobuf.MessageOptionsR\tmarshaler:C\n\x0bunmarshaler\x18\x92\xf4\x03\ - \x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x0bunmarshaler:L\n\ - \x10stable_marshaler\x18\x93\xf4\x03\x20\x01(\x08\x12\x1f.google.protobu\ - f.MessageOptionsR\x0fstableMarshaler:7\n\x05sizer\x18\x94\xf4\x03\x20\ - \x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x05sizer:L\n\x10unsafe\ - _marshaler\x18\x97\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageO\ - ptionsR\x0funsafeMarshaler:P\n\x12unsafe_unmarshaler\x18\x98\xf4\x03\x20\ - \x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x11unsafeUnmarshaler:W\ - \n\x16goproto_extensions_map\x18\x99\xf4\x03\x20\x01(\x08\x12\x1f.google\ - .protobuf.MessageOptionsR\x14goprotoExtensionsMap:T\n\x14goproto_unrecog\ - nized\x18\x9a\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOption\ - sR\x13goprotoUnrecognized:A\n\nprotosizer\x18\x9c\xf4\x03\x20\x01(\x08\ - \x12\x1f.google.protobuf.MessageOptionsR\nprotosizer:;\n\x07compare\x18\ - \x9d\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x07com\ - pare:=\n\x08typedecl\x18\x9e\xf4\x03\x20\x01(\x08\x12\x1f.google.protobu\ - f.MessageOptionsR\x08typedecl:C\n\x0bmessagename\x18\xa1\xf4\x03\x20\x01\ - (\x08\x12\x1f.google.protobuf.MessageOptionsR\x0bmessagename:N\n\x11gopr\ - oto_sizecache\x18\xa2\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.Messa\ - geOptionsR\x10goprotoSizecache:J\n\x0fgoproto_unkeyed\x18\xa3\xf4\x03\ - \x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x0egoprotoUnkeyed:\ - ;\n\x08nullable\x18\xe9\xfb\x03\x20\x01(\x08\x12\x1d.google.protobuf.Fie\ - ldOptionsR\x08nullable:5\n\x05embed\x18\xea\xfb\x03\x20\x01(\x08\x12\x1d\ - .google.protobuf.FieldOptionsR\x05embed:?\n\ncustomtype\x18\xeb\xfb\x03\ - \x20\x01(\t\x12\x1d.google.protobuf.FieldOptionsR\ncustomtype:?\n\ncusto\ - mname\x18\xec\xfb\x03\x20\x01(\t\x12\x1d.google.protobuf.FieldOptionsR\n\ - customname:9\n\x07jsontag\x18\xed\xfb\x03\x20\x01(\t\x12\x1d.google.prot\ - obuf.FieldOptionsR\x07jsontag:;\n\x08moretags\x18\xee\xfb\x03\x20\x01(\t\ - \x12\x1d.google.protobuf.FieldOptionsR\x08moretags:;\n\x08casttype\x18\ - \xef\xfb\x03\x20\x01(\t\x12\x1d.google.protobuf.FieldOptionsR\x08casttyp\ - e:9\n\x07castkey\x18\xf0\xfb\x03\x20\x01(\t\x12\x1d.google.protobuf.Fiel\ - dOptionsR\x07castkey:=\n\tcastvalue\x18\xf1\xfb\x03\x20\x01(\t\x12\x1d.g\ - oogle.protobuf.FieldOptionsR\tcastvalue:9\n\x07stdtime\x18\xf2\xfb\x03\ - \x20\x01(\x08\x12\x1d.google.protobuf.FieldOptionsR\x07stdtime:A\n\x0bst\ - dduration\x18\xf3\xfb\x03\x20\x01(\x08\x12\x1d.google.protobuf.FieldOpti\ - onsR\x0bstdduration:?\n\nwktpointer\x18\xf4\xfb\x03\x20\x01(\x08\x12\x1d\ - .google.protobuf.FieldOptionsR\nwktpointerBE\n\x13com.google.protobufB\n\ - GoGoProtosZ\"github.com/gogo/protobuf/gogoprotob\x06proto2\ -"; - -/// `FileDescriptorProto` object which was a source for this generated file -fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); - file_descriptor_proto_lazy.get(|| { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() - }) -} - -/// `FileDescriptor` object which allows dynamic access to files -pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { - static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); - static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); - file_descriptor.get(|| { - let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { - let mut deps = ::std::vec::Vec::with_capacity(1); - deps.push(::protobuf::descriptor::file_descriptor().clone()); - let mut messages = ::std::vec::Vec::with_capacity(0); - let mut enums = ::std::vec::Vec::with_capacity(0); - ::protobuf::reflect::GeneratedFileDescriptor::new_generated( - file_descriptor_proto(), - deps, - messages, - enums, - ) - }); - ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) - }) -} diff --git a/crates/shim-protos/src/cgroups/metrics.rs b/crates/shim-protos/src/cgroups/metrics.rs deleted file mode 100644 index 5e9fa249..00000000 --- a/crates/shim-protos/src/cgroups/metrics.rs +++ /dev/null @@ -1,5410 +0,0 @@ -// This file is generated by rust-protobuf 3.1.0. Do not edit -// .proto file is parsed by pure -// @generated - -// https://github.com/rust-lang/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![allow(unused_attributes)] -#![cfg_attr(rustfmt, rustfmt::skip)] - -#![allow(box_pointers)] -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unused_results)] -#![allow(unused_mut)] - -//! Generated file from `github.com/containerd/cgroups/stats/v1/metrics.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_1_0; - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:io.containerd.cgroups.v1.Metrics) -pub struct Metrics { - // message fields - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.Metrics.hugetlb) - pub hugetlb: ::std::vec::Vec, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.Metrics.pids) - pub pids: ::protobuf::MessageField, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.Metrics.cpu) - pub cpu: ::protobuf::MessageField, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.Metrics.memory) - pub memory: ::protobuf::MessageField, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.Metrics.blkio) - pub blkio: ::protobuf::MessageField, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.Metrics.rdma) - pub rdma: ::protobuf::MessageField, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.Metrics.network) - pub network: ::std::vec::Vec, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.Metrics.cgroup_stats) - pub cgroup_stats: ::protobuf::MessageField, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.Metrics.memory_oom_control) - pub memory_oom_control: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:io.containerd.cgroups.v1.Metrics.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a Metrics { - fn default() -> &'a Metrics { - ::default_instance() - } -} - -impl Metrics { - pub fn new() -> Metrics { - ::std::default::Default::default() - } - - // repeated .io.containerd.cgroups.v1.HugetlbStat hugetlb = 1; - - pub fn hugetlb(&self) -> &[HugetlbStat] { - &self.hugetlb - } - - pub fn clear_hugetlb(&mut self) { - self.hugetlb.clear(); - } - - // Param is passed by value, moved - pub fn set_hugetlb(&mut self, v: ::std::vec::Vec) { - self.hugetlb = v; - } - - // Mutable pointer to the field. - pub fn mut_hugetlb(&mut self) -> &mut ::std::vec::Vec { - &mut self.hugetlb - } - - // Take field - pub fn take_hugetlb(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.hugetlb, ::std::vec::Vec::new()) - } - - // .io.containerd.cgroups.v1.PidsStat pids = 2; - - pub fn pids(&self) -> &PidsStat { - self.pids.as_ref().unwrap_or_else(|| ::default_instance()) - } - - pub fn clear_pids(&mut self) { - self.pids.clear(); - } - - pub fn has_pids(&self) -> bool { - self.pids.is_some() - } - - // Param is passed by value, moved - pub fn set_pids(&mut self, v: PidsStat) { - self.pids = ::protobuf::MessageField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_pids(&mut self) -> &mut PidsStat { - self.pids.mut_or_insert_default() - } - - // Take field - pub fn take_pids(&mut self) -> PidsStat { - self.pids.take().unwrap_or_else(|| PidsStat::new()) - } - - // .io.containerd.cgroups.v1.CPUStat cpu = 3; - - pub fn cpu(&self) -> &CPUStat { - self.cpu.as_ref().unwrap_or_else(|| ::default_instance()) - } - - pub fn clear_cpu(&mut self) { - self.cpu.clear(); - } - - pub fn has_cpu(&self) -> bool { - self.cpu.is_some() - } - - // Param is passed by value, moved - pub fn set_cpu(&mut self, v: CPUStat) { - self.cpu = ::protobuf::MessageField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_cpu(&mut self) -> &mut CPUStat { - self.cpu.mut_or_insert_default() - } - - // Take field - pub fn take_cpu(&mut self) -> CPUStat { - self.cpu.take().unwrap_or_else(|| CPUStat::new()) - } - - // .io.containerd.cgroups.v1.MemoryStat memory = 4; - - pub fn memory(&self) -> &MemoryStat { - self.memory.as_ref().unwrap_or_else(|| ::default_instance()) - } - - pub fn clear_memory(&mut self) { - self.memory.clear(); - } - - pub fn has_memory(&self) -> bool { - self.memory.is_some() - } - - // Param is passed by value, moved - pub fn set_memory(&mut self, v: MemoryStat) { - self.memory = ::protobuf::MessageField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_memory(&mut self) -> &mut MemoryStat { - self.memory.mut_or_insert_default() - } - - // Take field - pub fn take_memory(&mut self) -> MemoryStat { - self.memory.take().unwrap_or_else(|| MemoryStat::new()) - } - - // .io.containerd.cgroups.v1.BlkIOStat blkio = 5; - - pub fn blkio(&self) -> &BlkIOStat { - self.blkio.as_ref().unwrap_or_else(|| ::default_instance()) - } - - pub fn clear_blkio(&mut self) { - self.blkio.clear(); - } - - pub fn has_blkio(&self) -> bool { - self.blkio.is_some() - } - - // Param is passed by value, moved - pub fn set_blkio(&mut self, v: BlkIOStat) { - self.blkio = ::protobuf::MessageField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_blkio(&mut self) -> &mut BlkIOStat { - self.blkio.mut_or_insert_default() - } - - // Take field - pub fn take_blkio(&mut self) -> BlkIOStat { - self.blkio.take().unwrap_or_else(|| BlkIOStat::new()) - } - - // .io.containerd.cgroups.v1.RdmaStat rdma = 6; - - pub fn rdma(&self) -> &RdmaStat { - self.rdma.as_ref().unwrap_or_else(|| ::default_instance()) - } - - pub fn clear_rdma(&mut self) { - self.rdma.clear(); - } - - pub fn has_rdma(&self) -> bool { - self.rdma.is_some() - } - - // Param is passed by value, moved - pub fn set_rdma(&mut self, v: RdmaStat) { - self.rdma = ::protobuf::MessageField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_rdma(&mut self) -> &mut RdmaStat { - self.rdma.mut_or_insert_default() - } - - // Take field - pub fn take_rdma(&mut self) -> RdmaStat { - self.rdma.take().unwrap_or_else(|| RdmaStat::new()) - } - - // repeated .io.containerd.cgroups.v1.NetworkStat network = 7; - - pub fn network(&self) -> &[NetworkStat] { - &self.network - } - - pub fn clear_network(&mut self) { - self.network.clear(); - } - - // Param is passed by value, moved - pub fn set_network(&mut self, v: ::std::vec::Vec) { - self.network = v; - } - - // Mutable pointer to the field. - pub fn mut_network(&mut self) -> &mut ::std::vec::Vec { - &mut self.network - } - - // Take field - pub fn take_network(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.network, ::std::vec::Vec::new()) - } - - // .io.containerd.cgroups.v1.CgroupStats cgroup_stats = 8; - - pub fn cgroup_stats(&self) -> &CgroupStats { - self.cgroup_stats.as_ref().unwrap_or_else(|| ::default_instance()) - } - - pub fn clear_cgroup_stats(&mut self) { - self.cgroup_stats.clear(); - } - - pub fn has_cgroup_stats(&self) -> bool { - self.cgroup_stats.is_some() - } - - // Param is passed by value, moved - pub fn set_cgroup_stats(&mut self, v: CgroupStats) { - self.cgroup_stats = ::protobuf::MessageField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_cgroup_stats(&mut self) -> &mut CgroupStats { - self.cgroup_stats.mut_or_insert_default() - } - - // Take field - pub fn take_cgroup_stats(&mut self) -> CgroupStats { - self.cgroup_stats.take().unwrap_or_else(|| CgroupStats::new()) - } - - // .io.containerd.cgroups.v1.MemoryOomControl memory_oom_control = 9; - - pub fn memory_oom_control(&self) -> &MemoryOomControl { - self.memory_oom_control.as_ref().unwrap_or_else(|| ::default_instance()) - } - - pub fn clear_memory_oom_control(&mut self) { - self.memory_oom_control.clear(); - } - - pub fn has_memory_oom_control(&self) -> bool { - self.memory_oom_control.is_some() - } - - // Param is passed by value, moved - pub fn set_memory_oom_control(&mut self, v: MemoryOomControl) { - self.memory_oom_control = ::protobuf::MessageField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_memory_oom_control(&mut self) -> &mut MemoryOomControl { - self.memory_oom_control.mut_or_insert_default() - } - - // Take field - pub fn take_memory_oom_control(&mut self) -> MemoryOomControl { - self.memory_oom_control.take().unwrap_or_else(|| MemoryOomControl::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(9); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "hugetlb", - |m: &Metrics| { &m.hugetlb }, - |m: &mut Metrics| { &mut m.hugetlb }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, PidsStat>( - "pids", - |m: &Metrics| { &m.pids }, - |m: &mut Metrics| { &mut m.pids }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, CPUStat>( - "cpu", - |m: &Metrics| { &m.cpu }, - |m: &mut Metrics| { &mut m.cpu }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MemoryStat>( - "memory", - |m: &Metrics| { &m.memory }, - |m: &mut Metrics| { &mut m.memory }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, BlkIOStat>( - "blkio", - |m: &Metrics| { &m.blkio }, - |m: &mut Metrics| { &mut m.blkio }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, RdmaStat>( - "rdma", - |m: &Metrics| { &m.rdma }, - |m: &mut Metrics| { &mut m.rdma }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "network", - |m: &Metrics| { &m.network }, - |m: &mut Metrics| { &mut m.network }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, CgroupStats>( - "cgroup_stats", - |m: &Metrics| { &m.cgroup_stats }, - |m: &mut Metrics| { &mut m.cgroup_stats }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MemoryOomControl>( - "memory_oom_control", - |m: &Metrics| { &m.memory_oom_control }, - |m: &mut Metrics| { &mut m.memory_oom_control }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "Metrics", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for Metrics { - const NAME: &'static str = "Metrics"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.hugetlb.push(is.read_message()?); - }, - 18 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.pids)?; - }, - 26 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.cpu)?; - }, - 34 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.memory)?; - }, - 42 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.blkio)?; - }, - 50 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.rdma)?; - }, - 58 => { - self.network.push(is.read_message()?); - }, - 66 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.cgroup_stats)?; - }, - 74 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.memory_oom_control)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - for value in &self.hugetlb { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - if let Some(v) = self.pids.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.cpu.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.memory.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.blkio.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.rdma.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - for value in &self.network { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - if let Some(v) = self.cgroup_stats.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.memory_oom_control.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - for v in &self.hugetlb { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - }; - if let Some(v) = self.pids.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - } - if let Some(v) = self.cpu.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - } - if let Some(v) = self.memory.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?; - } - if let Some(v) = self.blkio.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?; - } - if let Some(v) = self.rdma.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(6, v, os)?; - } - for v in &self.network { - ::protobuf::rt::write_message_field_with_cached_size(7, v, os)?; - }; - if let Some(v) = self.cgroup_stats.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(8, v, os)?; - } - if let Some(v) = self.memory_oom_control.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(9, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> Metrics { - Metrics::new() - } - - fn clear(&mut self) { - self.hugetlb.clear(); - self.pids.clear(); - self.cpu.clear(); - self.memory.clear(); - self.blkio.clear(); - self.rdma.clear(); - self.network.clear(); - self.cgroup_stats.clear(); - self.memory_oom_control.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static Metrics { - static instance: Metrics = Metrics { - hugetlb: ::std::vec::Vec::new(), - pids: ::protobuf::MessageField::none(), - cpu: ::protobuf::MessageField::none(), - memory: ::protobuf::MessageField::none(), - blkio: ::protobuf::MessageField::none(), - rdma: ::protobuf::MessageField::none(), - network: ::std::vec::Vec::new(), - cgroup_stats: ::protobuf::MessageField::none(), - memory_oom_control: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for Metrics { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("Metrics").unwrap()).clone() - } -} - -impl ::std::fmt::Display for Metrics { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for Metrics { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:io.containerd.cgroups.v1.HugetlbStat) -pub struct HugetlbStat { - // message fields - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.HugetlbStat.usage) - pub usage: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.HugetlbStat.max) - pub max: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.HugetlbStat.failcnt) - pub failcnt: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.HugetlbStat.pagesize) - pub pagesize: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:io.containerd.cgroups.v1.HugetlbStat.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a HugetlbStat { - fn default() -> &'a HugetlbStat { - ::default_instance() - } -} - -impl HugetlbStat { - pub fn new() -> HugetlbStat { - ::std::default::Default::default() - } - - // uint64 usage = 1; - - pub fn usage(&self) -> u64 { - self.usage - } - - pub fn clear_usage(&mut self) { - self.usage = 0; - } - - // Param is passed by value, moved - pub fn set_usage(&mut self, v: u64) { - self.usage = v; - } - - // uint64 max = 2; - - pub fn max(&self) -> u64 { - self.max - } - - pub fn clear_max(&mut self) { - self.max = 0; - } - - // Param is passed by value, moved - pub fn set_max(&mut self, v: u64) { - self.max = v; - } - - // uint64 failcnt = 3; - - pub fn failcnt(&self) -> u64 { - self.failcnt - } - - pub fn clear_failcnt(&mut self) { - self.failcnt = 0; - } - - // Param is passed by value, moved - pub fn set_failcnt(&mut self, v: u64) { - self.failcnt = v; - } - - // string pagesize = 4; - - pub fn pagesize(&self) -> &str { - &self.pagesize - } - - pub fn clear_pagesize(&mut self) { - self.pagesize.clear(); - } - - // Param is passed by value, moved - pub fn set_pagesize(&mut self, v: ::std::string::String) { - self.pagesize = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_pagesize(&mut self) -> &mut ::std::string::String { - &mut self.pagesize - } - - // Take field - pub fn take_pagesize(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.pagesize, ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(4); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "usage", - |m: &HugetlbStat| { &m.usage }, - |m: &mut HugetlbStat| { &mut m.usage }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "max", - |m: &HugetlbStat| { &m.max }, - |m: &mut HugetlbStat| { &mut m.max }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "failcnt", - |m: &HugetlbStat| { &m.failcnt }, - |m: &mut HugetlbStat| { &mut m.failcnt }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "pagesize", - |m: &HugetlbStat| { &m.pagesize }, - |m: &mut HugetlbStat| { &mut m.pagesize }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "HugetlbStat", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for HugetlbStat { - const NAME: &'static str = "HugetlbStat"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.usage = is.read_uint64()?; - }, - 16 => { - self.max = is.read_uint64()?; - }, - 24 => { - self.failcnt = is.read_uint64()?; - }, - 34 => { - self.pagesize = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.usage != 0 { - my_size += ::protobuf::rt::uint64_size(1, self.usage); - } - if self.max != 0 { - my_size += ::protobuf::rt::uint64_size(2, self.max); - } - if self.failcnt != 0 { - my_size += ::protobuf::rt::uint64_size(3, self.failcnt); - } - if !self.pagesize.is_empty() { - my_size += ::protobuf::rt::string_size(4, &self.pagesize); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.usage != 0 { - os.write_uint64(1, self.usage)?; - } - if self.max != 0 { - os.write_uint64(2, self.max)?; - } - if self.failcnt != 0 { - os.write_uint64(3, self.failcnt)?; - } - if !self.pagesize.is_empty() { - os.write_string(4, &self.pagesize)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> HugetlbStat { - HugetlbStat::new() - } - - fn clear(&mut self) { - self.usage = 0; - self.max = 0; - self.failcnt = 0; - self.pagesize.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static HugetlbStat { - static instance: HugetlbStat = HugetlbStat { - usage: 0, - max: 0, - failcnt: 0, - pagesize: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for HugetlbStat { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("HugetlbStat").unwrap()).clone() - } -} - -impl ::std::fmt::Display for HugetlbStat { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for HugetlbStat { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:io.containerd.cgroups.v1.PidsStat) -pub struct PidsStat { - // message fields - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.PidsStat.current) - pub current: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.PidsStat.limit) - pub limit: u64, - // special fields - // @@protoc_insertion_point(special_field:io.containerd.cgroups.v1.PidsStat.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a PidsStat { - fn default() -> &'a PidsStat { - ::default_instance() - } -} - -impl PidsStat { - pub fn new() -> PidsStat { - ::std::default::Default::default() - } - - // uint64 current = 1; - - pub fn current(&self) -> u64 { - self.current - } - - pub fn clear_current(&mut self) { - self.current = 0; - } - - // Param is passed by value, moved - pub fn set_current(&mut self, v: u64) { - self.current = v; - } - - // uint64 limit = 2; - - pub fn limit(&self) -> u64 { - self.limit - } - - pub fn clear_limit(&mut self) { - self.limit = 0; - } - - // Param is passed by value, moved - pub fn set_limit(&mut self, v: u64) { - self.limit = v; - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(2); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "current", - |m: &PidsStat| { &m.current }, - |m: &mut PidsStat| { &mut m.current }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "limit", - |m: &PidsStat| { &m.limit }, - |m: &mut PidsStat| { &mut m.limit }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "PidsStat", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for PidsStat { - const NAME: &'static str = "PidsStat"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.current = is.read_uint64()?; - }, - 16 => { - self.limit = is.read_uint64()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.current != 0 { - my_size += ::protobuf::rt::uint64_size(1, self.current); - } - if self.limit != 0 { - my_size += ::protobuf::rt::uint64_size(2, self.limit); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.current != 0 { - os.write_uint64(1, self.current)?; - } - if self.limit != 0 { - os.write_uint64(2, self.limit)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> PidsStat { - PidsStat::new() - } - - fn clear(&mut self) { - self.current = 0; - self.limit = 0; - self.special_fields.clear(); - } - - fn default_instance() -> &'static PidsStat { - static instance: PidsStat = PidsStat { - current: 0, - limit: 0, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for PidsStat { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("PidsStat").unwrap()).clone() - } -} - -impl ::std::fmt::Display for PidsStat { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for PidsStat { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:io.containerd.cgroups.v1.CPUStat) -pub struct CPUStat { - // message fields - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.CPUStat.usage) - pub usage: ::protobuf::MessageField, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.CPUStat.throttling) - pub throttling: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:io.containerd.cgroups.v1.CPUStat.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a CPUStat { - fn default() -> &'a CPUStat { - ::default_instance() - } -} - -impl CPUStat { - pub fn new() -> CPUStat { - ::std::default::Default::default() - } - - // .io.containerd.cgroups.v1.CPUUsage usage = 1; - - pub fn usage(&self) -> &CPUUsage { - self.usage.as_ref().unwrap_or_else(|| ::default_instance()) - } - - pub fn clear_usage(&mut self) { - self.usage.clear(); - } - - pub fn has_usage(&self) -> bool { - self.usage.is_some() - } - - // Param is passed by value, moved - pub fn set_usage(&mut self, v: CPUUsage) { - self.usage = ::protobuf::MessageField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_usage(&mut self) -> &mut CPUUsage { - self.usage.mut_or_insert_default() - } - - // Take field - pub fn take_usage(&mut self) -> CPUUsage { - self.usage.take().unwrap_or_else(|| CPUUsage::new()) - } - - // .io.containerd.cgroups.v1.Throttle throttling = 2; - - pub fn throttling(&self) -> &Throttle { - self.throttling.as_ref().unwrap_or_else(|| ::default_instance()) - } - - pub fn clear_throttling(&mut self) { - self.throttling.clear(); - } - - pub fn has_throttling(&self) -> bool { - self.throttling.is_some() - } - - // Param is passed by value, moved - pub fn set_throttling(&mut self, v: Throttle) { - self.throttling = ::protobuf::MessageField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_throttling(&mut self) -> &mut Throttle { - self.throttling.mut_or_insert_default() - } - - // Take field - pub fn take_throttling(&mut self) -> Throttle { - self.throttling.take().unwrap_or_else(|| Throttle::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(2); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, CPUUsage>( - "usage", - |m: &CPUStat| { &m.usage }, - |m: &mut CPUStat| { &mut m.usage }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Throttle>( - "throttling", - |m: &CPUStat| { &m.throttling }, - |m: &mut CPUStat| { &mut m.throttling }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "CPUStat", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for CPUStat { - const NAME: &'static str = "CPUStat"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.usage)?; - }, - 18 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.throttling)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.usage.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.throttling.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.usage.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - if let Some(v) = self.throttling.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> CPUStat { - CPUStat::new() - } - - fn clear(&mut self) { - self.usage.clear(); - self.throttling.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static CPUStat { - static instance: CPUStat = CPUStat { - usage: ::protobuf::MessageField::none(), - throttling: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for CPUStat { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("CPUStat").unwrap()).clone() - } -} - -impl ::std::fmt::Display for CPUStat { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for CPUStat { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:io.containerd.cgroups.v1.CPUUsage) -pub struct CPUUsage { - // message fields - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.CPUUsage.total) - pub total: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.CPUUsage.kernel) - pub kernel: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.CPUUsage.user) - pub user: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.CPUUsage.per_cpu) - pub per_cpu: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:io.containerd.cgroups.v1.CPUUsage.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a CPUUsage { - fn default() -> &'a CPUUsage { - ::default_instance() - } -} - -impl CPUUsage { - pub fn new() -> CPUUsage { - ::std::default::Default::default() - } - - // uint64 total = 1; - - pub fn total(&self) -> u64 { - self.total - } - - pub fn clear_total(&mut self) { - self.total = 0; - } - - // Param is passed by value, moved - pub fn set_total(&mut self, v: u64) { - self.total = v; - } - - // uint64 kernel = 2; - - pub fn kernel(&self) -> u64 { - self.kernel - } - - pub fn clear_kernel(&mut self) { - self.kernel = 0; - } - - // Param is passed by value, moved - pub fn set_kernel(&mut self, v: u64) { - self.kernel = v; - } - - // uint64 user = 3; - - pub fn user(&self) -> u64 { - self.user - } - - pub fn clear_user(&mut self) { - self.user = 0; - } - - // Param is passed by value, moved - pub fn set_user(&mut self, v: u64) { - self.user = v; - } - - // repeated uint64 per_cpu = 4; - - pub fn per_cpu(&self) -> &[u64] { - &self.per_cpu - } - - pub fn clear_per_cpu(&mut self) { - self.per_cpu.clear(); - } - - // Param is passed by value, moved - pub fn set_per_cpu(&mut self, v: ::std::vec::Vec) { - self.per_cpu = v; - } - - // Mutable pointer to the field. - pub fn mut_per_cpu(&mut self) -> &mut ::std::vec::Vec { - &mut self.per_cpu - } - - // Take field - pub fn take_per_cpu(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.per_cpu, ::std::vec::Vec::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(4); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "total", - |m: &CPUUsage| { &m.total }, - |m: &mut CPUUsage| { &mut m.total }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "kernel", - |m: &CPUUsage| { &m.kernel }, - |m: &mut CPUUsage| { &mut m.kernel }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "user", - |m: &CPUUsage| { &m.user }, - |m: &mut CPUUsage| { &mut m.user }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "per_cpu", - |m: &CPUUsage| { &m.per_cpu }, - |m: &mut CPUUsage| { &mut m.per_cpu }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "CPUUsage", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for CPUUsage { - const NAME: &'static str = "CPUUsage"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.total = is.read_uint64()?; - }, - 16 => { - self.kernel = is.read_uint64()?; - }, - 24 => { - self.user = is.read_uint64()?; - }, - 34 => { - is.read_repeated_packed_uint64_into(&mut self.per_cpu)?; - }, - 32 => { - self.per_cpu.push(is.read_uint64()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.total != 0 { - my_size += ::protobuf::rt::uint64_size(1, self.total); - } - if self.kernel != 0 { - my_size += ::protobuf::rt::uint64_size(2, self.kernel); - } - if self.user != 0 { - my_size += ::protobuf::rt::uint64_size(3, self.user); - } - for value in &self.per_cpu { - my_size += ::protobuf::rt::uint64_size(4, *value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.total != 0 { - os.write_uint64(1, self.total)?; - } - if self.kernel != 0 { - os.write_uint64(2, self.kernel)?; - } - if self.user != 0 { - os.write_uint64(3, self.user)?; - } - for v in &self.per_cpu { - os.write_uint64(4, *v)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> CPUUsage { - CPUUsage::new() - } - - fn clear(&mut self) { - self.total = 0; - self.kernel = 0; - self.user = 0; - self.per_cpu.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static CPUUsage { - static instance: CPUUsage = CPUUsage { - total: 0, - kernel: 0, - user: 0, - per_cpu: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for CPUUsage { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("CPUUsage").unwrap()).clone() - } -} - -impl ::std::fmt::Display for CPUUsage { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for CPUUsage { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:io.containerd.cgroups.v1.Throttle) -pub struct Throttle { - // message fields - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.Throttle.periods) - pub periods: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.Throttle.throttled_periods) - pub throttled_periods: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.Throttle.throttled_time) - pub throttled_time: u64, - // special fields - // @@protoc_insertion_point(special_field:io.containerd.cgroups.v1.Throttle.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a Throttle { - fn default() -> &'a Throttle { - ::default_instance() - } -} - -impl Throttle { - pub fn new() -> Throttle { - ::std::default::Default::default() - } - - // uint64 periods = 1; - - pub fn periods(&self) -> u64 { - self.periods - } - - pub fn clear_periods(&mut self) { - self.periods = 0; - } - - // Param is passed by value, moved - pub fn set_periods(&mut self, v: u64) { - self.periods = v; - } - - // uint64 throttled_periods = 2; - - pub fn throttled_periods(&self) -> u64 { - self.throttled_periods - } - - pub fn clear_throttled_periods(&mut self) { - self.throttled_periods = 0; - } - - // Param is passed by value, moved - pub fn set_throttled_periods(&mut self, v: u64) { - self.throttled_periods = v; - } - - // uint64 throttled_time = 3; - - pub fn throttled_time(&self) -> u64 { - self.throttled_time - } - - pub fn clear_throttled_time(&mut self) { - self.throttled_time = 0; - } - - // Param is passed by value, moved - pub fn set_throttled_time(&mut self, v: u64) { - self.throttled_time = v; - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(3); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "periods", - |m: &Throttle| { &m.periods }, - |m: &mut Throttle| { &mut m.periods }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "throttled_periods", - |m: &Throttle| { &m.throttled_periods }, - |m: &mut Throttle| { &mut m.throttled_periods }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "throttled_time", - |m: &Throttle| { &m.throttled_time }, - |m: &mut Throttle| { &mut m.throttled_time }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "Throttle", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for Throttle { - const NAME: &'static str = "Throttle"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.periods = is.read_uint64()?; - }, - 16 => { - self.throttled_periods = is.read_uint64()?; - }, - 24 => { - self.throttled_time = is.read_uint64()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.periods != 0 { - my_size += ::protobuf::rt::uint64_size(1, self.periods); - } - if self.throttled_periods != 0 { - my_size += ::protobuf::rt::uint64_size(2, self.throttled_periods); - } - if self.throttled_time != 0 { - my_size += ::protobuf::rt::uint64_size(3, self.throttled_time); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.periods != 0 { - os.write_uint64(1, self.periods)?; - } - if self.throttled_periods != 0 { - os.write_uint64(2, self.throttled_periods)?; - } - if self.throttled_time != 0 { - os.write_uint64(3, self.throttled_time)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> Throttle { - Throttle::new() - } - - fn clear(&mut self) { - self.periods = 0; - self.throttled_periods = 0; - self.throttled_time = 0; - self.special_fields.clear(); - } - - fn default_instance() -> &'static Throttle { - static instance: Throttle = Throttle { - periods: 0, - throttled_periods: 0, - throttled_time: 0, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for Throttle { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("Throttle").unwrap()).clone() - } -} - -impl ::std::fmt::Display for Throttle { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for Throttle { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:io.containerd.cgroups.v1.MemoryStat) -pub struct MemoryStat { - // message fields - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.MemoryStat.cache) - pub cache: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.MemoryStat.rss) - pub rss: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.MemoryStat.rss_huge) - pub rss_huge: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.MemoryStat.mapped_file) - pub mapped_file: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.MemoryStat.dirty) - pub dirty: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.MemoryStat.writeback) - pub writeback: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.MemoryStat.pg_pg_in) - pub pg_pg_in: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.MemoryStat.pg_pg_out) - pub pg_pg_out: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.MemoryStat.pg_fault) - pub pg_fault: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.MemoryStat.pg_maj_fault) - pub pg_maj_fault: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.MemoryStat.inactive_anon) - pub inactive_anon: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.MemoryStat.active_anon) - pub active_anon: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.MemoryStat.inactive_file) - pub inactive_file: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.MemoryStat.active_file) - pub active_file: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.MemoryStat.unevictable) - pub unevictable: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.MemoryStat.hierarchical_memory_limit) - pub hierarchical_memory_limit: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.MemoryStat.hierarchical_swap_limit) - pub hierarchical_swap_limit: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.MemoryStat.total_cache) - pub total_cache: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.MemoryStat.total_rss) - pub total_rss: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.MemoryStat.total_rss_huge) - pub total_rss_huge: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.MemoryStat.total_mapped_file) - pub total_mapped_file: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.MemoryStat.total_dirty) - pub total_dirty: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.MemoryStat.total_writeback) - pub total_writeback: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.MemoryStat.total_pg_pg_in) - pub total_pg_pg_in: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.MemoryStat.total_pg_pg_out) - pub total_pg_pg_out: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.MemoryStat.total_pg_fault) - pub total_pg_fault: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.MemoryStat.total_pg_maj_fault) - pub total_pg_maj_fault: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.MemoryStat.total_inactive_anon) - pub total_inactive_anon: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.MemoryStat.total_active_anon) - pub total_active_anon: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.MemoryStat.total_inactive_file) - pub total_inactive_file: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.MemoryStat.total_active_file) - pub total_active_file: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.MemoryStat.total_unevictable) - pub total_unevictable: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.MemoryStat.usage) - pub usage: ::protobuf::MessageField, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.MemoryStat.swap) - pub swap: ::protobuf::MessageField, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.MemoryStat.kernel) - pub kernel: ::protobuf::MessageField, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.MemoryStat.kernel_tcp) - pub kernel_tcp: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:io.containerd.cgroups.v1.MemoryStat.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a MemoryStat { - fn default() -> &'a MemoryStat { - ::default_instance() - } -} - -impl MemoryStat { - pub fn new() -> MemoryStat { - ::std::default::Default::default() - } - - // uint64 cache = 1; - - pub fn cache(&self) -> u64 { - self.cache - } - - pub fn clear_cache(&mut self) { - self.cache = 0; - } - - // Param is passed by value, moved - pub fn set_cache(&mut self, v: u64) { - self.cache = v; - } - - // uint64 rss = 2; - - pub fn rss(&self) -> u64 { - self.rss - } - - pub fn clear_rss(&mut self) { - self.rss = 0; - } - - // Param is passed by value, moved - pub fn set_rss(&mut self, v: u64) { - self.rss = v; - } - - // uint64 rss_huge = 3; - - pub fn rss_huge(&self) -> u64 { - self.rss_huge - } - - pub fn clear_rss_huge(&mut self) { - self.rss_huge = 0; - } - - // Param is passed by value, moved - pub fn set_rss_huge(&mut self, v: u64) { - self.rss_huge = v; - } - - // uint64 mapped_file = 4; - - pub fn mapped_file(&self) -> u64 { - self.mapped_file - } - - pub fn clear_mapped_file(&mut self) { - self.mapped_file = 0; - } - - // Param is passed by value, moved - pub fn set_mapped_file(&mut self, v: u64) { - self.mapped_file = v; - } - - // uint64 dirty = 5; - - pub fn dirty(&self) -> u64 { - self.dirty - } - - pub fn clear_dirty(&mut self) { - self.dirty = 0; - } - - // Param is passed by value, moved - pub fn set_dirty(&mut self, v: u64) { - self.dirty = v; - } - - // uint64 writeback = 6; - - pub fn writeback(&self) -> u64 { - self.writeback - } - - pub fn clear_writeback(&mut self) { - self.writeback = 0; - } - - // Param is passed by value, moved - pub fn set_writeback(&mut self, v: u64) { - self.writeback = v; - } - - // uint64 pg_pg_in = 7; - - pub fn pg_pg_in(&self) -> u64 { - self.pg_pg_in - } - - pub fn clear_pg_pg_in(&mut self) { - self.pg_pg_in = 0; - } - - // Param is passed by value, moved - pub fn set_pg_pg_in(&mut self, v: u64) { - self.pg_pg_in = v; - } - - // uint64 pg_pg_out = 8; - - pub fn pg_pg_out(&self) -> u64 { - self.pg_pg_out - } - - pub fn clear_pg_pg_out(&mut self) { - self.pg_pg_out = 0; - } - - // Param is passed by value, moved - pub fn set_pg_pg_out(&mut self, v: u64) { - self.pg_pg_out = v; - } - - // uint64 pg_fault = 9; - - pub fn pg_fault(&self) -> u64 { - self.pg_fault - } - - pub fn clear_pg_fault(&mut self) { - self.pg_fault = 0; - } - - // Param is passed by value, moved - pub fn set_pg_fault(&mut self, v: u64) { - self.pg_fault = v; - } - - // uint64 pg_maj_fault = 10; - - pub fn pg_maj_fault(&self) -> u64 { - self.pg_maj_fault - } - - pub fn clear_pg_maj_fault(&mut self) { - self.pg_maj_fault = 0; - } - - // Param is passed by value, moved - pub fn set_pg_maj_fault(&mut self, v: u64) { - self.pg_maj_fault = v; - } - - // uint64 inactive_anon = 11; - - pub fn inactive_anon(&self) -> u64 { - self.inactive_anon - } - - pub fn clear_inactive_anon(&mut self) { - self.inactive_anon = 0; - } - - // Param is passed by value, moved - pub fn set_inactive_anon(&mut self, v: u64) { - self.inactive_anon = v; - } - - // uint64 active_anon = 12; - - pub fn active_anon(&self) -> u64 { - self.active_anon - } - - pub fn clear_active_anon(&mut self) { - self.active_anon = 0; - } - - // Param is passed by value, moved - pub fn set_active_anon(&mut self, v: u64) { - self.active_anon = v; - } - - // uint64 inactive_file = 13; - - pub fn inactive_file(&self) -> u64 { - self.inactive_file - } - - pub fn clear_inactive_file(&mut self) { - self.inactive_file = 0; - } - - // Param is passed by value, moved - pub fn set_inactive_file(&mut self, v: u64) { - self.inactive_file = v; - } - - // uint64 active_file = 14; - - pub fn active_file(&self) -> u64 { - self.active_file - } - - pub fn clear_active_file(&mut self) { - self.active_file = 0; - } - - // Param is passed by value, moved - pub fn set_active_file(&mut self, v: u64) { - self.active_file = v; - } - - // uint64 unevictable = 15; - - pub fn unevictable(&self) -> u64 { - self.unevictable - } - - pub fn clear_unevictable(&mut self) { - self.unevictable = 0; - } - - // Param is passed by value, moved - pub fn set_unevictable(&mut self, v: u64) { - self.unevictable = v; - } - - // uint64 hierarchical_memory_limit = 16; - - pub fn hierarchical_memory_limit(&self) -> u64 { - self.hierarchical_memory_limit - } - - pub fn clear_hierarchical_memory_limit(&mut self) { - self.hierarchical_memory_limit = 0; - } - - // Param is passed by value, moved - pub fn set_hierarchical_memory_limit(&mut self, v: u64) { - self.hierarchical_memory_limit = v; - } - - // uint64 hierarchical_swap_limit = 17; - - pub fn hierarchical_swap_limit(&self) -> u64 { - self.hierarchical_swap_limit - } - - pub fn clear_hierarchical_swap_limit(&mut self) { - self.hierarchical_swap_limit = 0; - } - - // Param is passed by value, moved - pub fn set_hierarchical_swap_limit(&mut self, v: u64) { - self.hierarchical_swap_limit = v; - } - - // uint64 total_cache = 18; - - pub fn total_cache(&self) -> u64 { - self.total_cache - } - - pub fn clear_total_cache(&mut self) { - self.total_cache = 0; - } - - // Param is passed by value, moved - pub fn set_total_cache(&mut self, v: u64) { - self.total_cache = v; - } - - // uint64 total_rss = 19; - - pub fn total_rss(&self) -> u64 { - self.total_rss - } - - pub fn clear_total_rss(&mut self) { - self.total_rss = 0; - } - - // Param is passed by value, moved - pub fn set_total_rss(&mut self, v: u64) { - self.total_rss = v; - } - - // uint64 total_rss_huge = 20; - - pub fn total_rss_huge(&self) -> u64 { - self.total_rss_huge - } - - pub fn clear_total_rss_huge(&mut self) { - self.total_rss_huge = 0; - } - - // Param is passed by value, moved - pub fn set_total_rss_huge(&mut self, v: u64) { - self.total_rss_huge = v; - } - - // uint64 total_mapped_file = 21; - - pub fn total_mapped_file(&self) -> u64 { - self.total_mapped_file - } - - pub fn clear_total_mapped_file(&mut self) { - self.total_mapped_file = 0; - } - - // Param is passed by value, moved - pub fn set_total_mapped_file(&mut self, v: u64) { - self.total_mapped_file = v; - } - - // uint64 total_dirty = 22; - - pub fn total_dirty(&self) -> u64 { - self.total_dirty - } - - pub fn clear_total_dirty(&mut self) { - self.total_dirty = 0; - } - - // Param is passed by value, moved - pub fn set_total_dirty(&mut self, v: u64) { - self.total_dirty = v; - } - - // uint64 total_writeback = 23; - - pub fn total_writeback(&self) -> u64 { - self.total_writeback - } - - pub fn clear_total_writeback(&mut self) { - self.total_writeback = 0; - } - - // Param is passed by value, moved - pub fn set_total_writeback(&mut self, v: u64) { - self.total_writeback = v; - } - - // uint64 total_pg_pg_in = 24; - - pub fn total_pg_pg_in(&self) -> u64 { - self.total_pg_pg_in - } - - pub fn clear_total_pg_pg_in(&mut self) { - self.total_pg_pg_in = 0; - } - - // Param is passed by value, moved - pub fn set_total_pg_pg_in(&mut self, v: u64) { - self.total_pg_pg_in = v; - } - - // uint64 total_pg_pg_out = 25; - - pub fn total_pg_pg_out(&self) -> u64 { - self.total_pg_pg_out - } - - pub fn clear_total_pg_pg_out(&mut self) { - self.total_pg_pg_out = 0; - } - - // Param is passed by value, moved - pub fn set_total_pg_pg_out(&mut self, v: u64) { - self.total_pg_pg_out = v; - } - - // uint64 total_pg_fault = 26; - - pub fn total_pg_fault(&self) -> u64 { - self.total_pg_fault - } - - pub fn clear_total_pg_fault(&mut self) { - self.total_pg_fault = 0; - } - - // Param is passed by value, moved - pub fn set_total_pg_fault(&mut self, v: u64) { - self.total_pg_fault = v; - } - - // uint64 total_pg_maj_fault = 27; - - pub fn total_pg_maj_fault(&self) -> u64 { - self.total_pg_maj_fault - } - - pub fn clear_total_pg_maj_fault(&mut self) { - self.total_pg_maj_fault = 0; - } - - // Param is passed by value, moved - pub fn set_total_pg_maj_fault(&mut self, v: u64) { - self.total_pg_maj_fault = v; - } - - // uint64 total_inactive_anon = 28; - - pub fn total_inactive_anon(&self) -> u64 { - self.total_inactive_anon - } - - pub fn clear_total_inactive_anon(&mut self) { - self.total_inactive_anon = 0; - } - - // Param is passed by value, moved - pub fn set_total_inactive_anon(&mut self, v: u64) { - self.total_inactive_anon = v; - } - - // uint64 total_active_anon = 29; - - pub fn total_active_anon(&self) -> u64 { - self.total_active_anon - } - - pub fn clear_total_active_anon(&mut self) { - self.total_active_anon = 0; - } - - // Param is passed by value, moved - pub fn set_total_active_anon(&mut self, v: u64) { - self.total_active_anon = v; - } - - // uint64 total_inactive_file = 30; - - pub fn total_inactive_file(&self) -> u64 { - self.total_inactive_file - } - - pub fn clear_total_inactive_file(&mut self) { - self.total_inactive_file = 0; - } - - // Param is passed by value, moved - pub fn set_total_inactive_file(&mut self, v: u64) { - self.total_inactive_file = v; - } - - // uint64 total_active_file = 31; - - pub fn total_active_file(&self) -> u64 { - self.total_active_file - } - - pub fn clear_total_active_file(&mut self) { - self.total_active_file = 0; - } - - // Param is passed by value, moved - pub fn set_total_active_file(&mut self, v: u64) { - self.total_active_file = v; - } - - // uint64 total_unevictable = 32; - - pub fn total_unevictable(&self) -> u64 { - self.total_unevictable - } - - pub fn clear_total_unevictable(&mut self) { - self.total_unevictable = 0; - } - - // Param is passed by value, moved - pub fn set_total_unevictable(&mut self, v: u64) { - self.total_unevictable = v; - } - - // .io.containerd.cgroups.v1.MemoryEntry usage = 33; - - pub fn usage(&self) -> &MemoryEntry { - self.usage.as_ref().unwrap_or_else(|| ::default_instance()) - } - - pub fn clear_usage(&mut self) { - self.usage.clear(); - } - - pub fn has_usage(&self) -> bool { - self.usage.is_some() - } - - // Param is passed by value, moved - pub fn set_usage(&mut self, v: MemoryEntry) { - self.usage = ::protobuf::MessageField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_usage(&mut self) -> &mut MemoryEntry { - self.usage.mut_or_insert_default() - } - - // Take field - pub fn take_usage(&mut self) -> MemoryEntry { - self.usage.take().unwrap_or_else(|| MemoryEntry::new()) - } - - // .io.containerd.cgroups.v1.MemoryEntry swap = 34; - - pub fn swap(&self) -> &MemoryEntry { - self.swap.as_ref().unwrap_or_else(|| ::default_instance()) - } - - pub fn clear_swap(&mut self) { - self.swap.clear(); - } - - pub fn has_swap(&self) -> bool { - self.swap.is_some() - } - - // Param is passed by value, moved - pub fn set_swap(&mut self, v: MemoryEntry) { - self.swap = ::protobuf::MessageField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_swap(&mut self) -> &mut MemoryEntry { - self.swap.mut_or_insert_default() - } - - // Take field - pub fn take_swap(&mut self) -> MemoryEntry { - self.swap.take().unwrap_or_else(|| MemoryEntry::new()) - } - - // .io.containerd.cgroups.v1.MemoryEntry kernel = 35; - - pub fn kernel(&self) -> &MemoryEntry { - self.kernel.as_ref().unwrap_or_else(|| ::default_instance()) - } - - pub fn clear_kernel(&mut self) { - self.kernel.clear(); - } - - pub fn has_kernel(&self) -> bool { - self.kernel.is_some() - } - - // Param is passed by value, moved - pub fn set_kernel(&mut self, v: MemoryEntry) { - self.kernel = ::protobuf::MessageField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_kernel(&mut self) -> &mut MemoryEntry { - self.kernel.mut_or_insert_default() - } - - // Take field - pub fn take_kernel(&mut self) -> MemoryEntry { - self.kernel.take().unwrap_or_else(|| MemoryEntry::new()) - } - - // .io.containerd.cgroups.v1.MemoryEntry kernel_tcp = 36; - - pub fn kernel_tcp(&self) -> &MemoryEntry { - self.kernel_tcp.as_ref().unwrap_or_else(|| ::default_instance()) - } - - pub fn clear_kernel_tcp(&mut self) { - self.kernel_tcp.clear(); - } - - pub fn has_kernel_tcp(&self) -> bool { - self.kernel_tcp.is_some() - } - - // Param is passed by value, moved - pub fn set_kernel_tcp(&mut self, v: MemoryEntry) { - self.kernel_tcp = ::protobuf::MessageField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_kernel_tcp(&mut self) -> &mut MemoryEntry { - self.kernel_tcp.mut_or_insert_default() - } - - // Take field - pub fn take_kernel_tcp(&mut self) -> MemoryEntry { - self.kernel_tcp.take().unwrap_or_else(|| MemoryEntry::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(36); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "cache", - |m: &MemoryStat| { &m.cache }, - |m: &mut MemoryStat| { &mut m.cache }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "rss", - |m: &MemoryStat| { &m.rss }, - |m: &mut MemoryStat| { &mut m.rss }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "rss_huge", - |m: &MemoryStat| { &m.rss_huge }, - |m: &mut MemoryStat| { &mut m.rss_huge }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "mapped_file", - |m: &MemoryStat| { &m.mapped_file }, - |m: &mut MemoryStat| { &mut m.mapped_file }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "dirty", - |m: &MemoryStat| { &m.dirty }, - |m: &mut MemoryStat| { &mut m.dirty }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "writeback", - |m: &MemoryStat| { &m.writeback }, - |m: &mut MemoryStat| { &mut m.writeback }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "pg_pg_in", - |m: &MemoryStat| { &m.pg_pg_in }, - |m: &mut MemoryStat| { &mut m.pg_pg_in }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "pg_pg_out", - |m: &MemoryStat| { &m.pg_pg_out }, - |m: &mut MemoryStat| { &mut m.pg_pg_out }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "pg_fault", - |m: &MemoryStat| { &m.pg_fault }, - |m: &mut MemoryStat| { &mut m.pg_fault }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "pg_maj_fault", - |m: &MemoryStat| { &m.pg_maj_fault }, - |m: &mut MemoryStat| { &mut m.pg_maj_fault }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "inactive_anon", - |m: &MemoryStat| { &m.inactive_anon }, - |m: &mut MemoryStat| { &mut m.inactive_anon }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "active_anon", - |m: &MemoryStat| { &m.active_anon }, - |m: &mut MemoryStat| { &mut m.active_anon }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "inactive_file", - |m: &MemoryStat| { &m.inactive_file }, - |m: &mut MemoryStat| { &mut m.inactive_file }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "active_file", - |m: &MemoryStat| { &m.active_file }, - |m: &mut MemoryStat| { &mut m.active_file }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "unevictable", - |m: &MemoryStat| { &m.unevictable }, - |m: &mut MemoryStat| { &mut m.unevictable }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "hierarchical_memory_limit", - |m: &MemoryStat| { &m.hierarchical_memory_limit }, - |m: &mut MemoryStat| { &mut m.hierarchical_memory_limit }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "hierarchical_swap_limit", - |m: &MemoryStat| { &m.hierarchical_swap_limit }, - |m: &mut MemoryStat| { &mut m.hierarchical_swap_limit }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "total_cache", - |m: &MemoryStat| { &m.total_cache }, - |m: &mut MemoryStat| { &mut m.total_cache }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "total_rss", - |m: &MemoryStat| { &m.total_rss }, - |m: &mut MemoryStat| { &mut m.total_rss }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "total_rss_huge", - |m: &MemoryStat| { &m.total_rss_huge }, - |m: &mut MemoryStat| { &mut m.total_rss_huge }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "total_mapped_file", - |m: &MemoryStat| { &m.total_mapped_file }, - |m: &mut MemoryStat| { &mut m.total_mapped_file }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "total_dirty", - |m: &MemoryStat| { &m.total_dirty }, - |m: &mut MemoryStat| { &mut m.total_dirty }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "total_writeback", - |m: &MemoryStat| { &m.total_writeback }, - |m: &mut MemoryStat| { &mut m.total_writeback }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "total_pg_pg_in", - |m: &MemoryStat| { &m.total_pg_pg_in }, - |m: &mut MemoryStat| { &mut m.total_pg_pg_in }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "total_pg_pg_out", - |m: &MemoryStat| { &m.total_pg_pg_out }, - |m: &mut MemoryStat| { &mut m.total_pg_pg_out }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "total_pg_fault", - |m: &MemoryStat| { &m.total_pg_fault }, - |m: &mut MemoryStat| { &mut m.total_pg_fault }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "total_pg_maj_fault", - |m: &MemoryStat| { &m.total_pg_maj_fault }, - |m: &mut MemoryStat| { &mut m.total_pg_maj_fault }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "total_inactive_anon", - |m: &MemoryStat| { &m.total_inactive_anon }, - |m: &mut MemoryStat| { &mut m.total_inactive_anon }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "total_active_anon", - |m: &MemoryStat| { &m.total_active_anon }, - |m: &mut MemoryStat| { &mut m.total_active_anon }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "total_inactive_file", - |m: &MemoryStat| { &m.total_inactive_file }, - |m: &mut MemoryStat| { &mut m.total_inactive_file }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "total_active_file", - |m: &MemoryStat| { &m.total_active_file }, - |m: &mut MemoryStat| { &mut m.total_active_file }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "total_unevictable", - |m: &MemoryStat| { &m.total_unevictable }, - |m: &mut MemoryStat| { &mut m.total_unevictable }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MemoryEntry>( - "usage", - |m: &MemoryStat| { &m.usage }, - |m: &mut MemoryStat| { &mut m.usage }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MemoryEntry>( - "swap", - |m: &MemoryStat| { &m.swap }, - |m: &mut MemoryStat| { &mut m.swap }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MemoryEntry>( - "kernel", - |m: &MemoryStat| { &m.kernel }, - |m: &mut MemoryStat| { &mut m.kernel }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MemoryEntry>( - "kernel_tcp", - |m: &MemoryStat| { &m.kernel_tcp }, - |m: &mut MemoryStat| { &mut m.kernel_tcp }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "MemoryStat", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for MemoryStat { - const NAME: &'static str = "MemoryStat"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.cache = is.read_uint64()?; - }, - 16 => { - self.rss = is.read_uint64()?; - }, - 24 => { - self.rss_huge = is.read_uint64()?; - }, - 32 => { - self.mapped_file = is.read_uint64()?; - }, - 40 => { - self.dirty = is.read_uint64()?; - }, - 48 => { - self.writeback = is.read_uint64()?; - }, - 56 => { - self.pg_pg_in = is.read_uint64()?; - }, - 64 => { - self.pg_pg_out = is.read_uint64()?; - }, - 72 => { - self.pg_fault = is.read_uint64()?; - }, - 80 => { - self.pg_maj_fault = is.read_uint64()?; - }, - 88 => { - self.inactive_anon = is.read_uint64()?; - }, - 96 => { - self.active_anon = is.read_uint64()?; - }, - 104 => { - self.inactive_file = is.read_uint64()?; - }, - 112 => { - self.active_file = is.read_uint64()?; - }, - 120 => { - self.unevictable = is.read_uint64()?; - }, - 128 => { - self.hierarchical_memory_limit = is.read_uint64()?; - }, - 136 => { - self.hierarchical_swap_limit = is.read_uint64()?; - }, - 144 => { - self.total_cache = is.read_uint64()?; - }, - 152 => { - self.total_rss = is.read_uint64()?; - }, - 160 => { - self.total_rss_huge = is.read_uint64()?; - }, - 168 => { - self.total_mapped_file = is.read_uint64()?; - }, - 176 => { - self.total_dirty = is.read_uint64()?; - }, - 184 => { - self.total_writeback = is.read_uint64()?; - }, - 192 => { - self.total_pg_pg_in = is.read_uint64()?; - }, - 200 => { - self.total_pg_pg_out = is.read_uint64()?; - }, - 208 => { - self.total_pg_fault = is.read_uint64()?; - }, - 216 => { - self.total_pg_maj_fault = is.read_uint64()?; - }, - 224 => { - self.total_inactive_anon = is.read_uint64()?; - }, - 232 => { - self.total_active_anon = is.read_uint64()?; - }, - 240 => { - self.total_inactive_file = is.read_uint64()?; - }, - 248 => { - self.total_active_file = is.read_uint64()?; - }, - 256 => { - self.total_unevictable = is.read_uint64()?; - }, - 266 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.usage)?; - }, - 274 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.swap)?; - }, - 282 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.kernel)?; - }, - 290 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.kernel_tcp)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.cache != 0 { - my_size += ::protobuf::rt::uint64_size(1, self.cache); - } - if self.rss != 0 { - my_size += ::protobuf::rt::uint64_size(2, self.rss); - } - if self.rss_huge != 0 { - my_size += ::protobuf::rt::uint64_size(3, self.rss_huge); - } - if self.mapped_file != 0 { - my_size += ::protobuf::rt::uint64_size(4, self.mapped_file); - } - if self.dirty != 0 { - my_size += ::protobuf::rt::uint64_size(5, self.dirty); - } - if self.writeback != 0 { - my_size += ::protobuf::rt::uint64_size(6, self.writeback); - } - if self.pg_pg_in != 0 { - my_size += ::protobuf::rt::uint64_size(7, self.pg_pg_in); - } - if self.pg_pg_out != 0 { - my_size += ::protobuf::rt::uint64_size(8, self.pg_pg_out); - } - if self.pg_fault != 0 { - my_size += ::protobuf::rt::uint64_size(9, self.pg_fault); - } - if self.pg_maj_fault != 0 { - my_size += ::protobuf::rt::uint64_size(10, self.pg_maj_fault); - } - if self.inactive_anon != 0 { - my_size += ::protobuf::rt::uint64_size(11, self.inactive_anon); - } - if self.active_anon != 0 { - my_size += ::protobuf::rt::uint64_size(12, self.active_anon); - } - if self.inactive_file != 0 { - my_size += ::protobuf::rt::uint64_size(13, self.inactive_file); - } - if self.active_file != 0 { - my_size += ::protobuf::rt::uint64_size(14, self.active_file); - } - if self.unevictable != 0 { - my_size += ::protobuf::rt::uint64_size(15, self.unevictable); - } - if self.hierarchical_memory_limit != 0 { - my_size += ::protobuf::rt::uint64_size(16, self.hierarchical_memory_limit); - } - if self.hierarchical_swap_limit != 0 { - my_size += ::protobuf::rt::uint64_size(17, self.hierarchical_swap_limit); - } - if self.total_cache != 0 { - my_size += ::protobuf::rt::uint64_size(18, self.total_cache); - } - if self.total_rss != 0 { - my_size += ::protobuf::rt::uint64_size(19, self.total_rss); - } - if self.total_rss_huge != 0 { - my_size += ::protobuf::rt::uint64_size(20, self.total_rss_huge); - } - if self.total_mapped_file != 0 { - my_size += ::protobuf::rt::uint64_size(21, self.total_mapped_file); - } - if self.total_dirty != 0 { - my_size += ::protobuf::rt::uint64_size(22, self.total_dirty); - } - if self.total_writeback != 0 { - my_size += ::protobuf::rt::uint64_size(23, self.total_writeback); - } - if self.total_pg_pg_in != 0 { - my_size += ::protobuf::rt::uint64_size(24, self.total_pg_pg_in); - } - if self.total_pg_pg_out != 0 { - my_size += ::protobuf::rt::uint64_size(25, self.total_pg_pg_out); - } - if self.total_pg_fault != 0 { - my_size += ::protobuf::rt::uint64_size(26, self.total_pg_fault); - } - if self.total_pg_maj_fault != 0 { - my_size += ::protobuf::rt::uint64_size(27, self.total_pg_maj_fault); - } - if self.total_inactive_anon != 0 { - my_size += ::protobuf::rt::uint64_size(28, self.total_inactive_anon); - } - if self.total_active_anon != 0 { - my_size += ::protobuf::rt::uint64_size(29, self.total_active_anon); - } - if self.total_inactive_file != 0 { - my_size += ::protobuf::rt::uint64_size(30, self.total_inactive_file); - } - if self.total_active_file != 0 { - my_size += ::protobuf::rt::uint64_size(31, self.total_active_file); - } - if self.total_unevictable != 0 { - my_size += ::protobuf::rt::uint64_size(32, self.total_unevictable); - } - if let Some(v) = self.usage.as_ref() { - let len = v.compute_size(); - my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.swap.as_ref() { - let len = v.compute_size(); - my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.kernel.as_ref() { - let len = v.compute_size(); - my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.kernel_tcp.as_ref() { - let len = v.compute_size(); - my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.cache != 0 { - os.write_uint64(1, self.cache)?; - } - if self.rss != 0 { - os.write_uint64(2, self.rss)?; - } - if self.rss_huge != 0 { - os.write_uint64(3, self.rss_huge)?; - } - if self.mapped_file != 0 { - os.write_uint64(4, self.mapped_file)?; - } - if self.dirty != 0 { - os.write_uint64(5, self.dirty)?; - } - if self.writeback != 0 { - os.write_uint64(6, self.writeback)?; - } - if self.pg_pg_in != 0 { - os.write_uint64(7, self.pg_pg_in)?; - } - if self.pg_pg_out != 0 { - os.write_uint64(8, self.pg_pg_out)?; - } - if self.pg_fault != 0 { - os.write_uint64(9, self.pg_fault)?; - } - if self.pg_maj_fault != 0 { - os.write_uint64(10, self.pg_maj_fault)?; - } - if self.inactive_anon != 0 { - os.write_uint64(11, self.inactive_anon)?; - } - if self.active_anon != 0 { - os.write_uint64(12, self.active_anon)?; - } - if self.inactive_file != 0 { - os.write_uint64(13, self.inactive_file)?; - } - if self.active_file != 0 { - os.write_uint64(14, self.active_file)?; - } - if self.unevictable != 0 { - os.write_uint64(15, self.unevictable)?; - } - if self.hierarchical_memory_limit != 0 { - os.write_uint64(16, self.hierarchical_memory_limit)?; - } - if self.hierarchical_swap_limit != 0 { - os.write_uint64(17, self.hierarchical_swap_limit)?; - } - if self.total_cache != 0 { - os.write_uint64(18, self.total_cache)?; - } - if self.total_rss != 0 { - os.write_uint64(19, self.total_rss)?; - } - if self.total_rss_huge != 0 { - os.write_uint64(20, self.total_rss_huge)?; - } - if self.total_mapped_file != 0 { - os.write_uint64(21, self.total_mapped_file)?; - } - if self.total_dirty != 0 { - os.write_uint64(22, self.total_dirty)?; - } - if self.total_writeback != 0 { - os.write_uint64(23, self.total_writeback)?; - } - if self.total_pg_pg_in != 0 { - os.write_uint64(24, self.total_pg_pg_in)?; - } - if self.total_pg_pg_out != 0 { - os.write_uint64(25, self.total_pg_pg_out)?; - } - if self.total_pg_fault != 0 { - os.write_uint64(26, self.total_pg_fault)?; - } - if self.total_pg_maj_fault != 0 { - os.write_uint64(27, self.total_pg_maj_fault)?; - } - if self.total_inactive_anon != 0 { - os.write_uint64(28, self.total_inactive_anon)?; - } - if self.total_active_anon != 0 { - os.write_uint64(29, self.total_active_anon)?; - } - if self.total_inactive_file != 0 { - os.write_uint64(30, self.total_inactive_file)?; - } - if self.total_active_file != 0 { - os.write_uint64(31, self.total_active_file)?; - } - if self.total_unevictable != 0 { - os.write_uint64(32, self.total_unevictable)?; - } - if let Some(v) = self.usage.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(33, v, os)?; - } - if let Some(v) = self.swap.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(34, v, os)?; - } - if let Some(v) = self.kernel.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(35, v, os)?; - } - if let Some(v) = self.kernel_tcp.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(36, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> MemoryStat { - MemoryStat::new() - } - - fn clear(&mut self) { - self.cache = 0; - self.rss = 0; - self.rss_huge = 0; - self.mapped_file = 0; - self.dirty = 0; - self.writeback = 0; - self.pg_pg_in = 0; - self.pg_pg_out = 0; - self.pg_fault = 0; - self.pg_maj_fault = 0; - self.inactive_anon = 0; - self.active_anon = 0; - self.inactive_file = 0; - self.active_file = 0; - self.unevictable = 0; - self.hierarchical_memory_limit = 0; - self.hierarchical_swap_limit = 0; - self.total_cache = 0; - self.total_rss = 0; - self.total_rss_huge = 0; - self.total_mapped_file = 0; - self.total_dirty = 0; - self.total_writeback = 0; - self.total_pg_pg_in = 0; - self.total_pg_pg_out = 0; - self.total_pg_fault = 0; - self.total_pg_maj_fault = 0; - self.total_inactive_anon = 0; - self.total_active_anon = 0; - self.total_inactive_file = 0; - self.total_active_file = 0; - self.total_unevictable = 0; - self.usage.clear(); - self.swap.clear(); - self.kernel.clear(); - self.kernel_tcp.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static MemoryStat { - static instance: MemoryStat = MemoryStat { - cache: 0, - rss: 0, - rss_huge: 0, - mapped_file: 0, - dirty: 0, - writeback: 0, - pg_pg_in: 0, - pg_pg_out: 0, - pg_fault: 0, - pg_maj_fault: 0, - inactive_anon: 0, - active_anon: 0, - inactive_file: 0, - active_file: 0, - unevictable: 0, - hierarchical_memory_limit: 0, - hierarchical_swap_limit: 0, - total_cache: 0, - total_rss: 0, - total_rss_huge: 0, - total_mapped_file: 0, - total_dirty: 0, - total_writeback: 0, - total_pg_pg_in: 0, - total_pg_pg_out: 0, - total_pg_fault: 0, - total_pg_maj_fault: 0, - total_inactive_anon: 0, - total_active_anon: 0, - total_inactive_file: 0, - total_active_file: 0, - total_unevictable: 0, - usage: ::protobuf::MessageField::none(), - swap: ::protobuf::MessageField::none(), - kernel: ::protobuf::MessageField::none(), - kernel_tcp: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for MemoryStat { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("MemoryStat").unwrap()).clone() - } -} - -impl ::std::fmt::Display for MemoryStat { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for MemoryStat { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:io.containerd.cgroups.v1.MemoryEntry) -pub struct MemoryEntry { - // message fields - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.MemoryEntry.limit) - pub limit: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.MemoryEntry.usage) - pub usage: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.MemoryEntry.max) - pub max: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.MemoryEntry.failcnt) - pub failcnt: u64, - // special fields - // @@protoc_insertion_point(special_field:io.containerd.cgroups.v1.MemoryEntry.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a MemoryEntry { - fn default() -> &'a MemoryEntry { - ::default_instance() - } -} - -impl MemoryEntry { - pub fn new() -> MemoryEntry { - ::std::default::Default::default() - } - - // uint64 limit = 1; - - pub fn limit(&self) -> u64 { - self.limit - } - - pub fn clear_limit(&mut self) { - self.limit = 0; - } - - // Param is passed by value, moved - pub fn set_limit(&mut self, v: u64) { - self.limit = v; - } - - // uint64 usage = 2; - - pub fn usage(&self) -> u64 { - self.usage - } - - pub fn clear_usage(&mut self) { - self.usage = 0; - } - - // Param is passed by value, moved - pub fn set_usage(&mut self, v: u64) { - self.usage = v; - } - - // uint64 max = 3; - - pub fn max(&self) -> u64 { - self.max - } - - pub fn clear_max(&mut self) { - self.max = 0; - } - - // Param is passed by value, moved - pub fn set_max(&mut self, v: u64) { - self.max = v; - } - - // uint64 failcnt = 4; - - pub fn failcnt(&self) -> u64 { - self.failcnt - } - - pub fn clear_failcnt(&mut self) { - self.failcnt = 0; - } - - // Param is passed by value, moved - pub fn set_failcnt(&mut self, v: u64) { - self.failcnt = v; - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(4); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "limit", - |m: &MemoryEntry| { &m.limit }, - |m: &mut MemoryEntry| { &mut m.limit }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "usage", - |m: &MemoryEntry| { &m.usage }, - |m: &mut MemoryEntry| { &mut m.usage }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "max", - |m: &MemoryEntry| { &m.max }, - |m: &mut MemoryEntry| { &mut m.max }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "failcnt", - |m: &MemoryEntry| { &m.failcnt }, - |m: &mut MemoryEntry| { &mut m.failcnt }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "MemoryEntry", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for MemoryEntry { - const NAME: &'static str = "MemoryEntry"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.limit = is.read_uint64()?; - }, - 16 => { - self.usage = is.read_uint64()?; - }, - 24 => { - self.max = is.read_uint64()?; - }, - 32 => { - self.failcnt = is.read_uint64()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.limit != 0 { - my_size += ::protobuf::rt::uint64_size(1, self.limit); - } - if self.usage != 0 { - my_size += ::protobuf::rt::uint64_size(2, self.usage); - } - if self.max != 0 { - my_size += ::protobuf::rt::uint64_size(3, self.max); - } - if self.failcnt != 0 { - my_size += ::protobuf::rt::uint64_size(4, self.failcnt); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.limit != 0 { - os.write_uint64(1, self.limit)?; - } - if self.usage != 0 { - os.write_uint64(2, self.usage)?; - } - if self.max != 0 { - os.write_uint64(3, self.max)?; - } - if self.failcnt != 0 { - os.write_uint64(4, self.failcnt)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> MemoryEntry { - MemoryEntry::new() - } - - fn clear(&mut self) { - self.limit = 0; - self.usage = 0; - self.max = 0; - self.failcnt = 0; - self.special_fields.clear(); - } - - fn default_instance() -> &'static MemoryEntry { - static instance: MemoryEntry = MemoryEntry { - limit: 0, - usage: 0, - max: 0, - failcnt: 0, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for MemoryEntry { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("MemoryEntry").unwrap()).clone() - } -} - -impl ::std::fmt::Display for MemoryEntry { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for MemoryEntry { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:io.containerd.cgroups.v1.MemoryOomControl) -pub struct MemoryOomControl { - // message fields - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.MemoryOomControl.oom_kill_disable) - pub oom_kill_disable: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.MemoryOomControl.under_oom) - pub under_oom: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.MemoryOomControl.oom_kill) - pub oom_kill: u64, - // special fields - // @@protoc_insertion_point(special_field:io.containerd.cgroups.v1.MemoryOomControl.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a MemoryOomControl { - fn default() -> &'a MemoryOomControl { - ::default_instance() - } -} - -impl MemoryOomControl { - pub fn new() -> MemoryOomControl { - ::std::default::Default::default() - } - - // uint64 oom_kill_disable = 1; - - pub fn oom_kill_disable(&self) -> u64 { - self.oom_kill_disable - } - - pub fn clear_oom_kill_disable(&mut self) { - self.oom_kill_disable = 0; - } - - // Param is passed by value, moved - pub fn set_oom_kill_disable(&mut self, v: u64) { - self.oom_kill_disable = v; - } - - // uint64 under_oom = 2; - - pub fn under_oom(&self) -> u64 { - self.under_oom - } - - pub fn clear_under_oom(&mut self) { - self.under_oom = 0; - } - - // Param is passed by value, moved - pub fn set_under_oom(&mut self, v: u64) { - self.under_oom = v; - } - - // uint64 oom_kill = 3; - - pub fn oom_kill(&self) -> u64 { - self.oom_kill - } - - pub fn clear_oom_kill(&mut self) { - self.oom_kill = 0; - } - - // Param is passed by value, moved - pub fn set_oom_kill(&mut self, v: u64) { - self.oom_kill = v; - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(3); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "oom_kill_disable", - |m: &MemoryOomControl| { &m.oom_kill_disable }, - |m: &mut MemoryOomControl| { &mut m.oom_kill_disable }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "under_oom", - |m: &MemoryOomControl| { &m.under_oom }, - |m: &mut MemoryOomControl| { &mut m.under_oom }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "oom_kill", - |m: &MemoryOomControl| { &m.oom_kill }, - |m: &mut MemoryOomControl| { &mut m.oom_kill }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "MemoryOomControl", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for MemoryOomControl { - const NAME: &'static str = "MemoryOomControl"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.oom_kill_disable = is.read_uint64()?; - }, - 16 => { - self.under_oom = is.read_uint64()?; - }, - 24 => { - self.oom_kill = is.read_uint64()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.oom_kill_disable != 0 { - my_size += ::protobuf::rt::uint64_size(1, self.oom_kill_disable); - } - if self.under_oom != 0 { - my_size += ::protobuf::rt::uint64_size(2, self.under_oom); - } - if self.oom_kill != 0 { - my_size += ::protobuf::rt::uint64_size(3, self.oom_kill); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.oom_kill_disable != 0 { - os.write_uint64(1, self.oom_kill_disable)?; - } - if self.under_oom != 0 { - os.write_uint64(2, self.under_oom)?; - } - if self.oom_kill != 0 { - os.write_uint64(3, self.oom_kill)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> MemoryOomControl { - MemoryOomControl::new() - } - - fn clear(&mut self) { - self.oom_kill_disable = 0; - self.under_oom = 0; - self.oom_kill = 0; - self.special_fields.clear(); - } - - fn default_instance() -> &'static MemoryOomControl { - static instance: MemoryOomControl = MemoryOomControl { - oom_kill_disable: 0, - under_oom: 0, - oom_kill: 0, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for MemoryOomControl { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("MemoryOomControl").unwrap()).clone() - } -} - -impl ::std::fmt::Display for MemoryOomControl { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for MemoryOomControl { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:io.containerd.cgroups.v1.BlkIOStat) -pub struct BlkIOStat { - // message fields - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.BlkIOStat.io_service_bytes_recursive) - pub io_service_bytes_recursive: ::std::vec::Vec, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.BlkIOStat.io_serviced_recursive) - pub io_serviced_recursive: ::std::vec::Vec, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.BlkIOStat.io_queued_recursive) - pub io_queued_recursive: ::std::vec::Vec, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.BlkIOStat.io_service_time_recursive) - pub io_service_time_recursive: ::std::vec::Vec, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.BlkIOStat.io_wait_time_recursive) - pub io_wait_time_recursive: ::std::vec::Vec, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.BlkIOStat.io_merged_recursive) - pub io_merged_recursive: ::std::vec::Vec, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.BlkIOStat.io_time_recursive) - pub io_time_recursive: ::std::vec::Vec, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.BlkIOStat.sectors_recursive) - pub sectors_recursive: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:io.containerd.cgroups.v1.BlkIOStat.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a BlkIOStat { - fn default() -> &'a BlkIOStat { - ::default_instance() - } -} - -impl BlkIOStat { - pub fn new() -> BlkIOStat { - ::std::default::Default::default() - } - - // repeated .io.containerd.cgroups.v1.BlkIOEntry io_service_bytes_recursive = 1; - - pub fn io_service_bytes_recursive(&self) -> &[BlkIOEntry] { - &self.io_service_bytes_recursive - } - - pub fn clear_io_service_bytes_recursive(&mut self) { - self.io_service_bytes_recursive.clear(); - } - - // Param is passed by value, moved - pub fn set_io_service_bytes_recursive(&mut self, v: ::std::vec::Vec) { - self.io_service_bytes_recursive = v; - } - - // Mutable pointer to the field. - pub fn mut_io_service_bytes_recursive(&mut self) -> &mut ::std::vec::Vec { - &mut self.io_service_bytes_recursive - } - - // Take field - pub fn take_io_service_bytes_recursive(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.io_service_bytes_recursive, ::std::vec::Vec::new()) - } - - // repeated .io.containerd.cgroups.v1.BlkIOEntry io_serviced_recursive = 2; - - pub fn io_serviced_recursive(&self) -> &[BlkIOEntry] { - &self.io_serviced_recursive - } - - pub fn clear_io_serviced_recursive(&mut self) { - self.io_serviced_recursive.clear(); - } - - // Param is passed by value, moved - pub fn set_io_serviced_recursive(&mut self, v: ::std::vec::Vec) { - self.io_serviced_recursive = v; - } - - // Mutable pointer to the field. - pub fn mut_io_serviced_recursive(&mut self) -> &mut ::std::vec::Vec { - &mut self.io_serviced_recursive - } - - // Take field - pub fn take_io_serviced_recursive(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.io_serviced_recursive, ::std::vec::Vec::new()) - } - - // repeated .io.containerd.cgroups.v1.BlkIOEntry io_queued_recursive = 3; - - pub fn io_queued_recursive(&self) -> &[BlkIOEntry] { - &self.io_queued_recursive - } - - pub fn clear_io_queued_recursive(&mut self) { - self.io_queued_recursive.clear(); - } - - // Param is passed by value, moved - pub fn set_io_queued_recursive(&mut self, v: ::std::vec::Vec) { - self.io_queued_recursive = v; - } - - // Mutable pointer to the field. - pub fn mut_io_queued_recursive(&mut self) -> &mut ::std::vec::Vec { - &mut self.io_queued_recursive - } - - // Take field - pub fn take_io_queued_recursive(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.io_queued_recursive, ::std::vec::Vec::new()) - } - - // repeated .io.containerd.cgroups.v1.BlkIOEntry io_service_time_recursive = 4; - - pub fn io_service_time_recursive(&self) -> &[BlkIOEntry] { - &self.io_service_time_recursive - } - - pub fn clear_io_service_time_recursive(&mut self) { - self.io_service_time_recursive.clear(); - } - - // Param is passed by value, moved - pub fn set_io_service_time_recursive(&mut self, v: ::std::vec::Vec) { - self.io_service_time_recursive = v; - } - - // Mutable pointer to the field. - pub fn mut_io_service_time_recursive(&mut self) -> &mut ::std::vec::Vec { - &mut self.io_service_time_recursive - } - - // Take field - pub fn take_io_service_time_recursive(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.io_service_time_recursive, ::std::vec::Vec::new()) - } - - // repeated .io.containerd.cgroups.v1.BlkIOEntry io_wait_time_recursive = 5; - - pub fn io_wait_time_recursive(&self) -> &[BlkIOEntry] { - &self.io_wait_time_recursive - } - - pub fn clear_io_wait_time_recursive(&mut self) { - self.io_wait_time_recursive.clear(); - } - - // Param is passed by value, moved - pub fn set_io_wait_time_recursive(&mut self, v: ::std::vec::Vec) { - self.io_wait_time_recursive = v; - } - - // Mutable pointer to the field. - pub fn mut_io_wait_time_recursive(&mut self) -> &mut ::std::vec::Vec { - &mut self.io_wait_time_recursive - } - - // Take field - pub fn take_io_wait_time_recursive(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.io_wait_time_recursive, ::std::vec::Vec::new()) - } - - // repeated .io.containerd.cgroups.v1.BlkIOEntry io_merged_recursive = 6; - - pub fn io_merged_recursive(&self) -> &[BlkIOEntry] { - &self.io_merged_recursive - } - - pub fn clear_io_merged_recursive(&mut self) { - self.io_merged_recursive.clear(); - } - - // Param is passed by value, moved - pub fn set_io_merged_recursive(&mut self, v: ::std::vec::Vec) { - self.io_merged_recursive = v; - } - - // Mutable pointer to the field. - pub fn mut_io_merged_recursive(&mut self) -> &mut ::std::vec::Vec { - &mut self.io_merged_recursive - } - - // Take field - pub fn take_io_merged_recursive(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.io_merged_recursive, ::std::vec::Vec::new()) - } - - // repeated .io.containerd.cgroups.v1.BlkIOEntry io_time_recursive = 7; - - pub fn io_time_recursive(&self) -> &[BlkIOEntry] { - &self.io_time_recursive - } - - pub fn clear_io_time_recursive(&mut self) { - self.io_time_recursive.clear(); - } - - // Param is passed by value, moved - pub fn set_io_time_recursive(&mut self, v: ::std::vec::Vec) { - self.io_time_recursive = v; - } - - // Mutable pointer to the field. - pub fn mut_io_time_recursive(&mut self) -> &mut ::std::vec::Vec { - &mut self.io_time_recursive - } - - // Take field - pub fn take_io_time_recursive(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.io_time_recursive, ::std::vec::Vec::new()) - } - - // repeated .io.containerd.cgroups.v1.BlkIOEntry sectors_recursive = 8; - - pub fn sectors_recursive(&self) -> &[BlkIOEntry] { - &self.sectors_recursive - } - - pub fn clear_sectors_recursive(&mut self) { - self.sectors_recursive.clear(); - } - - // Param is passed by value, moved - pub fn set_sectors_recursive(&mut self, v: ::std::vec::Vec) { - self.sectors_recursive = v; - } - - // Mutable pointer to the field. - pub fn mut_sectors_recursive(&mut self) -> &mut ::std::vec::Vec { - &mut self.sectors_recursive - } - - // Take field - pub fn take_sectors_recursive(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.sectors_recursive, ::std::vec::Vec::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(8); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "io_service_bytes_recursive", - |m: &BlkIOStat| { &m.io_service_bytes_recursive }, - |m: &mut BlkIOStat| { &mut m.io_service_bytes_recursive }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "io_serviced_recursive", - |m: &BlkIOStat| { &m.io_serviced_recursive }, - |m: &mut BlkIOStat| { &mut m.io_serviced_recursive }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "io_queued_recursive", - |m: &BlkIOStat| { &m.io_queued_recursive }, - |m: &mut BlkIOStat| { &mut m.io_queued_recursive }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "io_service_time_recursive", - |m: &BlkIOStat| { &m.io_service_time_recursive }, - |m: &mut BlkIOStat| { &mut m.io_service_time_recursive }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "io_wait_time_recursive", - |m: &BlkIOStat| { &m.io_wait_time_recursive }, - |m: &mut BlkIOStat| { &mut m.io_wait_time_recursive }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "io_merged_recursive", - |m: &BlkIOStat| { &m.io_merged_recursive }, - |m: &mut BlkIOStat| { &mut m.io_merged_recursive }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "io_time_recursive", - |m: &BlkIOStat| { &m.io_time_recursive }, - |m: &mut BlkIOStat| { &mut m.io_time_recursive }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "sectors_recursive", - |m: &BlkIOStat| { &m.sectors_recursive }, - |m: &mut BlkIOStat| { &mut m.sectors_recursive }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "BlkIOStat", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for BlkIOStat { - const NAME: &'static str = "BlkIOStat"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.io_service_bytes_recursive.push(is.read_message()?); - }, - 18 => { - self.io_serviced_recursive.push(is.read_message()?); - }, - 26 => { - self.io_queued_recursive.push(is.read_message()?); - }, - 34 => { - self.io_service_time_recursive.push(is.read_message()?); - }, - 42 => { - self.io_wait_time_recursive.push(is.read_message()?); - }, - 50 => { - self.io_merged_recursive.push(is.read_message()?); - }, - 58 => { - self.io_time_recursive.push(is.read_message()?); - }, - 66 => { - self.sectors_recursive.push(is.read_message()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - for value in &self.io_service_bytes_recursive { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - for value in &self.io_serviced_recursive { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - for value in &self.io_queued_recursive { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - for value in &self.io_service_time_recursive { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - for value in &self.io_wait_time_recursive { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - for value in &self.io_merged_recursive { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - for value in &self.io_time_recursive { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - for value in &self.sectors_recursive { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - for v in &self.io_service_bytes_recursive { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - }; - for v in &self.io_serviced_recursive { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - }; - for v in &self.io_queued_recursive { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - }; - for v in &self.io_service_time_recursive { - ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?; - }; - for v in &self.io_wait_time_recursive { - ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?; - }; - for v in &self.io_merged_recursive { - ::protobuf::rt::write_message_field_with_cached_size(6, v, os)?; - }; - for v in &self.io_time_recursive { - ::protobuf::rt::write_message_field_with_cached_size(7, v, os)?; - }; - for v in &self.sectors_recursive { - ::protobuf::rt::write_message_field_with_cached_size(8, v, os)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> BlkIOStat { - BlkIOStat::new() - } - - fn clear(&mut self) { - self.io_service_bytes_recursive.clear(); - self.io_serviced_recursive.clear(); - self.io_queued_recursive.clear(); - self.io_service_time_recursive.clear(); - self.io_wait_time_recursive.clear(); - self.io_merged_recursive.clear(); - self.io_time_recursive.clear(); - self.sectors_recursive.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static BlkIOStat { - static instance: BlkIOStat = BlkIOStat { - io_service_bytes_recursive: ::std::vec::Vec::new(), - io_serviced_recursive: ::std::vec::Vec::new(), - io_queued_recursive: ::std::vec::Vec::new(), - io_service_time_recursive: ::std::vec::Vec::new(), - io_wait_time_recursive: ::std::vec::Vec::new(), - io_merged_recursive: ::std::vec::Vec::new(), - io_time_recursive: ::std::vec::Vec::new(), - sectors_recursive: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for BlkIOStat { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("BlkIOStat").unwrap()).clone() - } -} - -impl ::std::fmt::Display for BlkIOStat { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for BlkIOStat { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:io.containerd.cgroups.v1.BlkIOEntry) -pub struct BlkIOEntry { - // message fields - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.BlkIOEntry.op) - pub op: ::std::string::String, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.BlkIOEntry.device) - pub device: ::std::string::String, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.BlkIOEntry.major) - pub major: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.BlkIOEntry.minor) - pub minor: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.BlkIOEntry.value) - pub value: u64, - // special fields - // @@protoc_insertion_point(special_field:io.containerd.cgroups.v1.BlkIOEntry.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a BlkIOEntry { - fn default() -> &'a BlkIOEntry { - ::default_instance() - } -} - -impl BlkIOEntry { - pub fn new() -> BlkIOEntry { - ::std::default::Default::default() - } - - // string op = 1; - - pub fn op(&self) -> &str { - &self.op - } - - pub fn clear_op(&mut self) { - self.op.clear(); - } - - // Param is passed by value, moved - pub fn set_op(&mut self, v: ::std::string::String) { - self.op = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_op(&mut self) -> &mut ::std::string::String { - &mut self.op - } - - // Take field - pub fn take_op(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.op, ::std::string::String::new()) - } - - // string device = 2; - - pub fn device(&self) -> &str { - &self.device - } - - pub fn clear_device(&mut self) { - self.device.clear(); - } - - // Param is passed by value, moved - pub fn set_device(&mut self, v: ::std::string::String) { - self.device = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_device(&mut self) -> &mut ::std::string::String { - &mut self.device - } - - // Take field - pub fn take_device(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.device, ::std::string::String::new()) - } - - // uint64 major = 3; - - pub fn major(&self) -> u64 { - self.major - } - - pub fn clear_major(&mut self) { - self.major = 0; - } - - // Param is passed by value, moved - pub fn set_major(&mut self, v: u64) { - self.major = v; - } - - // uint64 minor = 4; - - pub fn minor(&self) -> u64 { - self.minor - } - - pub fn clear_minor(&mut self) { - self.minor = 0; - } - - // Param is passed by value, moved - pub fn set_minor(&mut self, v: u64) { - self.minor = v; - } - - // uint64 value = 5; - - pub fn value(&self) -> u64 { - self.value - } - - pub fn clear_value(&mut self) { - self.value = 0; - } - - // Param is passed by value, moved - pub fn set_value(&mut self, v: u64) { - self.value = v; - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(5); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "op", - |m: &BlkIOEntry| { &m.op }, - |m: &mut BlkIOEntry| { &mut m.op }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "device", - |m: &BlkIOEntry| { &m.device }, - |m: &mut BlkIOEntry| { &mut m.device }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "major", - |m: &BlkIOEntry| { &m.major }, - |m: &mut BlkIOEntry| { &mut m.major }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "minor", - |m: &BlkIOEntry| { &m.minor }, - |m: &mut BlkIOEntry| { &mut m.minor }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "value", - |m: &BlkIOEntry| { &m.value }, - |m: &mut BlkIOEntry| { &mut m.value }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "BlkIOEntry", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for BlkIOEntry { - const NAME: &'static str = "BlkIOEntry"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.op = is.read_string()?; - }, - 18 => { - self.device = is.read_string()?; - }, - 24 => { - self.major = is.read_uint64()?; - }, - 32 => { - self.minor = is.read_uint64()?; - }, - 40 => { - self.value = is.read_uint64()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.op.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.op); - } - if !self.device.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.device); - } - if self.major != 0 { - my_size += ::protobuf::rt::uint64_size(3, self.major); - } - if self.minor != 0 { - my_size += ::protobuf::rt::uint64_size(4, self.minor); - } - if self.value != 0 { - my_size += ::protobuf::rt::uint64_size(5, self.value); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.op.is_empty() { - os.write_string(1, &self.op)?; - } - if !self.device.is_empty() { - os.write_string(2, &self.device)?; - } - if self.major != 0 { - os.write_uint64(3, self.major)?; - } - if self.minor != 0 { - os.write_uint64(4, self.minor)?; - } - if self.value != 0 { - os.write_uint64(5, self.value)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> BlkIOEntry { - BlkIOEntry::new() - } - - fn clear(&mut self) { - self.op.clear(); - self.device.clear(); - self.major = 0; - self.minor = 0; - self.value = 0; - self.special_fields.clear(); - } - - fn default_instance() -> &'static BlkIOEntry { - static instance: BlkIOEntry = BlkIOEntry { - op: ::std::string::String::new(), - device: ::std::string::String::new(), - major: 0, - minor: 0, - value: 0, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for BlkIOEntry { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("BlkIOEntry").unwrap()).clone() - } -} - -impl ::std::fmt::Display for BlkIOEntry { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for BlkIOEntry { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:io.containerd.cgroups.v1.RdmaStat) -pub struct RdmaStat { - // message fields - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.RdmaStat.current) - pub current: ::std::vec::Vec, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.RdmaStat.limit) - pub limit: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:io.containerd.cgroups.v1.RdmaStat.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a RdmaStat { - fn default() -> &'a RdmaStat { - ::default_instance() - } -} - -impl RdmaStat { - pub fn new() -> RdmaStat { - ::std::default::Default::default() - } - - // repeated .io.containerd.cgroups.v1.RdmaEntry current = 1; - - pub fn current(&self) -> &[RdmaEntry] { - &self.current - } - - pub fn clear_current(&mut self) { - self.current.clear(); - } - - // Param is passed by value, moved - pub fn set_current(&mut self, v: ::std::vec::Vec) { - self.current = v; - } - - // Mutable pointer to the field. - pub fn mut_current(&mut self) -> &mut ::std::vec::Vec { - &mut self.current - } - - // Take field - pub fn take_current(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.current, ::std::vec::Vec::new()) - } - - // repeated .io.containerd.cgroups.v1.RdmaEntry limit = 2; - - pub fn limit(&self) -> &[RdmaEntry] { - &self.limit - } - - pub fn clear_limit(&mut self) { - self.limit.clear(); - } - - // Param is passed by value, moved - pub fn set_limit(&mut self, v: ::std::vec::Vec) { - self.limit = v; - } - - // Mutable pointer to the field. - pub fn mut_limit(&mut self) -> &mut ::std::vec::Vec { - &mut self.limit - } - - // Take field - pub fn take_limit(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.limit, ::std::vec::Vec::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(2); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "current", - |m: &RdmaStat| { &m.current }, - |m: &mut RdmaStat| { &mut m.current }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "limit", - |m: &RdmaStat| { &m.limit }, - |m: &mut RdmaStat| { &mut m.limit }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "RdmaStat", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for RdmaStat { - const NAME: &'static str = "RdmaStat"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.current.push(is.read_message()?); - }, - 18 => { - self.limit.push(is.read_message()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - for value in &self.current { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - for value in &self.limit { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - for v in &self.current { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - }; - for v in &self.limit { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> RdmaStat { - RdmaStat::new() - } - - fn clear(&mut self) { - self.current.clear(); - self.limit.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static RdmaStat { - static instance: RdmaStat = RdmaStat { - current: ::std::vec::Vec::new(), - limit: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for RdmaStat { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("RdmaStat").unwrap()).clone() - } -} - -impl ::std::fmt::Display for RdmaStat { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for RdmaStat { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:io.containerd.cgroups.v1.RdmaEntry) -pub struct RdmaEntry { - // message fields - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.RdmaEntry.device) - pub device: ::std::string::String, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.RdmaEntry.hca_handles) - pub hca_handles: u32, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.RdmaEntry.hca_objects) - pub hca_objects: u32, - // special fields - // @@protoc_insertion_point(special_field:io.containerd.cgroups.v1.RdmaEntry.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a RdmaEntry { - fn default() -> &'a RdmaEntry { - ::default_instance() - } -} - -impl RdmaEntry { - pub fn new() -> RdmaEntry { - ::std::default::Default::default() - } - - // string device = 1; - - pub fn device(&self) -> &str { - &self.device - } - - pub fn clear_device(&mut self) { - self.device.clear(); - } - - // Param is passed by value, moved - pub fn set_device(&mut self, v: ::std::string::String) { - self.device = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_device(&mut self) -> &mut ::std::string::String { - &mut self.device - } - - // Take field - pub fn take_device(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.device, ::std::string::String::new()) - } - - // uint32 hca_handles = 2; - - pub fn hca_handles(&self) -> u32 { - self.hca_handles - } - - pub fn clear_hca_handles(&mut self) { - self.hca_handles = 0; - } - - // Param is passed by value, moved - pub fn set_hca_handles(&mut self, v: u32) { - self.hca_handles = v; - } - - // uint32 hca_objects = 3; - - pub fn hca_objects(&self) -> u32 { - self.hca_objects - } - - pub fn clear_hca_objects(&mut self) { - self.hca_objects = 0; - } - - // Param is passed by value, moved - pub fn set_hca_objects(&mut self, v: u32) { - self.hca_objects = v; - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(3); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "device", - |m: &RdmaEntry| { &m.device }, - |m: &mut RdmaEntry| { &mut m.device }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "hca_handles", - |m: &RdmaEntry| { &m.hca_handles }, - |m: &mut RdmaEntry| { &mut m.hca_handles }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "hca_objects", - |m: &RdmaEntry| { &m.hca_objects }, - |m: &mut RdmaEntry| { &mut m.hca_objects }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "RdmaEntry", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for RdmaEntry { - const NAME: &'static str = "RdmaEntry"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.device = is.read_string()?; - }, - 16 => { - self.hca_handles = is.read_uint32()?; - }, - 24 => { - self.hca_objects = is.read_uint32()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.device.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.device); - } - if self.hca_handles != 0 { - my_size += ::protobuf::rt::uint32_size(2, self.hca_handles); - } - if self.hca_objects != 0 { - my_size += ::protobuf::rt::uint32_size(3, self.hca_objects); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.device.is_empty() { - os.write_string(1, &self.device)?; - } - if self.hca_handles != 0 { - os.write_uint32(2, self.hca_handles)?; - } - if self.hca_objects != 0 { - os.write_uint32(3, self.hca_objects)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> RdmaEntry { - RdmaEntry::new() - } - - fn clear(&mut self) { - self.device.clear(); - self.hca_handles = 0; - self.hca_objects = 0; - self.special_fields.clear(); - } - - fn default_instance() -> &'static RdmaEntry { - static instance: RdmaEntry = RdmaEntry { - device: ::std::string::String::new(), - hca_handles: 0, - hca_objects: 0, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for RdmaEntry { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("RdmaEntry").unwrap()).clone() - } -} - -impl ::std::fmt::Display for RdmaEntry { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for RdmaEntry { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:io.containerd.cgroups.v1.NetworkStat) -pub struct NetworkStat { - // message fields - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.NetworkStat.name) - pub name: ::std::string::String, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.NetworkStat.rx_bytes) - pub rx_bytes: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.NetworkStat.rx_packets) - pub rx_packets: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.NetworkStat.rx_errors) - pub rx_errors: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.NetworkStat.rx_dropped) - pub rx_dropped: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.NetworkStat.tx_bytes) - pub tx_bytes: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.NetworkStat.tx_packets) - pub tx_packets: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.NetworkStat.tx_errors) - pub tx_errors: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.NetworkStat.tx_dropped) - pub tx_dropped: u64, - // special fields - // @@protoc_insertion_point(special_field:io.containerd.cgroups.v1.NetworkStat.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a NetworkStat { - fn default() -> &'a NetworkStat { - ::default_instance() - } -} - -impl NetworkStat { - pub fn new() -> NetworkStat { - ::std::default::Default::default() - } - - // string name = 1; - - pub fn name(&self) -> &str { - &self.name - } - - pub fn clear_name(&mut self) { - self.name.clear(); - } - - // Param is passed by value, moved - pub fn set_name(&mut self, v: ::std::string::String) { - self.name = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_name(&mut self) -> &mut ::std::string::String { - &mut self.name - } - - // Take field - pub fn take_name(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.name, ::std::string::String::new()) - } - - // uint64 rx_bytes = 2; - - pub fn rx_bytes(&self) -> u64 { - self.rx_bytes - } - - pub fn clear_rx_bytes(&mut self) { - self.rx_bytes = 0; - } - - // Param is passed by value, moved - pub fn set_rx_bytes(&mut self, v: u64) { - self.rx_bytes = v; - } - - // uint64 rx_packets = 3; - - pub fn rx_packets(&self) -> u64 { - self.rx_packets - } - - pub fn clear_rx_packets(&mut self) { - self.rx_packets = 0; - } - - // Param is passed by value, moved - pub fn set_rx_packets(&mut self, v: u64) { - self.rx_packets = v; - } - - // uint64 rx_errors = 4; - - pub fn rx_errors(&self) -> u64 { - self.rx_errors - } - - pub fn clear_rx_errors(&mut self) { - self.rx_errors = 0; - } - - // Param is passed by value, moved - pub fn set_rx_errors(&mut self, v: u64) { - self.rx_errors = v; - } - - // uint64 rx_dropped = 5; - - pub fn rx_dropped(&self) -> u64 { - self.rx_dropped - } - - pub fn clear_rx_dropped(&mut self) { - self.rx_dropped = 0; - } - - // Param is passed by value, moved - pub fn set_rx_dropped(&mut self, v: u64) { - self.rx_dropped = v; - } - - // uint64 tx_bytes = 6; - - pub fn tx_bytes(&self) -> u64 { - self.tx_bytes - } - - pub fn clear_tx_bytes(&mut self) { - self.tx_bytes = 0; - } - - // Param is passed by value, moved - pub fn set_tx_bytes(&mut self, v: u64) { - self.tx_bytes = v; - } - - // uint64 tx_packets = 7; - - pub fn tx_packets(&self) -> u64 { - self.tx_packets - } - - pub fn clear_tx_packets(&mut self) { - self.tx_packets = 0; - } - - // Param is passed by value, moved - pub fn set_tx_packets(&mut self, v: u64) { - self.tx_packets = v; - } - - // uint64 tx_errors = 8; - - pub fn tx_errors(&self) -> u64 { - self.tx_errors - } - - pub fn clear_tx_errors(&mut self) { - self.tx_errors = 0; - } - - // Param is passed by value, moved - pub fn set_tx_errors(&mut self, v: u64) { - self.tx_errors = v; - } - - // uint64 tx_dropped = 9; - - pub fn tx_dropped(&self) -> u64 { - self.tx_dropped - } - - pub fn clear_tx_dropped(&mut self) { - self.tx_dropped = 0; - } - - // Param is passed by value, moved - pub fn set_tx_dropped(&mut self, v: u64) { - self.tx_dropped = v; - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(9); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "name", - |m: &NetworkStat| { &m.name }, - |m: &mut NetworkStat| { &mut m.name }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "rx_bytes", - |m: &NetworkStat| { &m.rx_bytes }, - |m: &mut NetworkStat| { &mut m.rx_bytes }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "rx_packets", - |m: &NetworkStat| { &m.rx_packets }, - |m: &mut NetworkStat| { &mut m.rx_packets }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "rx_errors", - |m: &NetworkStat| { &m.rx_errors }, - |m: &mut NetworkStat| { &mut m.rx_errors }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "rx_dropped", - |m: &NetworkStat| { &m.rx_dropped }, - |m: &mut NetworkStat| { &mut m.rx_dropped }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "tx_bytes", - |m: &NetworkStat| { &m.tx_bytes }, - |m: &mut NetworkStat| { &mut m.tx_bytes }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "tx_packets", - |m: &NetworkStat| { &m.tx_packets }, - |m: &mut NetworkStat| { &mut m.tx_packets }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "tx_errors", - |m: &NetworkStat| { &m.tx_errors }, - |m: &mut NetworkStat| { &mut m.tx_errors }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "tx_dropped", - |m: &NetworkStat| { &m.tx_dropped }, - |m: &mut NetworkStat| { &mut m.tx_dropped }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "NetworkStat", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for NetworkStat { - const NAME: &'static str = "NetworkStat"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.name = is.read_string()?; - }, - 16 => { - self.rx_bytes = is.read_uint64()?; - }, - 24 => { - self.rx_packets = is.read_uint64()?; - }, - 32 => { - self.rx_errors = is.read_uint64()?; - }, - 40 => { - self.rx_dropped = is.read_uint64()?; - }, - 48 => { - self.tx_bytes = is.read_uint64()?; - }, - 56 => { - self.tx_packets = is.read_uint64()?; - }, - 64 => { - self.tx_errors = is.read_uint64()?; - }, - 72 => { - self.tx_dropped = is.read_uint64()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.name.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.name); - } - if self.rx_bytes != 0 { - my_size += ::protobuf::rt::uint64_size(2, self.rx_bytes); - } - if self.rx_packets != 0 { - my_size += ::protobuf::rt::uint64_size(3, self.rx_packets); - } - if self.rx_errors != 0 { - my_size += ::protobuf::rt::uint64_size(4, self.rx_errors); - } - if self.rx_dropped != 0 { - my_size += ::protobuf::rt::uint64_size(5, self.rx_dropped); - } - if self.tx_bytes != 0 { - my_size += ::protobuf::rt::uint64_size(6, self.tx_bytes); - } - if self.tx_packets != 0 { - my_size += ::protobuf::rt::uint64_size(7, self.tx_packets); - } - if self.tx_errors != 0 { - my_size += ::protobuf::rt::uint64_size(8, self.tx_errors); - } - if self.tx_dropped != 0 { - my_size += ::protobuf::rt::uint64_size(9, self.tx_dropped); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.name.is_empty() { - os.write_string(1, &self.name)?; - } - if self.rx_bytes != 0 { - os.write_uint64(2, self.rx_bytes)?; - } - if self.rx_packets != 0 { - os.write_uint64(3, self.rx_packets)?; - } - if self.rx_errors != 0 { - os.write_uint64(4, self.rx_errors)?; - } - if self.rx_dropped != 0 { - os.write_uint64(5, self.rx_dropped)?; - } - if self.tx_bytes != 0 { - os.write_uint64(6, self.tx_bytes)?; - } - if self.tx_packets != 0 { - os.write_uint64(7, self.tx_packets)?; - } - if self.tx_errors != 0 { - os.write_uint64(8, self.tx_errors)?; - } - if self.tx_dropped != 0 { - os.write_uint64(9, self.tx_dropped)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> NetworkStat { - NetworkStat::new() - } - - fn clear(&mut self) { - self.name.clear(); - self.rx_bytes = 0; - self.rx_packets = 0; - self.rx_errors = 0; - self.rx_dropped = 0; - self.tx_bytes = 0; - self.tx_packets = 0; - self.tx_errors = 0; - self.tx_dropped = 0; - self.special_fields.clear(); - } - - fn default_instance() -> &'static NetworkStat { - static instance: NetworkStat = NetworkStat { - name: ::std::string::String::new(), - rx_bytes: 0, - rx_packets: 0, - rx_errors: 0, - rx_dropped: 0, - tx_bytes: 0, - tx_packets: 0, - tx_errors: 0, - tx_dropped: 0, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for NetworkStat { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("NetworkStat").unwrap()).clone() - } -} - -impl ::std::fmt::Display for NetworkStat { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for NetworkStat { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:io.containerd.cgroups.v1.CgroupStats) -pub struct CgroupStats { - // message fields - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.CgroupStats.nr_sleeping) - pub nr_sleeping: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.CgroupStats.nr_running) - pub nr_running: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.CgroupStats.nr_stopped) - pub nr_stopped: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.CgroupStats.nr_uninterruptible) - pub nr_uninterruptible: u64, - // @@protoc_insertion_point(field:io.containerd.cgroups.v1.CgroupStats.nr_io_wait) - pub nr_io_wait: u64, - // special fields - // @@protoc_insertion_point(special_field:io.containerd.cgroups.v1.CgroupStats.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a CgroupStats { - fn default() -> &'a CgroupStats { - ::default_instance() - } -} - -impl CgroupStats { - pub fn new() -> CgroupStats { - ::std::default::Default::default() - } - - // uint64 nr_sleeping = 1; - - pub fn nr_sleeping(&self) -> u64 { - self.nr_sleeping - } - - pub fn clear_nr_sleeping(&mut self) { - self.nr_sleeping = 0; - } - - // Param is passed by value, moved - pub fn set_nr_sleeping(&mut self, v: u64) { - self.nr_sleeping = v; - } - - // uint64 nr_running = 2; - - pub fn nr_running(&self) -> u64 { - self.nr_running - } - - pub fn clear_nr_running(&mut self) { - self.nr_running = 0; - } - - // Param is passed by value, moved - pub fn set_nr_running(&mut self, v: u64) { - self.nr_running = v; - } - - // uint64 nr_stopped = 3; - - pub fn nr_stopped(&self) -> u64 { - self.nr_stopped - } - - pub fn clear_nr_stopped(&mut self) { - self.nr_stopped = 0; - } - - // Param is passed by value, moved - pub fn set_nr_stopped(&mut self, v: u64) { - self.nr_stopped = v; - } - - // uint64 nr_uninterruptible = 4; - - pub fn nr_uninterruptible(&self) -> u64 { - self.nr_uninterruptible - } - - pub fn clear_nr_uninterruptible(&mut self) { - self.nr_uninterruptible = 0; - } - - // Param is passed by value, moved - pub fn set_nr_uninterruptible(&mut self, v: u64) { - self.nr_uninterruptible = v; - } - - // uint64 nr_io_wait = 5; - - pub fn nr_io_wait(&self) -> u64 { - self.nr_io_wait - } - - pub fn clear_nr_io_wait(&mut self) { - self.nr_io_wait = 0; - } - - // Param is passed by value, moved - pub fn set_nr_io_wait(&mut self, v: u64) { - self.nr_io_wait = v; - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(5); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "nr_sleeping", - |m: &CgroupStats| { &m.nr_sleeping }, - |m: &mut CgroupStats| { &mut m.nr_sleeping }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "nr_running", - |m: &CgroupStats| { &m.nr_running }, - |m: &mut CgroupStats| { &mut m.nr_running }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "nr_stopped", - |m: &CgroupStats| { &m.nr_stopped }, - |m: &mut CgroupStats| { &mut m.nr_stopped }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "nr_uninterruptible", - |m: &CgroupStats| { &m.nr_uninterruptible }, - |m: &mut CgroupStats| { &mut m.nr_uninterruptible }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "nr_io_wait", - |m: &CgroupStats| { &m.nr_io_wait }, - |m: &mut CgroupStats| { &mut m.nr_io_wait }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "CgroupStats", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for CgroupStats { - const NAME: &'static str = "CgroupStats"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.nr_sleeping = is.read_uint64()?; - }, - 16 => { - self.nr_running = is.read_uint64()?; - }, - 24 => { - self.nr_stopped = is.read_uint64()?; - }, - 32 => { - self.nr_uninterruptible = is.read_uint64()?; - }, - 40 => { - self.nr_io_wait = is.read_uint64()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.nr_sleeping != 0 { - my_size += ::protobuf::rt::uint64_size(1, self.nr_sleeping); - } - if self.nr_running != 0 { - my_size += ::protobuf::rt::uint64_size(2, self.nr_running); - } - if self.nr_stopped != 0 { - my_size += ::protobuf::rt::uint64_size(3, self.nr_stopped); - } - if self.nr_uninterruptible != 0 { - my_size += ::protobuf::rt::uint64_size(4, self.nr_uninterruptible); - } - if self.nr_io_wait != 0 { - my_size += ::protobuf::rt::uint64_size(5, self.nr_io_wait); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.nr_sleeping != 0 { - os.write_uint64(1, self.nr_sleeping)?; - } - if self.nr_running != 0 { - os.write_uint64(2, self.nr_running)?; - } - if self.nr_stopped != 0 { - os.write_uint64(3, self.nr_stopped)?; - } - if self.nr_uninterruptible != 0 { - os.write_uint64(4, self.nr_uninterruptible)?; - } - if self.nr_io_wait != 0 { - os.write_uint64(5, self.nr_io_wait)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> CgroupStats { - CgroupStats::new() - } - - fn clear(&mut self) { - self.nr_sleeping = 0; - self.nr_running = 0; - self.nr_stopped = 0; - self.nr_uninterruptible = 0; - self.nr_io_wait = 0; - self.special_fields.clear(); - } - - fn default_instance() -> &'static CgroupStats { - static instance: CgroupStats = CgroupStats { - nr_sleeping: 0, - nr_running: 0, - nr_stopped: 0, - nr_uninterruptible: 0, - nr_io_wait: 0, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for CgroupStats { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("CgroupStats").unwrap()).clone() - } -} - -impl ::std::fmt::Display for CgroupStats { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for CgroupStats { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -static file_descriptor_proto_data: &'static [u8] = b"\ - \n4github.com/containerd/cgroups/stats/v1/metrics.proto\x12\x18io.contai\ - nerd.cgroups.v1\x1a\x14gogoproto/gogo.proto\"\xd6\x04\n\x07Metrics\x12?\ - \n\x07hugetlb\x18\x01\x20\x03(\x0b2%.io.containerd.cgroups.v1.HugetlbSta\ - tR\x07hugetlb\x126\n\x04pids\x18\x02\x20\x01(\x0b2\".io.containerd.cgrou\ - ps.v1.PidsStatR\x04pids\x12<\n\x03cpu\x18\x03\x20\x01(\x0b2!.io.containe\ - rd.cgroups.v1.CPUStatR\x03cpuB\x07\xe2\xde\x1f\x03CPU\x12<\n\x06memory\ - \x18\x04\x20\x01(\x0b2$.io.containerd.cgroups.v1.MemoryStatR\x06memory\ - \x129\n\x05blkio\x18\x05\x20\x01(\x0b2#.io.containerd.cgroups.v1.BlkIOSt\ - atR\x05blkio\x126\n\x04rdma\x18\x06\x20\x01(\x0b2\".io.containerd.cgroup\ - s.v1.RdmaStatR\x04rdma\x12?\n\x07network\x18\x07\x20\x03(\x0b2%.io.conta\ - inerd.cgroups.v1.NetworkStatR\x07network\x12H\n\x0ccgroup_stats\x18\x08\ - \x20\x01(\x0b2%.io.containerd.cgroups.v1.CgroupStatsR\x0bcgroupStats\x12\ - X\n\x12memory_oom_control\x18\t\x20\x01(\x0b2*.io.containerd.cgroups.v1.\ - MemoryOomControlR\x10memoryOomControl\"k\n\x0bHugetlbStat\x12\x14\n\x05u\ - sage\x18\x01\x20\x01(\x04R\x05usage\x12\x10\n\x03max\x18\x02\x20\x01(\ - \x04R\x03max\x12\x18\n\x07failcnt\x18\x03\x20\x01(\x04R\x07failcnt\x12\ - \x1a\n\x08pagesize\x18\x04\x20\x01(\tR\x08pagesize\":\n\x08PidsStat\x12\ - \x18\n\x07current\x18\x01\x20\x01(\x04R\x07current\x12\x14\n\x05limit\ - \x18\x02\x20\x01(\x04R\x05limit\"\x87\x01\n\x07CPUStat\x128\n\x05usage\ - \x18\x01\x20\x01(\x0b2\".io.containerd.cgroups.v1.CPUUsageR\x05usage\x12\ - B\n\nthrottling\x18\x02\x20\x01(\x0b2\".io.containerd.cgroups.v1.Throttl\ - eR\nthrottling\"q\n\x08CPUUsage\x12\x14\n\x05total\x18\x01\x20\x01(\x04R\ - \x05total\x12\x16\n\x06kernel\x18\x02\x20\x01(\x04R\x06kernel\x12\x12\n\ - \x04user\x18\x03\x20\x01(\x04R\x04user\x12#\n\x07per_cpu\x18\x04\x20\x03\ - (\x04R\x06perCpuB\n\xe2\xde\x1f\x06PerCPU\"x\n\x08Throttle\x12\x18\n\x07\ - periods\x18\x01\x20\x01(\x04R\x07periods\x12+\n\x11throttled_periods\x18\ - \x02\x20\x01(\x04R\x10throttledPeriods\x12%\n\x0ethrottled_time\x18\x03\ - \x20\x01(\x04R\rthrottledTime\"\xd9\x0b\n\nMemoryStat\x12\x14\n\x05cache\ - \x18\x01\x20\x01(\x04R\x05cache\x12\x19\n\x03rss\x18\x02\x20\x01(\x04R\ - \x03rssB\x07\xe2\xde\x1f\x03RSS\x12&\n\x08rss_huge\x18\x03\x20\x01(\x04R\ - \x07rssHugeB\x0b\xe2\xde\x1f\x07RSSHuge\x12\x1f\n\x0bmapped_file\x18\x04\ - \x20\x01(\x04R\nmappedFile\x12\x14\n\x05dirty\x18\x05\x20\x01(\x04R\x05d\ - irty\x12\x1c\n\twriteback\x18\x06\x20\x01(\x04R\twriteback\x12\x18\n\x08\ - pg_pg_in\x18\x07\x20\x01(\x04R\x06pgPgIn\x12\x1a\n\tpg_pg_out\x18\x08\ - \x20\x01(\x04R\x07pgPgOut\x12\x19\n\x08pg_fault\x18\t\x20\x01(\x04R\x07p\ - gFault\x12\x20\n\x0cpg_maj_fault\x18\n\x20\x01(\x04R\npgMajFault\x12#\n\ - \rinactive_anon\x18\x0b\x20\x01(\x04R\x0cinactiveAnon\x12\x1f\n\x0bactiv\ - e_anon\x18\x0c\x20\x01(\x04R\nactiveAnon\x12#\n\rinactive_file\x18\r\x20\ - \x01(\x04R\x0cinactiveFile\x12\x1f\n\x0bactive_file\x18\x0e\x20\x01(\x04\ - R\nactiveFile\x12\x20\n\x0bunevictable\x18\x0f\x20\x01(\x04R\x0bunevicta\ - ble\x12:\n\x19hierarchical_memory_limit\x18\x10\x20\x01(\x04R\x17hierarc\ - hicalMemoryLimit\x126\n\x17hierarchical_swap_limit\x18\x11\x20\x01(\x04R\ - \x15hierarchicalSwapLimit\x12\x1f\n\x0btotal_cache\x18\x12\x20\x01(\x04R\ - \ntotalCache\x12)\n\ttotal_rss\x18\x13\x20\x01(\x04R\x08totalRssB\x0c\ - \xe2\xde\x1f\x08TotalRSS\x126\n\x0etotal_rss_huge\x18\x14\x20\x01(\x04R\ - \x0ctotalRssHugeB\x10\xe2\xde\x1f\x0cTotalRSSHuge\x12*\n\x11total_mapped\ - _file\x18\x15\x20\x01(\x04R\x0ftotalMappedFile\x12\x1f\n\x0btotal_dirty\ - \x18\x16\x20\x01(\x04R\ntotalDirty\x12'\n\x0ftotal_writeback\x18\x17\x20\ - \x01(\x04R\x0etotalWriteback\x12#\n\x0etotal_pg_pg_in\x18\x18\x20\x01(\ - \x04R\x0btotalPgPgIn\x12%\n\x0ftotal_pg_pg_out\x18\x19\x20\x01(\x04R\x0c\ - totalPgPgOut\x12$\n\x0etotal_pg_fault\x18\x1a\x20\x01(\x04R\x0ctotalPgFa\ - ult\x12+\n\x12total_pg_maj_fault\x18\x1b\x20\x01(\x04R\x0ftotalPgMajFaul\ - t\x12.\n\x13total_inactive_anon\x18\x1c\x20\x01(\x04R\x11totalInactiveAn\ - on\x12*\n\x11total_active_anon\x18\x1d\x20\x01(\x04R\x0ftotalActiveAnon\ - \x12.\n\x13total_inactive_file\x18\x1e\x20\x01(\x04R\x11totalInactiveFil\ - e\x12*\n\x11total_active_file\x18\x1f\x20\x01(\x04R\x0ftotalActiveFile\ - \x12+\n\x11total_unevictable\x18\x20\x20\x01(\x04R\x10totalUnevictable\ - \x12;\n\x05usage\x18!\x20\x01(\x0b2%.io.containerd.cgroups.v1.MemoryEntr\ - yR\x05usage\x129\n\x04swap\x18\"\x20\x01(\x0b2%.io.containerd.cgroups.v1\ - .MemoryEntryR\x04swap\x12=\n\x06kernel\x18#\x20\x01(\x0b2%.io.containerd\ - .cgroups.v1.MemoryEntryR\x06kernel\x12S\n\nkernel_tcp\x18$\x20\x01(\x0b2\ - %.io.containerd.cgroups.v1.MemoryEntryR\tkernelTcpB\r\xe2\xde\x1f\tKerne\ - lTCP\"e\n\x0bMemoryEntry\x12\x14\n\x05limit\x18\x01\x20\x01(\x04R\x05lim\ - it\x12\x14\n\x05usage\x18\x02\x20\x01(\x04R\x05usage\x12\x10\n\x03max\ - \x18\x03\x20\x01(\x04R\x03max\x12\x18\n\x07failcnt\x18\x04\x20\x01(\x04R\ - \x07failcnt\"t\n\x10MemoryOomControl\x12(\n\x10oom_kill_disable\x18\x01\ - \x20\x01(\x04R\x0eoomKillDisable\x12\x1b\n\tunder_oom\x18\x02\x20\x01(\ - \x04R\x08underOom\x12\x19\n\x08oom_kill\x18\x03\x20\x01(\x04R\x07oomKill\ - \"\xd5\x05\n\tBlkIOStat\x12a\n\x1aio_service_bytes_recursive\x18\x01\x20\ - \x03(\x0b2$.io.containerd.cgroups.v1.BlkIOEntryR\x17ioServiceBytesRecurs\ - ive\x12X\n\x15io_serviced_recursive\x18\x02\x20\x03(\x0b2$.io.containerd\ - .cgroups.v1.BlkIOEntryR\x13ioServicedRecursive\x12T\n\x13io_queued_recur\ - sive\x18\x03\x20\x03(\x0b2$.io.containerd.cgroups.v1.BlkIOEntryR\x11ioQu\ - euedRecursive\x12_\n\x19io_service_time_recursive\x18\x04\x20\x03(\x0b2$\ - .io.containerd.cgroups.v1.BlkIOEntryR\x16ioServiceTimeRecursive\x12Y\n\ - \x16io_wait_time_recursive\x18\x05\x20\x03(\x0b2$.io.containerd.cgroups.\ - v1.BlkIOEntryR\x13ioWaitTimeRecursive\x12T\n\x13io_merged_recursive\x18\ - \x06\x20\x03(\x0b2$.io.containerd.cgroups.v1.BlkIOEntryR\x11ioMergedRecu\ - rsive\x12P\n\x11io_time_recursive\x18\x07\x20\x03(\x0b2$.io.containerd.c\ - groups.v1.BlkIOEntryR\x0fioTimeRecursive\x12Q\n\x11sectors_recursive\x18\ - \x08\x20\x03(\x0b2$.io.containerd.cgroups.v1.BlkIOEntryR\x10sectorsRecur\ - sive\"v\n\nBlkIOEntry\x12\x0e\n\x02op\x18\x01\x20\x01(\tR\x02op\x12\x16\ - \n\x06device\x18\x02\x20\x01(\tR\x06device\x12\x14\n\x05major\x18\x03\ - \x20\x01(\x04R\x05major\x12\x14\n\x05minor\x18\x04\x20\x01(\x04R\x05mino\ - r\x12\x14\n\x05value\x18\x05\x20\x01(\x04R\x05value\"\x84\x01\n\x08RdmaS\ - tat\x12=\n\x07current\x18\x01\x20\x03(\x0b2#.io.containerd.cgroups.v1.Rd\ - maEntryR\x07current\x129\n\x05limit\x18\x02\x20\x03(\x0b2#.io.containerd\ - .cgroups.v1.RdmaEntryR\x05limit\"e\n\tRdmaEntry\x12\x16\n\x06device\x18\ - \x01\x20\x01(\tR\x06device\x12\x1f\n\x0bhca_handles\x18\x02\x20\x01(\rR\ - \nhcaHandles\x12\x1f\n\x0bhca_objects\x18\x03\x20\x01(\rR\nhcaObjects\"\ - \x8d\x02\n\x0bNetworkStat\x12\x12\n\x04name\x18\x01\x20\x01(\tR\x04name\ - \x12\x19\n\x08rx_bytes\x18\x02\x20\x01(\x04R\x07rxBytes\x12\x1d\n\nrx_pa\ - ckets\x18\x03\x20\x01(\x04R\trxPackets\x12\x1b\n\trx_errors\x18\x04\x20\ - \x01(\x04R\x08rxErrors\x12\x1d\n\nrx_dropped\x18\x05\x20\x01(\x04R\trxDr\ - opped\x12\x19\n\x08tx_bytes\x18\x06\x20\x01(\x04R\x07txBytes\x12\x1d\n\n\ - tx_packets\x18\x07\x20\x01(\x04R\ttxPackets\x12\x1b\n\ttx_errors\x18\x08\ - \x20\x01(\x04R\x08txErrors\x12\x1d\n\ntx_dropped\x18\t\x20\x01(\x04R\ttx\ - Dropped\"\xb9\x01\n\x0bCgroupStats\x12\x1f\n\x0bnr_sleeping\x18\x01\x20\ - \x01(\x04R\nnrSleeping\x12\x1d\n\nnr_running\x18\x02\x20\x01(\x04R\tnrRu\ - nning\x12\x1d\n\nnr_stopped\x18\x03\x20\x01(\x04R\tnrStopped\x12-\n\x12n\ - r_uninterruptible\x18\x04\x20\x01(\x04R\x11nrUninterruptible\x12\x1c\n\n\ - nr_io_wait\x18\x05\x20\x01(\x04R\x08nrIoWaitb\x06proto3\ -"; - -/// `FileDescriptorProto` object which was a source for this generated file -fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); - file_descriptor_proto_lazy.get(|| { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() - }) -} - -/// `FileDescriptor` object which allows dynamic access to files -pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { - static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); - static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); - file_descriptor.get(|| { - let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { - let mut deps = ::std::vec::Vec::with_capacity(1); - deps.push(super::gogo::file_descriptor().clone()); - let mut messages = ::std::vec::Vec::with_capacity(15); - messages.push(Metrics::generated_message_descriptor_data()); - messages.push(HugetlbStat::generated_message_descriptor_data()); - messages.push(PidsStat::generated_message_descriptor_data()); - messages.push(CPUStat::generated_message_descriptor_data()); - messages.push(CPUUsage::generated_message_descriptor_data()); - messages.push(Throttle::generated_message_descriptor_data()); - messages.push(MemoryStat::generated_message_descriptor_data()); - messages.push(MemoryEntry::generated_message_descriptor_data()); - messages.push(MemoryOomControl::generated_message_descriptor_data()); - messages.push(BlkIOStat::generated_message_descriptor_data()); - messages.push(BlkIOEntry::generated_message_descriptor_data()); - messages.push(RdmaStat::generated_message_descriptor_data()); - messages.push(RdmaEntry::generated_message_descriptor_data()); - messages.push(NetworkStat::generated_message_descriptor_data()); - messages.push(CgroupStats::generated_message_descriptor_data()); - let mut enums = ::std::vec::Vec::with_capacity(0); - ::protobuf::reflect::GeneratedFileDescriptor::new_generated( - file_descriptor_proto(), - deps, - messages, - enums, - ) - }); - ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) - }) -} diff --git a/crates/shim-protos/src/cgroups/mod.rs b/crates/shim-protos/src/cgroups/mod.rs deleted file mode 100644 index dbbffdaf..00000000 --- a/crates/shim-protos/src/cgroups/mod.rs +++ /dev/null @@ -1,4 +0,0 @@ -// @generated - -pub mod gogo; -pub mod metrics; diff --git a/crates/shim-protos/src/events.rs b/crates/shim-protos/src/events.rs new file mode 100644 index 00000000..d7d1dd80 --- /dev/null +++ b/crates/shim-protos/src/events.rs @@ -0,0 +1,51 @@ +/* + 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. +*/ + +pub mod container { + include!(concat!(env!("OUT_DIR"), "/events/container.rs")); +} + +pub mod content { + include!(concat!(env!("OUT_DIR"), "/events/content.rs")); +} + +pub mod image { + include!(concat!(env!("OUT_DIR"), "/events/image.rs")); +} + +pub mod namespace { + include!(concat!(env!("OUT_DIR"), "/events/namespace.rs")); +} + +pub mod snapshot { + include!(concat!(env!("OUT_DIR"), "/events/snapshot.rs")); +} + +pub mod task { + include!(concat!(env!("OUT_DIR"), "/events/task.rs")); +} + +mod mount { + pub use crate::types::mount::*; +} + +mod gogo { + pub use crate::types::gogo::*; +} + +mod fieldpath { + pub use crate::types::fieldpath::*; +} diff --git a/crates/shim-protos/src/events/container.rs b/crates/shim-protos/src/events/container.rs deleted file mode 100644 index cadb579f..00000000 --- a/crates/shim-protos/src/events/container.rs +++ /dev/null @@ -1,963 +0,0 @@ -// This file is generated by rust-protobuf 3.1.0. Do not edit -// .proto file is parsed by pure -// @generated - -// https://github.com/rust-lang/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![allow(unused_attributes)] -#![cfg_attr(rustfmt, rustfmt::skip)] - -#![allow(box_pointers)] -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unused_results)] -#![allow(unused_mut)] - -//! Generated file from `github.com/containerd/containerd/api/events/container.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_1_0; - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.events.ContainerCreate) -pub struct ContainerCreate { - // message fields - // @@protoc_insertion_point(field:containerd.events.ContainerCreate.id) - pub id: ::std::string::String, - // @@protoc_insertion_point(field:containerd.events.ContainerCreate.image) - pub image: ::std::string::String, - // @@protoc_insertion_point(field:containerd.events.ContainerCreate.runtime) - pub runtime: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:containerd.events.ContainerCreate.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ContainerCreate { - fn default() -> &'a ContainerCreate { - ::default_instance() - } -} - -impl ContainerCreate { - pub fn new() -> ContainerCreate { - ::std::default::Default::default() - } - - // string id = 1; - - pub fn id(&self) -> &str { - &self.id - } - - pub fn clear_id(&mut self) { - self.id.clear(); - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: ::std::string::String) { - self.id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_id(&mut self) -> &mut ::std::string::String { - &mut self.id - } - - // Take field - pub fn take_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.id, ::std::string::String::new()) - } - - // string image = 2; - - pub fn image(&self) -> &str { - &self.image - } - - pub fn clear_image(&mut self) { - self.image.clear(); - } - - // Param is passed by value, moved - pub fn set_image(&mut self, v: ::std::string::String) { - self.image = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_image(&mut self) -> &mut ::std::string::String { - &mut self.image - } - - // Take field - pub fn take_image(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.image, ::std::string::String::new()) - } - - // .containerd.events.ContainerCreate.Runtime runtime = 3; - - pub fn runtime(&self) -> &container_create::Runtime { - self.runtime.as_ref().unwrap_or_else(|| ::default_instance()) - } - - pub fn clear_runtime(&mut self) { - self.runtime.clear(); - } - - pub fn has_runtime(&self) -> bool { - self.runtime.is_some() - } - - // Param is passed by value, moved - pub fn set_runtime(&mut self, v: container_create::Runtime) { - self.runtime = ::protobuf::MessageField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_runtime(&mut self) -> &mut container_create::Runtime { - self.runtime.mut_or_insert_default() - } - - // Take field - pub fn take_runtime(&mut self) -> container_create::Runtime { - self.runtime.take().unwrap_or_else(|| container_create::Runtime::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(3); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "id", - |m: &ContainerCreate| { &m.id }, - |m: &mut ContainerCreate| { &mut m.id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "image", - |m: &ContainerCreate| { &m.image }, - |m: &mut ContainerCreate| { &mut m.image }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, container_create::Runtime>( - "runtime", - |m: &ContainerCreate| { &m.runtime }, - |m: &mut ContainerCreate| { &mut m.runtime }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "ContainerCreate", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for ContainerCreate { - const NAME: &'static str = "ContainerCreate"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.id = is.read_string()?; - }, - 18 => { - self.image = is.read_string()?; - }, - 26 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.runtime)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.id); - } - if !self.image.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.image); - } - if let Some(v) = self.runtime.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.id.is_empty() { - os.write_string(1, &self.id)?; - } - if !self.image.is_empty() { - os.write_string(2, &self.image)?; - } - if let Some(v) = self.runtime.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ContainerCreate { - ContainerCreate::new() - } - - fn clear(&mut self) { - self.id.clear(); - self.image.clear(); - self.runtime.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static ContainerCreate { - static instance: ContainerCreate = ContainerCreate { - id: ::std::string::String::new(), - image: ::std::string::String::new(), - runtime: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for ContainerCreate { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("ContainerCreate").unwrap()).clone() - } -} - -impl ::std::fmt::Display for ContainerCreate { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ContainerCreate { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -/// Nested message and enums of message `ContainerCreate` -pub mod container_create { - #[derive(PartialEq,Clone,Default,Debug)] - // @@protoc_insertion_point(message:containerd.events.ContainerCreate.Runtime) - pub struct Runtime { - // message fields - // @@protoc_insertion_point(field:containerd.events.ContainerCreate.Runtime.name) - pub name: ::std::string::String, - // @@protoc_insertion_point(field:containerd.events.ContainerCreate.Runtime.options) - pub options: ::protobuf::MessageField<::protobuf::well_known_types::any::Any>, - // special fields - // @@protoc_insertion_point(special_field:containerd.events.ContainerCreate.Runtime.special_fields) - pub special_fields: ::protobuf::SpecialFields, - } - - impl<'a> ::std::default::Default for &'a Runtime { - fn default() -> &'a Runtime { - ::default_instance() - } - } - - impl Runtime { - pub fn new() -> Runtime { - ::std::default::Default::default() - } - - // string name = 1; - - pub fn name(&self) -> &str { - &self.name - } - - pub fn clear_name(&mut self) { - self.name.clear(); - } - - // Param is passed by value, moved - pub fn set_name(&mut self, v: ::std::string::String) { - self.name = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_name(&mut self) -> &mut ::std::string::String { - &mut self.name - } - - // Take field - pub fn take_name(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.name, ::std::string::String::new()) - } - - // .google.protobuf.Any options = 2; - - pub fn options(&self) -> &::protobuf::well_known_types::any::Any { - self.options.as_ref().unwrap_or_else(|| <::protobuf::well_known_types::any::Any as ::protobuf::Message>::default_instance()) - } - - pub fn clear_options(&mut self) { - self.options.clear(); - } - - pub fn has_options(&self) -> bool { - self.options.is_some() - } - - // Param is passed by value, moved - pub fn set_options(&mut self, v: ::protobuf::well_known_types::any::Any) { - self.options = ::protobuf::MessageField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_options(&mut self) -> &mut ::protobuf::well_known_types::any::Any { - self.options.mut_or_insert_default() - } - - // Take field - pub fn take_options(&mut self) -> ::protobuf::well_known_types::any::Any { - self.options.take().unwrap_or_else(|| ::protobuf::well_known_types::any::Any::new()) - } - - pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(2); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "name", - |m: &Runtime| { &m.name }, - |m: &mut Runtime| { &mut m.name }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ::protobuf::well_known_types::any::Any>( - "options", - |m: &Runtime| { &m.options }, - |m: &mut Runtime| { &mut m.options }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "ContainerCreate.Runtime", - fields, - oneofs, - ) - } - } - - impl ::protobuf::Message for Runtime { - const NAME: &'static str = "Runtime"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.name = is.read_string()?; - }, - 18 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.options)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.name.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.name); - } - if let Some(v) = self.options.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.name.is_empty() { - os.write_string(1, &self.name)?; - } - if let Some(v) = self.options.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> Runtime { - Runtime::new() - } - - fn clear(&mut self) { - self.name.clear(); - self.options.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static Runtime { - static instance: Runtime = Runtime { - name: ::std::string::String::new(), - options: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } - } - - impl ::protobuf::MessageFull for Runtime { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| super::file_descriptor().message_by_package_relative_name("ContainerCreate.Runtime").unwrap()).clone() - } - } - - impl ::std::fmt::Display for Runtime { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } - } - - impl ::protobuf::reflect::ProtobufValue for Runtime { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.events.ContainerUpdate) -pub struct ContainerUpdate { - // message fields - // @@protoc_insertion_point(field:containerd.events.ContainerUpdate.id) - pub id: ::std::string::String, - // @@protoc_insertion_point(field:containerd.events.ContainerUpdate.image) - pub image: ::std::string::String, - // @@protoc_insertion_point(field:containerd.events.ContainerUpdate.labels) - pub labels: ::std::collections::HashMap<::std::string::String, ::std::string::String>, - // @@protoc_insertion_point(field:containerd.events.ContainerUpdate.snapshot_key) - pub snapshot_key: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:containerd.events.ContainerUpdate.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ContainerUpdate { - fn default() -> &'a ContainerUpdate { - ::default_instance() - } -} - -impl ContainerUpdate { - pub fn new() -> ContainerUpdate { - ::std::default::Default::default() - } - - // string id = 1; - - pub fn id(&self) -> &str { - &self.id - } - - pub fn clear_id(&mut self) { - self.id.clear(); - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: ::std::string::String) { - self.id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_id(&mut self) -> &mut ::std::string::String { - &mut self.id - } - - // Take field - pub fn take_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.id, ::std::string::String::new()) - } - - // string image = 2; - - pub fn image(&self) -> &str { - &self.image - } - - pub fn clear_image(&mut self) { - self.image.clear(); - } - - // Param is passed by value, moved - pub fn set_image(&mut self, v: ::std::string::String) { - self.image = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_image(&mut self) -> &mut ::std::string::String { - &mut self.image - } - - // Take field - pub fn take_image(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.image, ::std::string::String::new()) - } - - // repeated .containerd.events.ContainerUpdate.LabelsEntry labels = 3; - - pub fn labels(&self) -> &::std::collections::HashMap<::std::string::String, ::std::string::String> { - &self.labels - } - - pub fn clear_labels(&mut self) { - self.labels.clear(); - } - - // Param is passed by value, moved - pub fn set_labels(&mut self, v: ::std::collections::HashMap<::std::string::String, ::std::string::String>) { - self.labels = v; - } - - // Mutable pointer to the field. - pub fn mut_labels(&mut self) -> &mut ::std::collections::HashMap<::std::string::String, ::std::string::String> { - &mut self.labels - } - - // Take field - pub fn take_labels(&mut self) -> ::std::collections::HashMap<::std::string::String, ::std::string::String> { - ::std::mem::replace(&mut self.labels, ::std::collections::HashMap::new()) - } - - // string snapshot_key = 4; - - pub fn snapshot_key(&self) -> &str { - &self.snapshot_key - } - - pub fn clear_snapshot_key(&mut self) { - self.snapshot_key.clear(); - } - - // Param is passed by value, moved - pub fn set_snapshot_key(&mut self, v: ::std::string::String) { - self.snapshot_key = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_snapshot_key(&mut self) -> &mut ::std::string::String { - &mut self.snapshot_key - } - - // Take field - pub fn take_snapshot_key(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.snapshot_key, ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(4); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "id", - |m: &ContainerUpdate| { &m.id }, - |m: &mut ContainerUpdate| { &mut m.id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "image", - |m: &ContainerUpdate| { &m.image }, - |m: &mut ContainerUpdate| { &mut m.image }, - )); - fields.push(::protobuf::reflect::rt::v2::make_map_simpler_accessor::<_, _, _>( - "labels", - |m: &ContainerUpdate| { &m.labels }, - |m: &mut ContainerUpdate| { &mut m.labels }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "snapshot_key", - |m: &ContainerUpdate| { &m.snapshot_key }, - |m: &mut ContainerUpdate| { &mut m.snapshot_key }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "ContainerUpdate", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for ContainerUpdate { - const NAME: &'static str = "ContainerUpdate"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.id = is.read_string()?; - }, - 18 => { - self.image = is.read_string()?; - }, - 26 => { - let len = is.read_raw_varint32()?; - let old_limit = is.push_limit(len as u64)?; - let mut key = ::std::default::Default::default(); - let mut value = ::std::default::Default::default(); - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => key = is.read_string()?, - 18 => value = is.read_string()?, - _ => ::protobuf::rt::skip_field_for_tag(tag, is)?, - }; - } - is.pop_limit(old_limit); - self.labels.insert(key, value); - }, - 34 => { - self.snapshot_key = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.id); - } - if !self.image.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.image); - } - for (k, v) in &self.labels { - let mut entry_size = 0; - entry_size += ::protobuf::rt::string_size(1, &k); - entry_size += ::protobuf::rt::string_size(2, &v); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(entry_size) + entry_size - }; - if !self.snapshot_key.is_empty() { - my_size += ::protobuf::rt::string_size(4, &self.snapshot_key); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.id.is_empty() { - os.write_string(1, &self.id)?; - } - if !self.image.is_empty() { - os.write_string(2, &self.image)?; - } - for (k, v) in &self.labels { - let mut entry_size = 0; - entry_size += ::protobuf::rt::string_size(1, &k); - entry_size += ::protobuf::rt::string_size(2, &v); - os.write_raw_varint32(26)?; // Tag. - os.write_raw_varint32(entry_size as u32)?; - os.write_string(1, &k)?; - os.write_string(2, &v)?; - }; - if !self.snapshot_key.is_empty() { - os.write_string(4, &self.snapshot_key)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ContainerUpdate { - ContainerUpdate::new() - } - - fn clear(&mut self) { - self.id.clear(); - self.image.clear(); - self.labels.clear(); - self.snapshot_key.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static ContainerUpdate { - static instance: ::protobuf::rt::Lazy = ::protobuf::rt::Lazy::new(); - instance.get(ContainerUpdate::new) - } -} - -impl ::protobuf::MessageFull for ContainerUpdate { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("ContainerUpdate").unwrap()).clone() - } -} - -impl ::std::fmt::Display for ContainerUpdate { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ContainerUpdate { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.events.ContainerDelete) -pub struct ContainerDelete { - // message fields - // @@protoc_insertion_point(field:containerd.events.ContainerDelete.id) - pub id: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:containerd.events.ContainerDelete.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ContainerDelete { - fn default() -> &'a ContainerDelete { - ::default_instance() - } -} - -impl ContainerDelete { - pub fn new() -> ContainerDelete { - ::std::default::Default::default() - } - - // string id = 1; - - pub fn id(&self) -> &str { - &self.id - } - - pub fn clear_id(&mut self) { - self.id.clear(); - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: ::std::string::String) { - self.id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_id(&mut self) -> &mut ::std::string::String { - &mut self.id - } - - // Take field - pub fn take_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.id, ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "id", - |m: &ContainerDelete| { &m.id }, - |m: &mut ContainerDelete| { &mut m.id }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "ContainerDelete", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for ContainerDelete { - const NAME: &'static str = "ContainerDelete"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.id = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.id); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.id.is_empty() { - os.write_string(1, &self.id)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ContainerDelete { - ContainerDelete::new() - } - - fn clear(&mut self) { - self.id.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static ContainerDelete { - static instance: ContainerDelete = ContainerDelete { - id: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for ContainerDelete { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("ContainerDelete").unwrap()).clone() - } -} - -impl ::std::fmt::Display for ContainerDelete { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ContainerDelete { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -static file_descriptor_proto_data: &'static [u8] = b"\ - \n;github.com/containerd/containerd/api/events/container.proto\x12\x11co\ - ntainerd.events\x1a\x19google/protobuf/any.proto\x1a\x14gogoproto/gogo.p\ - roto\x1a@github.com/containerd/containerd/protobuf/plugin/fieldpath.prot\ - oX\x01X\x02\"\xcc\x01\n\x0fContainerCreate\x12\x0e\n\x02id\x18\x01\x20\ - \x01(\tR\x02id\x12\x14\n\x05image\x18\x02\x20\x01(\tR\x05image\x12D\n\ - \x07runtime\x18\x03\x20\x01(\x0b2*.containerd.events.ContainerCreate.Run\ - timeR\x07runtime\x1aM\n\x07Runtime\x12\x12\n\x04name\x18\x01\x20\x01(\tR\ - \x04name\x12.\n\x07options\x18\x02\x20\x01(\x0b2\x14.google.protobuf.Any\ - R\x07options\"\xdd\x01\n\x0fContainerUpdate\x12\x0e\n\x02id\x18\x01\x20\ - \x01(\tR\x02id\x12\x14\n\x05image\x18\x02\x20\x01(\tR\x05image\x12F\n\ - \x06labels\x18\x03\x20\x03(\x0b2..containerd.events.ContainerUpdate.Labe\ - lsEntryR\x06labels\x12!\n\x0csnapshot_key\x18\x04\x20\x01(\tR\x0bsnapsho\ - tKey\x1a9\n\x0bLabelsEntry\x12\x10\n\x03key\x18\x01\x20\x01(\tR\x03key\ - \x12\x14\n\x05value\x18\x02\x20\x01(\tR\x05value:\x028\x01\"!\n\x0fConta\ - inerDelete\x12\x0e\n\x02id\x18\x01\x20\x01(\tR\x02idB8Z2github.com/conta\ - inerd/containerd/api/events;events\xa0\xf4\x1e\x01b\x06proto3\ -"; - -/// `FileDescriptorProto` object which was a source for this generated file -fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); - file_descriptor_proto_lazy.get(|| { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() - }) -} - -/// `FileDescriptor` object which allows dynamic access to files -pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { - static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); - static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); - file_descriptor.get(|| { - let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { - let mut deps = ::std::vec::Vec::with_capacity(3); - deps.push(::protobuf::well_known_types::any::file_descriptor().clone()); - deps.push(super::gogo::file_descriptor().clone()); - deps.push(super::fieldpath::file_descriptor().clone()); - let mut messages = ::std::vec::Vec::with_capacity(4); - messages.push(ContainerCreate::generated_message_descriptor_data()); - messages.push(ContainerUpdate::generated_message_descriptor_data()); - messages.push(ContainerDelete::generated_message_descriptor_data()); - messages.push(container_create::Runtime::generated_message_descriptor_data()); - let mut enums = ::std::vec::Vec::with_capacity(0); - ::protobuf::reflect::GeneratedFileDescriptor::new_generated( - file_descriptor_proto(), - deps, - messages, - enums, - ) - }); - ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) - }) -} diff --git a/crates/shim-protos/src/events/content.rs b/crates/shim-protos/src/events/content.rs deleted file mode 100644 index 81a62dc0..00000000 --- a/crates/shim-protos/src/events/content.rs +++ /dev/null @@ -1,214 +0,0 @@ -// This file is generated by rust-protobuf 3.1.0. Do not edit -// .proto file is parsed by pure -// @generated - -// https://github.com/rust-lang/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![allow(unused_attributes)] -#![cfg_attr(rustfmt, rustfmt::skip)] - -#![allow(box_pointers)] -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unused_results)] -#![allow(unused_mut)] - -//! Generated file from `github.com/containerd/containerd/api/events/content.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_1_0; - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.events.ContentDelete) -pub struct ContentDelete { - // message fields - // @@protoc_insertion_point(field:containerd.events.ContentDelete.digest) - pub digest: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:containerd.events.ContentDelete.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ContentDelete { - fn default() -> &'a ContentDelete { - ::default_instance() - } -} - -impl ContentDelete { - pub fn new() -> ContentDelete { - ::std::default::Default::default() - } - - // string digest = 1; - - pub fn digest(&self) -> &str { - &self.digest - } - - pub fn clear_digest(&mut self) { - self.digest.clear(); - } - - // Param is passed by value, moved - pub fn set_digest(&mut self, v: ::std::string::String) { - self.digest = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_digest(&mut self) -> &mut ::std::string::String { - &mut self.digest - } - - // Take field - pub fn take_digest(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.digest, ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "digest", - |m: &ContentDelete| { &m.digest }, - |m: &mut ContentDelete| { &mut m.digest }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "ContentDelete", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for ContentDelete { - const NAME: &'static str = "ContentDelete"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.digest = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.digest.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.digest); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.digest.is_empty() { - os.write_string(1, &self.digest)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ContentDelete { - ContentDelete::new() - } - - fn clear(&mut self) { - self.digest.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static ContentDelete { - static instance: ContentDelete = ContentDelete { - digest: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for ContentDelete { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("ContentDelete").unwrap()).clone() - } -} - -impl ::std::fmt::Display for ContentDelete { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ContentDelete { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -static file_descriptor_proto_data: &'static [u8] = b"\ - \n9github.com/containerd/containerd/api/events/content.proto\x12\x11cont\ - ainerd.events\x1a\x14gogoproto/gogo.proto\x1a@github.com/containerd/cont\ - ainerd/protobuf/plugin/fieldpath.protoX\0X\x01\"[\n\rContentDelete\x12J\ - \n\x06digest\x18\x01\x20\x01(\tR\x06digestB2\xda\xde\x1f*github.com/open\ - containers/go-digest.Digest\xc8\xde\x1f\0B8Z2github.com/containerd/conta\ - inerd/api/events;events\xa0\xf4\x1e\x01b\x06proto3\ -"; - -/// `FileDescriptorProto` object which was a source for this generated file -fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); - file_descriptor_proto_lazy.get(|| { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() - }) -} - -/// `FileDescriptor` object which allows dynamic access to files -pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { - static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); - static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); - file_descriptor.get(|| { - let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { - let mut deps = ::std::vec::Vec::with_capacity(2); - deps.push(super::gogo::file_descriptor().clone()); - deps.push(super::fieldpath::file_descriptor().clone()); - let mut messages = ::std::vec::Vec::with_capacity(1); - messages.push(ContentDelete::generated_message_descriptor_data()); - let mut enums = ::std::vec::Vec::with_capacity(0); - ::protobuf::reflect::GeneratedFileDescriptor::new_generated( - file_descriptor_proto(), - deps, - messages, - enums, - ) - }); - ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) - }) -} diff --git a/crates/shim-protos/src/events/fieldpath.rs b/crates/shim-protos/src/events/fieldpath.rs deleted file mode 100644 index e0725374..00000000 --- a/crates/shim-protos/src/events/fieldpath.rs +++ /dev/null @@ -1,71 +0,0 @@ -// This file is generated by rust-protobuf 3.1.0. Do not edit -// .proto file is parsed by pure -// @generated - -// https://github.com/rust-lang/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![allow(unused_attributes)] -#![cfg_attr(rustfmt, rustfmt::skip)] - -#![allow(box_pointers)] -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unused_results)] -#![allow(unused_mut)] - -//! Generated file from `github.com/containerd/containerd/protobuf/plugin/fieldpath.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_1_0; - -/// Extension fields -pub mod exts { - - pub const fieldpath_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63300, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const fieldpath: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64400, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); -} - -static file_descriptor_proto_data: &'static [u8] = b"\ - \n@github.com/containerd/containerd/protobuf/plugin/fieldpath.proto\x12\ - \x11containerd.plugin\x1a\x20google/protobuf/descriptor.proto:C\n\rfield\ - path_all\x18\xc4\xee\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOption\ - sR\x0cfieldpathAll:?\n\tfieldpath\x18\x90\xf7\x03\x20\x01(\x08\x12\x1f.g\ - oogle.protobuf.MessageOptionsR\tfieldpathb\x06proto2\ -"; - -/// `FileDescriptorProto` object which was a source for this generated file -fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); - file_descriptor_proto_lazy.get(|| { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() - }) -} - -/// `FileDescriptor` object which allows dynamic access to files -pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { - static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); - static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); - file_descriptor.get(|| { - let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { - let mut deps = ::std::vec::Vec::with_capacity(1); - deps.push(::protobuf::descriptor::file_descriptor().clone()); - let mut messages = ::std::vec::Vec::with_capacity(0); - let mut enums = ::std::vec::Vec::with_capacity(0); - ::protobuf::reflect::GeneratedFileDescriptor::new_generated( - file_descriptor_proto(), - deps, - messages, - enums, - ) - }); - ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) - }) -} diff --git a/crates/shim-protos/src/events/gogo.rs b/crates/shim-protos/src/events/gogo.rs deleted file mode 100644 index a05967a9..00000000 --- a/crates/shim-protos/src/events/gogo.rs +++ /dev/null @@ -1,327 +0,0 @@ -// This file is generated by rust-protobuf 3.1.0. Do not edit -// .proto file is parsed by pure -// @generated - -// https://github.com/rust-lang/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![allow(unused_attributes)] -#![cfg_attr(rustfmt, rustfmt::skip)] - -#![allow(box_pointers)] -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unused_results)] -#![allow(unused_mut)] - -//! Generated file from `gogoproto/gogo.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_1_0; - -/// Extension fields -pub mod exts { - - pub const goproto_enum_prefix: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(62001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_enum_stringer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(62021, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const enum_stringer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(62022, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const enum_customname: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(62023, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); - - pub const enumdecl: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(62024, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const enumvalue_customname: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumValueOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(66001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); - - pub const goproto_getters_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_enum_prefix_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63002, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_stringer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63003, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const verbose_equal_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63004, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const face_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63005, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const gostring_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63006, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const populate_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63007, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const stringer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63008, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const onlyone_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63009, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const equal_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63013, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const description_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63014, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const testgen_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63015, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const benchgen_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63016, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const marshaler_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63017, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const unmarshaler_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63018, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const stable_marshaler_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63019, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const sizer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63020, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_enum_stringer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63021, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const enum_stringer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63022, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const unsafe_marshaler_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63023, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const unsafe_unmarshaler_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63024, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_extensions_map_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63025, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_unrecognized_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63026, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const gogoproto_import: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63027, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const protosizer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63028, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const compare_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63029, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const typedecl_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63030, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const enumdecl_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63031, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_registration: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63032, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const messagename_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63033, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_sizecache_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63034, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_unkeyed_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63035, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_getters: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_stringer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64003, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const verbose_equal: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64004, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const face: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64005, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const gostring: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64006, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const populate: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64007, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const stringer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(67008, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const onlyone: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64009, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const equal: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64013, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const description: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64014, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const testgen: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64015, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const benchgen: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64016, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const marshaler: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64017, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const unmarshaler: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64018, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const stable_marshaler: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64019, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const sizer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64020, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const unsafe_marshaler: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64023, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const unsafe_unmarshaler: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64024, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_extensions_map: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64025, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_unrecognized: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64026, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const protosizer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64028, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const compare: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64029, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const typedecl: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64030, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const messagename: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64033, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_sizecache: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64034, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_unkeyed: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64035, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const nullable: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(65001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const embed: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(65002, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const customtype: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65003, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); - - pub const customname: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65004, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); - - pub const jsontag: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65005, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); - - pub const moretags: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65006, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); - - pub const casttype: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65007, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); - - pub const castkey: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65008, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); - - pub const castvalue: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65009, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); - - pub const stdtime: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(65010, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const stdduration: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(65011, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const wktpointer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(65012, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); -} - -static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x14gogoproto/gogo.proto\x12\tgogoproto\x1a\x20google/protobuf/descrip\ - tor.proto:N\n\x13goproto_enum_prefix\x18\xb1\xe4\x03\x20\x01(\x08\x12\ - \x1c.google.protobuf.EnumOptionsR\x11goprotoEnumPrefix:R\n\x15goproto_en\ - um_stringer\x18\xc5\xe4\x03\x20\x01(\x08\x12\x1c.google.protobuf.EnumOpt\ - ionsR\x13goprotoEnumStringer:C\n\renum_stringer\x18\xc6\xe4\x03\x20\x01(\ - \x08\x12\x1c.google.protobuf.EnumOptionsR\x0cenumStringer:G\n\x0fenum_cu\ - stomname\x18\xc7\xe4\x03\x20\x01(\t\x12\x1c.google.protobuf.EnumOptionsR\ - \x0eenumCustomname::\n\x08enumdecl\x18\xc8\xe4\x03\x20\x01(\x08\x12\x1c.\ - google.protobuf.EnumOptionsR\x08enumdecl:V\n\x14enumvalue_customname\x18\ - \xd1\x83\x04\x20\x01(\t\x12!.google.protobuf.EnumValueOptionsR\x13enumva\ - lueCustomname:N\n\x13goproto_getters_all\x18\x99\xec\x03\x20\x01(\x08\ - \x12\x1c.google.protobuf.FileOptionsR\x11goprotoGettersAll:U\n\x17goprot\ - o_enum_prefix_all\x18\x9a\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.F\ - ileOptionsR\x14goprotoEnumPrefixAll:P\n\x14goproto_stringer_all\x18\x9b\ - \xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x12goprotoStr\ - ingerAll:J\n\x11verbose_equal_all\x18\x9c\xec\x03\x20\x01(\x08\x12\x1c.g\ - oogle.protobuf.FileOptionsR\x0fverboseEqualAll:9\n\x08face_all\x18\x9d\ - \xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x07faceAll:A\ - \n\x0cgostring_all\x18\x9e\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.\ - FileOptionsR\x0bgostringAll:A\n\x0cpopulate_all\x18\x9f\xec\x03\x20\x01(\ - \x08\x12\x1c.google.protobuf.FileOptionsR\x0bpopulateAll:A\n\x0cstringer\ - _all\x18\xa0\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\ - \x0bstringerAll:?\n\x0bonlyone_all\x18\xa1\xec\x03\x20\x01(\x08\x12\x1c.\ - google.protobuf.FileOptionsR\nonlyoneAll:;\n\tequal_all\x18\xa5\xec\x03\ - \x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x08equalAll:G\n\x0fde\ - scription_all\x18\xa6\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileO\ - ptionsR\x0edescriptionAll:?\n\x0btestgen_all\x18\xa7\xec\x03\x20\x01(\ - \x08\x12\x1c.google.protobuf.FileOptionsR\ntestgenAll:A\n\x0cbenchgen_al\ - l\x18\xa8\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x0bb\ - enchgenAll:C\n\rmarshaler_all\x18\xa9\xec\x03\x20\x01(\x08\x12\x1c.googl\ - e.protobuf.FileOptionsR\x0cmarshalerAll:G\n\x0funmarshaler_all\x18\xaa\ - \xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x0eunmarshale\ - rAll:P\n\x14stable_marshaler_all\x18\xab\xec\x03\x20\x01(\x08\x12\x1c.go\ - ogle.protobuf.FileOptionsR\x12stableMarshalerAll:;\n\tsizer_all\x18\xac\ - \xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x08sizerAll:Y\ - \n\x19goproto_enum_stringer_all\x18\xad\xec\x03\x20\x01(\x08\x12\x1c.goo\ - gle.protobuf.FileOptionsR\x16goprotoEnumStringerAll:J\n\x11enum_stringer\ - _all\x18\xae\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\ - \x0fenumStringerAll:P\n\x14unsafe_marshaler_all\x18\xaf\xec\x03\x20\x01(\ - \x08\x12\x1c.google.protobuf.FileOptionsR\x12unsafeMarshalerAll:T\n\x16u\ - nsafe_unmarshaler_all\x18\xb0\xec\x03\x20\x01(\x08\x12\x1c.google.protob\ - uf.FileOptionsR\x14unsafeUnmarshalerAll:[\n\x1agoproto_extensions_map_al\ - l\x18\xb1\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x17g\ - oprotoExtensionsMapAll:X\n\x18goproto_unrecognized_all\x18\xb2\xec\x03\ - \x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x16goprotoUnrecognize\ - dAll:I\n\x10gogoproto_import\x18\xb3\xec\x03\x20\x01(\x08\x12\x1c.google\ - .protobuf.FileOptionsR\x0fgogoprotoImport:E\n\x0eprotosizer_all\x18\xb4\ - \xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\rprotosizerAl\ - l:?\n\x0bcompare_all\x18\xb5\xec\x03\x20\x01(\x08\x12\x1c.google.protobu\ - f.FileOptionsR\ncompareAll:A\n\x0ctypedecl_all\x18\xb6\xec\x03\x20\x01(\ - \x08\x12\x1c.google.protobuf.FileOptionsR\x0btypedeclAll:A\n\x0cenumdecl\ - _all\x18\xb7\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\ - \x0benumdeclAll:Q\n\x14goproto_registration\x18\xb8\xec\x03\x20\x01(\x08\ - \x12\x1c.google.protobuf.FileOptionsR\x13goprotoRegistration:G\n\x0fmess\ - agename_all\x18\xb9\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOpt\ - ionsR\x0emessagenameAll:R\n\x15goproto_sizecache_all\x18\xba\xec\x03\x20\ - \x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x13goprotoSizecacheAll:N\ - \n\x13goproto_unkeyed_all\x18\xbb\xec\x03\x20\x01(\x08\x12\x1c.google.pr\ - otobuf.FileOptionsR\x11goprotoUnkeyedAll:J\n\x0fgoproto_getters\x18\x81\ - \xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x0egoproto\ - Getters:L\n\x10goproto_stringer\x18\x83\xf4\x03\x20\x01(\x08\x12\x1f.goo\ - gle.protobuf.MessageOptionsR\x0fgoprotoStringer:F\n\rverbose_equal\x18\ - \x84\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x0cver\ - boseEqual:5\n\x04face\x18\x85\xf4\x03\x20\x01(\x08\x12\x1f.google.protob\ - uf.MessageOptionsR\x04face:=\n\x08gostring\x18\x86\xf4\x03\x20\x01(\x08\ - \x12\x1f.google.protobuf.MessageOptionsR\x08gostring:=\n\x08populate\x18\ - \x87\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x08pop\ - ulate:=\n\x08stringer\x18\xc0\x8b\x04\x20\x01(\x08\x12\x1f.google.protob\ - uf.MessageOptionsR\x08stringer:;\n\x07onlyone\x18\x89\xf4\x03\x20\x01(\ - \x08\x12\x1f.google.protobuf.MessageOptionsR\x07onlyone:7\n\x05equal\x18\ - \x8d\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x05equ\ - al:C\n\x0bdescription\x18\x8e\xf4\x03\x20\x01(\x08\x12\x1f.google.protob\ - uf.MessageOptionsR\x0bdescription:;\n\x07testgen\x18\x8f\xf4\x03\x20\x01\ - (\x08\x12\x1f.google.protobuf.MessageOptionsR\x07testgen:=\n\x08benchgen\ - \x18\x90\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\ - \x08benchgen:?\n\tmarshaler\x18\x91\xf4\x03\x20\x01(\x08\x12\x1f.google.\ - protobuf.MessageOptionsR\tmarshaler:C\n\x0bunmarshaler\x18\x92\xf4\x03\ - \x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x0bunmarshaler:L\n\ - \x10stable_marshaler\x18\x93\xf4\x03\x20\x01(\x08\x12\x1f.google.protobu\ - f.MessageOptionsR\x0fstableMarshaler:7\n\x05sizer\x18\x94\xf4\x03\x20\ - \x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x05sizer:L\n\x10unsafe\ - _marshaler\x18\x97\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageO\ - ptionsR\x0funsafeMarshaler:P\n\x12unsafe_unmarshaler\x18\x98\xf4\x03\x20\ - \x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x11unsafeUnmarshaler:W\ - \n\x16goproto_extensions_map\x18\x99\xf4\x03\x20\x01(\x08\x12\x1f.google\ - .protobuf.MessageOptionsR\x14goprotoExtensionsMap:T\n\x14goproto_unrecog\ - nized\x18\x9a\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOption\ - sR\x13goprotoUnrecognized:A\n\nprotosizer\x18\x9c\xf4\x03\x20\x01(\x08\ - \x12\x1f.google.protobuf.MessageOptionsR\nprotosizer:;\n\x07compare\x18\ - \x9d\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x07com\ - pare:=\n\x08typedecl\x18\x9e\xf4\x03\x20\x01(\x08\x12\x1f.google.protobu\ - f.MessageOptionsR\x08typedecl:C\n\x0bmessagename\x18\xa1\xf4\x03\x20\x01\ - (\x08\x12\x1f.google.protobuf.MessageOptionsR\x0bmessagename:N\n\x11gopr\ - oto_sizecache\x18\xa2\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.Messa\ - geOptionsR\x10goprotoSizecache:J\n\x0fgoproto_unkeyed\x18\xa3\xf4\x03\ - \x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x0egoprotoUnkeyed:\ - ;\n\x08nullable\x18\xe9\xfb\x03\x20\x01(\x08\x12\x1d.google.protobuf.Fie\ - ldOptionsR\x08nullable:5\n\x05embed\x18\xea\xfb\x03\x20\x01(\x08\x12\x1d\ - .google.protobuf.FieldOptionsR\x05embed:?\n\ncustomtype\x18\xeb\xfb\x03\ - \x20\x01(\t\x12\x1d.google.protobuf.FieldOptionsR\ncustomtype:?\n\ncusto\ - mname\x18\xec\xfb\x03\x20\x01(\t\x12\x1d.google.protobuf.FieldOptionsR\n\ - customname:9\n\x07jsontag\x18\xed\xfb\x03\x20\x01(\t\x12\x1d.google.prot\ - obuf.FieldOptionsR\x07jsontag:;\n\x08moretags\x18\xee\xfb\x03\x20\x01(\t\ - \x12\x1d.google.protobuf.FieldOptionsR\x08moretags:;\n\x08casttype\x18\ - \xef\xfb\x03\x20\x01(\t\x12\x1d.google.protobuf.FieldOptionsR\x08casttyp\ - e:9\n\x07castkey\x18\xf0\xfb\x03\x20\x01(\t\x12\x1d.google.protobuf.Fiel\ - dOptionsR\x07castkey:=\n\tcastvalue\x18\xf1\xfb\x03\x20\x01(\t\x12\x1d.g\ - oogle.protobuf.FieldOptionsR\tcastvalue:9\n\x07stdtime\x18\xf2\xfb\x03\ - \x20\x01(\x08\x12\x1d.google.protobuf.FieldOptionsR\x07stdtime:A\n\x0bst\ - dduration\x18\xf3\xfb\x03\x20\x01(\x08\x12\x1d.google.protobuf.FieldOpti\ - onsR\x0bstdduration:?\n\nwktpointer\x18\xf4\xfb\x03\x20\x01(\x08\x12\x1d\ - .google.protobuf.FieldOptionsR\nwktpointerBE\n\x13com.google.protobufB\n\ - GoGoProtosZ\"github.com/gogo/protobuf/gogoprotob\x06proto2\ -"; - -/// `FileDescriptorProto` object which was a source for this generated file -fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); - file_descriptor_proto_lazy.get(|| { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() - }) -} - -/// `FileDescriptor` object which allows dynamic access to files -pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { - static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); - static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); - file_descriptor.get(|| { - let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { - let mut deps = ::std::vec::Vec::with_capacity(1); - deps.push(::protobuf::descriptor::file_descriptor().clone()); - let mut messages = ::std::vec::Vec::with_capacity(0); - let mut enums = ::std::vec::Vec::with_capacity(0); - ::protobuf::reflect::GeneratedFileDescriptor::new_generated( - file_descriptor_proto(), - deps, - messages, - enums, - ) - }); - ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) - }) -} diff --git a/crates/shim-protos/src/events/image.rs b/crates/shim-protos/src/events/image.rs deleted file mode 100644 index d835b77a..00000000 --- a/crates/shim-protos/src/events/image.rs +++ /dev/null @@ -1,638 +0,0 @@ -// This file is generated by rust-protobuf 3.1.0. Do not edit -// .proto file is parsed by pure -// @generated - -// https://github.com/rust-lang/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![allow(unused_attributes)] -#![cfg_attr(rustfmt, rustfmt::skip)] - -#![allow(box_pointers)] -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unused_results)] -#![allow(unused_mut)] - -//! Generated file from `github.com/containerd/containerd/api/events/image.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_1_0; - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.services.images.v1.ImageCreate) -pub struct ImageCreate { - // message fields - // @@protoc_insertion_point(field:containerd.services.images.v1.ImageCreate.name) - pub name: ::std::string::String, - // @@protoc_insertion_point(field:containerd.services.images.v1.ImageCreate.labels) - pub labels: ::std::collections::HashMap<::std::string::String, ::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:containerd.services.images.v1.ImageCreate.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ImageCreate { - fn default() -> &'a ImageCreate { - ::default_instance() - } -} - -impl ImageCreate { - pub fn new() -> ImageCreate { - ::std::default::Default::default() - } - - // string name = 1; - - pub fn name(&self) -> &str { - &self.name - } - - pub fn clear_name(&mut self) { - self.name.clear(); - } - - // Param is passed by value, moved - pub fn set_name(&mut self, v: ::std::string::String) { - self.name = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_name(&mut self) -> &mut ::std::string::String { - &mut self.name - } - - // Take field - pub fn take_name(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.name, ::std::string::String::new()) - } - - // repeated .containerd.services.images.v1.ImageCreate.LabelsEntry labels = 2; - - pub fn labels(&self) -> &::std::collections::HashMap<::std::string::String, ::std::string::String> { - &self.labels - } - - pub fn clear_labels(&mut self) { - self.labels.clear(); - } - - // Param is passed by value, moved - pub fn set_labels(&mut self, v: ::std::collections::HashMap<::std::string::String, ::std::string::String>) { - self.labels = v; - } - - // Mutable pointer to the field. - pub fn mut_labels(&mut self) -> &mut ::std::collections::HashMap<::std::string::String, ::std::string::String> { - &mut self.labels - } - - // Take field - pub fn take_labels(&mut self) -> ::std::collections::HashMap<::std::string::String, ::std::string::String> { - ::std::mem::replace(&mut self.labels, ::std::collections::HashMap::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(2); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "name", - |m: &ImageCreate| { &m.name }, - |m: &mut ImageCreate| { &mut m.name }, - )); - fields.push(::protobuf::reflect::rt::v2::make_map_simpler_accessor::<_, _, _>( - "labels", - |m: &ImageCreate| { &m.labels }, - |m: &mut ImageCreate| { &mut m.labels }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "ImageCreate", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for ImageCreate { - const NAME: &'static str = "ImageCreate"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.name = is.read_string()?; - }, - 18 => { - let len = is.read_raw_varint32()?; - let old_limit = is.push_limit(len as u64)?; - let mut key = ::std::default::Default::default(); - let mut value = ::std::default::Default::default(); - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => key = is.read_string()?, - 18 => value = is.read_string()?, - _ => ::protobuf::rt::skip_field_for_tag(tag, is)?, - }; - } - is.pop_limit(old_limit); - self.labels.insert(key, value); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.name.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.name); - } - for (k, v) in &self.labels { - let mut entry_size = 0; - entry_size += ::protobuf::rt::string_size(1, &k); - entry_size += ::protobuf::rt::string_size(2, &v); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(entry_size) + entry_size - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.name.is_empty() { - os.write_string(1, &self.name)?; - } - for (k, v) in &self.labels { - let mut entry_size = 0; - entry_size += ::protobuf::rt::string_size(1, &k); - entry_size += ::protobuf::rt::string_size(2, &v); - os.write_raw_varint32(18)?; // Tag. - os.write_raw_varint32(entry_size as u32)?; - os.write_string(1, &k)?; - os.write_string(2, &v)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ImageCreate { - ImageCreate::new() - } - - fn clear(&mut self) { - self.name.clear(); - self.labels.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static ImageCreate { - static instance: ::protobuf::rt::Lazy = ::protobuf::rt::Lazy::new(); - instance.get(ImageCreate::new) - } -} - -impl ::protobuf::MessageFull for ImageCreate { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("ImageCreate").unwrap()).clone() - } -} - -impl ::std::fmt::Display for ImageCreate { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ImageCreate { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.services.images.v1.ImageUpdate) -pub struct ImageUpdate { - // message fields - // @@protoc_insertion_point(field:containerd.services.images.v1.ImageUpdate.name) - pub name: ::std::string::String, - // @@protoc_insertion_point(field:containerd.services.images.v1.ImageUpdate.labels) - pub labels: ::std::collections::HashMap<::std::string::String, ::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:containerd.services.images.v1.ImageUpdate.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ImageUpdate { - fn default() -> &'a ImageUpdate { - ::default_instance() - } -} - -impl ImageUpdate { - pub fn new() -> ImageUpdate { - ::std::default::Default::default() - } - - // string name = 1; - - pub fn name(&self) -> &str { - &self.name - } - - pub fn clear_name(&mut self) { - self.name.clear(); - } - - // Param is passed by value, moved - pub fn set_name(&mut self, v: ::std::string::String) { - self.name = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_name(&mut self) -> &mut ::std::string::String { - &mut self.name - } - - // Take field - pub fn take_name(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.name, ::std::string::String::new()) - } - - // repeated .containerd.services.images.v1.ImageUpdate.LabelsEntry labels = 2; - - pub fn labels(&self) -> &::std::collections::HashMap<::std::string::String, ::std::string::String> { - &self.labels - } - - pub fn clear_labels(&mut self) { - self.labels.clear(); - } - - // Param is passed by value, moved - pub fn set_labels(&mut self, v: ::std::collections::HashMap<::std::string::String, ::std::string::String>) { - self.labels = v; - } - - // Mutable pointer to the field. - pub fn mut_labels(&mut self) -> &mut ::std::collections::HashMap<::std::string::String, ::std::string::String> { - &mut self.labels - } - - // Take field - pub fn take_labels(&mut self) -> ::std::collections::HashMap<::std::string::String, ::std::string::String> { - ::std::mem::replace(&mut self.labels, ::std::collections::HashMap::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(2); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "name", - |m: &ImageUpdate| { &m.name }, - |m: &mut ImageUpdate| { &mut m.name }, - )); - fields.push(::protobuf::reflect::rt::v2::make_map_simpler_accessor::<_, _, _>( - "labels", - |m: &ImageUpdate| { &m.labels }, - |m: &mut ImageUpdate| { &mut m.labels }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "ImageUpdate", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for ImageUpdate { - const NAME: &'static str = "ImageUpdate"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.name = is.read_string()?; - }, - 18 => { - let len = is.read_raw_varint32()?; - let old_limit = is.push_limit(len as u64)?; - let mut key = ::std::default::Default::default(); - let mut value = ::std::default::Default::default(); - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => key = is.read_string()?, - 18 => value = is.read_string()?, - _ => ::protobuf::rt::skip_field_for_tag(tag, is)?, - }; - } - is.pop_limit(old_limit); - self.labels.insert(key, value); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.name.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.name); - } - for (k, v) in &self.labels { - let mut entry_size = 0; - entry_size += ::protobuf::rt::string_size(1, &k); - entry_size += ::protobuf::rt::string_size(2, &v); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(entry_size) + entry_size - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.name.is_empty() { - os.write_string(1, &self.name)?; - } - for (k, v) in &self.labels { - let mut entry_size = 0; - entry_size += ::protobuf::rt::string_size(1, &k); - entry_size += ::protobuf::rt::string_size(2, &v); - os.write_raw_varint32(18)?; // Tag. - os.write_raw_varint32(entry_size as u32)?; - os.write_string(1, &k)?; - os.write_string(2, &v)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ImageUpdate { - ImageUpdate::new() - } - - fn clear(&mut self) { - self.name.clear(); - self.labels.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static ImageUpdate { - static instance: ::protobuf::rt::Lazy = ::protobuf::rt::Lazy::new(); - instance.get(ImageUpdate::new) - } -} - -impl ::protobuf::MessageFull for ImageUpdate { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("ImageUpdate").unwrap()).clone() - } -} - -impl ::std::fmt::Display for ImageUpdate { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ImageUpdate { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.services.images.v1.ImageDelete) -pub struct ImageDelete { - // message fields - // @@protoc_insertion_point(field:containerd.services.images.v1.ImageDelete.name) - pub name: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:containerd.services.images.v1.ImageDelete.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ImageDelete { - fn default() -> &'a ImageDelete { - ::default_instance() - } -} - -impl ImageDelete { - pub fn new() -> ImageDelete { - ::std::default::Default::default() - } - - // string name = 1; - - pub fn name(&self) -> &str { - &self.name - } - - pub fn clear_name(&mut self) { - self.name.clear(); - } - - // Param is passed by value, moved - pub fn set_name(&mut self, v: ::std::string::String) { - self.name = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_name(&mut self) -> &mut ::std::string::String { - &mut self.name - } - - // Take field - pub fn take_name(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.name, ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "name", - |m: &ImageDelete| { &m.name }, - |m: &mut ImageDelete| { &mut m.name }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "ImageDelete", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for ImageDelete { - const NAME: &'static str = "ImageDelete"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.name = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.name.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.name); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.name.is_empty() { - os.write_string(1, &self.name)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ImageDelete { - ImageDelete::new() - } - - fn clear(&mut self) { - self.name.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static ImageDelete { - static instance: ImageDelete = ImageDelete { - name: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for ImageDelete { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("ImageDelete").unwrap()).clone() - } -} - -impl ::std::fmt::Display for ImageDelete { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ImageDelete { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -static file_descriptor_proto_data: &'static [u8] = b"\ - \n7github.com/containerd/containerd/api/events/image.proto\x12\x1dcontai\ - nerd.services.images.v1\x1a@github.com/containerd/containerd/protobuf/pl\ - ugin/fieldpath.protoX\0\"\xac\x01\n\x0bImageCreate\x12\x12\n\x04name\x18\ - \x01\x20\x01(\tR\x04name\x12N\n\x06labels\x18\x02\x20\x03(\x0b26.contain\ - erd.services.images.v1.ImageCreate.LabelsEntryR\x06labels\x1a9\n\x0bLabe\ - lsEntry\x12\x10\n\x03key\x18\x01\x20\x01(\tR\x03key\x12\x14\n\x05value\ - \x18\x02\x20\x01(\tR\x05value:\x028\x01\"\xac\x01\n\x0bImageUpdate\x12\ - \x12\n\x04name\x18\x01\x20\x01(\tR\x04name\x12N\n\x06labels\x18\x02\x20\ - \x03(\x0b26.containerd.services.images.v1.ImageUpdate.LabelsEntryR\x06la\ - bels\x1a9\n\x0bLabelsEntry\x12\x10\n\x03key\x18\x01\x20\x01(\tR\x03key\ - \x12\x14\n\x05value\x18\x02\x20\x01(\tR\x05value:\x028\x01\"!\n\x0bImage\ - Delete\x12\x12\n\x04name\x18\x01\x20\x01(\tR\x04nameB8Z2github.com/conta\ - inerd/containerd/api/events;events\xa0\xf4\x1e\x01b\x06proto3\ -"; - -/// `FileDescriptorProto` object which was a source for this generated file -fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); - file_descriptor_proto_lazy.get(|| { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() - }) -} - -/// `FileDescriptor` object which allows dynamic access to files -pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { - static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); - static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); - file_descriptor.get(|| { - let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { - let mut deps = ::std::vec::Vec::with_capacity(1); - deps.push(super::fieldpath::file_descriptor().clone()); - let mut messages = ::std::vec::Vec::with_capacity(3); - messages.push(ImageCreate::generated_message_descriptor_data()); - messages.push(ImageUpdate::generated_message_descriptor_data()); - messages.push(ImageDelete::generated_message_descriptor_data()); - let mut enums = ::std::vec::Vec::with_capacity(0); - ::protobuf::reflect::GeneratedFileDescriptor::new_generated( - file_descriptor_proto(), - deps, - messages, - enums, - ) - }); - ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) - }) -} diff --git a/crates/shim-protos/src/events/mod.rs b/crates/shim-protos/src/events/mod.rs deleted file mode 100644 index fca60ac7..00000000 --- a/crates/shim-protos/src/events/mod.rs +++ /dev/null @@ -1,11 +0,0 @@ -pub mod container; -pub mod content; -pub mod image; -pub mod namespace; -pub mod snapshot; -pub mod task; - -pub(crate) mod mount; - -mod fieldpath; -mod gogo; diff --git a/crates/shim-protos/src/events/mount.rs b/crates/shim-protos/src/events/mount.rs deleted file mode 100644 index 2164cfc7..00000000 --- a/crates/shim-protos/src/events/mount.rs +++ /dev/null @@ -1,3 +0,0 @@ -/// Reexport types::mount::* to avoid manually editing other auto-generated source files. - -pub use crate::types::mount::*; \ No newline at end of file diff --git a/crates/shim-protos/src/events/namespace.rs b/crates/shim-protos/src/events/namespace.rs deleted file mode 100644 index 291a3e15..00000000 --- a/crates/shim-protos/src/events/namespace.rs +++ /dev/null @@ -1,640 +0,0 @@ -// This file is generated by rust-protobuf 3.1.0. Do not edit -// .proto file is parsed by pure -// @generated - -// https://github.com/rust-lang/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![allow(unused_attributes)] -#![cfg_attr(rustfmt, rustfmt::skip)] - -#![allow(box_pointers)] -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unused_results)] -#![allow(unused_mut)] - -//! Generated file from `github.com/containerd/containerd/api/events/namespace.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_1_0; - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.events.NamespaceCreate) -pub struct NamespaceCreate { - // message fields - // @@protoc_insertion_point(field:containerd.events.NamespaceCreate.name) - pub name: ::std::string::String, - // @@protoc_insertion_point(field:containerd.events.NamespaceCreate.labels) - pub labels: ::std::collections::HashMap<::std::string::String, ::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:containerd.events.NamespaceCreate.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a NamespaceCreate { - fn default() -> &'a NamespaceCreate { - ::default_instance() - } -} - -impl NamespaceCreate { - pub fn new() -> NamespaceCreate { - ::std::default::Default::default() - } - - // string name = 1; - - pub fn name(&self) -> &str { - &self.name - } - - pub fn clear_name(&mut self) { - self.name.clear(); - } - - // Param is passed by value, moved - pub fn set_name(&mut self, v: ::std::string::String) { - self.name = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_name(&mut self) -> &mut ::std::string::String { - &mut self.name - } - - // Take field - pub fn take_name(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.name, ::std::string::String::new()) - } - - // repeated .containerd.events.NamespaceCreate.LabelsEntry labels = 2; - - pub fn labels(&self) -> &::std::collections::HashMap<::std::string::String, ::std::string::String> { - &self.labels - } - - pub fn clear_labels(&mut self) { - self.labels.clear(); - } - - // Param is passed by value, moved - pub fn set_labels(&mut self, v: ::std::collections::HashMap<::std::string::String, ::std::string::String>) { - self.labels = v; - } - - // Mutable pointer to the field. - pub fn mut_labels(&mut self) -> &mut ::std::collections::HashMap<::std::string::String, ::std::string::String> { - &mut self.labels - } - - // Take field - pub fn take_labels(&mut self) -> ::std::collections::HashMap<::std::string::String, ::std::string::String> { - ::std::mem::replace(&mut self.labels, ::std::collections::HashMap::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(2); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "name", - |m: &NamespaceCreate| { &m.name }, - |m: &mut NamespaceCreate| { &mut m.name }, - )); - fields.push(::protobuf::reflect::rt::v2::make_map_simpler_accessor::<_, _, _>( - "labels", - |m: &NamespaceCreate| { &m.labels }, - |m: &mut NamespaceCreate| { &mut m.labels }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "NamespaceCreate", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for NamespaceCreate { - const NAME: &'static str = "NamespaceCreate"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.name = is.read_string()?; - }, - 18 => { - let len = is.read_raw_varint32()?; - let old_limit = is.push_limit(len as u64)?; - let mut key = ::std::default::Default::default(); - let mut value = ::std::default::Default::default(); - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => key = is.read_string()?, - 18 => value = is.read_string()?, - _ => ::protobuf::rt::skip_field_for_tag(tag, is)?, - }; - } - is.pop_limit(old_limit); - self.labels.insert(key, value); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.name.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.name); - } - for (k, v) in &self.labels { - let mut entry_size = 0; - entry_size += ::protobuf::rt::string_size(1, &k); - entry_size += ::protobuf::rt::string_size(2, &v); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(entry_size) + entry_size - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.name.is_empty() { - os.write_string(1, &self.name)?; - } - for (k, v) in &self.labels { - let mut entry_size = 0; - entry_size += ::protobuf::rt::string_size(1, &k); - entry_size += ::protobuf::rt::string_size(2, &v); - os.write_raw_varint32(18)?; // Tag. - os.write_raw_varint32(entry_size as u32)?; - os.write_string(1, &k)?; - os.write_string(2, &v)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> NamespaceCreate { - NamespaceCreate::new() - } - - fn clear(&mut self) { - self.name.clear(); - self.labels.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static NamespaceCreate { - static instance: ::protobuf::rt::Lazy = ::protobuf::rt::Lazy::new(); - instance.get(NamespaceCreate::new) - } -} - -impl ::protobuf::MessageFull for NamespaceCreate { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("NamespaceCreate").unwrap()).clone() - } -} - -impl ::std::fmt::Display for NamespaceCreate { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for NamespaceCreate { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.events.NamespaceUpdate) -pub struct NamespaceUpdate { - // message fields - // @@protoc_insertion_point(field:containerd.events.NamespaceUpdate.name) - pub name: ::std::string::String, - // @@protoc_insertion_point(field:containerd.events.NamespaceUpdate.labels) - pub labels: ::std::collections::HashMap<::std::string::String, ::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:containerd.events.NamespaceUpdate.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a NamespaceUpdate { - fn default() -> &'a NamespaceUpdate { - ::default_instance() - } -} - -impl NamespaceUpdate { - pub fn new() -> NamespaceUpdate { - ::std::default::Default::default() - } - - // string name = 1; - - pub fn name(&self) -> &str { - &self.name - } - - pub fn clear_name(&mut self) { - self.name.clear(); - } - - // Param is passed by value, moved - pub fn set_name(&mut self, v: ::std::string::String) { - self.name = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_name(&mut self) -> &mut ::std::string::String { - &mut self.name - } - - // Take field - pub fn take_name(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.name, ::std::string::String::new()) - } - - // repeated .containerd.events.NamespaceUpdate.LabelsEntry labels = 2; - - pub fn labels(&self) -> &::std::collections::HashMap<::std::string::String, ::std::string::String> { - &self.labels - } - - pub fn clear_labels(&mut self) { - self.labels.clear(); - } - - // Param is passed by value, moved - pub fn set_labels(&mut self, v: ::std::collections::HashMap<::std::string::String, ::std::string::String>) { - self.labels = v; - } - - // Mutable pointer to the field. - pub fn mut_labels(&mut self) -> &mut ::std::collections::HashMap<::std::string::String, ::std::string::String> { - &mut self.labels - } - - // Take field - pub fn take_labels(&mut self) -> ::std::collections::HashMap<::std::string::String, ::std::string::String> { - ::std::mem::replace(&mut self.labels, ::std::collections::HashMap::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(2); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "name", - |m: &NamespaceUpdate| { &m.name }, - |m: &mut NamespaceUpdate| { &mut m.name }, - )); - fields.push(::protobuf::reflect::rt::v2::make_map_simpler_accessor::<_, _, _>( - "labels", - |m: &NamespaceUpdate| { &m.labels }, - |m: &mut NamespaceUpdate| { &mut m.labels }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "NamespaceUpdate", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for NamespaceUpdate { - const NAME: &'static str = "NamespaceUpdate"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.name = is.read_string()?; - }, - 18 => { - let len = is.read_raw_varint32()?; - let old_limit = is.push_limit(len as u64)?; - let mut key = ::std::default::Default::default(); - let mut value = ::std::default::Default::default(); - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => key = is.read_string()?, - 18 => value = is.read_string()?, - _ => ::protobuf::rt::skip_field_for_tag(tag, is)?, - }; - } - is.pop_limit(old_limit); - self.labels.insert(key, value); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.name.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.name); - } - for (k, v) in &self.labels { - let mut entry_size = 0; - entry_size += ::protobuf::rt::string_size(1, &k); - entry_size += ::protobuf::rt::string_size(2, &v); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(entry_size) + entry_size - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.name.is_empty() { - os.write_string(1, &self.name)?; - } - for (k, v) in &self.labels { - let mut entry_size = 0; - entry_size += ::protobuf::rt::string_size(1, &k); - entry_size += ::protobuf::rt::string_size(2, &v); - os.write_raw_varint32(18)?; // Tag. - os.write_raw_varint32(entry_size as u32)?; - os.write_string(1, &k)?; - os.write_string(2, &v)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> NamespaceUpdate { - NamespaceUpdate::new() - } - - fn clear(&mut self) { - self.name.clear(); - self.labels.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static NamespaceUpdate { - static instance: ::protobuf::rt::Lazy = ::protobuf::rt::Lazy::new(); - instance.get(NamespaceUpdate::new) - } -} - -impl ::protobuf::MessageFull for NamespaceUpdate { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("NamespaceUpdate").unwrap()).clone() - } -} - -impl ::std::fmt::Display for NamespaceUpdate { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for NamespaceUpdate { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.events.NamespaceDelete) -pub struct NamespaceDelete { - // message fields - // @@protoc_insertion_point(field:containerd.events.NamespaceDelete.name) - pub name: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:containerd.events.NamespaceDelete.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a NamespaceDelete { - fn default() -> &'a NamespaceDelete { - ::default_instance() - } -} - -impl NamespaceDelete { - pub fn new() -> NamespaceDelete { - ::std::default::Default::default() - } - - // string name = 1; - - pub fn name(&self) -> &str { - &self.name - } - - pub fn clear_name(&mut self) { - self.name.clear(); - } - - // Param is passed by value, moved - pub fn set_name(&mut self, v: ::std::string::String) { - self.name = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_name(&mut self) -> &mut ::std::string::String { - &mut self.name - } - - // Take field - pub fn take_name(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.name, ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "name", - |m: &NamespaceDelete| { &m.name }, - |m: &mut NamespaceDelete| { &mut m.name }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "NamespaceDelete", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for NamespaceDelete { - const NAME: &'static str = "NamespaceDelete"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.name = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.name.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.name); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.name.is_empty() { - os.write_string(1, &self.name)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> NamespaceDelete { - NamespaceDelete::new() - } - - fn clear(&mut self) { - self.name.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static NamespaceDelete { - static instance: NamespaceDelete = NamespaceDelete { - name: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for NamespaceDelete { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("NamespaceDelete").unwrap()).clone() - } -} - -impl ::std::fmt::Display for NamespaceDelete { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for NamespaceDelete { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -static file_descriptor_proto_data: &'static [u8] = b"\ - \n;github.com/containerd/containerd/api/events/namespace.proto\x12\x11co\ - ntainerd.events\x1a\x14gogoproto/gogo.proto\x1a@github.com/containerd/co\ - ntainerd/protobuf/plugin/fieldpath.protoX\0X\x01\"\xa8\x01\n\x0fNamespac\ - eCreate\x12\x12\n\x04name\x18\x01\x20\x01(\tR\x04name\x12F\n\x06labels\ - \x18\x02\x20\x03(\x0b2..containerd.events.NamespaceCreate.LabelsEntryR\ - \x06labels\x1a9\n\x0bLabelsEntry\x12\x10\n\x03key\x18\x01\x20\x01(\tR\ - \x03key\x12\x14\n\x05value\x18\x02\x20\x01(\tR\x05value:\x028\x01\"\xa8\ - \x01\n\x0fNamespaceUpdate\x12\x12\n\x04name\x18\x01\x20\x01(\tR\x04name\ - \x12F\n\x06labels\x18\x02\x20\x03(\x0b2..containerd.events.NamespaceUpda\ - te.LabelsEntryR\x06labels\x1a9\n\x0bLabelsEntry\x12\x10\n\x03key\x18\x01\ - \x20\x01(\tR\x03key\x12\x14\n\x05value\x18\x02\x20\x01(\tR\x05value:\x02\ - 8\x01\"%\n\x0fNamespaceDelete\x12\x12\n\x04name\x18\x01\x20\x01(\tR\x04n\ - ameB8Z2github.com/containerd/containerd/api/events;events\xa0\xf4\x1e\ - \x01b\x06proto3\ -"; - -/// `FileDescriptorProto` object which was a source for this generated file -fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); - file_descriptor_proto_lazy.get(|| { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() - }) -} - -/// `FileDescriptor` object which allows dynamic access to files -pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { - static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); - static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); - file_descriptor.get(|| { - let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { - let mut deps = ::std::vec::Vec::with_capacity(2); - deps.push(super::gogo::file_descriptor().clone()); - deps.push(super::fieldpath::file_descriptor().clone()); - let mut messages = ::std::vec::Vec::with_capacity(3); - messages.push(NamespaceCreate::generated_message_descriptor_data()); - messages.push(NamespaceUpdate::generated_message_descriptor_data()); - messages.push(NamespaceDelete::generated_message_descriptor_data()); - let mut enums = ::std::vec::Vec::with_capacity(0); - ::protobuf::reflect::GeneratedFileDescriptor::new_generated( - file_descriptor_proto(), - deps, - messages, - enums, - ) - }); - ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) - }) -} diff --git a/crates/shim-protos/src/events/snapshot.rs b/crates/shim-protos/src/events/snapshot.rs deleted file mode 100644 index 33530d96..00000000 --- a/crates/shim-protos/src/events/snapshot.rs +++ /dev/null @@ -1,601 +0,0 @@ -// This file is generated by rust-protobuf 3.1.0. Do not edit -// .proto file is parsed by pure -// @generated - -// https://github.com/rust-lang/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![allow(unused_attributes)] -#![cfg_attr(rustfmt, rustfmt::skip)] - -#![allow(box_pointers)] -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unused_results)] -#![allow(unused_mut)] - -//! Generated file from `github.com/containerd/containerd/api/events/snapshot.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_1_0; - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.events.SnapshotPrepare) -pub struct SnapshotPrepare { - // message fields - // @@protoc_insertion_point(field:containerd.events.SnapshotPrepare.key) - pub key: ::std::string::String, - // @@protoc_insertion_point(field:containerd.events.SnapshotPrepare.parent) - pub parent: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:containerd.events.SnapshotPrepare.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a SnapshotPrepare { - fn default() -> &'a SnapshotPrepare { - ::default_instance() - } -} - -impl SnapshotPrepare { - pub fn new() -> SnapshotPrepare { - ::std::default::Default::default() - } - - // string key = 1; - - pub fn key(&self) -> &str { - &self.key - } - - pub fn clear_key(&mut self) { - self.key.clear(); - } - - // Param is passed by value, moved - pub fn set_key(&mut self, v: ::std::string::String) { - self.key = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_key(&mut self) -> &mut ::std::string::String { - &mut self.key - } - - // Take field - pub fn take_key(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.key, ::std::string::String::new()) - } - - // string parent = 2; - - pub fn parent(&self) -> &str { - &self.parent - } - - pub fn clear_parent(&mut self) { - self.parent.clear(); - } - - // Param is passed by value, moved - pub fn set_parent(&mut self, v: ::std::string::String) { - self.parent = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_parent(&mut self) -> &mut ::std::string::String { - &mut self.parent - } - - // Take field - pub fn take_parent(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.parent, ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(2); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "key", - |m: &SnapshotPrepare| { &m.key }, - |m: &mut SnapshotPrepare| { &mut m.key }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "parent", - |m: &SnapshotPrepare| { &m.parent }, - |m: &mut SnapshotPrepare| { &mut m.parent }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "SnapshotPrepare", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for SnapshotPrepare { - const NAME: &'static str = "SnapshotPrepare"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.key = is.read_string()?; - }, - 18 => { - self.parent = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.key.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.key); - } - if !self.parent.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.parent); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.key.is_empty() { - os.write_string(1, &self.key)?; - } - if !self.parent.is_empty() { - os.write_string(2, &self.parent)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> SnapshotPrepare { - SnapshotPrepare::new() - } - - fn clear(&mut self) { - self.key.clear(); - self.parent.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static SnapshotPrepare { - static instance: SnapshotPrepare = SnapshotPrepare { - key: ::std::string::String::new(), - parent: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for SnapshotPrepare { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("SnapshotPrepare").unwrap()).clone() - } -} - -impl ::std::fmt::Display for SnapshotPrepare { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for SnapshotPrepare { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.events.SnapshotCommit) -pub struct SnapshotCommit { - // message fields - // @@protoc_insertion_point(field:containerd.events.SnapshotCommit.key) - pub key: ::std::string::String, - // @@protoc_insertion_point(field:containerd.events.SnapshotCommit.name) - pub name: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:containerd.events.SnapshotCommit.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a SnapshotCommit { - fn default() -> &'a SnapshotCommit { - ::default_instance() - } -} - -impl SnapshotCommit { - pub fn new() -> SnapshotCommit { - ::std::default::Default::default() - } - - // string key = 1; - - pub fn key(&self) -> &str { - &self.key - } - - pub fn clear_key(&mut self) { - self.key.clear(); - } - - // Param is passed by value, moved - pub fn set_key(&mut self, v: ::std::string::String) { - self.key = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_key(&mut self) -> &mut ::std::string::String { - &mut self.key - } - - // Take field - pub fn take_key(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.key, ::std::string::String::new()) - } - - // string name = 2; - - pub fn name(&self) -> &str { - &self.name - } - - pub fn clear_name(&mut self) { - self.name.clear(); - } - - // Param is passed by value, moved - pub fn set_name(&mut self, v: ::std::string::String) { - self.name = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_name(&mut self) -> &mut ::std::string::String { - &mut self.name - } - - // Take field - pub fn take_name(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.name, ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(2); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "key", - |m: &SnapshotCommit| { &m.key }, - |m: &mut SnapshotCommit| { &mut m.key }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "name", - |m: &SnapshotCommit| { &m.name }, - |m: &mut SnapshotCommit| { &mut m.name }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "SnapshotCommit", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for SnapshotCommit { - const NAME: &'static str = "SnapshotCommit"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.key = is.read_string()?; - }, - 18 => { - self.name = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.key.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.key); - } - if !self.name.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.name); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.key.is_empty() { - os.write_string(1, &self.key)?; - } - if !self.name.is_empty() { - os.write_string(2, &self.name)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> SnapshotCommit { - SnapshotCommit::new() - } - - fn clear(&mut self) { - self.key.clear(); - self.name.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static SnapshotCommit { - static instance: SnapshotCommit = SnapshotCommit { - key: ::std::string::String::new(), - name: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for SnapshotCommit { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("SnapshotCommit").unwrap()).clone() - } -} - -impl ::std::fmt::Display for SnapshotCommit { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for SnapshotCommit { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.events.SnapshotRemove) -pub struct SnapshotRemove { - // message fields - // @@protoc_insertion_point(field:containerd.events.SnapshotRemove.key) - pub key: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:containerd.events.SnapshotRemove.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a SnapshotRemove { - fn default() -> &'a SnapshotRemove { - ::default_instance() - } -} - -impl SnapshotRemove { - pub fn new() -> SnapshotRemove { - ::std::default::Default::default() - } - - // string key = 1; - - pub fn key(&self) -> &str { - &self.key - } - - pub fn clear_key(&mut self) { - self.key.clear(); - } - - // Param is passed by value, moved - pub fn set_key(&mut self, v: ::std::string::String) { - self.key = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_key(&mut self) -> &mut ::std::string::String { - &mut self.key - } - - // Take field - pub fn take_key(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.key, ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "key", - |m: &SnapshotRemove| { &m.key }, - |m: &mut SnapshotRemove| { &mut m.key }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "SnapshotRemove", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for SnapshotRemove { - const NAME: &'static str = "SnapshotRemove"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.key = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.key.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.key); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.key.is_empty() { - os.write_string(1, &self.key)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> SnapshotRemove { - SnapshotRemove::new() - } - - fn clear(&mut self) { - self.key.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static SnapshotRemove { - static instance: SnapshotRemove = SnapshotRemove { - key: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for SnapshotRemove { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("SnapshotRemove").unwrap()).clone() - } -} - -impl ::std::fmt::Display for SnapshotRemove { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for SnapshotRemove { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -static file_descriptor_proto_data: &'static [u8] = b"\ - \n:github.com/containerd/containerd/api/events/snapshot.proto\x12\x11con\ - tainerd.events\x1a@github.com/containerd/containerd/protobuf/plugin/fiel\ - dpath.protoX\0\";\n\x0fSnapshotPrepare\x12\x10\n\x03key\x18\x01\x20\x01(\ - \tR\x03key\x12\x16\n\x06parent\x18\x02\x20\x01(\tR\x06parent\"6\n\x0eSna\ - pshotCommit\x12\x10\n\x03key\x18\x01\x20\x01(\tR\x03key\x12\x12\n\x04nam\ - e\x18\x02\x20\x01(\tR\x04name\"\"\n\x0eSnapshotRemove\x12\x10\n\x03key\ - \x18\x01\x20\x01(\tR\x03keyB8Z2github.com/containerd/containerd/api/even\ - ts;events\xa0\xf4\x1e\x01b\x06proto3\ -"; - -/// `FileDescriptorProto` object which was a source for this generated file -fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); - file_descriptor_proto_lazy.get(|| { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() - }) -} - -/// `FileDescriptor` object which allows dynamic access to files -pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { - static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); - static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); - file_descriptor.get(|| { - let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { - let mut deps = ::std::vec::Vec::with_capacity(1); - deps.push(super::fieldpath::file_descriptor().clone()); - let mut messages = ::std::vec::Vec::with_capacity(3); - messages.push(SnapshotPrepare::generated_message_descriptor_data()); - messages.push(SnapshotCommit::generated_message_descriptor_data()); - messages.push(SnapshotRemove::generated_message_descriptor_data()); - let mut enums = ::std::vec::Vec::with_capacity(0); - ::protobuf::reflect::GeneratedFileDescriptor::new_generated( - file_descriptor_proto(), - deps, - messages, - enums, - ) - }); - ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) - }) -} diff --git a/crates/shim-protos/src/events/task.rs b/crates/shim-protos/src/events/task.rs deleted file mode 100644 index 67ca6c11..00000000 --- a/crates/shim-protos/src/events/task.rs +++ /dev/null @@ -1,2586 +0,0 @@ -// This file is generated by rust-protobuf 3.1.0. Do not edit -// .proto file is parsed by pure -// @generated - -// https://github.com/rust-lang/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![allow(unused_attributes)] -#![cfg_attr(rustfmt, rustfmt::skip)] - -#![allow(box_pointers)] -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unused_results)] -#![allow(unused_mut)] - -//! Generated file from `github.com/containerd/containerd/api/events/task.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_1_0; - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.events.TaskCreate) -pub struct TaskCreate { - // message fields - // @@protoc_insertion_point(field:containerd.events.TaskCreate.container_id) - pub container_id: ::std::string::String, - // @@protoc_insertion_point(field:containerd.events.TaskCreate.bundle) - pub bundle: ::std::string::String, - // @@protoc_insertion_point(field:containerd.events.TaskCreate.rootfs) - pub rootfs: ::std::vec::Vec, - // @@protoc_insertion_point(field:containerd.events.TaskCreate.io) - pub io: ::protobuf::MessageField, - // @@protoc_insertion_point(field:containerd.events.TaskCreate.checkpoint) - pub checkpoint: ::std::string::String, - // @@protoc_insertion_point(field:containerd.events.TaskCreate.pid) - pub pid: u32, - // special fields - // @@protoc_insertion_point(special_field:containerd.events.TaskCreate.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a TaskCreate { - fn default() -> &'a TaskCreate { - ::default_instance() - } -} - -impl TaskCreate { - pub fn new() -> TaskCreate { - ::std::default::Default::default() - } - - // string container_id = 1; - - pub fn container_id(&self) -> &str { - &self.container_id - } - - pub fn clear_container_id(&mut self) { - self.container_id.clear(); - } - - // Param is passed by value, moved - pub fn set_container_id(&mut self, v: ::std::string::String) { - self.container_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_container_id(&mut self) -> &mut ::std::string::String { - &mut self.container_id - } - - // Take field - pub fn take_container_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.container_id, ::std::string::String::new()) - } - - // string bundle = 2; - - pub fn bundle(&self) -> &str { - &self.bundle - } - - pub fn clear_bundle(&mut self) { - self.bundle.clear(); - } - - // Param is passed by value, moved - pub fn set_bundle(&mut self, v: ::std::string::String) { - self.bundle = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_bundle(&mut self) -> &mut ::std::string::String { - &mut self.bundle - } - - // Take field - pub fn take_bundle(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.bundle, ::std::string::String::new()) - } - - // repeated .containerd.types.Mount rootfs = 3; - - pub fn rootfs(&self) -> &[super::mount::Mount] { - &self.rootfs - } - - pub fn clear_rootfs(&mut self) { - self.rootfs.clear(); - } - - // Param is passed by value, moved - pub fn set_rootfs(&mut self, v: ::std::vec::Vec) { - self.rootfs = v; - } - - // Mutable pointer to the field. - pub fn mut_rootfs(&mut self) -> &mut ::std::vec::Vec { - &mut self.rootfs - } - - // Take field - pub fn take_rootfs(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.rootfs, ::std::vec::Vec::new()) - } - - // .containerd.events.TaskIO io = 4; - - pub fn io(&self) -> &TaskIO { - self.io.as_ref().unwrap_or_else(|| ::default_instance()) - } - - pub fn clear_io(&mut self) { - self.io.clear(); - } - - pub fn has_io(&self) -> bool { - self.io.is_some() - } - - // Param is passed by value, moved - pub fn set_io(&mut self, v: TaskIO) { - self.io = ::protobuf::MessageField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_io(&mut self) -> &mut TaskIO { - self.io.mut_or_insert_default() - } - - // Take field - pub fn take_io(&mut self) -> TaskIO { - self.io.take().unwrap_or_else(|| TaskIO::new()) - } - - // string checkpoint = 5; - - pub fn checkpoint(&self) -> &str { - &self.checkpoint - } - - pub fn clear_checkpoint(&mut self) { - self.checkpoint.clear(); - } - - // Param is passed by value, moved - pub fn set_checkpoint(&mut self, v: ::std::string::String) { - self.checkpoint = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_checkpoint(&mut self) -> &mut ::std::string::String { - &mut self.checkpoint - } - - // Take field - pub fn take_checkpoint(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.checkpoint, ::std::string::String::new()) - } - - // uint32 pid = 6; - - pub fn pid(&self) -> u32 { - self.pid - } - - pub fn clear_pid(&mut self) { - self.pid = 0; - } - - // Param is passed by value, moved - pub fn set_pid(&mut self, v: u32) { - self.pid = v; - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(6); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "container_id", - |m: &TaskCreate| { &m.container_id }, - |m: &mut TaskCreate| { &mut m.container_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "bundle", - |m: &TaskCreate| { &m.bundle }, - |m: &mut TaskCreate| { &mut m.bundle }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "rootfs", - |m: &TaskCreate| { &m.rootfs }, - |m: &mut TaskCreate| { &mut m.rootfs }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, TaskIO>( - "io", - |m: &TaskCreate| { &m.io }, - |m: &mut TaskCreate| { &mut m.io }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "checkpoint", - |m: &TaskCreate| { &m.checkpoint }, - |m: &mut TaskCreate| { &mut m.checkpoint }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "pid", - |m: &TaskCreate| { &m.pid }, - |m: &mut TaskCreate| { &mut m.pid }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "TaskCreate", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for TaskCreate { - const NAME: &'static str = "TaskCreate"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.container_id = is.read_string()?; - }, - 18 => { - self.bundle = is.read_string()?; - }, - 26 => { - self.rootfs.push(is.read_message()?); - }, - 34 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.io)?; - }, - 42 => { - self.checkpoint = is.read_string()?; - }, - 48 => { - self.pid = is.read_uint32()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.container_id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.container_id); - } - if !self.bundle.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.bundle); - } - for value in &self.rootfs { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - if let Some(v) = self.io.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if !self.checkpoint.is_empty() { - my_size += ::protobuf::rt::string_size(5, &self.checkpoint); - } - if self.pid != 0 { - my_size += ::protobuf::rt::uint32_size(6, self.pid); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.container_id.is_empty() { - os.write_string(1, &self.container_id)?; - } - if !self.bundle.is_empty() { - os.write_string(2, &self.bundle)?; - } - for v in &self.rootfs { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - }; - if let Some(v) = self.io.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?; - } - if !self.checkpoint.is_empty() { - os.write_string(5, &self.checkpoint)?; - } - if self.pid != 0 { - os.write_uint32(6, self.pid)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> TaskCreate { - TaskCreate::new() - } - - fn clear(&mut self) { - self.container_id.clear(); - self.bundle.clear(); - self.rootfs.clear(); - self.io.clear(); - self.checkpoint.clear(); - self.pid = 0; - self.special_fields.clear(); - } - - fn default_instance() -> &'static TaskCreate { - static instance: TaskCreate = TaskCreate { - container_id: ::std::string::String::new(), - bundle: ::std::string::String::new(), - rootfs: ::std::vec::Vec::new(), - io: ::protobuf::MessageField::none(), - checkpoint: ::std::string::String::new(), - pid: 0, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for TaskCreate { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("TaskCreate").unwrap()).clone() - } -} - -impl ::std::fmt::Display for TaskCreate { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for TaskCreate { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.events.TaskStart) -pub struct TaskStart { - // message fields - // @@protoc_insertion_point(field:containerd.events.TaskStart.container_id) - pub container_id: ::std::string::String, - // @@protoc_insertion_point(field:containerd.events.TaskStart.pid) - pub pid: u32, - // special fields - // @@protoc_insertion_point(special_field:containerd.events.TaskStart.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a TaskStart { - fn default() -> &'a TaskStart { - ::default_instance() - } -} - -impl TaskStart { - pub fn new() -> TaskStart { - ::std::default::Default::default() - } - - // string container_id = 1; - - pub fn container_id(&self) -> &str { - &self.container_id - } - - pub fn clear_container_id(&mut self) { - self.container_id.clear(); - } - - // Param is passed by value, moved - pub fn set_container_id(&mut self, v: ::std::string::String) { - self.container_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_container_id(&mut self) -> &mut ::std::string::String { - &mut self.container_id - } - - // Take field - pub fn take_container_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.container_id, ::std::string::String::new()) - } - - // uint32 pid = 2; - - pub fn pid(&self) -> u32 { - self.pid - } - - pub fn clear_pid(&mut self) { - self.pid = 0; - } - - // Param is passed by value, moved - pub fn set_pid(&mut self, v: u32) { - self.pid = v; - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(2); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "container_id", - |m: &TaskStart| { &m.container_id }, - |m: &mut TaskStart| { &mut m.container_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "pid", - |m: &TaskStart| { &m.pid }, - |m: &mut TaskStart| { &mut m.pid }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "TaskStart", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for TaskStart { - const NAME: &'static str = "TaskStart"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.container_id = is.read_string()?; - }, - 16 => { - self.pid = is.read_uint32()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.container_id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.container_id); - } - if self.pid != 0 { - my_size += ::protobuf::rt::uint32_size(2, self.pid); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.container_id.is_empty() { - os.write_string(1, &self.container_id)?; - } - if self.pid != 0 { - os.write_uint32(2, self.pid)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> TaskStart { - TaskStart::new() - } - - fn clear(&mut self) { - self.container_id.clear(); - self.pid = 0; - self.special_fields.clear(); - } - - fn default_instance() -> &'static TaskStart { - static instance: TaskStart = TaskStart { - container_id: ::std::string::String::new(), - pid: 0, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for TaskStart { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("TaskStart").unwrap()).clone() - } -} - -impl ::std::fmt::Display for TaskStart { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for TaskStart { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.events.TaskDelete) -pub struct TaskDelete { - // message fields - // @@protoc_insertion_point(field:containerd.events.TaskDelete.container_id) - pub container_id: ::std::string::String, - // @@protoc_insertion_point(field:containerd.events.TaskDelete.pid) - pub pid: u32, - // @@protoc_insertion_point(field:containerd.events.TaskDelete.exit_status) - pub exit_status: u32, - // @@protoc_insertion_point(field:containerd.events.TaskDelete.exited_at) - pub exited_at: ::protobuf::MessageField<::protobuf::well_known_types::timestamp::Timestamp>, - // @@protoc_insertion_point(field:containerd.events.TaskDelete.id) - pub id: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:containerd.events.TaskDelete.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a TaskDelete { - fn default() -> &'a TaskDelete { - ::default_instance() - } -} - -impl TaskDelete { - pub fn new() -> TaskDelete { - ::std::default::Default::default() - } - - // string container_id = 1; - - pub fn container_id(&self) -> &str { - &self.container_id - } - - pub fn clear_container_id(&mut self) { - self.container_id.clear(); - } - - // Param is passed by value, moved - pub fn set_container_id(&mut self, v: ::std::string::String) { - self.container_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_container_id(&mut self) -> &mut ::std::string::String { - &mut self.container_id - } - - // Take field - pub fn take_container_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.container_id, ::std::string::String::new()) - } - - // uint32 pid = 2; - - pub fn pid(&self) -> u32 { - self.pid - } - - pub fn clear_pid(&mut self) { - self.pid = 0; - } - - // Param is passed by value, moved - pub fn set_pid(&mut self, v: u32) { - self.pid = v; - } - - // uint32 exit_status = 3; - - pub fn exit_status(&self) -> u32 { - self.exit_status - } - - pub fn clear_exit_status(&mut self) { - self.exit_status = 0; - } - - // Param is passed by value, moved - pub fn set_exit_status(&mut self, v: u32) { - self.exit_status = v; - } - - // .google.protobuf.Timestamp exited_at = 4; - - pub fn exited_at(&self) -> &::protobuf::well_known_types::timestamp::Timestamp { - self.exited_at.as_ref().unwrap_or_else(|| <::protobuf::well_known_types::timestamp::Timestamp as ::protobuf::Message>::default_instance()) - } - - pub fn clear_exited_at(&mut self) { - self.exited_at.clear(); - } - - pub fn has_exited_at(&self) -> bool { - self.exited_at.is_some() - } - - // Param is passed by value, moved - pub fn set_exited_at(&mut self, v: ::protobuf::well_known_types::timestamp::Timestamp) { - self.exited_at = ::protobuf::MessageField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_exited_at(&mut self) -> &mut ::protobuf::well_known_types::timestamp::Timestamp { - self.exited_at.mut_or_insert_default() - } - - // Take field - pub fn take_exited_at(&mut self) -> ::protobuf::well_known_types::timestamp::Timestamp { - self.exited_at.take().unwrap_or_else(|| ::protobuf::well_known_types::timestamp::Timestamp::new()) - } - - // string id = 5; - - pub fn id(&self) -> &str { - &self.id - } - - pub fn clear_id(&mut self) { - self.id.clear(); - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: ::std::string::String) { - self.id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_id(&mut self) -> &mut ::std::string::String { - &mut self.id - } - - // Take field - pub fn take_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.id, ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(5); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "container_id", - |m: &TaskDelete| { &m.container_id }, - |m: &mut TaskDelete| { &mut m.container_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "pid", - |m: &TaskDelete| { &m.pid }, - |m: &mut TaskDelete| { &mut m.pid }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "exit_status", - |m: &TaskDelete| { &m.exit_status }, - |m: &mut TaskDelete| { &mut m.exit_status }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ::protobuf::well_known_types::timestamp::Timestamp>( - "exited_at", - |m: &TaskDelete| { &m.exited_at }, - |m: &mut TaskDelete| { &mut m.exited_at }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "id", - |m: &TaskDelete| { &m.id }, - |m: &mut TaskDelete| { &mut m.id }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "TaskDelete", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for TaskDelete { - const NAME: &'static str = "TaskDelete"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.container_id = is.read_string()?; - }, - 16 => { - self.pid = is.read_uint32()?; - }, - 24 => { - self.exit_status = is.read_uint32()?; - }, - 34 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.exited_at)?; - }, - 42 => { - self.id = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.container_id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.container_id); - } - if self.pid != 0 { - my_size += ::protobuf::rt::uint32_size(2, self.pid); - } - if self.exit_status != 0 { - my_size += ::protobuf::rt::uint32_size(3, self.exit_status); - } - if let Some(v) = self.exited_at.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if !self.id.is_empty() { - my_size += ::protobuf::rt::string_size(5, &self.id); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.container_id.is_empty() { - os.write_string(1, &self.container_id)?; - } - if self.pid != 0 { - os.write_uint32(2, self.pid)?; - } - if self.exit_status != 0 { - os.write_uint32(3, self.exit_status)?; - } - if let Some(v) = self.exited_at.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?; - } - if !self.id.is_empty() { - os.write_string(5, &self.id)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> TaskDelete { - TaskDelete::new() - } - - fn clear(&mut self) { - self.container_id.clear(); - self.pid = 0; - self.exit_status = 0; - self.exited_at.clear(); - self.id.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static TaskDelete { - static instance: TaskDelete = TaskDelete { - container_id: ::std::string::String::new(), - pid: 0, - exit_status: 0, - exited_at: ::protobuf::MessageField::none(), - id: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for TaskDelete { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("TaskDelete").unwrap()).clone() - } -} - -impl ::std::fmt::Display for TaskDelete { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for TaskDelete { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.events.TaskIO) -pub struct TaskIO { - // message fields - // @@protoc_insertion_point(field:containerd.events.TaskIO.stdin) - pub stdin: ::std::string::String, - // @@protoc_insertion_point(field:containerd.events.TaskIO.stdout) - pub stdout: ::std::string::String, - // @@protoc_insertion_point(field:containerd.events.TaskIO.stderr) - pub stderr: ::std::string::String, - // @@protoc_insertion_point(field:containerd.events.TaskIO.terminal) - pub terminal: bool, - // special fields - // @@protoc_insertion_point(special_field:containerd.events.TaskIO.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a TaskIO { - fn default() -> &'a TaskIO { - ::default_instance() - } -} - -impl TaskIO { - pub fn new() -> TaskIO { - ::std::default::Default::default() - } - - // string stdin = 1; - - pub fn stdin(&self) -> &str { - &self.stdin - } - - pub fn clear_stdin(&mut self) { - self.stdin.clear(); - } - - // Param is passed by value, moved - pub fn set_stdin(&mut self, v: ::std::string::String) { - self.stdin = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_stdin(&mut self) -> &mut ::std::string::String { - &mut self.stdin - } - - // Take field - pub fn take_stdin(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.stdin, ::std::string::String::new()) - } - - // string stdout = 2; - - pub fn stdout(&self) -> &str { - &self.stdout - } - - pub fn clear_stdout(&mut self) { - self.stdout.clear(); - } - - // Param is passed by value, moved - pub fn set_stdout(&mut self, v: ::std::string::String) { - self.stdout = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_stdout(&mut self) -> &mut ::std::string::String { - &mut self.stdout - } - - // Take field - pub fn take_stdout(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.stdout, ::std::string::String::new()) - } - - // string stderr = 3; - - pub fn stderr(&self) -> &str { - &self.stderr - } - - pub fn clear_stderr(&mut self) { - self.stderr.clear(); - } - - // Param is passed by value, moved - pub fn set_stderr(&mut self, v: ::std::string::String) { - self.stderr = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_stderr(&mut self) -> &mut ::std::string::String { - &mut self.stderr - } - - // Take field - pub fn take_stderr(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.stderr, ::std::string::String::new()) - } - - // bool terminal = 4; - - pub fn terminal(&self) -> bool { - self.terminal - } - - pub fn clear_terminal(&mut self) { - self.terminal = false; - } - - // Param is passed by value, moved - pub fn set_terminal(&mut self, v: bool) { - self.terminal = v; - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(4); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "stdin", - |m: &TaskIO| { &m.stdin }, - |m: &mut TaskIO| { &mut m.stdin }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "stdout", - |m: &TaskIO| { &m.stdout }, - |m: &mut TaskIO| { &mut m.stdout }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "stderr", - |m: &TaskIO| { &m.stderr }, - |m: &mut TaskIO| { &mut m.stderr }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "terminal", - |m: &TaskIO| { &m.terminal }, - |m: &mut TaskIO| { &mut m.terminal }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "TaskIO", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for TaskIO { - const NAME: &'static str = "TaskIO"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.stdin = is.read_string()?; - }, - 18 => { - self.stdout = is.read_string()?; - }, - 26 => { - self.stderr = is.read_string()?; - }, - 32 => { - self.terminal = is.read_bool()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.stdin.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.stdin); - } - if !self.stdout.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.stdout); - } - if !self.stderr.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.stderr); - } - if self.terminal != false { - my_size += 1 + 1; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.stdin.is_empty() { - os.write_string(1, &self.stdin)?; - } - if !self.stdout.is_empty() { - os.write_string(2, &self.stdout)?; - } - if !self.stderr.is_empty() { - os.write_string(3, &self.stderr)?; - } - if self.terminal != false { - os.write_bool(4, self.terminal)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> TaskIO { - TaskIO::new() - } - - fn clear(&mut self) { - self.stdin.clear(); - self.stdout.clear(); - self.stderr.clear(); - self.terminal = false; - self.special_fields.clear(); - } - - fn default_instance() -> &'static TaskIO { - static instance: TaskIO = TaskIO { - stdin: ::std::string::String::new(), - stdout: ::std::string::String::new(), - stderr: ::std::string::String::new(), - terminal: false, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for TaskIO { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("TaskIO").unwrap()).clone() - } -} - -impl ::std::fmt::Display for TaskIO { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for TaskIO { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.events.TaskExit) -pub struct TaskExit { - // message fields - // @@protoc_insertion_point(field:containerd.events.TaskExit.container_id) - pub container_id: ::std::string::String, - // @@protoc_insertion_point(field:containerd.events.TaskExit.id) - pub id: ::std::string::String, - // @@protoc_insertion_point(field:containerd.events.TaskExit.pid) - pub pid: u32, - // @@protoc_insertion_point(field:containerd.events.TaskExit.exit_status) - pub exit_status: u32, - // @@protoc_insertion_point(field:containerd.events.TaskExit.exited_at) - pub exited_at: ::protobuf::MessageField<::protobuf::well_known_types::timestamp::Timestamp>, - // special fields - // @@protoc_insertion_point(special_field:containerd.events.TaskExit.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a TaskExit { - fn default() -> &'a TaskExit { - ::default_instance() - } -} - -impl TaskExit { - pub fn new() -> TaskExit { - ::std::default::Default::default() - } - - // string container_id = 1; - - pub fn container_id(&self) -> &str { - &self.container_id - } - - pub fn clear_container_id(&mut self) { - self.container_id.clear(); - } - - // Param is passed by value, moved - pub fn set_container_id(&mut self, v: ::std::string::String) { - self.container_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_container_id(&mut self) -> &mut ::std::string::String { - &mut self.container_id - } - - // Take field - pub fn take_container_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.container_id, ::std::string::String::new()) - } - - // string id = 2; - - pub fn id(&self) -> &str { - &self.id - } - - pub fn clear_id(&mut self) { - self.id.clear(); - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: ::std::string::String) { - self.id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_id(&mut self) -> &mut ::std::string::String { - &mut self.id - } - - // Take field - pub fn take_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.id, ::std::string::String::new()) - } - - // uint32 pid = 3; - - pub fn pid(&self) -> u32 { - self.pid - } - - pub fn clear_pid(&mut self) { - self.pid = 0; - } - - // Param is passed by value, moved - pub fn set_pid(&mut self, v: u32) { - self.pid = v; - } - - // uint32 exit_status = 4; - - pub fn exit_status(&self) -> u32 { - self.exit_status - } - - pub fn clear_exit_status(&mut self) { - self.exit_status = 0; - } - - // Param is passed by value, moved - pub fn set_exit_status(&mut self, v: u32) { - self.exit_status = v; - } - - // .google.protobuf.Timestamp exited_at = 5; - - pub fn exited_at(&self) -> &::protobuf::well_known_types::timestamp::Timestamp { - self.exited_at.as_ref().unwrap_or_else(|| <::protobuf::well_known_types::timestamp::Timestamp as ::protobuf::Message>::default_instance()) - } - - pub fn clear_exited_at(&mut self) { - self.exited_at.clear(); - } - - pub fn has_exited_at(&self) -> bool { - self.exited_at.is_some() - } - - // Param is passed by value, moved - pub fn set_exited_at(&mut self, v: ::protobuf::well_known_types::timestamp::Timestamp) { - self.exited_at = ::protobuf::MessageField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_exited_at(&mut self) -> &mut ::protobuf::well_known_types::timestamp::Timestamp { - self.exited_at.mut_or_insert_default() - } - - // Take field - pub fn take_exited_at(&mut self) -> ::protobuf::well_known_types::timestamp::Timestamp { - self.exited_at.take().unwrap_or_else(|| ::protobuf::well_known_types::timestamp::Timestamp::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(5); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "container_id", - |m: &TaskExit| { &m.container_id }, - |m: &mut TaskExit| { &mut m.container_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "id", - |m: &TaskExit| { &m.id }, - |m: &mut TaskExit| { &mut m.id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "pid", - |m: &TaskExit| { &m.pid }, - |m: &mut TaskExit| { &mut m.pid }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "exit_status", - |m: &TaskExit| { &m.exit_status }, - |m: &mut TaskExit| { &mut m.exit_status }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ::protobuf::well_known_types::timestamp::Timestamp>( - "exited_at", - |m: &TaskExit| { &m.exited_at }, - |m: &mut TaskExit| { &mut m.exited_at }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "TaskExit", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for TaskExit { - const NAME: &'static str = "TaskExit"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.container_id = is.read_string()?; - }, - 18 => { - self.id = is.read_string()?; - }, - 24 => { - self.pid = is.read_uint32()?; - }, - 32 => { - self.exit_status = is.read_uint32()?; - }, - 42 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.exited_at)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.container_id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.container_id); - } - if !self.id.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.id); - } - if self.pid != 0 { - my_size += ::protobuf::rt::uint32_size(3, self.pid); - } - if self.exit_status != 0 { - my_size += ::protobuf::rt::uint32_size(4, self.exit_status); - } - if let Some(v) = self.exited_at.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.container_id.is_empty() { - os.write_string(1, &self.container_id)?; - } - if !self.id.is_empty() { - os.write_string(2, &self.id)?; - } - if self.pid != 0 { - os.write_uint32(3, self.pid)?; - } - if self.exit_status != 0 { - os.write_uint32(4, self.exit_status)?; - } - if let Some(v) = self.exited_at.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> TaskExit { - TaskExit::new() - } - - fn clear(&mut self) { - self.container_id.clear(); - self.id.clear(); - self.pid = 0; - self.exit_status = 0; - self.exited_at.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static TaskExit { - static instance: TaskExit = TaskExit { - container_id: ::std::string::String::new(), - id: ::std::string::String::new(), - pid: 0, - exit_status: 0, - exited_at: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for TaskExit { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("TaskExit").unwrap()).clone() - } -} - -impl ::std::fmt::Display for TaskExit { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for TaskExit { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.events.TaskOOM) -pub struct TaskOOM { - // message fields - // @@protoc_insertion_point(field:containerd.events.TaskOOM.container_id) - pub container_id: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:containerd.events.TaskOOM.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a TaskOOM { - fn default() -> &'a TaskOOM { - ::default_instance() - } -} - -impl TaskOOM { - pub fn new() -> TaskOOM { - ::std::default::Default::default() - } - - // string container_id = 1; - - pub fn container_id(&self) -> &str { - &self.container_id - } - - pub fn clear_container_id(&mut self) { - self.container_id.clear(); - } - - // Param is passed by value, moved - pub fn set_container_id(&mut self, v: ::std::string::String) { - self.container_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_container_id(&mut self) -> &mut ::std::string::String { - &mut self.container_id - } - - // Take field - pub fn take_container_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.container_id, ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "container_id", - |m: &TaskOOM| { &m.container_id }, - |m: &mut TaskOOM| { &mut m.container_id }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "TaskOOM", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for TaskOOM { - const NAME: &'static str = "TaskOOM"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.container_id = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.container_id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.container_id); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.container_id.is_empty() { - os.write_string(1, &self.container_id)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> TaskOOM { - TaskOOM::new() - } - - fn clear(&mut self) { - self.container_id.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static TaskOOM { - static instance: TaskOOM = TaskOOM { - container_id: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for TaskOOM { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("TaskOOM").unwrap()).clone() - } -} - -impl ::std::fmt::Display for TaskOOM { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for TaskOOM { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.events.TaskExecAdded) -pub struct TaskExecAdded { - // message fields - // @@protoc_insertion_point(field:containerd.events.TaskExecAdded.container_id) - pub container_id: ::std::string::String, - // @@protoc_insertion_point(field:containerd.events.TaskExecAdded.exec_id) - pub exec_id: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:containerd.events.TaskExecAdded.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a TaskExecAdded { - fn default() -> &'a TaskExecAdded { - ::default_instance() - } -} - -impl TaskExecAdded { - pub fn new() -> TaskExecAdded { - ::std::default::Default::default() - } - - // string container_id = 1; - - pub fn container_id(&self) -> &str { - &self.container_id - } - - pub fn clear_container_id(&mut self) { - self.container_id.clear(); - } - - // Param is passed by value, moved - pub fn set_container_id(&mut self, v: ::std::string::String) { - self.container_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_container_id(&mut self) -> &mut ::std::string::String { - &mut self.container_id - } - - // Take field - pub fn take_container_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.container_id, ::std::string::String::new()) - } - - // string exec_id = 2; - - pub fn exec_id(&self) -> &str { - &self.exec_id - } - - pub fn clear_exec_id(&mut self) { - self.exec_id.clear(); - } - - // Param is passed by value, moved - pub fn set_exec_id(&mut self, v: ::std::string::String) { - self.exec_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_exec_id(&mut self) -> &mut ::std::string::String { - &mut self.exec_id - } - - // Take field - pub fn take_exec_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.exec_id, ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(2); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "container_id", - |m: &TaskExecAdded| { &m.container_id }, - |m: &mut TaskExecAdded| { &mut m.container_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "exec_id", - |m: &TaskExecAdded| { &m.exec_id }, - |m: &mut TaskExecAdded| { &mut m.exec_id }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "TaskExecAdded", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for TaskExecAdded { - const NAME: &'static str = "TaskExecAdded"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.container_id = is.read_string()?; - }, - 18 => { - self.exec_id = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.container_id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.container_id); - } - if !self.exec_id.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.exec_id); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.container_id.is_empty() { - os.write_string(1, &self.container_id)?; - } - if !self.exec_id.is_empty() { - os.write_string(2, &self.exec_id)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> TaskExecAdded { - TaskExecAdded::new() - } - - fn clear(&mut self) { - self.container_id.clear(); - self.exec_id.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static TaskExecAdded { - static instance: TaskExecAdded = TaskExecAdded { - container_id: ::std::string::String::new(), - exec_id: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for TaskExecAdded { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("TaskExecAdded").unwrap()).clone() - } -} - -impl ::std::fmt::Display for TaskExecAdded { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for TaskExecAdded { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.events.TaskExecStarted) -pub struct TaskExecStarted { - // message fields - // @@protoc_insertion_point(field:containerd.events.TaskExecStarted.container_id) - pub container_id: ::std::string::String, - // @@protoc_insertion_point(field:containerd.events.TaskExecStarted.exec_id) - pub exec_id: ::std::string::String, - // @@protoc_insertion_point(field:containerd.events.TaskExecStarted.pid) - pub pid: u32, - // special fields - // @@protoc_insertion_point(special_field:containerd.events.TaskExecStarted.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a TaskExecStarted { - fn default() -> &'a TaskExecStarted { - ::default_instance() - } -} - -impl TaskExecStarted { - pub fn new() -> TaskExecStarted { - ::std::default::Default::default() - } - - // string container_id = 1; - - pub fn container_id(&self) -> &str { - &self.container_id - } - - pub fn clear_container_id(&mut self) { - self.container_id.clear(); - } - - // Param is passed by value, moved - pub fn set_container_id(&mut self, v: ::std::string::String) { - self.container_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_container_id(&mut self) -> &mut ::std::string::String { - &mut self.container_id - } - - // Take field - pub fn take_container_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.container_id, ::std::string::String::new()) - } - - // string exec_id = 2; - - pub fn exec_id(&self) -> &str { - &self.exec_id - } - - pub fn clear_exec_id(&mut self) { - self.exec_id.clear(); - } - - // Param is passed by value, moved - pub fn set_exec_id(&mut self, v: ::std::string::String) { - self.exec_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_exec_id(&mut self) -> &mut ::std::string::String { - &mut self.exec_id - } - - // Take field - pub fn take_exec_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.exec_id, ::std::string::String::new()) - } - - // uint32 pid = 3; - - pub fn pid(&self) -> u32 { - self.pid - } - - pub fn clear_pid(&mut self) { - self.pid = 0; - } - - // Param is passed by value, moved - pub fn set_pid(&mut self, v: u32) { - self.pid = v; - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(3); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "container_id", - |m: &TaskExecStarted| { &m.container_id }, - |m: &mut TaskExecStarted| { &mut m.container_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "exec_id", - |m: &TaskExecStarted| { &m.exec_id }, - |m: &mut TaskExecStarted| { &mut m.exec_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "pid", - |m: &TaskExecStarted| { &m.pid }, - |m: &mut TaskExecStarted| { &mut m.pid }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "TaskExecStarted", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for TaskExecStarted { - const NAME: &'static str = "TaskExecStarted"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.container_id = is.read_string()?; - }, - 18 => { - self.exec_id = is.read_string()?; - }, - 24 => { - self.pid = is.read_uint32()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.container_id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.container_id); - } - if !self.exec_id.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.exec_id); - } - if self.pid != 0 { - my_size += ::protobuf::rt::uint32_size(3, self.pid); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.container_id.is_empty() { - os.write_string(1, &self.container_id)?; - } - if !self.exec_id.is_empty() { - os.write_string(2, &self.exec_id)?; - } - if self.pid != 0 { - os.write_uint32(3, self.pid)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> TaskExecStarted { - TaskExecStarted::new() - } - - fn clear(&mut self) { - self.container_id.clear(); - self.exec_id.clear(); - self.pid = 0; - self.special_fields.clear(); - } - - fn default_instance() -> &'static TaskExecStarted { - static instance: TaskExecStarted = TaskExecStarted { - container_id: ::std::string::String::new(), - exec_id: ::std::string::String::new(), - pid: 0, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for TaskExecStarted { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("TaskExecStarted").unwrap()).clone() - } -} - -impl ::std::fmt::Display for TaskExecStarted { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for TaskExecStarted { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.events.TaskPaused) -pub struct TaskPaused { - // message fields - // @@protoc_insertion_point(field:containerd.events.TaskPaused.container_id) - pub container_id: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:containerd.events.TaskPaused.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a TaskPaused { - fn default() -> &'a TaskPaused { - ::default_instance() - } -} - -impl TaskPaused { - pub fn new() -> TaskPaused { - ::std::default::Default::default() - } - - // string container_id = 1; - - pub fn container_id(&self) -> &str { - &self.container_id - } - - pub fn clear_container_id(&mut self) { - self.container_id.clear(); - } - - // Param is passed by value, moved - pub fn set_container_id(&mut self, v: ::std::string::String) { - self.container_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_container_id(&mut self) -> &mut ::std::string::String { - &mut self.container_id - } - - // Take field - pub fn take_container_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.container_id, ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "container_id", - |m: &TaskPaused| { &m.container_id }, - |m: &mut TaskPaused| { &mut m.container_id }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "TaskPaused", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for TaskPaused { - const NAME: &'static str = "TaskPaused"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.container_id = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.container_id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.container_id); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.container_id.is_empty() { - os.write_string(1, &self.container_id)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> TaskPaused { - TaskPaused::new() - } - - fn clear(&mut self) { - self.container_id.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static TaskPaused { - static instance: TaskPaused = TaskPaused { - container_id: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for TaskPaused { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("TaskPaused").unwrap()).clone() - } -} - -impl ::std::fmt::Display for TaskPaused { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for TaskPaused { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.events.TaskResumed) -pub struct TaskResumed { - // message fields - // @@protoc_insertion_point(field:containerd.events.TaskResumed.container_id) - pub container_id: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:containerd.events.TaskResumed.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a TaskResumed { - fn default() -> &'a TaskResumed { - ::default_instance() - } -} - -impl TaskResumed { - pub fn new() -> TaskResumed { - ::std::default::Default::default() - } - - // string container_id = 1; - - pub fn container_id(&self) -> &str { - &self.container_id - } - - pub fn clear_container_id(&mut self) { - self.container_id.clear(); - } - - // Param is passed by value, moved - pub fn set_container_id(&mut self, v: ::std::string::String) { - self.container_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_container_id(&mut self) -> &mut ::std::string::String { - &mut self.container_id - } - - // Take field - pub fn take_container_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.container_id, ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "container_id", - |m: &TaskResumed| { &m.container_id }, - |m: &mut TaskResumed| { &mut m.container_id }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "TaskResumed", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for TaskResumed { - const NAME: &'static str = "TaskResumed"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.container_id = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.container_id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.container_id); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.container_id.is_empty() { - os.write_string(1, &self.container_id)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> TaskResumed { - TaskResumed::new() - } - - fn clear(&mut self) { - self.container_id.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static TaskResumed { - static instance: TaskResumed = TaskResumed { - container_id: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for TaskResumed { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("TaskResumed").unwrap()).clone() - } -} - -impl ::std::fmt::Display for TaskResumed { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for TaskResumed { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.events.TaskCheckpointed) -pub struct TaskCheckpointed { - // message fields - // @@protoc_insertion_point(field:containerd.events.TaskCheckpointed.container_id) - pub container_id: ::std::string::String, - // @@protoc_insertion_point(field:containerd.events.TaskCheckpointed.checkpoint) - pub checkpoint: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:containerd.events.TaskCheckpointed.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a TaskCheckpointed { - fn default() -> &'a TaskCheckpointed { - ::default_instance() - } -} - -impl TaskCheckpointed { - pub fn new() -> TaskCheckpointed { - ::std::default::Default::default() - } - - // string container_id = 1; - - pub fn container_id(&self) -> &str { - &self.container_id - } - - pub fn clear_container_id(&mut self) { - self.container_id.clear(); - } - - // Param is passed by value, moved - pub fn set_container_id(&mut self, v: ::std::string::String) { - self.container_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_container_id(&mut self) -> &mut ::std::string::String { - &mut self.container_id - } - - // Take field - pub fn take_container_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.container_id, ::std::string::String::new()) - } - - // string checkpoint = 2; - - pub fn checkpoint(&self) -> &str { - &self.checkpoint - } - - pub fn clear_checkpoint(&mut self) { - self.checkpoint.clear(); - } - - // Param is passed by value, moved - pub fn set_checkpoint(&mut self, v: ::std::string::String) { - self.checkpoint = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_checkpoint(&mut self) -> &mut ::std::string::String { - &mut self.checkpoint - } - - // Take field - pub fn take_checkpoint(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.checkpoint, ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(2); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "container_id", - |m: &TaskCheckpointed| { &m.container_id }, - |m: &mut TaskCheckpointed| { &mut m.container_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "checkpoint", - |m: &TaskCheckpointed| { &m.checkpoint }, - |m: &mut TaskCheckpointed| { &mut m.checkpoint }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "TaskCheckpointed", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for TaskCheckpointed { - const NAME: &'static str = "TaskCheckpointed"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.container_id = is.read_string()?; - }, - 18 => { - self.checkpoint = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.container_id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.container_id); - } - if !self.checkpoint.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.checkpoint); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.container_id.is_empty() { - os.write_string(1, &self.container_id)?; - } - if !self.checkpoint.is_empty() { - os.write_string(2, &self.checkpoint)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> TaskCheckpointed { - TaskCheckpointed::new() - } - - fn clear(&mut self) { - self.container_id.clear(); - self.checkpoint.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static TaskCheckpointed { - static instance: TaskCheckpointed = TaskCheckpointed { - container_id: ::std::string::String::new(), - checkpoint: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for TaskCheckpointed { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("TaskCheckpointed").unwrap()).clone() - } -} - -impl ::std::fmt::Display for TaskCheckpointed { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for TaskCheckpointed { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -static file_descriptor_proto_data: &'static [u8] = b"\ - \n6github.com/containerd/containerd/api/events/task.proto\x12\x11contain\ - erd.events\x1a\x14gogoproto/gogo.proto\x1a\x1fgoogle/protobuf/timestamp.\ - proto\x1a6github.com/containerd/containerd/api/types/mount.proto\x1a@git\ - hub.com/containerd/containerd/protobuf/plugin/fieldpath.protoX\0X\x03\"\ - \xdd\x01\n\nTaskCreate\x12!\n\x0ccontainer_id\x18\x01\x20\x01(\tR\x0bcon\ - tainerId\x12\x16\n\x06bundle\x18\x02\x20\x01(\tR\x06bundle\x12/\n\x06roo\ - tfs\x18\x03\x20\x03(\x0b2\x17.containerd.types.MountR\x06rootfs\x121\n\ - \x02io\x18\x04\x20\x01(\x0b2\x19.containerd.events.TaskIOR\x02ioB\x06\ - \xe2\xde\x1f\x02IO\x12\x1e\n\ncheckpoint\x18\x05\x20\x01(\tR\ncheckpoint\ - \x12\x10\n\x03pid\x18\x06\x20\x01(\rR\x03pid\"@\n\tTaskStart\x12!\n\x0cc\ - ontainer_id\x18\x01\x20\x01(\tR\x0bcontainerId\x12\x10\n\x03pid\x18\x02\ - \x20\x01(\rR\x03pid\"\xb5\x01\n\nTaskDelete\x12!\n\x0ccontainer_id\x18\ - \x01\x20\x01(\tR\x0bcontainerId\x12\x10\n\x03pid\x18\x02\x20\x01(\rR\x03\ - pid\x12\x1f\n\x0bexit_status\x18\x03\x20\x01(\rR\nexitStatus\x12A\n\texi\ - ted_at\x18\x04\x20\x01(\x0b2\x1a.google.protobuf.TimestampR\x08exitedAtB\ - \x08\x90\xdf\x1f\x01\xc8\xde\x1f\0\x12\x0e\n\x02id\x18\x05\x20\x01(\tR\ - \x02id\"j\n\x06TaskIO\x12\x14\n\x05stdin\x18\x01\x20\x01(\tR\x05stdin\ - \x12\x16\n\x06stdout\x18\x02\x20\x01(\tR\x06stdout\x12\x16\n\x06stderr\ - \x18\x03\x20\x01(\tR\x06stderr\x12\x1a\n\x08terminal\x18\x04\x20\x01(\ - \x08R\x08terminal\"\xb3\x01\n\x08TaskExit\x12!\n\x0ccontainer_id\x18\x01\ - \x20\x01(\tR\x0bcontainerId\x12\x0e\n\x02id\x18\x02\x20\x01(\tR\x02id\ - \x12\x10\n\x03pid\x18\x03\x20\x01(\rR\x03pid\x12\x1f\n\x0bexit_status\ - \x18\x04\x20\x01(\rR\nexitStatus\x12A\n\texited_at\x18\x05\x20\x01(\x0b2\ - \x1a.google.protobuf.TimestampR\x08exitedAtB\x08\x90\xdf\x1f\x01\xc8\xde\ - \x1f\0\",\n\x07TaskOOM\x12!\n\x0ccontainer_id\x18\x01\x20\x01(\tR\x0bcon\ - tainerId\"K\n\rTaskExecAdded\x12!\n\x0ccontainer_id\x18\x01\x20\x01(\tR\ - \x0bcontainerId\x12\x17\n\x07exec_id\x18\x02\x20\x01(\tR\x06execId\"_\n\ - \x0fTaskExecStarted\x12!\n\x0ccontainer_id\x18\x01\x20\x01(\tR\x0bcontai\ - nerId\x12\x17\n\x07exec_id\x18\x02\x20\x01(\tR\x06execId\x12\x10\n\x03pi\ - d\x18\x03\x20\x01(\rR\x03pid\"/\n\nTaskPaused\x12!\n\x0ccontainer_id\x18\ - \x01\x20\x01(\tR\x0bcontainerId\"0\n\x0bTaskResumed\x12!\n\x0ccontainer_\ - id\x18\x01\x20\x01(\tR\x0bcontainerId\"U\n\x10TaskCheckpointed\x12!\n\ - \x0ccontainer_id\x18\x01\x20\x01(\tR\x0bcontainerId\x12\x1e\n\ncheckpoin\ - t\x18\x02\x20\x01(\tR\ncheckpointB8Z2github.com/containerd/containerd/ap\ - i/events;events\xa0\xf4\x1e\x01b\x06proto3\ -"; - -/// `FileDescriptorProto` object which was a source for this generated file -fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); - file_descriptor_proto_lazy.get(|| { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() - }) -} - -/// `FileDescriptor` object which allows dynamic access to files -pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { - static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); - static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); - file_descriptor.get(|| { - let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { - let mut deps = ::std::vec::Vec::with_capacity(4); - deps.push(super::gogo::file_descriptor().clone()); - deps.push(::protobuf::well_known_types::timestamp::file_descriptor().clone()); - deps.push(super::mount::file_descriptor().clone()); - deps.push(super::fieldpath::file_descriptor().clone()); - let mut messages = ::std::vec::Vec::with_capacity(11); - messages.push(TaskCreate::generated_message_descriptor_data()); - messages.push(TaskStart::generated_message_descriptor_data()); - messages.push(TaskDelete::generated_message_descriptor_data()); - messages.push(TaskIO::generated_message_descriptor_data()); - messages.push(TaskExit::generated_message_descriptor_data()); - messages.push(TaskOOM::generated_message_descriptor_data()); - messages.push(TaskExecAdded::generated_message_descriptor_data()); - messages.push(TaskExecStarted::generated_message_descriptor_data()); - messages.push(TaskPaused::generated_message_descriptor_data()); - messages.push(TaskResumed::generated_message_descriptor_data()); - messages.push(TaskCheckpointed::generated_message_descriptor_data()); - let mut enums = ::std::vec::Vec::with_capacity(0); - ::protobuf::reflect::GeneratedFileDescriptor::new_generated( - file_descriptor_proto(), - deps, - messages, - enums, - ) - }); - ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) - }) -} diff --git a/crates/shim-protos/src/lib.rs b/crates/shim-protos/src/lib.rs index 03e67bf1..de41e124 100644 --- a/crates/shim-protos/src/lib.rs +++ b/crates/shim-protos/src/lib.rs @@ -60,20 +60,14 @@ //! ``` //! -// Supress warning: redundant field names in struct initialization -#![allow(clippy::redundant_field_names)] +#![allow(warnings)] pub use protobuf; pub use ttrpc; -/// Generated event structures. -#[rustfmt::skip] -pub mod events; -#[rustfmt::skip] pub mod cgroups; -#[rustfmt::skip] +pub mod events; pub mod shim; -#[rustfmt::skip] pub mod types; /// Includes event names shims can publish to containerd. diff --git a/crates/shim-protos/src/shim.rs b/crates/shim-protos/src/shim.rs new file mode 100644 index 00000000..ee14c492 --- /dev/null +++ b/crates/shim-protos/src/shim.rs @@ -0,0 +1,71 @@ +/* + 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. +*/ + +pub mod oci { + include!(concat!(env!("OUT_DIR"), "/shim/oci.rs")); +} + +pub mod events { + include!(concat!(env!("OUT_DIR"), "/shim/events.rs")); +} + +pub mod events_ttrpc { + include!(concat!(env!("OUT_DIR"), "/shim/events_ttrpc.rs")); +} + +#[cfg(feature = "async")] +pub mod events_ttrpc_async { + include!(concat!(env!("OUT_DIR"), "/shim_async/events_ttrpc.rs")); +} + +pub mod shim { + include!(concat!(env!("OUT_DIR"), "/shim/shim.rs")); +} + +pub mod shim_ttrpc { + include!(concat!(env!("OUT_DIR"), "/shim/shim_ttrpc.rs")); +} + +#[cfg(feature = "async")] +pub mod shim_ttrpc_async { + include!(concat!(env!("OUT_DIR"), "/shim_async/shim_ttrpc.rs")); +} + +pub(crate) mod empty { + pub use crate::types::empty::*; +} + +pub(crate) mod mount { + pub use crate::types::mount::*; +} + +pub(crate) mod task { + pub use crate::types::task::*; +} + +mod fieldpath { + pub use crate::types::fieldpath::*; +} + +mod gogo { + pub use crate::types::gogo::*; +} + +/// Shim task service. +pub use shim_ttrpc::{create_task, Task, TaskClient}; + +/// Shim events service. +pub use events_ttrpc::{create_events, Events, EventsClient}; diff --git a/crates/shim-protos/src/shim/empty.rs b/crates/shim-protos/src/shim/empty.rs deleted file mode 100644 index 7faf084a..00000000 --- a/crates/shim-protos/src/shim/empty.rs +++ /dev/null @@ -1,3 +0,0 @@ -/// Reexport types::empty::* to avoid manually editing other auto-generated source files. - -pub use crate::types::empty::*; diff --git a/crates/shim-protos/src/shim/events.rs b/crates/shim-protos/src/shim/events.rs deleted file mode 100644 index 88a6c08a..00000000 --- a/crates/shim-protos/src/shim/events.rs +++ /dev/null @@ -1,521 +0,0 @@ -// This file is generated by rust-protobuf 3.1.0. Do not edit -// .proto file is parsed by pure -// @generated - -// https://github.com/rust-lang/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![allow(unused_attributes)] -#![cfg_attr(rustfmt, rustfmt::skip)] - -#![allow(box_pointers)] -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unused_results)] -#![allow(unused_mut)] - -//! Generated file from `github.com/containerd/containerd/api/services/ttrpc/events/v1/events.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_1_0; - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.services.events.ttrpc.v1.ForwardRequest) -pub struct ForwardRequest { - // message fields - // @@protoc_insertion_point(field:containerd.services.events.ttrpc.v1.ForwardRequest.envelope) - pub envelope: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:containerd.services.events.ttrpc.v1.ForwardRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ForwardRequest { - fn default() -> &'a ForwardRequest { - ::default_instance() - } -} - -impl ForwardRequest { - pub fn new() -> ForwardRequest { - ::std::default::Default::default() - } - - // .containerd.services.events.ttrpc.v1.Envelope envelope = 1; - - pub fn envelope(&self) -> &Envelope { - self.envelope.as_ref().unwrap_or_else(|| ::default_instance()) - } - - pub fn clear_envelope(&mut self) { - self.envelope.clear(); - } - - pub fn has_envelope(&self) -> bool { - self.envelope.is_some() - } - - // Param is passed by value, moved - pub fn set_envelope(&mut self, v: Envelope) { - self.envelope = ::protobuf::MessageField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_envelope(&mut self) -> &mut Envelope { - self.envelope.mut_or_insert_default() - } - - // Take field - pub fn take_envelope(&mut self) -> Envelope { - self.envelope.take().unwrap_or_else(|| Envelope::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Envelope>( - "envelope", - |m: &ForwardRequest| { &m.envelope }, - |m: &mut ForwardRequest| { &mut m.envelope }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "ForwardRequest", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for ForwardRequest { - const NAME: &'static str = "ForwardRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.envelope)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.envelope.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.envelope.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ForwardRequest { - ForwardRequest::new() - } - - fn clear(&mut self) { - self.envelope.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static ForwardRequest { - static instance: ForwardRequest = ForwardRequest { - envelope: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for ForwardRequest { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("ForwardRequest").unwrap()).clone() - } -} - -impl ::std::fmt::Display for ForwardRequest { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ForwardRequest { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.services.events.ttrpc.v1.Envelope) -pub struct Envelope { - // message fields - // @@protoc_insertion_point(field:containerd.services.events.ttrpc.v1.Envelope.timestamp) - pub timestamp: ::protobuf::MessageField<::protobuf::well_known_types::timestamp::Timestamp>, - // @@protoc_insertion_point(field:containerd.services.events.ttrpc.v1.Envelope.namespace) - pub namespace: ::std::string::String, - // @@protoc_insertion_point(field:containerd.services.events.ttrpc.v1.Envelope.topic) - pub topic: ::std::string::String, - // @@protoc_insertion_point(field:containerd.services.events.ttrpc.v1.Envelope.event) - pub event: ::protobuf::MessageField<::protobuf::well_known_types::any::Any>, - // special fields - // @@protoc_insertion_point(special_field:containerd.services.events.ttrpc.v1.Envelope.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a Envelope { - fn default() -> &'a Envelope { - ::default_instance() - } -} - -impl Envelope { - pub fn new() -> Envelope { - ::std::default::Default::default() - } - - // .google.protobuf.Timestamp timestamp = 1; - - pub fn timestamp(&self) -> &::protobuf::well_known_types::timestamp::Timestamp { - self.timestamp.as_ref().unwrap_or_else(|| <::protobuf::well_known_types::timestamp::Timestamp as ::protobuf::Message>::default_instance()) - } - - pub fn clear_timestamp(&mut self) { - self.timestamp.clear(); - } - - pub fn has_timestamp(&self) -> bool { - self.timestamp.is_some() - } - - // Param is passed by value, moved - pub fn set_timestamp(&mut self, v: ::protobuf::well_known_types::timestamp::Timestamp) { - self.timestamp = ::protobuf::MessageField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_timestamp(&mut self) -> &mut ::protobuf::well_known_types::timestamp::Timestamp { - self.timestamp.mut_or_insert_default() - } - - // Take field - pub fn take_timestamp(&mut self) -> ::protobuf::well_known_types::timestamp::Timestamp { - self.timestamp.take().unwrap_or_else(|| ::protobuf::well_known_types::timestamp::Timestamp::new()) - } - - // string namespace = 2; - - pub fn namespace(&self) -> &str { - &self.namespace - } - - pub fn clear_namespace(&mut self) { - self.namespace.clear(); - } - - // Param is passed by value, moved - pub fn set_namespace(&mut self, v: ::std::string::String) { - self.namespace = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_namespace(&mut self) -> &mut ::std::string::String { - &mut self.namespace - } - - // Take field - pub fn take_namespace(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.namespace, ::std::string::String::new()) - } - - // string topic = 3; - - pub fn topic(&self) -> &str { - &self.topic - } - - pub fn clear_topic(&mut self) { - self.topic.clear(); - } - - // Param is passed by value, moved - pub fn set_topic(&mut self, v: ::std::string::String) { - self.topic = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_topic(&mut self) -> &mut ::std::string::String { - &mut self.topic - } - - // Take field - pub fn take_topic(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.topic, ::std::string::String::new()) - } - - // .google.protobuf.Any event = 4; - - pub fn event(&self) -> &::protobuf::well_known_types::any::Any { - self.event.as_ref().unwrap_or_else(|| <::protobuf::well_known_types::any::Any as ::protobuf::Message>::default_instance()) - } - - pub fn clear_event(&mut self) { - self.event.clear(); - } - - pub fn has_event(&self) -> bool { - self.event.is_some() - } - - // Param is passed by value, moved - pub fn set_event(&mut self, v: ::protobuf::well_known_types::any::Any) { - self.event = ::protobuf::MessageField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_event(&mut self) -> &mut ::protobuf::well_known_types::any::Any { - self.event.mut_or_insert_default() - } - - // Take field - pub fn take_event(&mut self) -> ::protobuf::well_known_types::any::Any { - self.event.take().unwrap_or_else(|| ::protobuf::well_known_types::any::Any::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(4); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ::protobuf::well_known_types::timestamp::Timestamp>( - "timestamp", - |m: &Envelope| { &m.timestamp }, - |m: &mut Envelope| { &mut m.timestamp }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "namespace", - |m: &Envelope| { &m.namespace }, - |m: &mut Envelope| { &mut m.namespace }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "topic", - |m: &Envelope| { &m.topic }, - |m: &mut Envelope| { &mut m.topic }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ::protobuf::well_known_types::any::Any>( - "event", - |m: &Envelope| { &m.event }, - |m: &mut Envelope| { &mut m.event }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "Envelope", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for Envelope { - const NAME: &'static str = "Envelope"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.timestamp)?; - }, - 18 => { - self.namespace = is.read_string()?; - }, - 26 => { - self.topic = is.read_string()?; - }, - 34 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.event)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.timestamp.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if !self.namespace.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.namespace); - } - if !self.topic.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.topic); - } - if let Some(v) = self.event.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.timestamp.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - if !self.namespace.is_empty() { - os.write_string(2, &self.namespace)?; - } - if !self.topic.is_empty() { - os.write_string(3, &self.topic)?; - } - if let Some(v) = self.event.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> Envelope { - Envelope::new() - } - - fn clear(&mut self) { - self.timestamp.clear(); - self.namespace.clear(); - self.topic.clear(); - self.event.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static Envelope { - static instance: Envelope = Envelope { - timestamp: ::protobuf::MessageField::none(), - namespace: ::std::string::String::new(), - topic: ::std::string::String::new(), - event: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for Envelope { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("Envelope").unwrap()).clone() - } -} - -impl ::std::fmt::Display for Envelope { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for Envelope { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -static file_descriptor_proto_data: &'static [u8] = b"\ - \nJgithub.com/containerd/containerd/api/services/ttrpc/events/v1/events.\ - proto\x12#containerd.services.events.ttrpc.v1\x1a@github.com/containerd/\ - containerd/protobuf/plugin/fieldpath.proto\x1a\x14gogoproto/gogo.proto\ - \x1a\x19google/protobuf/any.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\ - \x1fgoogle/protobuf/timestamp.protoX\0X\x01\"[\n\x0eForwardRequest\x12I\ - \n\x08envelope\x18\x01\x20\x01(\x0b2-.containerd.services.events.ttrpc.v\ - 1.EnvelopeR\x08envelope\"\xb4\x01\n\x08Envelope\x12B\n\ttimestamp\x18\ - \x01\x20\x01(\x0b2\x1a.google.protobuf.TimestampR\ttimestampB\x08\x90\ - \xdf\x1f\x01\xc8\xde\x1f\0\x12\x1c\n\tnamespace\x18\x02\x20\x01(\tR\tnam\ - espace\x12\x14\n\x05topic\x18\x03\x20\x01(\tR\x05topic\x12*\n\x05event\ - \x18\x04\x20\x01(\x0b2\x14.google.protobuf.AnyR\x05event:\x04\x80\xb9\ - \x1f\x012`\n\x06Events\x12V\n\x07Forward\x123.containerd.services.events\ - .ttrpc.v1.ForwardRequest\x1a\x16.google.protobuf.EmptyBFZDgithub.com/con\ - tainerd/containerd/api/services/ttrpc/events/v1;eventsb\x06proto3\ -"; - -/// `FileDescriptorProto` object which was a source for this generated file -fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); - file_descriptor_proto_lazy.get(|| { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() - }) -} - -/// `FileDescriptor` object which allows dynamic access to files -pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { - static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); - static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); - file_descriptor.get(|| { - let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { - let mut deps = ::std::vec::Vec::with_capacity(5); - deps.push(super::fieldpath::file_descriptor().clone()); - deps.push(super::gogo::file_descriptor().clone()); - deps.push(::protobuf::well_known_types::any::file_descriptor().clone()); - deps.push(::protobuf::well_known_types::empty::file_descriptor().clone()); - deps.push(::protobuf::well_known_types::timestamp::file_descriptor().clone()); - let mut messages = ::std::vec::Vec::with_capacity(2); - messages.push(ForwardRequest::generated_message_descriptor_data()); - messages.push(Envelope::generated_message_descriptor_data()); - let mut enums = ::std::vec::Vec::with_capacity(0); - ::protobuf::reflect::GeneratedFileDescriptor::new_generated( - file_descriptor_proto(), - deps, - messages, - enums, - ) - }); - ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) - }) -} diff --git a/crates/shim-protos/src/shim/events_ttrpc.rs b/crates/shim-protos/src/shim/events_ttrpc.rs deleted file mode 100644 index 8f1af54b..00000000 --- a/crates/shim-protos/src/shim/events_ttrpc.rs +++ /dev/null @@ -1,67 +0,0 @@ -// This file is generated by ttrpc-compiler 0.6.1. Do not edit -// @generated - -// https://github.com/Manishearth/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clipto_camel_casepy)] - -#![cfg_attr(rustfmt, rustfmt_skip)] - -#![allow(box_pointers)] -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unsafe_code)] -#![allow(unused_imports)] -#![allow(unused_results)] -use protobuf::{CodedInputStream, CodedOutputStream, Message}; -use std::collections::HashMap; -use std::sync::Arc; - -#[derive(Clone)] -pub struct EventsClient { - client: ::ttrpc::Client, -} - -impl EventsClient { - pub fn new(client: ::ttrpc::Client) -> Self { - EventsClient { - client: client, - } - } - - pub fn forward(&self, ctx: ttrpc::context::Context, req: &super::events::ForwardRequest) -> ::ttrpc::Result { - let mut cres = super::empty::Empty::new(); - ::ttrpc::client_request!(self, ctx, req, "containerd.services.events.ttrpc.v1.Events", "Forward", cres); - Ok(cres) - } -} - -struct ForwardMethod { - service: Arc>, -} - -impl ::ttrpc::MethodHandler for ForwardMethod { - fn handler(&self, ctx: ::ttrpc::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<()> { - ::ttrpc::request_handler!(self, ctx, req, events, ForwardRequest, forward); - Ok(()) - } -} - -pub trait Events { - fn forward(&self, _ctx: &::ttrpc::TtrpcContext, _: super::events::ForwardRequest) -> ::ttrpc::Result { - Err(::ttrpc::Error::RpcStatus(::ttrpc::get_status(::ttrpc::Code::NOT_FOUND, "/containerd.services.events.ttrpc.v1.Events/Forward is not supported".to_string()))) - } -} - -pub fn create_events(service: Arc>) -> HashMap> { - let mut methods = HashMap::new(); - - methods.insert("/containerd.services.events.ttrpc.v1.Events/Forward".to_string(), - Box::new(ForwardMethod{service: service.clone()}) as Box); - - methods -} diff --git a/crates/shim-protos/src/shim/events_ttrpc_async.rs b/crates/shim-protos/src/shim/events_ttrpc_async.rs deleted file mode 100644 index dfcca3d6..00000000 --- a/crates/shim-protos/src/shim/events_ttrpc_async.rs +++ /dev/null @@ -1,71 +0,0 @@ -// This file is generated by ttrpc-compiler 0.6.1. Do not edit -// @generated - -// https://github.com/Manishearth/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clipto_camel_casepy)] - -#![cfg_attr(rustfmt, rustfmt_skip)] - -#![allow(box_pointers)] -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unsafe_code)] -#![allow(unused_imports)] -#![allow(unused_results)] -use protobuf::{CodedInputStream, CodedOutputStream, Message}; -use std::collections::HashMap; -use std::sync::Arc; -use async_trait::async_trait; - -#[derive(Clone)] -pub struct EventsClient { - client: ::ttrpc::r#async::Client, -} - -impl EventsClient { - pub fn new(client: ::ttrpc::r#async::Client) -> Self { - EventsClient { - client: client, - } - } - - pub async fn forward(&self, ctx: ttrpc::context::Context, req: &super::events::ForwardRequest) -> ::ttrpc::Result { - let mut cres = super::empty::Empty::new(); - ::ttrpc::async_client_request!(self, ctx, req, "containerd.services.events.ttrpc.v1.Events", "Forward", cres); - } -} - -struct ForwardMethod { - service: Arc>, -} - -#[async_trait] -impl ::ttrpc::r#async::MethodHandler for ForwardMethod { - async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<::ttrpc::Response> { - ::ttrpc::async_request_handler!(self, ctx, req, events, ForwardRequest, forward); - } -} - -#[async_trait] -pub trait Events: Sync { - async fn forward(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _: super::events::ForwardRequest) -> ::ttrpc::Result { - Err(::ttrpc::Error::RpcStatus(::ttrpc::get_status(::ttrpc::Code::NOT_FOUND, "/containerd.services.events.ttrpc.v1.Events/Forward is not supported".to_string()))) - } -} - -pub fn create_events(service: Arc>) -> HashMap { - let mut ret = HashMap::new(); - let mut methods = HashMap::new(); - let streams = HashMap::new(); - - methods.insert("Forward".to_string(), - Box::new(ForwardMethod{service: service.clone()}) as Box); - - ret.insert("containerd.services.events.ttrpc.v1.Events".to_string(), ::ttrpc::r#async::Service{ methods, streams }); - ret -} diff --git a/crates/shim-protos/src/shim/fieldpath.rs b/crates/shim-protos/src/shim/fieldpath.rs deleted file mode 100644 index e0725374..00000000 --- a/crates/shim-protos/src/shim/fieldpath.rs +++ /dev/null @@ -1,71 +0,0 @@ -// This file is generated by rust-protobuf 3.1.0. Do not edit -// .proto file is parsed by pure -// @generated - -// https://github.com/rust-lang/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![allow(unused_attributes)] -#![cfg_attr(rustfmt, rustfmt::skip)] - -#![allow(box_pointers)] -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unused_results)] -#![allow(unused_mut)] - -//! Generated file from `github.com/containerd/containerd/protobuf/plugin/fieldpath.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_1_0; - -/// Extension fields -pub mod exts { - - pub const fieldpath_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63300, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const fieldpath: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64400, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); -} - -static file_descriptor_proto_data: &'static [u8] = b"\ - \n@github.com/containerd/containerd/protobuf/plugin/fieldpath.proto\x12\ - \x11containerd.plugin\x1a\x20google/protobuf/descriptor.proto:C\n\rfield\ - path_all\x18\xc4\xee\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOption\ - sR\x0cfieldpathAll:?\n\tfieldpath\x18\x90\xf7\x03\x20\x01(\x08\x12\x1f.g\ - oogle.protobuf.MessageOptionsR\tfieldpathb\x06proto2\ -"; - -/// `FileDescriptorProto` object which was a source for this generated file -fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); - file_descriptor_proto_lazy.get(|| { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() - }) -} - -/// `FileDescriptor` object which allows dynamic access to files -pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { - static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); - static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); - file_descriptor.get(|| { - let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { - let mut deps = ::std::vec::Vec::with_capacity(1); - deps.push(::protobuf::descriptor::file_descriptor().clone()); - let mut messages = ::std::vec::Vec::with_capacity(0); - let mut enums = ::std::vec::Vec::with_capacity(0); - ::protobuf::reflect::GeneratedFileDescriptor::new_generated( - file_descriptor_proto(), - deps, - messages, - enums, - ) - }); - ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) - }) -} diff --git a/crates/shim-protos/src/shim/gogo.rs b/crates/shim-protos/src/shim/gogo.rs deleted file mode 100644 index a05967a9..00000000 --- a/crates/shim-protos/src/shim/gogo.rs +++ /dev/null @@ -1,327 +0,0 @@ -// This file is generated by rust-protobuf 3.1.0. Do not edit -// .proto file is parsed by pure -// @generated - -// https://github.com/rust-lang/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![allow(unused_attributes)] -#![cfg_attr(rustfmt, rustfmt::skip)] - -#![allow(box_pointers)] -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unused_results)] -#![allow(unused_mut)] - -//! Generated file from `gogoproto/gogo.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_1_0; - -/// Extension fields -pub mod exts { - - pub const goproto_enum_prefix: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(62001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_enum_stringer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(62021, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const enum_stringer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(62022, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const enum_customname: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(62023, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); - - pub const enumdecl: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(62024, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const enumvalue_customname: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumValueOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(66001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); - - pub const goproto_getters_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_enum_prefix_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63002, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_stringer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63003, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const verbose_equal_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63004, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const face_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63005, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const gostring_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63006, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const populate_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63007, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const stringer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63008, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const onlyone_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63009, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const equal_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63013, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const description_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63014, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const testgen_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63015, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const benchgen_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63016, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const marshaler_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63017, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const unmarshaler_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63018, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const stable_marshaler_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63019, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const sizer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63020, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_enum_stringer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63021, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const enum_stringer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63022, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const unsafe_marshaler_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63023, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const unsafe_unmarshaler_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63024, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_extensions_map_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63025, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_unrecognized_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63026, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const gogoproto_import: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63027, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const protosizer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63028, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const compare_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63029, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const typedecl_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63030, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const enumdecl_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63031, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_registration: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63032, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const messagename_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63033, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_sizecache_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63034, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_unkeyed_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63035, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_getters: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_stringer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64003, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const verbose_equal: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64004, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const face: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64005, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const gostring: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64006, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const populate: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64007, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const stringer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(67008, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const onlyone: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64009, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const equal: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64013, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const description: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64014, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const testgen: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64015, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const benchgen: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64016, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const marshaler: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64017, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const unmarshaler: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64018, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const stable_marshaler: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64019, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const sizer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64020, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const unsafe_marshaler: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64023, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const unsafe_unmarshaler: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64024, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_extensions_map: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64025, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_unrecognized: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64026, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const protosizer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64028, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const compare: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64029, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const typedecl: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64030, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const messagename: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64033, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_sizecache: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64034, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_unkeyed: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64035, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const nullable: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(65001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const embed: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(65002, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const customtype: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65003, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); - - pub const customname: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65004, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); - - pub const jsontag: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65005, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); - - pub const moretags: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65006, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); - - pub const casttype: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65007, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); - - pub const castkey: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65008, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); - - pub const castvalue: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65009, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); - - pub const stdtime: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(65010, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const stdduration: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(65011, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const wktpointer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(65012, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); -} - -static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x14gogoproto/gogo.proto\x12\tgogoproto\x1a\x20google/protobuf/descrip\ - tor.proto:N\n\x13goproto_enum_prefix\x18\xb1\xe4\x03\x20\x01(\x08\x12\ - \x1c.google.protobuf.EnumOptionsR\x11goprotoEnumPrefix:R\n\x15goproto_en\ - um_stringer\x18\xc5\xe4\x03\x20\x01(\x08\x12\x1c.google.protobuf.EnumOpt\ - ionsR\x13goprotoEnumStringer:C\n\renum_stringer\x18\xc6\xe4\x03\x20\x01(\ - \x08\x12\x1c.google.protobuf.EnumOptionsR\x0cenumStringer:G\n\x0fenum_cu\ - stomname\x18\xc7\xe4\x03\x20\x01(\t\x12\x1c.google.protobuf.EnumOptionsR\ - \x0eenumCustomname::\n\x08enumdecl\x18\xc8\xe4\x03\x20\x01(\x08\x12\x1c.\ - google.protobuf.EnumOptionsR\x08enumdecl:V\n\x14enumvalue_customname\x18\ - \xd1\x83\x04\x20\x01(\t\x12!.google.protobuf.EnumValueOptionsR\x13enumva\ - lueCustomname:N\n\x13goproto_getters_all\x18\x99\xec\x03\x20\x01(\x08\ - \x12\x1c.google.protobuf.FileOptionsR\x11goprotoGettersAll:U\n\x17goprot\ - o_enum_prefix_all\x18\x9a\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.F\ - ileOptionsR\x14goprotoEnumPrefixAll:P\n\x14goproto_stringer_all\x18\x9b\ - \xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x12goprotoStr\ - ingerAll:J\n\x11verbose_equal_all\x18\x9c\xec\x03\x20\x01(\x08\x12\x1c.g\ - oogle.protobuf.FileOptionsR\x0fverboseEqualAll:9\n\x08face_all\x18\x9d\ - \xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x07faceAll:A\ - \n\x0cgostring_all\x18\x9e\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.\ - FileOptionsR\x0bgostringAll:A\n\x0cpopulate_all\x18\x9f\xec\x03\x20\x01(\ - \x08\x12\x1c.google.protobuf.FileOptionsR\x0bpopulateAll:A\n\x0cstringer\ - _all\x18\xa0\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\ - \x0bstringerAll:?\n\x0bonlyone_all\x18\xa1\xec\x03\x20\x01(\x08\x12\x1c.\ - google.protobuf.FileOptionsR\nonlyoneAll:;\n\tequal_all\x18\xa5\xec\x03\ - \x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x08equalAll:G\n\x0fde\ - scription_all\x18\xa6\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileO\ - ptionsR\x0edescriptionAll:?\n\x0btestgen_all\x18\xa7\xec\x03\x20\x01(\ - \x08\x12\x1c.google.protobuf.FileOptionsR\ntestgenAll:A\n\x0cbenchgen_al\ - l\x18\xa8\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x0bb\ - enchgenAll:C\n\rmarshaler_all\x18\xa9\xec\x03\x20\x01(\x08\x12\x1c.googl\ - e.protobuf.FileOptionsR\x0cmarshalerAll:G\n\x0funmarshaler_all\x18\xaa\ - \xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x0eunmarshale\ - rAll:P\n\x14stable_marshaler_all\x18\xab\xec\x03\x20\x01(\x08\x12\x1c.go\ - ogle.protobuf.FileOptionsR\x12stableMarshalerAll:;\n\tsizer_all\x18\xac\ - \xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x08sizerAll:Y\ - \n\x19goproto_enum_stringer_all\x18\xad\xec\x03\x20\x01(\x08\x12\x1c.goo\ - gle.protobuf.FileOptionsR\x16goprotoEnumStringerAll:J\n\x11enum_stringer\ - _all\x18\xae\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\ - \x0fenumStringerAll:P\n\x14unsafe_marshaler_all\x18\xaf\xec\x03\x20\x01(\ - \x08\x12\x1c.google.protobuf.FileOptionsR\x12unsafeMarshalerAll:T\n\x16u\ - nsafe_unmarshaler_all\x18\xb0\xec\x03\x20\x01(\x08\x12\x1c.google.protob\ - uf.FileOptionsR\x14unsafeUnmarshalerAll:[\n\x1agoproto_extensions_map_al\ - l\x18\xb1\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x17g\ - oprotoExtensionsMapAll:X\n\x18goproto_unrecognized_all\x18\xb2\xec\x03\ - \x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x16goprotoUnrecognize\ - dAll:I\n\x10gogoproto_import\x18\xb3\xec\x03\x20\x01(\x08\x12\x1c.google\ - .protobuf.FileOptionsR\x0fgogoprotoImport:E\n\x0eprotosizer_all\x18\xb4\ - \xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\rprotosizerAl\ - l:?\n\x0bcompare_all\x18\xb5\xec\x03\x20\x01(\x08\x12\x1c.google.protobu\ - f.FileOptionsR\ncompareAll:A\n\x0ctypedecl_all\x18\xb6\xec\x03\x20\x01(\ - \x08\x12\x1c.google.protobuf.FileOptionsR\x0btypedeclAll:A\n\x0cenumdecl\ - _all\x18\xb7\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\ - \x0benumdeclAll:Q\n\x14goproto_registration\x18\xb8\xec\x03\x20\x01(\x08\ - \x12\x1c.google.protobuf.FileOptionsR\x13goprotoRegistration:G\n\x0fmess\ - agename_all\x18\xb9\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOpt\ - ionsR\x0emessagenameAll:R\n\x15goproto_sizecache_all\x18\xba\xec\x03\x20\ - \x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x13goprotoSizecacheAll:N\ - \n\x13goproto_unkeyed_all\x18\xbb\xec\x03\x20\x01(\x08\x12\x1c.google.pr\ - otobuf.FileOptionsR\x11goprotoUnkeyedAll:J\n\x0fgoproto_getters\x18\x81\ - \xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x0egoproto\ - Getters:L\n\x10goproto_stringer\x18\x83\xf4\x03\x20\x01(\x08\x12\x1f.goo\ - gle.protobuf.MessageOptionsR\x0fgoprotoStringer:F\n\rverbose_equal\x18\ - \x84\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x0cver\ - boseEqual:5\n\x04face\x18\x85\xf4\x03\x20\x01(\x08\x12\x1f.google.protob\ - uf.MessageOptionsR\x04face:=\n\x08gostring\x18\x86\xf4\x03\x20\x01(\x08\ - \x12\x1f.google.protobuf.MessageOptionsR\x08gostring:=\n\x08populate\x18\ - \x87\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x08pop\ - ulate:=\n\x08stringer\x18\xc0\x8b\x04\x20\x01(\x08\x12\x1f.google.protob\ - uf.MessageOptionsR\x08stringer:;\n\x07onlyone\x18\x89\xf4\x03\x20\x01(\ - \x08\x12\x1f.google.protobuf.MessageOptionsR\x07onlyone:7\n\x05equal\x18\ - \x8d\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x05equ\ - al:C\n\x0bdescription\x18\x8e\xf4\x03\x20\x01(\x08\x12\x1f.google.protob\ - uf.MessageOptionsR\x0bdescription:;\n\x07testgen\x18\x8f\xf4\x03\x20\x01\ - (\x08\x12\x1f.google.protobuf.MessageOptionsR\x07testgen:=\n\x08benchgen\ - \x18\x90\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\ - \x08benchgen:?\n\tmarshaler\x18\x91\xf4\x03\x20\x01(\x08\x12\x1f.google.\ - protobuf.MessageOptionsR\tmarshaler:C\n\x0bunmarshaler\x18\x92\xf4\x03\ - \x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x0bunmarshaler:L\n\ - \x10stable_marshaler\x18\x93\xf4\x03\x20\x01(\x08\x12\x1f.google.protobu\ - f.MessageOptionsR\x0fstableMarshaler:7\n\x05sizer\x18\x94\xf4\x03\x20\ - \x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x05sizer:L\n\x10unsafe\ - _marshaler\x18\x97\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageO\ - ptionsR\x0funsafeMarshaler:P\n\x12unsafe_unmarshaler\x18\x98\xf4\x03\x20\ - \x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x11unsafeUnmarshaler:W\ - \n\x16goproto_extensions_map\x18\x99\xf4\x03\x20\x01(\x08\x12\x1f.google\ - .protobuf.MessageOptionsR\x14goprotoExtensionsMap:T\n\x14goproto_unrecog\ - nized\x18\x9a\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOption\ - sR\x13goprotoUnrecognized:A\n\nprotosizer\x18\x9c\xf4\x03\x20\x01(\x08\ - \x12\x1f.google.protobuf.MessageOptionsR\nprotosizer:;\n\x07compare\x18\ - \x9d\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x07com\ - pare:=\n\x08typedecl\x18\x9e\xf4\x03\x20\x01(\x08\x12\x1f.google.protobu\ - f.MessageOptionsR\x08typedecl:C\n\x0bmessagename\x18\xa1\xf4\x03\x20\x01\ - (\x08\x12\x1f.google.protobuf.MessageOptionsR\x0bmessagename:N\n\x11gopr\ - oto_sizecache\x18\xa2\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.Messa\ - geOptionsR\x10goprotoSizecache:J\n\x0fgoproto_unkeyed\x18\xa3\xf4\x03\ - \x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x0egoprotoUnkeyed:\ - ;\n\x08nullable\x18\xe9\xfb\x03\x20\x01(\x08\x12\x1d.google.protobuf.Fie\ - ldOptionsR\x08nullable:5\n\x05embed\x18\xea\xfb\x03\x20\x01(\x08\x12\x1d\ - .google.protobuf.FieldOptionsR\x05embed:?\n\ncustomtype\x18\xeb\xfb\x03\ - \x20\x01(\t\x12\x1d.google.protobuf.FieldOptionsR\ncustomtype:?\n\ncusto\ - mname\x18\xec\xfb\x03\x20\x01(\t\x12\x1d.google.protobuf.FieldOptionsR\n\ - customname:9\n\x07jsontag\x18\xed\xfb\x03\x20\x01(\t\x12\x1d.google.prot\ - obuf.FieldOptionsR\x07jsontag:;\n\x08moretags\x18\xee\xfb\x03\x20\x01(\t\ - \x12\x1d.google.protobuf.FieldOptionsR\x08moretags:;\n\x08casttype\x18\ - \xef\xfb\x03\x20\x01(\t\x12\x1d.google.protobuf.FieldOptionsR\x08casttyp\ - e:9\n\x07castkey\x18\xf0\xfb\x03\x20\x01(\t\x12\x1d.google.protobuf.Fiel\ - dOptionsR\x07castkey:=\n\tcastvalue\x18\xf1\xfb\x03\x20\x01(\t\x12\x1d.g\ - oogle.protobuf.FieldOptionsR\tcastvalue:9\n\x07stdtime\x18\xf2\xfb\x03\ - \x20\x01(\x08\x12\x1d.google.protobuf.FieldOptionsR\x07stdtime:A\n\x0bst\ - dduration\x18\xf3\xfb\x03\x20\x01(\x08\x12\x1d.google.protobuf.FieldOpti\ - onsR\x0bstdduration:?\n\nwktpointer\x18\xf4\xfb\x03\x20\x01(\x08\x12\x1d\ - .google.protobuf.FieldOptionsR\nwktpointerBE\n\x13com.google.protobufB\n\ - GoGoProtosZ\"github.com/gogo/protobuf/gogoprotob\x06proto2\ -"; - -/// `FileDescriptorProto` object which was a source for this generated file -fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); - file_descriptor_proto_lazy.get(|| { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() - }) -} - -/// `FileDescriptor` object which allows dynamic access to files -pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { - static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); - static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); - file_descriptor.get(|| { - let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { - let mut deps = ::std::vec::Vec::with_capacity(1); - deps.push(::protobuf::descriptor::file_descriptor().clone()); - let mut messages = ::std::vec::Vec::with_capacity(0); - let mut enums = ::std::vec::Vec::with_capacity(0); - ::protobuf::reflect::GeneratedFileDescriptor::new_generated( - file_descriptor_proto(), - deps, - messages, - enums, - ) - }); - ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) - }) -} diff --git a/crates/shim-protos/src/shim/mod.rs b/crates/shim-protos/src/shim/mod.rs deleted file mode 100644 index 6af3fb21..00000000 --- a/crates/shim-protos/src/shim/mod.rs +++ /dev/null @@ -1,18 +0,0 @@ -pub mod oci; - -pub mod events; -pub mod events_ttrpc; -#[cfg(feature = "async")] -pub mod events_ttrpc_async; - -pub mod shim; -pub mod shim_ttrpc; -#[cfg(feature = "async")] -pub mod shim_ttrpc_async; - -pub(crate) mod empty; -pub(crate) mod mount; -pub(crate) mod task; - -mod fieldpath; -mod gogo; diff --git a/crates/shim-protos/src/shim/mount.rs b/crates/shim-protos/src/shim/mount.rs deleted file mode 100644 index 48d3f009..00000000 --- a/crates/shim-protos/src/shim/mount.rs +++ /dev/null @@ -1,3 +0,0 @@ -/// Reexport types::mount::* to avoid manually editing other auto-generated source files. - -pub use crate::types::mount::*; diff --git a/crates/shim-protos/src/shim/oci.rs b/crates/shim-protos/src/shim/oci.rs deleted file mode 100644 index a5535438..00000000 --- a/crates/shim-protos/src/shim/oci.rs +++ /dev/null @@ -1,1207 +0,0 @@ -// This file is generated by rust-protobuf 3.1.0. Do not edit -// .proto file is parsed by pure -// @generated - -// https://github.com/rust-lang/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![allow(unused_attributes)] -#![cfg_attr(rustfmt, rustfmt::skip)] - -#![allow(box_pointers)] -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unused_results)] -#![allow(unused_mut)] - -//! Generated file from `github.com/containerd/containerd/runtime/v2/runc/options/oci.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_1_0; - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.runc.v1.Options) -pub struct Options { - // message fields - // @@protoc_insertion_point(field:containerd.runc.v1.Options.no_pivot_root) - pub no_pivot_root: bool, - // @@protoc_insertion_point(field:containerd.runc.v1.Options.no_new_keyring) - pub no_new_keyring: bool, - // @@protoc_insertion_point(field:containerd.runc.v1.Options.shim_cgroup) - pub shim_cgroup: ::std::string::String, - // @@protoc_insertion_point(field:containerd.runc.v1.Options.io_uid) - pub io_uid: u32, - // @@protoc_insertion_point(field:containerd.runc.v1.Options.io_gid) - pub io_gid: u32, - // @@protoc_insertion_point(field:containerd.runc.v1.Options.binary_name) - pub binary_name: ::std::string::String, - // @@protoc_insertion_point(field:containerd.runc.v1.Options.root) - pub root: ::std::string::String, - // @@protoc_insertion_point(field:containerd.runc.v1.Options.criu_path) - pub criu_path: ::std::string::String, - // @@protoc_insertion_point(field:containerd.runc.v1.Options.systemd_cgroup) - pub systemd_cgroup: bool, - // @@protoc_insertion_point(field:containerd.runc.v1.Options.criu_image_path) - pub criu_image_path: ::std::string::String, - // @@protoc_insertion_point(field:containerd.runc.v1.Options.criu_work_path) - pub criu_work_path: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:containerd.runc.v1.Options.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a Options { - fn default() -> &'a Options { - ::default_instance() - } -} - -impl Options { - pub fn new() -> Options { - ::std::default::Default::default() - } - - // bool no_pivot_root = 1; - - pub fn no_pivot_root(&self) -> bool { - self.no_pivot_root - } - - pub fn clear_no_pivot_root(&mut self) { - self.no_pivot_root = false; - } - - // Param is passed by value, moved - pub fn set_no_pivot_root(&mut self, v: bool) { - self.no_pivot_root = v; - } - - // bool no_new_keyring = 2; - - pub fn no_new_keyring(&self) -> bool { - self.no_new_keyring - } - - pub fn clear_no_new_keyring(&mut self) { - self.no_new_keyring = false; - } - - // Param is passed by value, moved - pub fn set_no_new_keyring(&mut self, v: bool) { - self.no_new_keyring = v; - } - - // string shim_cgroup = 3; - - pub fn shim_cgroup(&self) -> &str { - &self.shim_cgroup - } - - pub fn clear_shim_cgroup(&mut self) { - self.shim_cgroup.clear(); - } - - // Param is passed by value, moved - pub fn set_shim_cgroup(&mut self, v: ::std::string::String) { - self.shim_cgroup = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_shim_cgroup(&mut self) -> &mut ::std::string::String { - &mut self.shim_cgroup - } - - // Take field - pub fn take_shim_cgroup(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.shim_cgroup, ::std::string::String::new()) - } - - // uint32 io_uid = 4; - - pub fn io_uid(&self) -> u32 { - self.io_uid - } - - pub fn clear_io_uid(&mut self) { - self.io_uid = 0; - } - - // Param is passed by value, moved - pub fn set_io_uid(&mut self, v: u32) { - self.io_uid = v; - } - - // uint32 io_gid = 5; - - pub fn io_gid(&self) -> u32 { - self.io_gid - } - - pub fn clear_io_gid(&mut self) { - self.io_gid = 0; - } - - // Param is passed by value, moved - pub fn set_io_gid(&mut self, v: u32) { - self.io_gid = v; - } - - // string binary_name = 6; - - pub fn binary_name(&self) -> &str { - &self.binary_name - } - - pub fn clear_binary_name(&mut self) { - self.binary_name.clear(); - } - - // Param is passed by value, moved - pub fn set_binary_name(&mut self, v: ::std::string::String) { - self.binary_name = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_binary_name(&mut self) -> &mut ::std::string::String { - &mut self.binary_name - } - - // Take field - pub fn take_binary_name(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.binary_name, ::std::string::String::new()) - } - - // string root = 7; - - pub fn root(&self) -> &str { - &self.root - } - - pub fn clear_root(&mut self) { - self.root.clear(); - } - - // Param is passed by value, moved - pub fn set_root(&mut self, v: ::std::string::String) { - self.root = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_root(&mut self) -> &mut ::std::string::String { - &mut self.root - } - - // Take field - pub fn take_root(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.root, ::std::string::String::new()) - } - - // string criu_path = 8; - - pub fn criu_path(&self) -> &str { - &self.criu_path - } - - pub fn clear_criu_path(&mut self) { - self.criu_path.clear(); - } - - // Param is passed by value, moved - pub fn set_criu_path(&mut self, v: ::std::string::String) { - self.criu_path = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_criu_path(&mut self) -> &mut ::std::string::String { - &mut self.criu_path - } - - // Take field - pub fn take_criu_path(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.criu_path, ::std::string::String::new()) - } - - // bool systemd_cgroup = 9; - - pub fn systemd_cgroup(&self) -> bool { - self.systemd_cgroup - } - - pub fn clear_systemd_cgroup(&mut self) { - self.systemd_cgroup = false; - } - - // Param is passed by value, moved - pub fn set_systemd_cgroup(&mut self, v: bool) { - self.systemd_cgroup = v; - } - - // string criu_image_path = 10; - - pub fn criu_image_path(&self) -> &str { - &self.criu_image_path - } - - pub fn clear_criu_image_path(&mut self) { - self.criu_image_path.clear(); - } - - // Param is passed by value, moved - pub fn set_criu_image_path(&mut self, v: ::std::string::String) { - self.criu_image_path = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_criu_image_path(&mut self) -> &mut ::std::string::String { - &mut self.criu_image_path - } - - // Take field - pub fn take_criu_image_path(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.criu_image_path, ::std::string::String::new()) - } - - // string criu_work_path = 11; - - pub fn criu_work_path(&self) -> &str { - &self.criu_work_path - } - - pub fn clear_criu_work_path(&mut self) { - self.criu_work_path.clear(); - } - - // Param is passed by value, moved - pub fn set_criu_work_path(&mut self, v: ::std::string::String) { - self.criu_work_path = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_criu_work_path(&mut self) -> &mut ::std::string::String { - &mut self.criu_work_path - } - - // Take field - pub fn take_criu_work_path(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.criu_work_path, ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(11); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "no_pivot_root", - |m: &Options| { &m.no_pivot_root }, - |m: &mut Options| { &mut m.no_pivot_root }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "no_new_keyring", - |m: &Options| { &m.no_new_keyring }, - |m: &mut Options| { &mut m.no_new_keyring }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "shim_cgroup", - |m: &Options| { &m.shim_cgroup }, - |m: &mut Options| { &mut m.shim_cgroup }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "io_uid", - |m: &Options| { &m.io_uid }, - |m: &mut Options| { &mut m.io_uid }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "io_gid", - |m: &Options| { &m.io_gid }, - |m: &mut Options| { &mut m.io_gid }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "binary_name", - |m: &Options| { &m.binary_name }, - |m: &mut Options| { &mut m.binary_name }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "root", - |m: &Options| { &m.root }, - |m: &mut Options| { &mut m.root }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "criu_path", - |m: &Options| { &m.criu_path }, - |m: &mut Options| { &mut m.criu_path }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "systemd_cgroup", - |m: &Options| { &m.systemd_cgroup }, - |m: &mut Options| { &mut m.systemd_cgroup }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "criu_image_path", - |m: &Options| { &m.criu_image_path }, - |m: &mut Options| { &mut m.criu_image_path }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "criu_work_path", - |m: &Options| { &m.criu_work_path }, - |m: &mut Options| { &mut m.criu_work_path }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "Options", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for Options { - const NAME: &'static str = "Options"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.no_pivot_root = is.read_bool()?; - }, - 16 => { - self.no_new_keyring = is.read_bool()?; - }, - 26 => { - self.shim_cgroup = is.read_string()?; - }, - 32 => { - self.io_uid = is.read_uint32()?; - }, - 40 => { - self.io_gid = is.read_uint32()?; - }, - 50 => { - self.binary_name = is.read_string()?; - }, - 58 => { - self.root = is.read_string()?; - }, - 66 => { - self.criu_path = is.read_string()?; - }, - 72 => { - self.systemd_cgroup = is.read_bool()?; - }, - 82 => { - self.criu_image_path = is.read_string()?; - }, - 90 => { - self.criu_work_path = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.no_pivot_root != false { - my_size += 1 + 1; - } - if self.no_new_keyring != false { - my_size += 1 + 1; - } - if !self.shim_cgroup.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.shim_cgroup); - } - if self.io_uid != 0 { - my_size += ::protobuf::rt::uint32_size(4, self.io_uid); - } - if self.io_gid != 0 { - my_size += ::protobuf::rt::uint32_size(5, self.io_gid); - } - if !self.binary_name.is_empty() { - my_size += ::protobuf::rt::string_size(6, &self.binary_name); - } - if !self.root.is_empty() { - my_size += ::protobuf::rt::string_size(7, &self.root); - } - if !self.criu_path.is_empty() { - my_size += ::protobuf::rt::string_size(8, &self.criu_path); - } - if self.systemd_cgroup != false { - my_size += 1 + 1; - } - if !self.criu_image_path.is_empty() { - my_size += ::protobuf::rt::string_size(10, &self.criu_image_path); - } - if !self.criu_work_path.is_empty() { - my_size += ::protobuf::rt::string_size(11, &self.criu_work_path); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.no_pivot_root != false { - os.write_bool(1, self.no_pivot_root)?; - } - if self.no_new_keyring != false { - os.write_bool(2, self.no_new_keyring)?; - } - if !self.shim_cgroup.is_empty() { - os.write_string(3, &self.shim_cgroup)?; - } - if self.io_uid != 0 { - os.write_uint32(4, self.io_uid)?; - } - if self.io_gid != 0 { - os.write_uint32(5, self.io_gid)?; - } - if !self.binary_name.is_empty() { - os.write_string(6, &self.binary_name)?; - } - if !self.root.is_empty() { - os.write_string(7, &self.root)?; - } - if !self.criu_path.is_empty() { - os.write_string(8, &self.criu_path)?; - } - if self.systemd_cgroup != false { - os.write_bool(9, self.systemd_cgroup)?; - } - if !self.criu_image_path.is_empty() { - os.write_string(10, &self.criu_image_path)?; - } - if !self.criu_work_path.is_empty() { - os.write_string(11, &self.criu_work_path)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> Options { - Options::new() - } - - fn clear(&mut self) { - self.no_pivot_root = false; - self.no_new_keyring = false; - self.shim_cgroup.clear(); - self.io_uid = 0; - self.io_gid = 0; - self.binary_name.clear(); - self.root.clear(); - self.criu_path.clear(); - self.systemd_cgroup = false; - self.criu_image_path.clear(); - self.criu_work_path.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static Options { - static instance: Options = Options { - no_pivot_root: false, - no_new_keyring: false, - shim_cgroup: ::std::string::String::new(), - io_uid: 0, - io_gid: 0, - binary_name: ::std::string::String::new(), - root: ::std::string::String::new(), - criu_path: ::std::string::String::new(), - systemd_cgroup: false, - criu_image_path: ::std::string::String::new(), - criu_work_path: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for Options { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("Options").unwrap()).clone() - } -} - -impl ::std::fmt::Display for Options { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for Options { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.runc.v1.CheckpointOptions) -pub struct CheckpointOptions { - // message fields - // @@protoc_insertion_point(field:containerd.runc.v1.CheckpointOptions.exit) - pub exit: bool, - // @@protoc_insertion_point(field:containerd.runc.v1.CheckpointOptions.open_tcp) - pub open_tcp: bool, - // @@protoc_insertion_point(field:containerd.runc.v1.CheckpointOptions.external_unix_sockets) - pub external_unix_sockets: bool, - // @@protoc_insertion_point(field:containerd.runc.v1.CheckpointOptions.terminal) - pub terminal: bool, - // @@protoc_insertion_point(field:containerd.runc.v1.CheckpointOptions.file_locks) - pub file_locks: bool, - // @@protoc_insertion_point(field:containerd.runc.v1.CheckpointOptions.empty_namespaces) - pub empty_namespaces: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:containerd.runc.v1.CheckpointOptions.cgroups_mode) - pub cgroups_mode: ::std::string::String, - // @@protoc_insertion_point(field:containerd.runc.v1.CheckpointOptions.image_path) - pub image_path: ::std::string::String, - // @@protoc_insertion_point(field:containerd.runc.v1.CheckpointOptions.work_path) - pub work_path: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:containerd.runc.v1.CheckpointOptions.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a CheckpointOptions { - fn default() -> &'a CheckpointOptions { - ::default_instance() - } -} - -impl CheckpointOptions { - pub fn new() -> CheckpointOptions { - ::std::default::Default::default() - } - - // bool exit = 1; - - pub fn exit(&self) -> bool { - self.exit - } - - pub fn clear_exit(&mut self) { - self.exit = false; - } - - // Param is passed by value, moved - pub fn set_exit(&mut self, v: bool) { - self.exit = v; - } - - // bool open_tcp = 2; - - pub fn open_tcp(&self) -> bool { - self.open_tcp - } - - pub fn clear_open_tcp(&mut self) { - self.open_tcp = false; - } - - // Param is passed by value, moved - pub fn set_open_tcp(&mut self, v: bool) { - self.open_tcp = v; - } - - // bool external_unix_sockets = 3; - - pub fn external_unix_sockets(&self) -> bool { - self.external_unix_sockets - } - - pub fn clear_external_unix_sockets(&mut self) { - self.external_unix_sockets = false; - } - - // Param is passed by value, moved - pub fn set_external_unix_sockets(&mut self, v: bool) { - self.external_unix_sockets = v; - } - - // bool terminal = 4; - - pub fn terminal(&self) -> bool { - self.terminal - } - - pub fn clear_terminal(&mut self) { - self.terminal = false; - } - - // Param is passed by value, moved - pub fn set_terminal(&mut self, v: bool) { - self.terminal = v; - } - - // bool file_locks = 5; - - pub fn file_locks(&self) -> bool { - self.file_locks - } - - pub fn clear_file_locks(&mut self) { - self.file_locks = false; - } - - // Param is passed by value, moved - pub fn set_file_locks(&mut self, v: bool) { - self.file_locks = v; - } - - // repeated string empty_namespaces = 6; - - pub fn empty_namespaces(&self) -> &[::std::string::String] { - &self.empty_namespaces - } - - pub fn clear_empty_namespaces(&mut self) { - self.empty_namespaces.clear(); - } - - // Param is passed by value, moved - pub fn set_empty_namespaces(&mut self, v: ::std::vec::Vec<::std::string::String>) { - self.empty_namespaces = v; - } - - // Mutable pointer to the field. - pub fn mut_empty_namespaces(&mut self) -> &mut ::std::vec::Vec<::std::string::String> { - &mut self.empty_namespaces - } - - // Take field - pub fn take_empty_namespaces(&mut self) -> ::std::vec::Vec<::std::string::String> { - ::std::mem::replace(&mut self.empty_namespaces, ::std::vec::Vec::new()) - } - - // string cgroups_mode = 7; - - pub fn cgroups_mode(&self) -> &str { - &self.cgroups_mode - } - - pub fn clear_cgroups_mode(&mut self) { - self.cgroups_mode.clear(); - } - - // Param is passed by value, moved - pub fn set_cgroups_mode(&mut self, v: ::std::string::String) { - self.cgroups_mode = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_cgroups_mode(&mut self) -> &mut ::std::string::String { - &mut self.cgroups_mode - } - - // Take field - pub fn take_cgroups_mode(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.cgroups_mode, ::std::string::String::new()) - } - - // string image_path = 8; - - pub fn image_path(&self) -> &str { - &self.image_path - } - - pub fn clear_image_path(&mut self) { - self.image_path.clear(); - } - - // Param is passed by value, moved - pub fn set_image_path(&mut self, v: ::std::string::String) { - self.image_path = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_image_path(&mut self) -> &mut ::std::string::String { - &mut self.image_path - } - - // Take field - pub fn take_image_path(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.image_path, ::std::string::String::new()) - } - - // string work_path = 9; - - pub fn work_path(&self) -> &str { - &self.work_path - } - - pub fn clear_work_path(&mut self) { - self.work_path.clear(); - } - - // Param is passed by value, moved - pub fn set_work_path(&mut self, v: ::std::string::String) { - self.work_path = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_work_path(&mut self) -> &mut ::std::string::String { - &mut self.work_path - } - - // Take field - pub fn take_work_path(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.work_path, ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(9); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "exit", - |m: &CheckpointOptions| { &m.exit }, - |m: &mut CheckpointOptions| { &mut m.exit }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "open_tcp", - |m: &CheckpointOptions| { &m.open_tcp }, - |m: &mut CheckpointOptions| { &mut m.open_tcp }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "external_unix_sockets", - |m: &CheckpointOptions| { &m.external_unix_sockets }, - |m: &mut CheckpointOptions| { &mut m.external_unix_sockets }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "terminal", - |m: &CheckpointOptions| { &m.terminal }, - |m: &mut CheckpointOptions| { &mut m.terminal }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "file_locks", - |m: &CheckpointOptions| { &m.file_locks }, - |m: &mut CheckpointOptions| { &mut m.file_locks }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "empty_namespaces", - |m: &CheckpointOptions| { &m.empty_namespaces }, - |m: &mut CheckpointOptions| { &mut m.empty_namespaces }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "cgroups_mode", - |m: &CheckpointOptions| { &m.cgroups_mode }, - |m: &mut CheckpointOptions| { &mut m.cgroups_mode }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "image_path", - |m: &CheckpointOptions| { &m.image_path }, - |m: &mut CheckpointOptions| { &mut m.image_path }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "work_path", - |m: &CheckpointOptions| { &m.work_path }, - |m: &mut CheckpointOptions| { &mut m.work_path }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "CheckpointOptions", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for CheckpointOptions { - const NAME: &'static str = "CheckpointOptions"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.exit = is.read_bool()?; - }, - 16 => { - self.open_tcp = is.read_bool()?; - }, - 24 => { - self.external_unix_sockets = is.read_bool()?; - }, - 32 => { - self.terminal = is.read_bool()?; - }, - 40 => { - self.file_locks = is.read_bool()?; - }, - 50 => { - self.empty_namespaces.push(is.read_string()?); - }, - 58 => { - self.cgroups_mode = is.read_string()?; - }, - 66 => { - self.image_path = is.read_string()?; - }, - 74 => { - self.work_path = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.exit != false { - my_size += 1 + 1; - } - if self.open_tcp != false { - my_size += 1 + 1; - } - if self.external_unix_sockets != false { - my_size += 1 + 1; - } - if self.terminal != false { - my_size += 1 + 1; - } - if self.file_locks != false { - my_size += 1 + 1; - } - for value in &self.empty_namespaces { - my_size += ::protobuf::rt::string_size(6, &value); - }; - if !self.cgroups_mode.is_empty() { - my_size += ::protobuf::rt::string_size(7, &self.cgroups_mode); - } - if !self.image_path.is_empty() { - my_size += ::protobuf::rt::string_size(8, &self.image_path); - } - if !self.work_path.is_empty() { - my_size += ::protobuf::rt::string_size(9, &self.work_path); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.exit != false { - os.write_bool(1, self.exit)?; - } - if self.open_tcp != false { - os.write_bool(2, self.open_tcp)?; - } - if self.external_unix_sockets != false { - os.write_bool(3, self.external_unix_sockets)?; - } - if self.terminal != false { - os.write_bool(4, self.terminal)?; - } - if self.file_locks != false { - os.write_bool(5, self.file_locks)?; - } - for v in &self.empty_namespaces { - os.write_string(6, &v)?; - }; - if !self.cgroups_mode.is_empty() { - os.write_string(7, &self.cgroups_mode)?; - } - if !self.image_path.is_empty() { - os.write_string(8, &self.image_path)?; - } - if !self.work_path.is_empty() { - os.write_string(9, &self.work_path)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> CheckpointOptions { - CheckpointOptions::new() - } - - fn clear(&mut self) { - self.exit = false; - self.open_tcp = false; - self.external_unix_sockets = false; - self.terminal = false; - self.file_locks = false; - self.empty_namespaces.clear(); - self.cgroups_mode.clear(); - self.image_path.clear(); - self.work_path.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static CheckpointOptions { - static instance: CheckpointOptions = CheckpointOptions { - exit: false, - open_tcp: false, - external_unix_sockets: false, - terminal: false, - file_locks: false, - empty_namespaces: ::std::vec::Vec::new(), - cgroups_mode: ::std::string::String::new(), - image_path: ::std::string::String::new(), - work_path: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for CheckpointOptions { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("CheckpointOptions").unwrap()).clone() - } -} - -impl ::std::fmt::Display for CheckpointOptions { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for CheckpointOptions { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.runc.v1.ProcessDetails) -pub struct ProcessDetails { - // message fields - // @@protoc_insertion_point(field:containerd.runc.v1.ProcessDetails.exec_id) - pub exec_id: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:containerd.runc.v1.ProcessDetails.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ProcessDetails { - fn default() -> &'a ProcessDetails { - ::default_instance() - } -} - -impl ProcessDetails { - pub fn new() -> ProcessDetails { - ::std::default::Default::default() - } - - // string exec_id = 1; - - pub fn exec_id(&self) -> &str { - &self.exec_id - } - - pub fn clear_exec_id(&mut self) { - self.exec_id.clear(); - } - - // Param is passed by value, moved - pub fn set_exec_id(&mut self, v: ::std::string::String) { - self.exec_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_exec_id(&mut self) -> &mut ::std::string::String { - &mut self.exec_id - } - - // Take field - pub fn take_exec_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.exec_id, ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "exec_id", - |m: &ProcessDetails| { &m.exec_id }, - |m: &mut ProcessDetails| { &mut m.exec_id }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "ProcessDetails", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for ProcessDetails { - const NAME: &'static str = "ProcessDetails"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.exec_id = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.exec_id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.exec_id); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.exec_id.is_empty() { - os.write_string(1, &self.exec_id)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ProcessDetails { - ProcessDetails::new() - } - - fn clear(&mut self) { - self.exec_id.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static ProcessDetails { - static instance: ProcessDetails = ProcessDetails { - exec_id: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for ProcessDetails { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("ProcessDetails").unwrap()).clone() - } -} - -impl ::std::fmt::Display for ProcessDetails { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ProcessDetails { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -static file_descriptor_proto_data: &'static [u8] = b"\ - \nBgithub.com/containerd/containerd/runtime/v2/runc/options/oci.proto\ - \x12\x12containerd.runc.v1\x1a\x14gogoproto/gogo.protoX\0\"\xe9\x02\n\ - \x07Options\x12\"\n\rno_pivot_root\x18\x01\x20\x01(\x08R\x0bnoPivotRoot\ - \x12$\n\x0eno_new_keyring\x18\x02\x20\x01(\x08R\x0cnoNewKeyring\x12\x1f\ - \n\x0bshim_cgroup\x18\x03\x20\x01(\tR\nshimCgroup\x12\x15\n\x06io_uid\ - \x18\x04\x20\x01(\rR\x05ioUid\x12\x15\n\x06io_gid\x18\x05\x20\x01(\rR\ - \x05ioGid\x12\x1f\n\x0bbinary_name\x18\x06\x20\x01(\tR\nbinaryName\x12\ - \x12\n\x04root\x18\x07\x20\x01(\tR\x04root\x12\x1b\n\tcriu_path\x18\x08\ - \x20\x01(\tR\x08criuPath\x12%\n\x0esystemd_cgroup\x18\t\x20\x01(\x08R\rs\ - ystemdCgroup\x12&\n\x0fcriu_image_path\x18\n\x20\x01(\tR\rcriuImagePath\ - \x12$\n\x0ecriu_work_path\x18\x0b\x20\x01(\tR\x0ccriuWorkPath\"\xbb\x02\ - \n\x11CheckpointOptions\x12\x12\n\x04exit\x18\x01\x20\x01(\x08R\x04exit\ - \x12\x19\n\x08open_tcp\x18\x02\x20\x01(\x08R\x07openTcp\x122\n\x15extern\ - al_unix_sockets\x18\x03\x20\x01(\x08R\x13externalUnixSockets\x12\x1a\n\ - \x08terminal\x18\x04\x20\x01(\x08R\x08terminal\x12\x1d\n\nfile_locks\x18\ - \x05\x20\x01(\x08R\tfileLocks\x12)\n\x10empty_namespaces\x18\x06\x20\x03\ - (\tR\x0femptyNamespaces\x12!\n\x0ccgroups_mode\x18\x07\x20\x01(\tR\x0bcg\ - roupsMode\x12\x1d\n\nimage_path\x18\x08\x20\x01(\tR\timagePath\x12\x1b\n\ - \twork_path\x18\t\x20\x01(\tR\x08workPath\")\n\x0eProcessDetails\x12\x17\ - \n\x07exec_id\x18\x01\x20\x01(\tR\x06execIdBBZ@github.com/containerd/con\ - tainerd/runtime/v2/runc/options;optionsb\x06proto3\ -"; - -/// `FileDescriptorProto` object which was a source for this generated file -fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); - file_descriptor_proto_lazy.get(|| { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() - }) -} - -/// `FileDescriptor` object which allows dynamic access to files -pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { - static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); - static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); - file_descriptor.get(|| { - let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { - let mut deps = ::std::vec::Vec::with_capacity(1); - deps.push(super::gogo::file_descriptor().clone()); - let mut messages = ::std::vec::Vec::with_capacity(3); - messages.push(Options::generated_message_descriptor_data()); - messages.push(CheckpointOptions::generated_message_descriptor_data()); - messages.push(ProcessDetails::generated_message_descriptor_data()); - let mut enums = ::std::vec::Vec::with_capacity(0); - ::protobuf::reflect::GeneratedFileDescriptor::new_generated( - file_descriptor_proto(), - deps, - messages, - enums, - ) - }); - ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) - }) -} diff --git a/crates/shim-protos/src/shim/shim.rs b/crates/shim-protos/src/shim/shim.rs deleted file mode 100644 index 18a53bf2..00000000 --- a/crates/shim-protos/src/shim/shim.rs +++ /dev/null @@ -1,5901 +0,0 @@ -// This file is generated by rust-protobuf 3.1.0. Do not edit -// .proto file is parsed by pure -// @generated - -// https://github.com/rust-lang/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![allow(unused_attributes)] -#![cfg_attr(rustfmt, rustfmt::skip)] - -#![allow(box_pointers)] -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unused_results)] -#![allow(unused_mut)] - -//! Generated file from `github.com/containerd/containerd/runtime/v2/task/shim.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_1_0; - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.task.v2.CreateTaskRequest) -pub struct CreateTaskRequest { - // message fields - // @@protoc_insertion_point(field:containerd.task.v2.CreateTaskRequest.id) - pub id: ::std::string::String, - // @@protoc_insertion_point(field:containerd.task.v2.CreateTaskRequest.bundle) - pub bundle: ::std::string::String, - // @@protoc_insertion_point(field:containerd.task.v2.CreateTaskRequest.rootfs) - pub rootfs: ::std::vec::Vec, - // @@protoc_insertion_point(field:containerd.task.v2.CreateTaskRequest.terminal) - pub terminal: bool, - // @@protoc_insertion_point(field:containerd.task.v2.CreateTaskRequest.stdin) - pub stdin: ::std::string::String, - // @@protoc_insertion_point(field:containerd.task.v2.CreateTaskRequest.stdout) - pub stdout: ::std::string::String, - // @@protoc_insertion_point(field:containerd.task.v2.CreateTaskRequest.stderr) - pub stderr: ::std::string::String, - // @@protoc_insertion_point(field:containerd.task.v2.CreateTaskRequest.checkpoint) - pub checkpoint: ::std::string::String, - // @@protoc_insertion_point(field:containerd.task.v2.CreateTaskRequest.parent_checkpoint) - pub parent_checkpoint: ::std::string::String, - // @@protoc_insertion_point(field:containerd.task.v2.CreateTaskRequest.options) - pub options: ::protobuf::MessageField<::protobuf::well_known_types::any::Any>, - // special fields - // @@protoc_insertion_point(special_field:containerd.task.v2.CreateTaskRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a CreateTaskRequest { - fn default() -> &'a CreateTaskRequest { - ::default_instance() - } -} - -impl CreateTaskRequest { - pub fn new() -> CreateTaskRequest { - ::std::default::Default::default() - } - - // string id = 1; - - pub fn id(&self) -> &str { - &self.id - } - - pub fn clear_id(&mut self) { - self.id.clear(); - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: ::std::string::String) { - self.id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_id(&mut self) -> &mut ::std::string::String { - &mut self.id - } - - // Take field - pub fn take_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.id, ::std::string::String::new()) - } - - // string bundle = 2; - - pub fn bundle(&self) -> &str { - &self.bundle - } - - pub fn clear_bundle(&mut self) { - self.bundle.clear(); - } - - // Param is passed by value, moved - pub fn set_bundle(&mut self, v: ::std::string::String) { - self.bundle = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_bundle(&mut self) -> &mut ::std::string::String { - &mut self.bundle - } - - // Take field - pub fn take_bundle(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.bundle, ::std::string::String::new()) - } - - // repeated .containerd.types.Mount rootfs = 3; - - pub fn rootfs(&self) -> &[super::mount::Mount] { - &self.rootfs - } - - pub fn clear_rootfs(&mut self) { - self.rootfs.clear(); - } - - // Param is passed by value, moved - pub fn set_rootfs(&mut self, v: ::std::vec::Vec) { - self.rootfs = v; - } - - // Mutable pointer to the field. - pub fn mut_rootfs(&mut self) -> &mut ::std::vec::Vec { - &mut self.rootfs - } - - // Take field - pub fn take_rootfs(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.rootfs, ::std::vec::Vec::new()) - } - - // bool terminal = 4; - - pub fn terminal(&self) -> bool { - self.terminal - } - - pub fn clear_terminal(&mut self) { - self.terminal = false; - } - - // Param is passed by value, moved - pub fn set_terminal(&mut self, v: bool) { - self.terminal = v; - } - - // string stdin = 5; - - pub fn stdin(&self) -> &str { - &self.stdin - } - - pub fn clear_stdin(&mut self) { - self.stdin.clear(); - } - - // Param is passed by value, moved - pub fn set_stdin(&mut self, v: ::std::string::String) { - self.stdin = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_stdin(&mut self) -> &mut ::std::string::String { - &mut self.stdin - } - - // Take field - pub fn take_stdin(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.stdin, ::std::string::String::new()) - } - - // string stdout = 6; - - pub fn stdout(&self) -> &str { - &self.stdout - } - - pub fn clear_stdout(&mut self) { - self.stdout.clear(); - } - - // Param is passed by value, moved - pub fn set_stdout(&mut self, v: ::std::string::String) { - self.stdout = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_stdout(&mut self) -> &mut ::std::string::String { - &mut self.stdout - } - - // Take field - pub fn take_stdout(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.stdout, ::std::string::String::new()) - } - - // string stderr = 7; - - pub fn stderr(&self) -> &str { - &self.stderr - } - - pub fn clear_stderr(&mut self) { - self.stderr.clear(); - } - - // Param is passed by value, moved - pub fn set_stderr(&mut self, v: ::std::string::String) { - self.stderr = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_stderr(&mut self) -> &mut ::std::string::String { - &mut self.stderr - } - - // Take field - pub fn take_stderr(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.stderr, ::std::string::String::new()) - } - - // string checkpoint = 8; - - pub fn checkpoint(&self) -> &str { - &self.checkpoint - } - - pub fn clear_checkpoint(&mut self) { - self.checkpoint.clear(); - } - - // Param is passed by value, moved - pub fn set_checkpoint(&mut self, v: ::std::string::String) { - self.checkpoint = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_checkpoint(&mut self) -> &mut ::std::string::String { - &mut self.checkpoint - } - - // Take field - pub fn take_checkpoint(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.checkpoint, ::std::string::String::new()) - } - - // string parent_checkpoint = 9; - - pub fn parent_checkpoint(&self) -> &str { - &self.parent_checkpoint - } - - pub fn clear_parent_checkpoint(&mut self) { - self.parent_checkpoint.clear(); - } - - // Param is passed by value, moved - pub fn set_parent_checkpoint(&mut self, v: ::std::string::String) { - self.parent_checkpoint = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_parent_checkpoint(&mut self) -> &mut ::std::string::String { - &mut self.parent_checkpoint - } - - // Take field - pub fn take_parent_checkpoint(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.parent_checkpoint, ::std::string::String::new()) - } - - // .google.protobuf.Any options = 10; - - pub fn options(&self) -> &::protobuf::well_known_types::any::Any { - self.options.as_ref().unwrap_or_else(|| <::protobuf::well_known_types::any::Any as ::protobuf::Message>::default_instance()) - } - - pub fn clear_options(&mut self) { - self.options.clear(); - } - - pub fn has_options(&self) -> bool { - self.options.is_some() - } - - // Param is passed by value, moved - pub fn set_options(&mut self, v: ::protobuf::well_known_types::any::Any) { - self.options = ::protobuf::MessageField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_options(&mut self) -> &mut ::protobuf::well_known_types::any::Any { - self.options.mut_or_insert_default() - } - - // Take field - pub fn take_options(&mut self) -> ::protobuf::well_known_types::any::Any { - self.options.take().unwrap_or_else(|| ::protobuf::well_known_types::any::Any::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(10); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "id", - |m: &CreateTaskRequest| { &m.id }, - |m: &mut CreateTaskRequest| { &mut m.id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "bundle", - |m: &CreateTaskRequest| { &m.bundle }, - |m: &mut CreateTaskRequest| { &mut m.bundle }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "rootfs", - |m: &CreateTaskRequest| { &m.rootfs }, - |m: &mut CreateTaskRequest| { &mut m.rootfs }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "terminal", - |m: &CreateTaskRequest| { &m.terminal }, - |m: &mut CreateTaskRequest| { &mut m.terminal }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "stdin", - |m: &CreateTaskRequest| { &m.stdin }, - |m: &mut CreateTaskRequest| { &mut m.stdin }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "stdout", - |m: &CreateTaskRequest| { &m.stdout }, - |m: &mut CreateTaskRequest| { &mut m.stdout }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "stderr", - |m: &CreateTaskRequest| { &m.stderr }, - |m: &mut CreateTaskRequest| { &mut m.stderr }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "checkpoint", - |m: &CreateTaskRequest| { &m.checkpoint }, - |m: &mut CreateTaskRequest| { &mut m.checkpoint }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "parent_checkpoint", - |m: &CreateTaskRequest| { &m.parent_checkpoint }, - |m: &mut CreateTaskRequest| { &mut m.parent_checkpoint }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ::protobuf::well_known_types::any::Any>( - "options", - |m: &CreateTaskRequest| { &m.options }, - |m: &mut CreateTaskRequest| { &mut m.options }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "CreateTaskRequest", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for CreateTaskRequest { - const NAME: &'static str = "CreateTaskRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.id = is.read_string()?; - }, - 18 => { - self.bundle = is.read_string()?; - }, - 26 => { - self.rootfs.push(is.read_message()?); - }, - 32 => { - self.terminal = is.read_bool()?; - }, - 42 => { - self.stdin = is.read_string()?; - }, - 50 => { - self.stdout = is.read_string()?; - }, - 58 => { - self.stderr = is.read_string()?; - }, - 66 => { - self.checkpoint = is.read_string()?; - }, - 74 => { - self.parent_checkpoint = is.read_string()?; - }, - 82 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.options)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.id); - } - if !self.bundle.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.bundle); - } - for value in &self.rootfs { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - if self.terminal != false { - my_size += 1 + 1; - } - if !self.stdin.is_empty() { - my_size += ::protobuf::rt::string_size(5, &self.stdin); - } - if !self.stdout.is_empty() { - my_size += ::protobuf::rt::string_size(6, &self.stdout); - } - if !self.stderr.is_empty() { - my_size += ::protobuf::rt::string_size(7, &self.stderr); - } - if !self.checkpoint.is_empty() { - my_size += ::protobuf::rt::string_size(8, &self.checkpoint); - } - if !self.parent_checkpoint.is_empty() { - my_size += ::protobuf::rt::string_size(9, &self.parent_checkpoint); - } - if let Some(v) = self.options.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.id.is_empty() { - os.write_string(1, &self.id)?; - } - if !self.bundle.is_empty() { - os.write_string(2, &self.bundle)?; - } - for v in &self.rootfs { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - }; - if self.terminal != false { - os.write_bool(4, self.terminal)?; - } - if !self.stdin.is_empty() { - os.write_string(5, &self.stdin)?; - } - if !self.stdout.is_empty() { - os.write_string(6, &self.stdout)?; - } - if !self.stderr.is_empty() { - os.write_string(7, &self.stderr)?; - } - if !self.checkpoint.is_empty() { - os.write_string(8, &self.checkpoint)?; - } - if !self.parent_checkpoint.is_empty() { - os.write_string(9, &self.parent_checkpoint)?; - } - if let Some(v) = self.options.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(10, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> CreateTaskRequest { - CreateTaskRequest::new() - } - - fn clear(&mut self) { - self.id.clear(); - self.bundle.clear(); - self.rootfs.clear(); - self.terminal = false; - self.stdin.clear(); - self.stdout.clear(); - self.stderr.clear(); - self.checkpoint.clear(); - self.parent_checkpoint.clear(); - self.options.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static CreateTaskRequest { - static instance: CreateTaskRequest = CreateTaskRequest { - id: ::std::string::String::new(), - bundle: ::std::string::String::new(), - rootfs: ::std::vec::Vec::new(), - terminal: false, - stdin: ::std::string::String::new(), - stdout: ::std::string::String::new(), - stderr: ::std::string::String::new(), - checkpoint: ::std::string::String::new(), - parent_checkpoint: ::std::string::String::new(), - options: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for CreateTaskRequest { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("CreateTaskRequest").unwrap()).clone() - } -} - -impl ::std::fmt::Display for CreateTaskRequest { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for CreateTaskRequest { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.task.v2.CreateTaskResponse) -pub struct CreateTaskResponse { - // message fields - // @@protoc_insertion_point(field:containerd.task.v2.CreateTaskResponse.pid) - pub pid: u32, - // special fields - // @@protoc_insertion_point(special_field:containerd.task.v2.CreateTaskResponse.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a CreateTaskResponse { - fn default() -> &'a CreateTaskResponse { - ::default_instance() - } -} - -impl CreateTaskResponse { - pub fn new() -> CreateTaskResponse { - ::std::default::Default::default() - } - - // uint32 pid = 1; - - pub fn pid(&self) -> u32 { - self.pid - } - - pub fn clear_pid(&mut self) { - self.pid = 0; - } - - // Param is passed by value, moved - pub fn set_pid(&mut self, v: u32) { - self.pid = v; - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "pid", - |m: &CreateTaskResponse| { &m.pid }, - |m: &mut CreateTaskResponse| { &mut m.pid }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "CreateTaskResponse", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for CreateTaskResponse { - const NAME: &'static str = "CreateTaskResponse"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.pid = is.read_uint32()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.pid != 0 { - my_size += ::protobuf::rt::uint32_size(1, self.pid); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.pid != 0 { - os.write_uint32(1, self.pid)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> CreateTaskResponse { - CreateTaskResponse::new() - } - - fn clear(&mut self) { - self.pid = 0; - self.special_fields.clear(); - } - - fn default_instance() -> &'static CreateTaskResponse { - static instance: CreateTaskResponse = CreateTaskResponse { - pid: 0, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for CreateTaskResponse { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("CreateTaskResponse").unwrap()).clone() - } -} - -impl ::std::fmt::Display for CreateTaskResponse { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for CreateTaskResponse { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.task.v2.DeleteRequest) -pub struct DeleteRequest { - // message fields - // @@protoc_insertion_point(field:containerd.task.v2.DeleteRequest.id) - pub id: ::std::string::String, - // @@protoc_insertion_point(field:containerd.task.v2.DeleteRequest.exec_id) - pub exec_id: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:containerd.task.v2.DeleteRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a DeleteRequest { - fn default() -> &'a DeleteRequest { - ::default_instance() - } -} - -impl DeleteRequest { - pub fn new() -> DeleteRequest { - ::std::default::Default::default() - } - - // string id = 1; - - pub fn id(&self) -> &str { - &self.id - } - - pub fn clear_id(&mut self) { - self.id.clear(); - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: ::std::string::String) { - self.id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_id(&mut self) -> &mut ::std::string::String { - &mut self.id - } - - // Take field - pub fn take_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.id, ::std::string::String::new()) - } - - // string exec_id = 2; - - pub fn exec_id(&self) -> &str { - &self.exec_id - } - - pub fn clear_exec_id(&mut self) { - self.exec_id.clear(); - } - - // Param is passed by value, moved - pub fn set_exec_id(&mut self, v: ::std::string::String) { - self.exec_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_exec_id(&mut self) -> &mut ::std::string::String { - &mut self.exec_id - } - - // Take field - pub fn take_exec_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.exec_id, ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(2); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "id", - |m: &DeleteRequest| { &m.id }, - |m: &mut DeleteRequest| { &mut m.id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "exec_id", - |m: &DeleteRequest| { &m.exec_id }, - |m: &mut DeleteRequest| { &mut m.exec_id }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "DeleteRequest", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for DeleteRequest { - const NAME: &'static str = "DeleteRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.id = is.read_string()?; - }, - 18 => { - self.exec_id = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.id); - } - if !self.exec_id.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.exec_id); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.id.is_empty() { - os.write_string(1, &self.id)?; - } - if !self.exec_id.is_empty() { - os.write_string(2, &self.exec_id)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> DeleteRequest { - DeleteRequest::new() - } - - fn clear(&mut self) { - self.id.clear(); - self.exec_id.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static DeleteRequest { - static instance: DeleteRequest = DeleteRequest { - id: ::std::string::String::new(), - exec_id: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for DeleteRequest { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("DeleteRequest").unwrap()).clone() - } -} - -impl ::std::fmt::Display for DeleteRequest { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for DeleteRequest { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.task.v2.DeleteResponse) -pub struct DeleteResponse { - // message fields - // @@protoc_insertion_point(field:containerd.task.v2.DeleteResponse.pid) - pub pid: u32, - // @@protoc_insertion_point(field:containerd.task.v2.DeleteResponse.exit_status) - pub exit_status: u32, - // @@protoc_insertion_point(field:containerd.task.v2.DeleteResponse.exited_at) - pub exited_at: ::protobuf::MessageField<::protobuf::well_known_types::timestamp::Timestamp>, - // special fields - // @@protoc_insertion_point(special_field:containerd.task.v2.DeleteResponse.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a DeleteResponse { - fn default() -> &'a DeleteResponse { - ::default_instance() - } -} - -impl DeleteResponse { - pub fn new() -> DeleteResponse { - ::std::default::Default::default() - } - - // uint32 pid = 1; - - pub fn pid(&self) -> u32 { - self.pid - } - - pub fn clear_pid(&mut self) { - self.pid = 0; - } - - // Param is passed by value, moved - pub fn set_pid(&mut self, v: u32) { - self.pid = v; - } - - // uint32 exit_status = 2; - - pub fn exit_status(&self) -> u32 { - self.exit_status - } - - pub fn clear_exit_status(&mut self) { - self.exit_status = 0; - } - - // Param is passed by value, moved - pub fn set_exit_status(&mut self, v: u32) { - self.exit_status = v; - } - - // .google.protobuf.Timestamp exited_at = 3; - - pub fn exited_at(&self) -> &::protobuf::well_known_types::timestamp::Timestamp { - self.exited_at.as_ref().unwrap_or_else(|| <::protobuf::well_known_types::timestamp::Timestamp as ::protobuf::Message>::default_instance()) - } - - pub fn clear_exited_at(&mut self) { - self.exited_at.clear(); - } - - pub fn has_exited_at(&self) -> bool { - self.exited_at.is_some() - } - - // Param is passed by value, moved - pub fn set_exited_at(&mut self, v: ::protobuf::well_known_types::timestamp::Timestamp) { - self.exited_at = ::protobuf::MessageField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_exited_at(&mut self) -> &mut ::protobuf::well_known_types::timestamp::Timestamp { - self.exited_at.mut_or_insert_default() - } - - // Take field - pub fn take_exited_at(&mut self) -> ::protobuf::well_known_types::timestamp::Timestamp { - self.exited_at.take().unwrap_or_else(|| ::protobuf::well_known_types::timestamp::Timestamp::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(3); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "pid", - |m: &DeleteResponse| { &m.pid }, - |m: &mut DeleteResponse| { &mut m.pid }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "exit_status", - |m: &DeleteResponse| { &m.exit_status }, - |m: &mut DeleteResponse| { &mut m.exit_status }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ::protobuf::well_known_types::timestamp::Timestamp>( - "exited_at", - |m: &DeleteResponse| { &m.exited_at }, - |m: &mut DeleteResponse| { &mut m.exited_at }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "DeleteResponse", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for DeleteResponse { - const NAME: &'static str = "DeleteResponse"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.pid = is.read_uint32()?; - }, - 16 => { - self.exit_status = is.read_uint32()?; - }, - 26 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.exited_at)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.pid != 0 { - my_size += ::protobuf::rt::uint32_size(1, self.pid); - } - if self.exit_status != 0 { - my_size += ::protobuf::rt::uint32_size(2, self.exit_status); - } - if let Some(v) = self.exited_at.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.pid != 0 { - os.write_uint32(1, self.pid)?; - } - if self.exit_status != 0 { - os.write_uint32(2, self.exit_status)?; - } - if let Some(v) = self.exited_at.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> DeleteResponse { - DeleteResponse::new() - } - - fn clear(&mut self) { - self.pid = 0; - self.exit_status = 0; - self.exited_at.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static DeleteResponse { - static instance: DeleteResponse = DeleteResponse { - pid: 0, - exit_status: 0, - exited_at: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for DeleteResponse { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("DeleteResponse").unwrap()).clone() - } -} - -impl ::std::fmt::Display for DeleteResponse { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for DeleteResponse { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.task.v2.ExecProcessRequest) -pub struct ExecProcessRequest { - // message fields - // @@protoc_insertion_point(field:containerd.task.v2.ExecProcessRequest.id) - pub id: ::std::string::String, - // @@protoc_insertion_point(field:containerd.task.v2.ExecProcessRequest.exec_id) - pub exec_id: ::std::string::String, - // @@protoc_insertion_point(field:containerd.task.v2.ExecProcessRequest.terminal) - pub terminal: bool, - // @@protoc_insertion_point(field:containerd.task.v2.ExecProcessRequest.stdin) - pub stdin: ::std::string::String, - // @@protoc_insertion_point(field:containerd.task.v2.ExecProcessRequest.stdout) - pub stdout: ::std::string::String, - // @@protoc_insertion_point(field:containerd.task.v2.ExecProcessRequest.stderr) - pub stderr: ::std::string::String, - // @@protoc_insertion_point(field:containerd.task.v2.ExecProcessRequest.spec) - pub spec: ::protobuf::MessageField<::protobuf::well_known_types::any::Any>, - // special fields - // @@protoc_insertion_point(special_field:containerd.task.v2.ExecProcessRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ExecProcessRequest { - fn default() -> &'a ExecProcessRequest { - ::default_instance() - } -} - -impl ExecProcessRequest { - pub fn new() -> ExecProcessRequest { - ::std::default::Default::default() - } - - // string id = 1; - - pub fn id(&self) -> &str { - &self.id - } - - pub fn clear_id(&mut self) { - self.id.clear(); - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: ::std::string::String) { - self.id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_id(&mut self) -> &mut ::std::string::String { - &mut self.id - } - - // Take field - pub fn take_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.id, ::std::string::String::new()) - } - - // string exec_id = 2; - - pub fn exec_id(&self) -> &str { - &self.exec_id - } - - pub fn clear_exec_id(&mut self) { - self.exec_id.clear(); - } - - // Param is passed by value, moved - pub fn set_exec_id(&mut self, v: ::std::string::String) { - self.exec_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_exec_id(&mut self) -> &mut ::std::string::String { - &mut self.exec_id - } - - // Take field - pub fn take_exec_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.exec_id, ::std::string::String::new()) - } - - // bool terminal = 3; - - pub fn terminal(&self) -> bool { - self.terminal - } - - pub fn clear_terminal(&mut self) { - self.terminal = false; - } - - // Param is passed by value, moved - pub fn set_terminal(&mut self, v: bool) { - self.terminal = v; - } - - // string stdin = 4; - - pub fn stdin(&self) -> &str { - &self.stdin - } - - pub fn clear_stdin(&mut self) { - self.stdin.clear(); - } - - // Param is passed by value, moved - pub fn set_stdin(&mut self, v: ::std::string::String) { - self.stdin = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_stdin(&mut self) -> &mut ::std::string::String { - &mut self.stdin - } - - // Take field - pub fn take_stdin(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.stdin, ::std::string::String::new()) - } - - // string stdout = 5; - - pub fn stdout(&self) -> &str { - &self.stdout - } - - pub fn clear_stdout(&mut self) { - self.stdout.clear(); - } - - // Param is passed by value, moved - pub fn set_stdout(&mut self, v: ::std::string::String) { - self.stdout = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_stdout(&mut self) -> &mut ::std::string::String { - &mut self.stdout - } - - // Take field - pub fn take_stdout(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.stdout, ::std::string::String::new()) - } - - // string stderr = 6; - - pub fn stderr(&self) -> &str { - &self.stderr - } - - pub fn clear_stderr(&mut self) { - self.stderr.clear(); - } - - // Param is passed by value, moved - pub fn set_stderr(&mut self, v: ::std::string::String) { - self.stderr = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_stderr(&mut self) -> &mut ::std::string::String { - &mut self.stderr - } - - // Take field - pub fn take_stderr(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.stderr, ::std::string::String::new()) - } - - // .google.protobuf.Any spec = 7; - - pub fn spec(&self) -> &::protobuf::well_known_types::any::Any { - self.spec.as_ref().unwrap_or_else(|| <::protobuf::well_known_types::any::Any as ::protobuf::Message>::default_instance()) - } - - pub fn clear_spec(&mut self) { - self.spec.clear(); - } - - pub fn has_spec(&self) -> bool { - self.spec.is_some() - } - - // Param is passed by value, moved - pub fn set_spec(&mut self, v: ::protobuf::well_known_types::any::Any) { - self.spec = ::protobuf::MessageField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_spec(&mut self) -> &mut ::protobuf::well_known_types::any::Any { - self.spec.mut_or_insert_default() - } - - // Take field - pub fn take_spec(&mut self) -> ::protobuf::well_known_types::any::Any { - self.spec.take().unwrap_or_else(|| ::protobuf::well_known_types::any::Any::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(7); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "id", - |m: &ExecProcessRequest| { &m.id }, - |m: &mut ExecProcessRequest| { &mut m.id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "exec_id", - |m: &ExecProcessRequest| { &m.exec_id }, - |m: &mut ExecProcessRequest| { &mut m.exec_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "terminal", - |m: &ExecProcessRequest| { &m.terminal }, - |m: &mut ExecProcessRequest| { &mut m.terminal }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "stdin", - |m: &ExecProcessRequest| { &m.stdin }, - |m: &mut ExecProcessRequest| { &mut m.stdin }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "stdout", - |m: &ExecProcessRequest| { &m.stdout }, - |m: &mut ExecProcessRequest| { &mut m.stdout }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "stderr", - |m: &ExecProcessRequest| { &m.stderr }, - |m: &mut ExecProcessRequest| { &mut m.stderr }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ::protobuf::well_known_types::any::Any>( - "spec", - |m: &ExecProcessRequest| { &m.spec }, - |m: &mut ExecProcessRequest| { &mut m.spec }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "ExecProcessRequest", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for ExecProcessRequest { - const NAME: &'static str = "ExecProcessRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.id = is.read_string()?; - }, - 18 => { - self.exec_id = is.read_string()?; - }, - 24 => { - self.terminal = is.read_bool()?; - }, - 34 => { - self.stdin = is.read_string()?; - }, - 42 => { - self.stdout = is.read_string()?; - }, - 50 => { - self.stderr = is.read_string()?; - }, - 58 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.spec)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.id); - } - if !self.exec_id.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.exec_id); - } - if self.terminal != false { - my_size += 1 + 1; - } - if !self.stdin.is_empty() { - my_size += ::protobuf::rt::string_size(4, &self.stdin); - } - if !self.stdout.is_empty() { - my_size += ::protobuf::rt::string_size(5, &self.stdout); - } - if !self.stderr.is_empty() { - my_size += ::protobuf::rt::string_size(6, &self.stderr); - } - if let Some(v) = self.spec.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.id.is_empty() { - os.write_string(1, &self.id)?; - } - if !self.exec_id.is_empty() { - os.write_string(2, &self.exec_id)?; - } - if self.terminal != false { - os.write_bool(3, self.terminal)?; - } - if !self.stdin.is_empty() { - os.write_string(4, &self.stdin)?; - } - if !self.stdout.is_empty() { - os.write_string(5, &self.stdout)?; - } - if !self.stderr.is_empty() { - os.write_string(6, &self.stderr)?; - } - if let Some(v) = self.spec.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(7, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ExecProcessRequest { - ExecProcessRequest::new() - } - - fn clear(&mut self) { - self.id.clear(); - self.exec_id.clear(); - self.terminal = false; - self.stdin.clear(); - self.stdout.clear(); - self.stderr.clear(); - self.spec.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static ExecProcessRequest { - static instance: ExecProcessRequest = ExecProcessRequest { - id: ::std::string::String::new(), - exec_id: ::std::string::String::new(), - terminal: false, - stdin: ::std::string::String::new(), - stdout: ::std::string::String::new(), - stderr: ::std::string::String::new(), - spec: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for ExecProcessRequest { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("ExecProcessRequest").unwrap()).clone() - } -} - -impl ::std::fmt::Display for ExecProcessRequest { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ExecProcessRequest { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.task.v2.ExecProcessResponse) -pub struct ExecProcessResponse { - // special fields - // @@protoc_insertion_point(special_field:containerd.task.v2.ExecProcessResponse.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ExecProcessResponse { - fn default() -> &'a ExecProcessResponse { - ::default_instance() - } -} - -impl ExecProcessResponse { - pub fn new() -> ExecProcessResponse { - ::std::default::Default::default() - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(0); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "ExecProcessResponse", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for ExecProcessResponse { - const NAME: &'static str = "ExecProcessResponse"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ExecProcessResponse { - ExecProcessResponse::new() - } - - fn clear(&mut self) { - self.special_fields.clear(); - } - - fn default_instance() -> &'static ExecProcessResponse { - static instance: ExecProcessResponse = ExecProcessResponse { - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for ExecProcessResponse { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("ExecProcessResponse").unwrap()).clone() - } -} - -impl ::std::fmt::Display for ExecProcessResponse { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ExecProcessResponse { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.task.v2.ResizePtyRequest) -pub struct ResizePtyRequest { - // message fields - // @@protoc_insertion_point(field:containerd.task.v2.ResizePtyRequest.id) - pub id: ::std::string::String, - // @@protoc_insertion_point(field:containerd.task.v2.ResizePtyRequest.exec_id) - pub exec_id: ::std::string::String, - // @@protoc_insertion_point(field:containerd.task.v2.ResizePtyRequest.width) - pub width: u32, - // @@protoc_insertion_point(field:containerd.task.v2.ResizePtyRequest.height) - pub height: u32, - // special fields - // @@protoc_insertion_point(special_field:containerd.task.v2.ResizePtyRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ResizePtyRequest { - fn default() -> &'a ResizePtyRequest { - ::default_instance() - } -} - -impl ResizePtyRequest { - pub fn new() -> ResizePtyRequest { - ::std::default::Default::default() - } - - // string id = 1; - - pub fn id(&self) -> &str { - &self.id - } - - pub fn clear_id(&mut self) { - self.id.clear(); - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: ::std::string::String) { - self.id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_id(&mut self) -> &mut ::std::string::String { - &mut self.id - } - - // Take field - pub fn take_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.id, ::std::string::String::new()) - } - - // string exec_id = 2; - - pub fn exec_id(&self) -> &str { - &self.exec_id - } - - pub fn clear_exec_id(&mut self) { - self.exec_id.clear(); - } - - // Param is passed by value, moved - pub fn set_exec_id(&mut self, v: ::std::string::String) { - self.exec_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_exec_id(&mut self) -> &mut ::std::string::String { - &mut self.exec_id - } - - // Take field - pub fn take_exec_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.exec_id, ::std::string::String::new()) - } - - // uint32 width = 3; - - pub fn width(&self) -> u32 { - self.width - } - - pub fn clear_width(&mut self) { - self.width = 0; - } - - // Param is passed by value, moved - pub fn set_width(&mut self, v: u32) { - self.width = v; - } - - // uint32 height = 4; - - pub fn height(&self) -> u32 { - self.height - } - - pub fn clear_height(&mut self) { - self.height = 0; - } - - // Param is passed by value, moved - pub fn set_height(&mut self, v: u32) { - self.height = v; - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(4); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "id", - |m: &ResizePtyRequest| { &m.id }, - |m: &mut ResizePtyRequest| { &mut m.id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "exec_id", - |m: &ResizePtyRequest| { &m.exec_id }, - |m: &mut ResizePtyRequest| { &mut m.exec_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "width", - |m: &ResizePtyRequest| { &m.width }, - |m: &mut ResizePtyRequest| { &mut m.width }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "height", - |m: &ResizePtyRequest| { &m.height }, - |m: &mut ResizePtyRequest| { &mut m.height }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "ResizePtyRequest", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for ResizePtyRequest { - const NAME: &'static str = "ResizePtyRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.id = is.read_string()?; - }, - 18 => { - self.exec_id = is.read_string()?; - }, - 24 => { - self.width = is.read_uint32()?; - }, - 32 => { - self.height = is.read_uint32()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.id); - } - if !self.exec_id.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.exec_id); - } - if self.width != 0 { - my_size += ::protobuf::rt::uint32_size(3, self.width); - } - if self.height != 0 { - my_size += ::protobuf::rt::uint32_size(4, self.height); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.id.is_empty() { - os.write_string(1, &self.id)?; - } - if !self.exec_id.is_empty() { - os.write_string(2, &self.exec_id)?; - } - if self.width != 0 { - os.write_uint32(3, self.width)?; - } - if self.height != 0 { - os.write_uint32(4, self.height)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ResizePtyRequest { - ResizePtyRequest::new() - } - - fn clear(&mut self) { - self.id.clear(); - self.exec_id.clear(); - self.width = 0; - self.height = 0; - self.special_fields.clear(); - } - - fn default_instance() -> &'static ResizePtyRequest { - static instance: ResizePtyRequest = ResizePtyRequest { - id: ::std::string::String::new(), - exec_id: ::std::string::String::new(), - width: 0, - height: 0, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for ResizePtyRequest { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("ResizePtyRequest").unwrap()).clone() - } -} - -impl ::std::fmt::Display for ResizePtyRequest { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ResizePtyRequest { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.task.v2.StateRequest) -pub struct StateRequest { - // message fields - // @@protoc_insertion_point(field:containerd.task.v2.StateRequest.id) - pub id: ::std::string::String, - // @@protoc_insertion_point(field:containerd.task.v2.StateRequest.exec_id) - pub exec_id: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:containerd.task.v2.StateRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a StateRequest { - fn default() -> &'a StateRequest { - ::default_instance() - } -} - -impl StateRequest { - pub fn new() -> StateRequest { - ::std::default::Default::default() - } - - // string id = 1; - - pub fn id(&self) -> &str { - &self.id - } - - pub fn clear_id(&mut self) { - self.id.clear(); - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: ::std::string::String) { - self.id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_id(&mut self) -> &mut ::std::string::String { - &mut self.id - } - - // Take field - pub fn take_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.id, ::std::string::String::new()) - } - - // string exec_id = 2; - - pub fn exec_id(&self) -> &str { - &self.exec_id - } - - pub fn clear_exec_id(&mut self) { - self.exec_id.clear(); - } - - // Param is passed by value, moved - pub fn set_exec_id(&mut self, v: ::std::string::String) { - self.exec_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_exec_id(&mut self) -> &mut ::std::string::String { - &mut self.exec_id - } - - // Take field - pub fn take_exec_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.exec_id, ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(2); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "id", - |m: &StateRequest| { &m.id }, - |m: &mut StateRequest| { &mut m.id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "exec_id", - |m: &StateRequest| { &m.exec_id }, - |m: &mut StateRequest| { &mut m.exec_id }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "StateRequest", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for StateRequest { - const NAME: &'static str = "StateRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.id = is.read_string()?; - }, - 18 => { - self.exec_id = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.id); - } - if !self.exec_id.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.exec_id); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.id.is_empty() { - os.write_string(1, &self.id)?; - } - if !self.exec_id.is_empty() { - os.write_string(2, &self.exec_id)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> StateRequest { - StateRequest::new() - } - - fn clear(&mut self) { - self.id.clear(); - self.exec_id.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static StateRequest { - static instance: StateRequest = StateRequest { - id: ::std::string::String::new(), - exec_id: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for StateRequest { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("StateRequest").unwrap()).clone() - } -} - -impl ::std::fmt::Display for StateRequest { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for StateRequest { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.task.v2.StateResponse) -pub struct StateResponse { - // message fields - // @@protoc_insertion_point(field:containerd.task.v2.StateResponse.id) - pub id: ::std::string::String, - // @@protoc_insertion_point(field:containerd.task.v2.StateResponse.bundle) - pub bundle: ::std::string::String, - // @@protoc_insertion_point(field:containerd.task.v2.StateResponse.pid) - pub pid: u32, - // @@protoc_insertion_point(field:containerd.task.v2.StateResponse.status) - pub status: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:containerd.task.v2.StateResponse.stdin) - pub stdin: ::std::string::String, - // @@protoc_insertion_point(field:containerd.task.v2.StateResponse.stdout) - pub stdout: ::std::string::String, - // @@protoc_insertion_point(field:containerd.task.v2.StateResponse.stderr) - pub stderr: ::std::string::String, - // @@protoc_insertion_point(field:containerd.task.v2.StateResponse.terminal) - pub terminal: bool, - // @@protoc_insertion_point(field:containerd.task.v2.StateResponse.exit_status) - pub exit_status: u32, - // @@protoc_insertion_point(field:containerd.task.v2.StateResponse.exited_at) - pub exited_at: ::protobuf::MessageField<::protobuf::well_known_types::timestamp::Timestamp>, - // @@protoc_insertion_point(field:containerd.task.v2.StateResponse.exec_id) - pub exec_id: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:containerd.task.v2.StateResponse.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a StateResponse { - fn default() -> &'a StateResponse { - ::default_instance() - } -} - -impl StateResponse { - pub fn new() -> StateResponse { - ::std::default::Default::default() - } - - // string id = 1; - - pub fn id(&self) -> &str { - &self.id - } - - pub fn clear_id(&mut self) { - self.id.clear(); - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: ::std::string::String) { - self.id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_id(&mut self) -> &mut ::std::string::String { - &mut self.id - } - - // Take field - pub fn take_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.id, ::std::string::String::new()) - } - - // string bundle = 2; - - pub fn bundle(&self) -> &str { - &self.bundle - } - - pub fn clear_bundle(&mut self) { - self.bundle.clear(); - } - - // Param is passed by value, moved - pub fn set_bundle(&mut self, v: ::std::string::String) { - self.bundle = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_bundle(&mut self) -> &mut ::std::string::String { - &mut self.bundle - } - - // Take field - pub fn take_bundle(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.bundle, ::std::string::String::new()) - } - - // uint32 pid = 3; - - pub fn pid(&self) -> u32 { - self.pid - } - - pub fn clear_pid(&mut self) { - self.pid = 0; - } - - // Param is passed by value, moved - pub fn set_pid(&mut self, v: u32) { - self.pid = v; - } - - // .containerd.v1.types.Status status = 4; - - pub fn status(&self) -> super::task::Status { - self.status.enum_value_or_default() - } - - pub fn clear_status(&mut self) { - self.status = ::protobuf::EnumOrUnknown::new(super::task::Status::UNKNOWN); - } - - // Param is passed by value, moved - pub fn set_status(&mut self, v: super::task::Status) { - self.status = ::protobuf::EnumOrUnknown::new(v); - } - - // string stdin = 5; - - pub fn stdin(&self) -> &str { - &self.stdin - } - - pub fn clear_stdin(&mut self) { - self.stdin.clear(); - } - - // Param is passed by value, moved - pub fn set_stdin(&mut self, v: ::std::string::String) { - self.stdin = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_stdin(&mut self) -> &mut ::std::string::String { - &mut self.stdin - } - - // Take field - pub fn take_stdin(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.stdin, ::std::string::String::new()) - } - - // string stdout = 6; - - pub fn stdout(&self) -> &str { - &self.stdout - } - - pub fn clear_stdout(&mut self) { - self.stdout.clear(); - } - - // Param is passed by value, moved - pub fn set_stdout(&mut self, v: ::std::string::String) { - self.stdout = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_stdout(&mut self) -> &mut ::std::string::String { - &mut self.stdout - } - - // Take field - pub fn take_stdout(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.stdout, ::std::string::String::new()) - } - - // string stderr = 7; - - pub fn stderr(&self) -> &str { - &self.stderr - } - - pub fn clear_stderr(&mut self) { - self.stderr.clear(); - } - - // Param is passed by value, moved - pub fn set_stderr(&mut self, v: ::std::string::String) { - self.stderr = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_stderr(&mut self) -> &mut ::std::string::String { - &mut self.stderr - } - - // Take field - pub fn take_stderr(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.stderr, ::std::string::String::new()) - } - - // bool terminal = 8; - - pub fn terminal(&self) -> bool { - self.terminal - } - - pub fn clear_terminal(&mut self) { - self.terminal = false; - } - - // Param is passed by value, moved - pub fn set_terminal(&mut self, v: bool) { - self.terminal = v; - } - - // uint32 exit_status = 9; - - pub fn exit_status(&self) -> u32 { - self.exit_status - } - - pub fn clear_exit_status(&mut self) { - self.exit_status = 0; - } - - // Param is passed by value, moved - pub fn set_exit_status(&mut self, v: u32) { - self.exit_status = v; - } - - // .google.protobuf.Timestamp exited_at = 10; - - pub fn exited_at(&self) -> &::protobuf::well_known_types::timestamp::Timestamp { - self.exited_at.as_ref().unwrap_or_else(|| <::protobuf::well_known_types::timestamp::Timestamp as ::protobuf::Message>::default_instance()) - } - - pub fn clear_exited_at(&mut self) { - self.exited_at.clear(); - } - - pub fn has_exited_at(&self) -> bool { - self.exited_at.is_some() - } - - // Param is passed by value, moved - pub fn set_exited_at(&mut self, v: ::protobuf::well_known_types::timestamp::Timestamp) { - self.exited_at = ::protobuf::MessageField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_exited_at(&mut self) -> &mut ::protobuf::well_known_types::timestamp::Timestamp { - self.exited_at.mut_or_insert_default() - } - - // Take field - pub fn take_exited_at(&mut self) -> ::protobuf::well_known_types::timestamp::Timestamp { - self.exited_at.take().unwrap_or_else(|| ::protobuf::well_known_types::timestamp::Timestamp::new()) - } - - // string exec_id = 11; - - pub fn exec_id(&self) -> &str { - &self.exec_id - } - - pub fn clear_exec_id(&mut self) { - self.exec_id.clear(); - } - - // Param is passed by value, moved - pub fn set_exec_id(&mut self, v: ::std::string::String) { - self.exec_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_exec_id(&mut self) -> &mut ::std::string::String { - &mut self.exec_id - } - - // Take field - pub fn take_exec_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.exec_id, ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(11); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "id", - |m: &StateResponse| { &m.id }, - |m: &mut StateResponse| { &mut m.id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "bundle", - |m: &StateResponse| { &m.bundle }, - |m: &mut StateResponse| { &mut m.bundle }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "pid", - |m: &StateResponse| { &m.pid }, - |m: &mut StateResponse| { &mut m.pid }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "status", - |m: &StateResponse| { &m.status }, - |m: &mut StateResponse| { &mut m.status }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "stdin", - |m: &StateResponse| { &m.stdin }, - |m: &mut StateResponse| { &mut m.stdin }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "stdout", - |m: &StateResponse| { &m.stdout }, - |m: &mut StateResponse| { &mut m.stdout }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "stderr", - |m: &StateResponse| { &m.stderr }, - |m: &mut StateResponse| { &mut m.stderr }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "terminal", - |m: &StateResponse| { &m.terminal }, - |m: &mut StateResponse| { &mut m.terminal }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "exit_status", - |m: &StateResponse| { &m.exit_status }, - |m: &mut StateResponse| { &mut m.exit_status }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ::protobuf::well_known_types::timestamp::Timestamp>( - "exited_at", - |m: &StateResponse| { &m.exited_at }, - |m: &mut StateResponse| { &mut m.exited_at }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "exec_id", - |m: &StateResponse| { &m.exec_id }, - |m: &mut StateResponse| { &mut m.exec_id }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "StateResponse", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for StateResponse { - const NAME: &'static str = "StateResponse"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.id = is.read_string()?; - }, - 18 => { - self.bundle = is.read_string()?; - }, - 24 => { - self.pid = is.read_uint32()?; - }, - 32 => { - self.status = is.read_enum_or_unknown()?; - }, - 42 => { - self.stdin = is.read_string()?; - }, - 50 => { - self.stdout = is.read_string()?; - }, - 58 => { - self.stderr = is.read_string()?; - }, - 64 => { - self.terminal = is.read_bool()?; - }, - 72 => { - self.exit_status = is.read_uint32()?; - }, - 82 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.exited_at)?; - }, - 90 => { - self.exec_id = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.id); - } - if !self.bundle.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.bundle); - } - if self.pid != 0 { - my_size += ::protobuf::rt::uint32_size(3, self.pid); - } - if self.status != ::protobuf::EnumOrUnknown::new(super::task::Status::UNKNOWN) { - my_size += ::protobuf::rt::int32_size(4, self.status.value()); - } - if !self.stdin.is_empty() { - my_size += ::protobuf::rt::string_size(5, &self.stdin); - } - if !self.stdout.is_empty() { - my_size += ::protobuf::rt::string_size(6, &self.stdout); - } - if !self.stderr.is_empty() { - my_size += ::protobuf::rt::string_size(7, &self.stderr); - } - if self.terminal != false { - my_size += 1 + 1; - } - if self.exit_status != 0 { - my_size += ::protobuf::rt::uint32_size(9, self.exit_status); - } - if let Some(v) = self.exited_at.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if !self.exec_id.is_empty() { - my_size += ::protobuf::rt::string_size(11, &self.exec_id); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.id.is_empty() { - os.write_string(1, &self.id)?; - } - if !self.bundle.is_empty() { - os.write_string(2, &self.bundle)?; - } - if self.pid != 0 { - os.write_uint32(3, self.pid)?; - } - if self.status != ::protobuf::EnumOrUnknown::new(super::task::Status::UNKNOWN) { - os.write_enum(4, ::protobuf::EnumOrUnknown::value(&self.status))?; - } - if !self.stdin.is_empty() { - os.write_string(5, &self.stdin)?; - } - if !self.stdout.is_empty() { - os.write_string(6, &self.stdout)?; - } - if !self.stderr.is_empty() { - os.write_string(7, &self.stderr)?; - } - if self.terminal != false { - os.write_bool(8, self.terminal)?; - } - if self.exit_status != 0 { - os.write_uint32(9, self.exit_status)?; - } - if let Some(v) = self.exited_at.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(10, v, os)?; - } - if !self.exec_id.is_empty() { - os.write_string(11, &self.exec_id)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> StateResponse { - StateResponse::new() - } - - fn clear(&mut self) { - self.id.clear(); - self.bundle.clear(); - self.pid = 0; - self.status = ::protobuf::EnumOrUnknown::new(super::task::Status::UNKNOWN); - self.stdin.clear(); - self.stdout.clear(); - self.stderr.clear(); - self.terminal = false; - self.exit_status = 0; - self.exited_at.clear(); - self.exec_id.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static StateResponse { - static instance: StateResponse = StateResponse { - id: ::std::string::String::new(), - bundle: ::std::string::String::new(), - pid: 0, - status: ::protobuf::EnumOrUnknown::from_i32(0), - stdin: ::std::string::String::new(), - stdout: ::std::string::String::new(), - stderr: ::std::string::String::new(), - terminal: false, - exit_status: 0, - exited_at: ::protobuf::MessageField::none(), - exec_id: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for StateResponse { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("StateResponse").unwrap()).clone() - } -} - -impl ::std::fmt::Display for StateResponse { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for StateResponse { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.task.v2.KillRequest) -pub struct KillRequest { - // message fields - // @@protoc_insertion_point(field:containerd.task.v2.KillRequest.id) - pub id: ::std::string::String, - // @@protoc_insertion_point(field:containerd.task.v2.KillRequest.exec_id) - pub exec_id: ::std::string::String, - // @@protoc_insertion_point(field:containerd.task.v2.KillRequest.signal) - pub signal: u32, - // @@protoc_insertion_point(field:containerd.task.v2.KillRequest.all) - pub all: bool, - // special fields - // @@protoc_insertion_point(special_field:containerd.task.v2.KillRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a KillRequest { - fn default() -> &'a KillRequest { - ::default_instance() - } -} - -impl KillRequest { - pub fn new() -> KillRequest { - ::std::default::Default::default() - } - - // string id = 1; - - pub fn id(&self) -> &str { - &self.id - } - - pub fn clear_id(&mut self) { - self.id.clear(); - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: ::std::string::String) { - self.id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_id(&mut self) -> &mut ::std::string::String { - &mut self.id - } - - // Take field - pub fn take_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.id, ::std::string::String::new()) - } - - // string exec_id = 2; - - pub fn exec_id(&self) -> &str { - &self.exec_id - } - - pub fn clear_exec_id(&mut self) { - self.exec_id.clear(); - } - - // Param is passed by value, moved - pub fn set_exec_id(&mut self, v: ::std::string::String) { - self.exec_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_exec_id(&mut self) -> &mut ::std::string::String { - &mut self.exec_id - } - - // Take field - pub fn take_exec_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.exec_id, ::std::string::String::new()) - } - - // uint32 signal = 3; - - pub fn signal(&self) -> u32 { - self.signal - } - - pub fn clear_signal(&mut self) { - self.signal = 0; - } - - // Param is passed by value, moved - pub fn set_signal(&mut self, v: u32) { - self.signal = v; - } - - // bool all = 4; - - pub fn all(&self) -> bool { - self.all - } - - pub fn clear_all(&mut self) { - self.all = false; - } - - // Param is passed by value, moved - pub fn set_all(&mut self, v: bool) { - self.all = v; - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(4); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "id", - |m: &KillRequest| { &m.id }, - |m: &mut KillRequest| { &mut m.id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "exec_id", - |m: &KillRequest| { &m.exec_id }, - |m: &mut KillRequest| { &mut m.exec_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "signal", - |m: &KillRequest| { &m.signal }, - |m: &mut KillRequest| { &mut m.signal }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "all", - |m: &KillRequest| { &m.all }, - |m: &mut KillRequest| { &mut m.all }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "KillRequest", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for KillRequest { - const NAME: &'static str = "KillRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.id = is.read_string()?; - }, - 18 => { - self.exec_id = is.read_string()?; - }, - 24 => { - self.signal = is.read_uint32()?; - }, - 32 => { - self.all = is.read_bool()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.id); - } - if !self.exec_id.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.exec_id); - } - if self.signal != 0 { - my_size += ::protobuf::rt::uint32_size(3, self.signal); - } - if self.all != false { - my_size += 1 + 1; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.id.is_empty() { - os.write_string(1, &self.id)?; - } - if !self.exec_id.is_empty() { - os.write_string(2, &self.exec_id)?; - } - if self.signal != 0 { - os.write_uint32(3, self.signal)?; - } - if self.all != false { - os.write_bool(4, self.all)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> KillRequest { - KillRequest::new() - } - - fn clear(&mut self) { - self.id.clear(); - self.exec_id.clear(); - self.signal = 0; - self.all = false; - self.special_fields.clear(); - } - - fn default_instance() -> &'static KillRequest { - static instance: KillRequest = KillRequest { - id: ::std::string::String::new(), - exec_id: ::std::string::String::new(), - signal: 0, - all: false, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for KillRequest { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("KillRequest").unwrap()).clone() - } -} - -impl ::std::fmt::Display for KillRequest { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for KillRequest { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.task.v2.CloseIORequest) -pub struct CloseIORequest { - // message fields - // @@protoc_insertion_point(field:containerd.task.v2.CloseIORequest.id) - pub id: ::std::string::String, - // @@protoc_insertion_point(field:containerd.task.v2.CloseIORequest.exec_id) - pub exec_id: ::std::string::String, - // @@protoc_insertion_point(field:containerd.task.v2.CloseIORequest.stdin) - pub stdin: bool, - // special fields - // @@protoc_insertion_point(special_field:containerd.task.v2.CloseIORequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a CloseIORequest { - fn default() -> &'a CloseIORequest { - ::default_instance() - } -} - -impl CloseIORequest { - pub fn new() -> CloseIORequest { - ::std::default::Default::default() - } - - // string id = 1; - - pub fn id(&self) -> &str { - &self.id - } - - pub fn clear_id(&mut self) { - self.id.clear(); - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: ::std::string::String) { - self.id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_id(&mut self) -> &mut ::std::string::String { - &mut self.id - } - - // Take field - pub fn take_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.id, ::std::string::String::new()) - } - - // string exec_id = 2; - - pub fn exec_id(&self) -> &str { - &self.exec_id - } - - pub fn clear_exec_id(&mut self) { - self.exec_id.clear(); - } - - // Param is passed by value, moved - pub fn set_exec_id(&mut self, v: ::std::string::String) { - self.exec_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_exec_id(&mut self) -> &mut ::std::string::String { - &mut self.exec_id - } - - // Take field - pub fn take_exec_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.exec_id, ::std::string::String::new()) - } - - // bool stdin = 3; - - pub fn stdin(&self) -> bool { - self.stdin - } - - pub fn clear_stdin(&mut self) { - self.stdin = false; - } - - // Param is passed by value, moved - pub fn set_stdin(&mut self, v: bool) { - self.stdin = v; - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(3); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "id", - |m: &CloseIORequest| { &m.id }, - |m: &mut CloseIORequest| { &mut m.id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "exec_id", - |m: &CloseIORequest| { &m.exec_id }, - |m: &mut CloseIORequest| { &mut m.exec_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "stdin", - |m: &CloseIORequest| { &m.stdin }, - |m: &mut CloseIORequest| { &mut m.stdin }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "CloseIORequest", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for CloseIORequest { - const NAME: &'static str = "CloseIORequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.id = is.read_string()?; - }, - 18 => { - self.exec_id = is.read_string()?; - }, - 24 => { - self.stdin = is.read_bool()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.id); - } - if !self.exec_id.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.exec_id); - } - if self.stdin != false { - my_size += 1 + 1; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.id.is_empty() { - os.write_string(1, &self.id)?; - } - if !self.exec_id.is_empty() { - os.write_string(2, &self.exec_id)?; - } - if self.stdin != false { - os.write_bool(3, self.stdin)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> CloseIORequest { - CloseIORequest::new() - } - - fn clear(&mut self) { - self.id.clear(); - self.exec_id.clear(); - self.stdin = false; - self.special_fields.clear(); - } - - fn default_instance() -> &'static CloseIORequest { - static instance: CloseIORequest = CloseIORequest { - id: ::std::string::String::new(), - exec_id: ::std::string::String::new(), - stdin: false, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for CloseIORequest { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("CloseIORequest").unwrap()).clone() - } -} - -impl ::std::fmt::Display for CloseIORequest { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for CloseIORequest { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.task.v2.PidsRequest) -pub struct PidsRequest { - // message fields - // @@protoc_insertion_point(field:containerd.task.v2.PidsRequest.id) - pub id: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:containerd.task.v2.PidsRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a PidsRequest { - fn default() -> &'a PidsRequest { - ::default_instance() - } -} - -impl PidsRequest { - pub fn new() -> PidsRequest { - ::std::default::Default::default() - } - - // string id = 1; - - pub fn id(&self) -> &str { - &self.id - } - - pub fn clear_id(&mut self) { - self.id.clear(); - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: ::std::string::String) { - self.id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_id(&mut self) -> &mut ::std::string::String { - &mut self.id - } - - // Take field - pub fn take_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.id, ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "id", - |m: &PidsRequest| { &m.id }, - |m: &mut PidsRequest| { &mut m.id }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "PidsRequest", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for PidsRequest { - const NAME: &'static str = "PidsRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.id = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.id); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.id.is_empty() { - os.write_string(1, &self.id)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> PidsRequest { - PidsRequest::new() - } - - fn clear(&mut self) { - self.id.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static PidsRequest { - static instance: PidsRequest = PidsRequest { - id: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for PidsRequest { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("PidsRequest").unwrap()).clone() - } -} - -impl ::std::fmt::Display for PidsRequest { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for PidsRequest { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.task.v2.PidsResponse) -pub struct PidsResponse { - // message fields - // @@protoc_insertion_point(field:containerd.task.v2.PidsResponse.processes) - pub processes: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:containerd.task.v2.PidsResponse.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a PidsResponse { - fn default() -> &'a PidsResponse { - ::default_instance() - } -} - -impl PidsResponse { - pub fn new() -> PidsResponse { - ::std::default::Default::default() - } - - // repeated .containerd.v1.types.ProcessInfo processes = 1; - - pub fn processes(&self) -> &[super::task::ProcessInfo] { - &self.processes - } - - pub fn clear_processes(&mut self) { - self.processes.clear(); - } - - // Param is passed by value, moved - pub fn set_processes(&mut self, v: ::std::vec::Vec) { - self.processes = v; - } - - // Mutable pointer to the field. - pub fn mut_processes(&mut self) -> &mut ::std::vec::Vec { - &mut self.processes - } - - // Take field - pub fn take_processes(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.processes, ::std::vec::Vec::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "processes", - |m: &PidsResponse| { &m.processes }, - |m: &mut PidsResponse| { &mut m.processes }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "PidsResponse", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for PidsResponse { - const NAME: &'static str = "PidsResponse"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.processes.push(is.read_message()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - for value in &self.processes { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - for v in &self.processes { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> PidsResponse { - PidsResponse::new() - } - - fn clear(&mut self) { - self.processes.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static PidsResponse { - static instance: PidsResponse = PidsResponse { - processes: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for PidsResponse { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("PidsResponse").unwrap()).clone() - } -} - -impl ::std::fmt::Display for PidsResponse { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for PidsResponse { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.task.v2.CheckpointTaskRequest) -pub struct CheckpointTaskRequest { - // message fields - // @@protoc_insertion_point(field:containerd.task.v2.CheckpointTaskRequest.id) - pub id: ::std::string::String, - // @@protoc_insertion_point(field:containerd.task.v2.CheckpointTaskRequest.path) - pub path: ::std::string::String, - // @@protoc_insertion_point(field:containerd.task.v2.CheckpointTaskRequest.options) - pub options: ::protobuf::MessageField<::protobuf::well_known_types::any::Any>, - // special fields - // @@protoc_insertion_point(special_field:containerd.task.v2.CheckpointTaskRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a CheckpointTaskRequest { - fn default() -> &'a CheckpointTaskRequest { - ::default_instance() - } -} - -impl CheckpointTaskRequest { - pub fn new() -> CheckpointTaskRequest { - ::std::default::Default::default() - } - - // string id = 1; - - pub fn id(&self) -> &str { - &self.id - } - - pub fn clear_id(&mut self) { - self.id.clear(); - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: ::std::string::String) { - self.id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_id(&mut self) -> &mut ::std::string::String { - &mut self.id - } - - // Take field - pub fn take_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.id, ::std::string::String::new()) - } - - // string path = 2; - - pub fn path(&self) -> &str { - &self.path - } - - pub fn clear_path(&mut self) { - self.path.clear(); - } - - // Param is passed by value, moved - pub fn set_path(&mut self, v: ::std::string::String) { - self.path = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_path(&mut self) -> &mut ::std::string::String { - &mut self.path - } - - // Take field - pub fn take_path(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.path, ::std::string::String::new()) - } - - // .google.protobuf.Any options = 3; - - pub fn options(&self) -> &::protobuf::well_known_types::any::Any { - self.options.as_ref().unwrap_or_else(|| <::protobuf::well_known_types::any::Any as ::protobuf::Message>::default_instance()) - } - - pub fn clear_options(&mut self) { - self.options.clear(); - } - - pub fn has_options(&self) -> bool { - self.options.is_some() - } - - // Param is passed by value, moved - pub fn set_options(&mut self, v: ::protobuf::well_known_types::any::Any) { - self.options = ::protobuf::MessageField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_options(&mut self) -> &mut ::protobuf::well_known_types::any::Any { - self.options.mut_or_insert_default() - } - - // Take field - pub fn take_options(&mut self) -> ::protobuf::well_known_types::any::Any { - self.options.take().unwrap_or_else(|| ::protobuf::well_known_types::any::Any::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(3); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "id", - |m: &CheckpointTaskRequest| { &m.id }, - |m: &mut CheckpointTaskRequest| { &mut m.id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "path", - |m: &CheckpointTaskRequest| { &m.path }, - |m: &mut CheckpointTaskRequest| { &mut m.path }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ::protobuf::well_known_types::any::Any>( - "options", - |m: &CheckpointTaskRequest| { &m.options }, - |m: &mut CheckpointTaskRequest| { &mut m.options }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "CheckpointTaskRequest", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for CheckpointTaskRequest { - const NAME: &'static str = "CheckpointTaskRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.id = is.read_string()?; - }, - 18 => { - self.path = is.read_string()?; - }, - 26 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.options)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.id); - } - if !self.path.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.path); - } - if let Some(v) = self.options.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.id.is_empty() { - os.write_string(1, &self.id)?; - } - if !self.path.is_empty() { - os.write_string(2, &self.path)?; - } - if let Some(v) = self.options.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> CheckpointTaskRequest { - CheckpointTaskRequest::new() - } - - fn clear(&mut self) { - self.id.clear(); - self.path.clear(); - self.options.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static CheckpointTaskRequest { - static instance: CheckpointTaskRequest = CheckpointTaskRequest { - id: ::std::string::String::new(), - path: ::std::string::String::new(), - options: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for CheckpointTaskRequest { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("CheckpointTaskRequest").unwrap()).clone() - } -} - -impl ::std::fmt::Display for CheckpointTaskRequest { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for CheckpointTaskRequest { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.task.v2.UpdateTaskRequest) -pub struct UpdateTaskRequest { - // message fields - // @@protoc_insertion_point(field:containerd.task.v2.UpdateTaskRequest.id) - pub id: ::std::string::String, - // @@protoc_insertion_point(field:containerd.task.v2.UpdateTaskRequest.resources) - pub resources: ::protobuf::MessageField<::protobuf::well_known_types::any::Any>, - // @@protoc_insertion_point(field:containerd.task.v2.UpdateTaskRequest.annotations) - pub annotations: ::std::collections::HashMap<::std::string::String, ::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:containerd.task.v2.UpdateTaskRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a UpdateTaskRequest { - fn default() -> &'a UpdateTaskRequest { - ::default_instance() - } -} - -impl UpdateTaskRequest { - pub fn new() -> UpdateTaskRequest { - ::std::default::Default::default() - } - - // string id = 1; - - pub fn id(&self) -> &str { - &self.id - } - - pub fn clear_id(&mut self) { - self.id.clear(); - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: ::std::string::String) { - self.id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_id(&mut self) -> &mut ::std::string::String { - &mut self.id - } - - // Take field - pub fn take_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.id, ::std::string::String::new()) - } - - // .google.protobuf.Any resources = 2; - - pub fn resources(&self) -> &::protobuf::well_known_types::any::Any { - self.resources.as_ref().unwrap_or_else(|| <::protobuf::well_known_types::any::Any as ::protobuf::Message>::default_instance()) - } - - pub fn clear_resources(&mut self) { - self.resources.clear(); - } - - pub fn has_resources(&self) -> bool { - self.resources.is_some() - } - - // Param is passed by value, moved - pub fn set_resources(&mut self, v: ::protobuf::well_known_types::any::Any) { - self.resources = ::protobuf::MessageField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_resources(&mut self) -> &mut ::protobuf::well_known_types::any::Any { - self.resources.mut_or_insert_default() - } - - // Take field - pub fn take_resources(&mut self) -> ::protobuf::well_known_types::any::Any { - self.resources.take().unwrap_or_else(|| ::protobuf::well_known_types::any::Any::new()) - } - - // repeated .containerd.task.v2.UpdateTaskRequest.AnnotationsEntry annotations = 3; - - pub fn annotations(&self) -> &::std::collections::HashMap<::std::string::String, ::std::string::String> { - &self.annotations - } - - pub fn clear_annotations(&mut self) { - self.annotations.clear(); - } - - // Param is passed by value, moved - pub fn set_annotations(&mut self, v: ::std::collections::HashMap<::std::string::String, ::std::string::String>) { - self.annotations = v; - } - - // Mutable pointer to the field. - pub fn mut_annotations(&mut self) -> &mut ::std::collections::HashMap<::std::string::String, ::std::string::String> { - &mut self.annotations - } - - // Take field - pub fn take_annotations(&mut self) -> ::std::collections::HashMap<::std::string::String, ::std::string::String> { - ::std::mem::replace(&mut self.annotations, ::std::collections::HashMap::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(3); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "id", - |m: &UpdateTaskRequest| { &m.id }, - |m: &mut UpdateTaskRequest| { &mut m.id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ::protobuf::well_known_types::any::Any>( - "resources", - |m: &UpdateTaskRequest| { &m.resources }, - |m: &mut UpdateTaskRequest| { &mut m.resources }, - )); - fields.push(::protobuf::reflect::rt::v2::make_map_simpler_accessor::<_, _, _>( - "annotations", - |m: &UpdateTaskRequest| { &m.annotations }, - |m: &mut UpdateTaskRequest| { &mut m.annotations }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "UpdateTaskRequest", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for UpdateTaskRequest { - const NAME: &'static str = "UpdateTaskRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.id = is.read_string()?; - }, - 18 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.resources)?; - }, - 26 => { - let len = is.read_raw_varint32()?; - let old_limit = is.push_limit(len as u64)?; - let mut key = ::std::default::Default::default(); - let mut value = ::std::default::Default::default(); - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => key = is.read_string()?, - 18 => value = is.read_string()?, - _ => ::protobuf::rt::skip_field_for_tag(tag, is)?, - }; - } - is.pop_limit(old_limit); - self.annotations.insert(key, value); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.id); - } - if let Some(v) = self.resources.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - for (k, v) in &self.annotations { - let mut entry_size = 0; - entry_size += ::protobuf::rt::string_size(1, &k); - entry_size += ::protobuf::rt::string_size(2, &v); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(entry_size) + entry_size - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.id.is_empty() { - os.write_string(1, &self.id)?; - } - if let Some(v) = self.resources.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - } - for (k, v) in &self.annotations { - let mut entry_size = 0; - entry_size += ::protobuf::rt::string_size(1, &k); - entry_size += ::protobuf::rt::string_size(2, &v); - os.write_raw_varint32(26)?; // Tag. - os.write_raw_varint32(entry_size as u32)?; - os.write_string(1, &k)?; - os.write_string(2, &v)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> UpdateTaskRequest { - UpdateTaskRequest::new() - } - - fn clear(&mut self) { - self.id.clear(); - self.resources.clear(); - self.annotations.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static UpdateTaskRequest { - static instance: ::protobuf::rt::Lazy = ::protobuf::rt::Lazy::new(); - instance.get(UpdateTaskRequest::new) - } -} - -impl ::protobuf::MessageFull for UpdateTaskRequest { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("UpdateTaskRequest").unwrap()).clone() - } -} - -impl ::std::fmt::Display for UpdateTaskRequest { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for UpdateTaskRequest { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.task.v2.StartRequest) -pub struct StartRequest { - // message fields - // @@protoc_insertion_point(field:containerd.task.v2.StartRequest.id) - pub id: ::std::string::String, - // @@protoc_insertion_point(field:containerd.task.v2.StartRequest.exec_id) - pub exec_id: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:containerd.task.v2.StartRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a StartRequest { - fn default() -> &'a StartRequest { - ::default_instance() - } -} - -impl StartRequest { - pub fn new() -> StartRequest { - ::std::default::Default::default() - } - - // string id = 1; - - pub fn id(&self) -> &str { - &self.id - } - - pub fn clear_id(&mut self) { - self.id.clear(); - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: ::std::string::String) { - self.id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_id(&mut self) -> &mut ::std::string::String { - &mut self.id - } - - // Take field - pub fn take_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.id, ::std::string::String::new()) - } - - // string exec_id = 2; - - pub fn exec_id(&self) -> &str { - &self.exec_id - } - - pub fn clear_exec_id(&mut self) { - self.exec_id.clear(); - } - - // Param is passed by value, moved - pub fn set_exec_id(&mut self, v: ::std::string::String) { - self.exec_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_exec_id(&mut self) -> &mut ::std::string::String { - &mut self.exec_id - } - - // Take field - pub fn take_exec_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.exec_id, ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(2); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "id", - |m: &StartRequest| { &m.id }, - |m: &mut StartRequest| { &mut m.id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "exec_id", - |m: &StartRequest| { &m.exec_id }, - |m: &mut StartRequest| { &mut m.exec_id }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "StartRequest", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for StartRequest { - const NAME: &'static str = "StartRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.id = is.read_string()?; - }, - 18 => { - self.exec_id = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.id); - } - if !self.exec_id.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.exec_id); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.id.is_empty() { - os.write_string(1, &self.id)?; - } - if !self.exec_id.is_empty() { - os.write_string(2, &self.exec_id)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> StartRequest { - StartRequest::new() - } - - fn clear(&mut self) { - self.id.clear(); - self.exec_id.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static StartRequest { - static instance: StartRequest = StartRequest { - id: ::std::string::String::new(), - exec_id: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for StartRequest { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("StartRequest").unwrap()).clone() - } -} - -impl ::std::fmt::Display for StartRequest { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for StartRequest { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.task.v2.StartResponse) -pub struct StartResponse { - // message fields - // @@protoc_insertion_point(field:containerd.task.v2.StartResponse.pid) - pub pid: u32, - // special fields - // @@protoc_insertion_point(special_field:containerd.task.v2.StartResponse.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a StartResponse { - fn default() -> &'a StartResponse { - ::default_instance() - } -} - -impl StartResponse { - pub fn new() -> StartResponse { - ::std::default::Default::default() - } - - // uint32 pid = 1; - - pub fn pid(&self) -> u32 { - self.pid - } - - pub fn clear_pid(&mut self) { - self.pid = 0; - } - - // Param is passed by value, moved - pub fn set_pid(&mut self, v: u32) { - self.pid = v; - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "pid", - |m: &StartResponse| { &m.pid }, - |m: &mut StartResponse| { &mut m.pid }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "StartResponse", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for StartResponse { - const NAME: &'static str = "StartResponse"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.pid = is.read_uint32()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.pid != 0 { - my_size += ::protobuf::rt::uint32_size(1, self.pid); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.pid != 0 { - os.write_uint32(1, self.pid)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> StartResponse { - StartResponse::new() - } - - fn clear(&mut self) { - self.pid = 0; - self.special_fields.clear(); - } - - fn default_instance() -> &'static StartResponse { - static instance: StartResponse = StartResponse { - pid: 0, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for StartResponse { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("StartResponse").unwrap()).clone() - } -} - -impl ::std::fmt::Display for StartResponse { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for StartResponse { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.task.v2.WaitRequest) -pub struct WaitRequest { - // message fields - // @@protoc_insertion_point(field:containerd.task.v2.WaitRequest.id) - pub id: ::std::string::String, - // @@protoc_insertion_point(field:containerd.task.v2.WaitRequest.exec_id) - pub exec_id: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:containerd.task.v2.WaitRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a WaitRequest { - fn default() -> &'a WaitRequest { - ::default_instance() - } -} - -impl WaitRequest { - pub fn new() -> WaitRequest { - ::std::default::Default::default() - } - - // string id = 1; - - pub fn id(&self) -> &str { - &self.id - } - - pub fn clear_id(&mut self) { - self.id.clear(); - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: ::std::string::String) { - self.id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_id(&mut self) -> &mut ::std::string::String { - &mut self.id - } - - // Take field - pub fn take_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.id, ::std::string::String::new()) - } - - // string exec_id = 2; - - pub fn exec_id(&self) -> &str { - &self.exec_id - } - - pub fn clear_exec_id(&mut self) { - self.exec_id.clear(); - } - - // Param is passed by value, moved - pub fn set_exec_id(&mut self, v: ::std::string::String) { - self.exec_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_exec_id(&mut self) -> &mut ::std::string::String { - &mut self.exec_id - } - - // Take field - pub fn take_exec_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.exec_id, ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(2); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "id", - |m: &WaitRequest| { &m.id }, - |m: &mut WaitRequest| { &mut m.id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "exec_id", - |m: &WaitRequest| { &m.exec_id }, - |m: &mut WaitRequest| { &mut m.exec_id }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "WaitRequest", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for WaitRequest { - const NAME: &'static str = "WaitRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.id = is.read_string()?; - }, - 18 => { - self.exec_id = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.id); - } - if !self.exec_id.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.exec_id); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.id.is_empty() { - os.write_string(1, &self.id)?; - } - if !self.exec_id.is_empty() { - os.write_string(2, &self.exec_id)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> WaitRequest { - WaitRequest::new() - } - - fn clear(&mut self) { - self.id.clear(); - self.exec_id.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static WaitRequest { - static instance: WaitRequest = WaitRequest { - id: ::std::string::String::new(), - exec_id: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for WaitRequest { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("WaitRequest").unwrap()).clone() - } -} - -impl ::std::fmt::Display for WaitRequest { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for WaitRequest { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.task.v2.WaitResponse) -pub struct WaitResponse { - // message fields - // @@protoc_insertion_point(field:containerd.task.v2.WaitResponse.exit_status) - pub exit_status: u32, - // @@protoc_insertion_point(field:containerd.task.v2.WaitResponse.exited_at) - pub exited_at: ::protobuf::MessageField<::protobuf::well_known_types::timestamp::Timestamp>, - // special fields - // @@protoc_insertion_point(special_field:containerd.task.v2.WaitResponse.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a WaitResponse { - fn default() -> &'a WaitResponse { - ::default_instance() - } -} - -impl WaitResponse { - pub fn new() -> WaitResponse { - ::std::default::Default::default() - } - - // uint32 exit_status = 1; - - pub fn exit_status(&self) -> u32 { - self.exit_status - } - - pub fn clear_exit_status(&mut self) { - self.exit_status = 0; - } - - // Param is passed by value, moved - pub fn set_exit_status(&mut self, v: u32) { - self.exit_status = v; - } - - // .google.protobuf.Timestamp exited_at = 2; - - pub fn exited_at(&self) -> &::protobuf::well_known_types::timestamp::Timestamp { - self.exited_at.as_ref().unwrap_or_else(|| <::protobuf::well_known_types::timestamp::Timestamp as ::protobuf::Message>::default_instance()) - } - - pub fn clear_exited_at(&mut self) { - self.exited_at.clear(); - } - - pub fn has_exited_at(&self) -> bool { - self.exited_at.is_some() - } - - // Param is passed by value, moved - pub fn set_exited_at(&mut self, v: ::protobuf::well_known_types::timestamp::Timestamp) { - self.exited_at = ::protobuf::MessageField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_exited_at(&mut self) -> &mut ::protobuf::well_known_types::timestamp::Timestamp { - self.exited_at.mut_or_insert_default() - } - - // Take field - pub fn take_exited_at(&mut self) -> ::protobuf::well_known_types::timestamp::Timestamp { - self.exited_at.take().unwrap_or_else(|| ::protobuf::well_known_types::timestamp::Timestamp::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(2); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "exit_status", - |m: &WaitResponse| { &m.exit_status }, - |m: &mut WaitResponse| { &mut m.exit_status }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ::protobuf::well_known_types::timestamp::Timestamp>( - "exited_at", - |m: &WaitResponse| { &m.exited_at }, - |m: &mut WaitResponse| { &mut m.exited_at }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "WaitResponse", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for WaitResponse { - const NAME: &'static str = "WaitResponse"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.exit_status = is.read_uint32()?; - }, - 18 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.exited_at)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.exit_status != 0 { - my_size += ::protobuf::rt::uint32_size(1, self.exit_status); - } - if let Some(v) = self.exited_at.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.exit_status != 0 { - os.write_uint32(1, self.exit_status)?; - } - if let Some(v) = self.exited_at.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> WaitResponse { - WaitResponse::new() - } - - fn clear(&mut self) { - self.exit_status = 0; - self.exited_at.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static WaitResponse { - static instance: WaitResponse = WaitResponse { - exit_status: 0, - exited_at: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for WaitResponse { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("WaitResponse").unwrap()).clone() - } -} - -impl ::std::fmt::Display for WaitResponse { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for WaitResponse { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.task.v2.StatsRequest) -pub struct StatsRequest { - // message fields - // @@protoc_insertion_point(field:containerd.task.v2.StatsRequest.id) - pub id: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:containerd.task.v2.StatsRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a StatsRequest { - fn default() -> &'a StatsRequest { - ::default_instance() - } -} - -impl StatsRequest { - pub fn new() -> StatsRequest { - ::std::default::Default::default() - } - - // string id = 1; - - pub fn id(&self) -> &str { - &self.id - } - - pub fn clear_id(&mut self) { - self.id.clear(); - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: ::std::string::String) { - self.id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_id(&mut self) -> &mut ::std::string::String { - &mut self.id - } - - // Take field - pub fn take_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.id, ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "id", - |m: &StatsRequest| { &m.id }, - |m: &mut StatsRequest| { &mut m.id }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "StatsRequest", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for StatsRequest { - const NAME: &'static str = "StatsRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.id = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.id); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.id.is_empty() { - os.write_string(1, &self.id)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> StatsRequest { - StatsRequest::new() - } - - fn clear(&mut self) { - self.id.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static StatsRequest { - static instance: StatsRequest = StatsRequest { - id: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for StatsRequest { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("StatsRequest").unwrap()).clone() - } -} - -impl ::std::fmt::Display for StatsRequest { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for StatsRequest { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.task.v2.StatsResponse) -pub struct StatsResponse { - // message fields - // @@protoc_insertion_point(field:containerd.task.v2.StatsResponse.stats) - pub stats: ::protobuf::MessageField<::protobuf::well_known_types::any::Any>, - // special fields - // @@protoc_insertion_point(special_field:containerd.task.v2.StatsResponse.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a StatsResponse { - fn default() -> &'a StatsResponse { - ::default_instance() - } -} - -impl StatsResponse { - pub fn new() -> StatsResponse { - ::std::default::Default::default() - } - - // .google.protobuf.Any stats = 1; - - pub fn stats(&self) -> &::protobuf::well_known_types::any::Any { - self.stats.as_ref().unwrap_or_else(|| <::protobuf::well_known_types::any::Any as ::protobuf::Message>::default_instance()) - } - - pub fn clear_stats(&mut self) { - self.stats.clear(); - } - - pub fn has_stats(&self) -> bool { - self.stats.is_some() - } - - // Param is passed by value, moved - pub fn set_stats(&mut self, v: ::protobuf::well_known_types::any::Any) { - self.stats = ::protobuf::MessageField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_stats(&mut self) -> &mut ::protobuf::well_known_types::any::Any { - self.stats.mut_or_insert_default() - } - - // Take field - pub fn take_stats(&mut self) -> ::protobuf::well_known_types::any::Any { - self.stats.take().unwrap_or_else(|| ::protobuf::well_known_types::any::Any::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ::protobuf::well_known_types::any::Any>( - "stats", - |m: &StatsResponse| { &m.stats }, - |m: &mut StatsResponse| { &mut m.stats }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "StatsResponse", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for StatsResponse { - const NAME: &'static str = "StatsResponse"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.stats)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.stats.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.stats.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> StatsResponse { - StatsResponse::new() - } - - fn clear(&mut self) { - self.stats.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static StatsResponse { - static instance: StatsResponse = StatsResponse { - stats: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for StatsResponse { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("StatsResponse").unwrap()).clone() - } -} - -impl ::std::fmt::Display for StatsResponse { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for StatsResponse { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.task.v2.ConnectRequest) -pub struct ConnectRequest { - // message fields - // @@protoc_insertion_point(field:containerd.task.v2.ConnectRequest.id) - pub id: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:containerd.task.v2.ConnectRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ConnectRequest { - fn default() -> &'a ConnectRequest { - ::default_instance() - } -} - -impl ConnectRequest { - pub fn new() -> ConnectRequest { - ::std::default::Default::default() - } - - // string id = 1; - - pub fn id(&self) -> &str { - &self.id - } - - pub fn clear_id(&mut self) { - self.id.clear(); - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: ::std::string::String) { - self.id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_id(&mut self) -> &mut ::std::string::String { - &mut self.id - } - - // Take field - pub fn take_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.id, ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "id", - |m: &ConnectRequest| { &m.id }, - |m: &mut ConnectRequest| { &mut m.id }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "ConnectRequest", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for ConnectRequest { - const NAME: &'static str = "ConnectRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.id = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.id); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.id.is_empty() { - os.write_string(1, &self.id)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ConnectRequest { - ConnectRequest::new() - } - - fn clear(&mut self) { - self.id.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static ConnectRequest { - static instance: ConnectRequest = ConnectRequest { - id: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for ConnectRequest { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("ConnectRequest").unwrap()).clone() - } -} - -impl ::std::fmt::Display for ConnectRequest { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ConnectRequest { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.task.v2.ConnectResponse) -pub struct ConnectResponse { - // message fields - // @@protoc_insertion_point(field:containerd.task.v2.ConnectResponse.shim_pid) - pub shim_pid: u32, - // @@protoc_insertion_point(field:containerd.task.v2.ConnectResponse.task_pid) - pub task_pid: u32, - // @@protoc_insertion_point(field:containerd.task.v2.ConnectResponse.version) - pub version: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:containerd.task.v2.ConnectResponse.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ConnectResponse { - fn default() -> &'a ConnectResponse { - ::default_instance() - } -} - -impl ConnectResponse { - pub fn new() -> ConnectResponse { - ::std::default::Default::default() - } - - // uint32 shim_pid = 1; - - pub fn shim_pid(&self) -> u32 { - self.shim_pid - } - - pub fn clear_shim_pid(&mut self) { - self.shim_pid = 0; - } - - // Param is passed by value, moved - pub fn set_shim_pid(&mut self, v: u32) { - self.shim_pid = v; - } - - // uint32 task_pid = 2; - - pub fn task_pid(&self) -> u32 { - self.task_pid - } - - pub fn clear_task_pid(&mut self) { - self.task_pid = 0; - } - - // Param is passed by value, moved - pub fn set_task_pid(&mut self, v: u32) { - self.task_pid = v; - } - - // string version = 3; - - pub fn version(&self) -> &str { - &self.version - } - - pub fn clear_version(&mut self) { - self.version.clear(); - } - - // Param is passed by value, moved - pub fn set_version(&mut self, v: ::std::string::String) { - self.version = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_version(&mut self) -> &mut ::std::string::String { - &mut self.version - } - - // Take field - pub fn take_version(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.version, ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(3); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "shim_pid", - |m: &ConnectResponse| { &m.shim_pid }, - |m: &mut ConnectResponse| { &mut m.shim_pid }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "task_pid", - |m: &ConnectResponse| { &m.task_pid }, - |m: &mut ConnectResponse| { &mut m.task_pid }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "version", - |m: &ConnectResponse| { &m.version }, - |m: &mut ConnectResponse| { &mut m.version }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "ConnectResponse", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for ConnectResponse { - const NAME: &'static str = "ConnectResponse"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.shim_pid = is.read_uint32()?; - }, - 16 => { - self.task_pid = is.read_uint32()?; - }, - 26 => { - self.version = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.shim_pid != 0 { - my_size += ::protobuf::rt::uint32_size(1, self.shim_pid); - } - if self.task_pid != 0 { - my_size += ::protobuf::rt::uint32_size(2, self.task_pid); - } - if !self.version.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.version); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.shim_pid != 0 { - os.write_uint32(1, self.shim_pid)?; - } - if self.task_pid != 0 { - os.write_uint32(2, self.task_pid)?; - } - if !self.version.is_empty() { - os.write_string(3, &self.version)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ConnectResponse { - ConnectResponse::new() - } - - fn clear(&mut self) { - self.shim_pid = 0; - self.task_pid = 0; - self.version.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static ConnectResponse { - static instance: ConnectResponse = ConnectResponse { - shim_pid: 0, - task_pid: 0, - version: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for ConnectResponse { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("ConnectResponse").unwrap()).clone() - } -} - -impl ::std::fmt::Display for ConnectResponse { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ConnectResponse { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.task.v2.ShutdownRequest) -pub struct ShutdownRequest { - // message fields - // @@protoc_insertion_point(field:containerd.task.v2.ShutdownRequest.id) - pub id: ::std::string::String, - // @@protoc_insertion_point(field:containerd.task.v2.ShutdownRequest.now) - pub now: bool, - // special fields - // @@protoc_insertion_point(special_field:containerd.task.v2.ShutdownRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ShutdownRequest { - fn default() -> &'a ShutdownRequest { - ::default_instance() - } -} - -impl ShutdownRequest { - pub fn new() -> ShutdownRequest { - ::std::default::Default::default() - } - - // string id = 1; - - pub fn id(&self) -> &str { - &self.id - } - - pub fn clear_id(&mut self) { - self.id.clear(); - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: ::std::string::String) { - self.id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_id(&mut self) -> &mut ::std::string::String { - &mut self.id - } - - // Take field - pub fn take_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.id, ::std::string::String::new()) - } - - // bool now = 2; - - pub fn now(&self) -> bool { - self.now - } - - pub fn clear_now(&mut self) { - self.now = false; - } - - // Param is passed by value, moved - pub fn set_now(&mut self, v: bool) { - self.now = v; - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(2); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "id", - |m: &ShutdownRequest| { &m.id }, - |m: &mut ShutdownRequest| { &mut m.id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "now", - |m: &ShutdownRequest| { &m.now }, - |m: &mut ShutdownRequest| { &mut m.now }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "ShutdownRequest", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for ShutdownRequest { - const NAME: &'static str = "ShutdownRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.id = is.read_string()?; - }, - 16 => { - self.now = is.read_bool()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.id); - } - if self.now != false { - my_size += 1 + 1; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.id.is_empty() { - os.write_string(1, &self.id)?; - } - if self.now != false { - os.write_bool(2, self.now)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ShutdownRequest { - ShutdownRequest::new() - } - - fn clear(&mut self) { - self.id.clear(); - self.now = false; - self.special_fields.clear(); - } - - fn default_instance() -> &'static ShutdownRequest { - static instance: ShutdownRequest = ShutdownRequest { - id: ::std::string::String::new(), - now: false, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for ShutdownRequest { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("ShutdownRequest").unwrap()).clone() - } -} - -impl ::std::fmt::Display for ShutdownRequest { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ShutdownRequest { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.task.v2.PauseRequest) -pub struct PauseRequest { - // message fields - // @@protoc_insertion_point(field:containerd.task.v2.PauseRequest.id) - pub id: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:containerd.task.v2.PauseRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a PauseRequest { - fn default() -> &'a PauseRequest { - ::default_instance() - } -} - -impl PauseRequest { - pub fn new() -> PauseRequest { - ::std::default::Default::default() - } - - // string id = 1; - - pub fn id(&self) -> &str { - &self.id - } - - pub fn clear_id(&mut self) { - self.id.clear(); - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: ::std::string::String) { - self.id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_id(&mut self) -> &mut ::std::string::String { - &mut self.id - } - - // Take field - pub fn take_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.id, ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "id", - |m: &PauseRequest| { &m.id }, - |m: &mut PauseRequest| { &mut m.id }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "PauseRequest", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for PauseRequest { - const NAME: &'static str = "PauseRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.id = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.id); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.id.is_empty() { - os.write_string(1, &self.id)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> PauseRequest { - PauseRequest::new() - } - - fn clear(&mut self) { - self.id.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static PauseRequest { - static instance: PauseRequest = PauseRequest { - id: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for PauseRequest { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("PauseRequest").unwrap()).clone() - } -} - -impl ::std::fmt::Display for PauseRequest { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for PauseRequest { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.task.v2.ResumeRequest) -pub struct ResumeRequest { - // message fields - // @@protoc_insertion_point(field:containerd.task.v2.ResumeRequest.id) - pub id: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:containerd.task.v2.ResumeRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ResumeRequest { - fn default() -> &'a ResumeRequest { - ::default_instance() - } -} - -impl ResumeRequest { - pub fn new() -> ResumeRequest { - ::std::default::Default::default() - } - - // string id = 1; - - pub fn id(&self) -> &str { - &self.id - } - - pub fn clear_id(&mut self) { - self.id.clear(); - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: ::std::string::String) { - self.id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_id(&mut self) -> &mut ::std::string::String { - &mut self.id - } - - // Take field - pub fn take_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.id, ::std::string::String::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(1); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "id", - |m: &ResumeRequest| { &m.id }, - |m: &mut ResumeRequest| { &mut m.id }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "ResumeRequest", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for ResumeRequest { - const NAME: &'static str = "ResumeRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.id = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.id); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.id.is_empty() { - os.write_string(1, &self.id)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ResumeRequest { - ResumeRequest::new() - } - - fn clear(&mut self) { - self.id.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static ResumeRequest { - static instance: ResumeRequest = ResumeRequest { - id: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for ResumeRequest { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("ResumeRequest").unwrap()).clone() - } -} - -impl ::std::fmt::Display for ResumeRequest { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ResumeRequest { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -static file_descriptor_proto_data: &'static [u8] = b"\ - \n;github.com/containerd/containerd/runtime/v2/task/shim.proto\x12\x12co\ - ntainerd.task.v2\x1a\x19google/protobuf/any.proto\x1a\x1bgoogle/protobuf\ - /empty.proto\x1a\x14gogoproto/gogo.proto\x1a\x1fgoogle/protobuf/timestam\ - p.proto\x1a6github.com/containerd/containerd/api/types/mount.proto\x1a:g\ - ithub.com/containerd/containerd/api/types/task/task.protoX\x02\"\xcb\x02\ - \n\x11CreateTaskRequest\x12\x0e\n\x02id\x18\x01\x20\x01(\tR\x02id\x12\ - \x16\n\x06bundle\x18\x02\x20\x01(\tR\x06bundle\x12/\n\x06rootfs\x18\x03\ - \x20\x03(\x0b2\x17.containerd.types.MountR\x06rootfs\x12\x1a\n\x08termin\ - al\x18\x04\x20\x01(\x08R\x08terminal\x12\x14\n\x05stdin\x18\x05\x20\x01(\ - \tR\x05stdin\x12\x16\n\x06stdout\x18\x06\x20\x01(\tR\x06stdout\x12\x16\n\ - \x06stderr\x18\x07\x20\x01(\tR\x06stderr\x12\x1e\n\ncheckpoint\x18\x08\ - \x20\x01(\tR\ncheckpoint\x12+\n\x11parent_checkpoint\x18\t\x20\x01(\tR\ - \x10parentCheckpoint\x12.\n\x07options\x18\n\x20\x01(\x0b2\x14.google.pr\ - otobuf.AnyR\x07options\"&\n\x12CreateTaskResponse\x12\x10\n\x03pid\x18\ - \x01\x20\x01(\rR\x03pid\"8\n\rDeleteRequest\x12\x0e\n\x02id\x18\x01\x20\ - \x01(\tR\x02id\x12\x17\n\x07exec_id\x18\x02\x20\x01(\tR\x06execId\"\x86\ - \x01\n\x0eDeleteResponse\x12\x10\n\x03pid\x18\x01\x20\x01(\rR\x03pid\x12\ - \x1f\n\x0bexit_status\x18\x02\x20\x01(\rR\nexitStatus\x12A\n\texited_at\ - \x18\x03\x20\x01(\x0b2\x1a.google.protobuf.TimestampR\x08exitedAtB\x08\ - \x90\xdf\x1f\x01\xc8\xde\x1f\0\"\xc9\x01\n\x12ExecProcessRequest\x12\x0e\ - \n\x02id\x18\x01\x20\x01(\tR\x02id\x12\x17\n\x07exec_id\x18\x02\x20\x01(\ - \tR\x06execId\x12\x1a\n\x08terminal\x18\x03\x20\x01(\x08R\x08terminal\ - \x12\x14\n\x05stdin\x18\x04\x20\x01(\tR\x05stdin\x12\x16\n\x06stdout\x18\ - \x05\x20\x01(\tR\x06stdout\x12\x16\n\x06stderr\x18\x06\x20\x01(\tR\x06st\ - derr\x12(\n\x04spec\x18\x07\x20\x01(\x0b2\x14.google.protobuf.AnyR\x04sp\ - ec\"\x15\n\x13ExecProcessResponse\"i\n\x10ResizePtyRequest\x12\x0e\n\x02\ - id\x18\x01\x20\x01(\tR\x02id\x12\x17\n\x07exec_id\x18\x02\x20\x01(\tR\ - \x06execId\x12\x14\n\x05width\x18\x03\x20\x01(\rR\x05width\x12\x16\n\x06\ - height\x18\x04\x20\x01(\rR\x06height\"7\n\x0cStateRequest\x12\x0e\n\x02i\ - d\x18\x01\x20\x01(\tR\x02id\x12\x17\n\x07exec_id\x18\x02\x20\x01(\tR\x06\ - execId\"\xdd\x02\n\rStateResponse\x12\x0e\n\x02id\x18\x01\x20\x01(\tR\ - \x02id\x12\x16\n\x06bundle\x18\x02\x20\x01(\tR\x06bundle\x12\x10\n\x03pi\ - d\x18\x03\x20\x01(\rR\x03pid\x123\n\x06status\x18\x04\x20\x01(\x0e2\x1b.\ - containerd.v1.types.StatusR\x06status\x12\x14\n\x05stdin\x18\x05\x20\x01\ - (\tR\x05stdin\x12\x16\n\x06stdout\x18\x06\x20\x01(\tR\x06stdout\x12\x16\ - \n\x06stderr\x18\x07\x20\x01(\tR\x06stderr\x12\x1a\n\x08terminal\x18\x08\ - \x20\x01(\x08R\x08terminal\x12\x1f\n\x0bexit_status\x18\t\x20\x01(\rR\ne\ - xitStatus\x12A\n\texited_at\x18\n\x20\x01(\x0b2\x1a.google.protobuf.Time\ - stampR\x08exitedAtB\x08\x90\xdf\x1f\x01\xc8\xde\x1f\0\x12\x17\n\x07exec_\ - id\x18\x0b\x20\x01(\tR\x06execId\"`\n\x0bKillRequest\x12\x0e\n\x02id\x18\ - \x01\x20\x01(\tR\x02id\x12\x17\n\x07exec_id\x18\x02\x20\x01(\tR\x06execI\ - d\x12\x16\n\x06signal\x18\x03\x20\x01(\rR\x06signal\x12\x10\n\x03all\x18\ - \x04\x20\x01(\x08R\x03all\"O\n\x0eCloseIORequest\x12\x0e\n\x02id\x18\x01\ - \x20\x01(\tR\x02id\x12\x17\n\x07exec_id\x18\x02\x20\x01(\tR\x06execId\ - \x12\x14\n\x05stdin\x18\x03\x20\x01(\x08R\x05stdin\"\x1d\n\x0bPidsReques\ - t\x12\x0e\n\x02id\x18\x01\x20\x01(\tR\x02id\"N\n\x0cPidsResponse\x12>\n\ - \tprocesses\x18\x01\x20\x03(\x0b2\x20.containerd.v1.types.ProcessInfoR\t\ - processes\"k\n\x15CheckpointTaskRequest\x12\x0e\n\x02id\x18\x01\x20\x01(\ - \tR\x02id\x12\x12\n\x04path\x18\x02\x20\x01(\tR\x04path\x12.\n\x07option\ - s\x18\x03\x20\x01(\x0b2\x14.google.protobuf.AnyR\x07options\"\xf1\x01\n\ - \x11UpdateTaskRequest\x12\x0e\n\x02id\x18\x01\x20\x01(\tR\x02id\x122\n\t\ - resources\x18\x02\x20\x01(\x0b2\x14.google.protobuf.AnyR\tresources\x12X\ - \n\x0bannotations\x18\x03\x20\x03(\x0b26.containerd.task.v2.UpdateTaskRe\ - quest.AnnotationsEntryR\x0bannotations\x1a>\n\x10AnnotationsEntry\x12\ - \x10\n\x03key\x18\x01\x20\x01(\tR\x03key\x12\x14\n\x05value\x18\x02\x20\ - \x01(\tR\x05value:\x028\x01\"7\n\x0cStartRequest\x12\x0e\n\x02id\x18\x01\ - \x20\x01(\tR\x02id\x12\x17\n\x07exec_id\x18\x02\x20\x01(\tR\x06execId\"!\ - \n\rStartResponse\x12\x10\n\x03pid\x18\x01\x20\x01(\rR\x03pid\"6\n\x0bWa\ - itRequest\x12\x0e\n\x02id\x18\x01\x20\x01(\tR\x02id\x12\x17\n\x07exec_id\ - \x18\x02\x20\x01(\tR\x06execId\"r\n\x0cWaitResponse\x12\x1f\n\x0bexit_st\ - atus\x18\x01\x20\x01(\rR\nexitStatus\x12A\n\texited_at\x18\x02\x20\x01(\ - \x0b2\x1a.google.protobuf.TimestampR\x08exitedAtB\x08\x90\xdf\x1f\x01\ - \xc8\xde\x1f\0\"\x1e\n\x0cStatsRequest\x12\x0e\n\x02id\x18\x01\x20\x01(\ - \tR\x02id\";\n\rStatsResponse\x12*\n\x05stats\x18\x01\x20\x01(\x0b2\x14.\ - google.protobuf.AnyR\x05stats\"\x20\n\x0eConnectRequest\x12\x0e\n\x02id\ - \x18\x01\x20\x01(\tR\x02id\"a\n\x0fConnectResponse\x12\x19\n\x08shim_pid\ - \x18\x01\x20\x01(\rR\x07shimPid\x12\x19\n\x08task_pid\x18\x02\x20\x01(\r\ - R\x07taskPid\x12\x18\n\x07version\x18\x03\x20\x01(\tR\x07version\"3\n\ - \x0fShutdownRequest\x12\x0e\n\x02id\x18\x01\x20\x01(\tR\x02id\x12\x10\n\ - \x03now\x18\x02\x20\x01(\x08R\x03now\"\x1e\n\x0cPauseRequest\x12\x0e\n\ - \x02id\x18\x01\x20\x01(\tR\x02id\"\x1f\n\rResumeRequest\x12\x0e\n\x02id\ - \x18\x01\x20\x01(\tR\x02id2\x8a\n\n\x04Task\x12L\n\x05State\x12\x20.cont\ - ainerd.task.v2.StateRequest\x1a!.containerd.task.v2.StateResponse\x12W\n\ - \x06Create\x12%.containerd.task.v2.CreateTaskRequest\x1a&.containerd.tas\ - k.v2.CreateTaskResponse\x12L\n\x05Start\x12\x20.containerd.task.v2.Start\ - Request\x1a!.containerd.task.v2.StartResponse\x12O\n\x06Delete\x12!.cont\ - ainerd.task.v2.DeleteRequest\x1a\".containerd.task.v2.DeleteResponse\x12\ - I\n\x04Pids\x12\x1f.containerd.task.v2.PidsRequest\x1a\x20.containerd.ta\ - sk.v2.PidsResponse\x12A\n\x05Pause\x12\x20.containerd.task.v2.PauseReque\ - st\x1a\x16.google.protobuf.Empty\x12C\n\x06Resume\x12!.containerd.task.v\ - 2.ResumeRequest\x1a\x16.google.protobuf.Empty\x12O\n\nCheckpoint\x12).co\ - ntainerd.task.v2.CheckpointTaskRequest\x1a\x16.google.protobuf.Empty\x12\ - ?\n\x04Kill\x12\x1f.containerd.task.v2.KillRequest\x1a\x16.google.protob\ - uf.Empty\x12F\n\x04Exec\x12&.containerd.task.v2.ExecProcessRequest\x1a\ - \x16.google.protobuf.Empty\x12I\n\tResizePty\x12$.containerd.task.v2.Res\ - izePtyRequest\x1a\x16.google.protobuf.Empty\x12E\n\x07CloseIO\x12\".cont\ - ainerd.task.v2.CloseIORequest\x1a\x16.google.protobuf.Empty\x12G\n\x06Up\ - date\x12%.containerd.task.v2.UpdateTaskRequest\x1a\x16.google.protobuf.E\ - mpty\x12I\n\x04Wait\x12\x1f.containerd.task.v2.WaitRequest\x1a\x20.conta\ - inerd.task.v2.WaitResponse\x12L\n\x05Stats\x12\x20.containerd.task.v2.St\ - atsRequest\x1a!.containerd.task.v2.StatsResponse\x12R\n\x07Connect\x12\"\ - .containerd.task.v2.ConnectRequest\x1a#.containerd.task.v2.ConnectRespon\ - se\x12G\n\x08Shutdown\x12#.containerd.task.v2.ShutdownRequest\x1a\x16.go\ - ogle.protobuf.EmptyB7Z5github.com/containerd/containerd/runtime/v2/task;\ - taskb\x06proto3\ -"; - -/// `FileDescriptorProto` object which was a source for this generated file -fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); - file_descriptor_proto_lazy.get(|| { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() - }) -} - -/// `FileDescriptor` object which allows dynamic access to files -pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { - static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); - static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); - file_descriptor.get(|| { - let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { - let mut deps = ::std::vec::Vec::with_capacity(6); - deps.push(::protobuf::well_known_types::any::file_descriptor().clone()); - deps.push(::protobuf::well_known_types::empty::file_descriptor().clone()); - deps.push(super::gogo::file_descriptor().clone()); - deps.push(::protobuf::well_known_types::timestamp::file_descriptor().clone()); - deps.push(super::mount::file_descriptor().clone()); - deps.push(super::task::file_descriptor().clone()); - let mut messages = ::std::vec::Vec::with_capacity(26); - messages.push(CreateTaskRequest::generated_message_descriptor_data()); - messages.push(CreateTaskResponse::generated_message_descriptor_data()); - messages.push(DeleteRequest::generated_message_descriptor_data()); - messages.push(DeleteResponse::generated_message_descriptor_data()); - messages.push(ExecProcessRequest::generated_message_descriptor_data()); - messages.push(ExecProcessResponse::generated_message_descriptor_data()); - messages.push(ResizePtyRequest::generated_message_descriptor_data()); - messages.push(StateRequest::generated_message_descriptor_data()); - messages.push(StateResponse::generated_message_descriptor_data()); - messages.push(KillRequest::generated_message_descriptor_data()); - messages.push(CloseIORequest::generated_message_descriptor_data()); - messages.push(PidsRequest::generated_message_descriptor_data()); - messages.push(PidsResponse::generated_message_descriptor_data()); - messages.push(CheckpointTaskRequest::generated_message_descriptor_data()); - messages.push(UpdateTaskRequest::generated_message_descriptor_data()); - messages.push(StartRequest::generated_message_descriptor_data()); - messages.push(StartResponse::generated_message_descriptor_data()); - messages.push(WaitRequest::generated_message_descriptor_data()); - messages.push(WaitResponse::generated_message_descriptor_data()); - messages.push(StatsRequest::generated_message_descriptor_data()); - messages.push(StatsResponse::generated_message_descriptor_data()); - messages.push(ConnectRequest::generated_message_descriptor_data()); - messages.push(ConnectResponse::generated_message_descriptor_data()); - messages.push(ShutdownRequest::generated_message_descriptor_data()); - messages.push(PauseRequest::generated_message_descriptor_data()); - messages.push(ResumeRequest::generated_message_descriptor_data()); - let mut enums = ::std::vec::Vec::with_capacity(0); - ::protobuf::reflect::GeneratedFileDescriptor::new_generated( - file_descriptor_proto(), - deps, - messages, - enums, - ) - }); - ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) - }) -} diff --git a/crates/shim-protos/src/shim/shim_ttrpc.rs b/crates/shim-protos/src/shim/shim_ttrpc.rs deleted file mode 100644 index d8251cf7..00000000 --- a/crates/shim-protos/src/shim/shim_ttrpc.rs +++ /dev/null @@ -1,435 +0,0 @@ -// This file is generated by ttrpc-compiler 0.6.1. Do not edit -// @generated - -// https://github.com/Manishearth/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clipto_camel_casepy)] - -#![cfg_attr(rustfmt, rustfmt_skip)] - -#![allow(box_pointers)] -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unsafe_code)] -#![allow(unused_imports)] -#![allow(unused_results)] -use protobuf::{CodedInputStream, CodedOutputStream, Message}; -use std::collections::HashMap; -use std::sync::Arc; - -#[derive(Clone)] -pub struct TaskClient { - client: ::ttrpc::Client, -} - -impl TaskClient { - pub fn new(client: ::ttrpc::Client) -> Self { - TaskClient { - client: client, - } - } - - pub fn state(&self, ctx: ttrpc::context::Context, req: &super::shim::StateRequest) -> ::ttrpc::Result { - let mut cres = super::shim::StateResponse::new(); - ::ttrpc::client_request!(self, ctx, req, "containerd.task.v2.Task", "State", cres); - Ok(cres) - } - - pub fn create(&self, ctx: ttrpc::context::Context, req: &super::shim::CreateTaskRequest) -> ::ttrpc::Result { - let mut cres = super::shim::CreateTaskResponse::new(); - ::ttrpc::client_request!(self, ctx, req, "containerd.task.v2.Task", "Create", cres); - Ok(cres) - } - - pub fn start(&self, ctx: ttrpc::context::Context, req: &super::shim::StartRequest) -> ::ttrpc::Result { - let mut cres = super::shim::StartResponse::new(); - ::ttrpc::client_request!(self, ctx, req, "containerd.task.v2.Task", "Start", cres); - Ok(cres) - } - - pub fn delete(&self, ctx: ttrpc::context::Context, req: &super::shim::DeleteRequest) -> ::ttrpc::Result { - let mut cres = super::shim::DeleteResponse::new(); - ::ttrpc::client_request!(self, ctx, req, "containerd.task.v2.Task", "Delete", cres); - Ok(cres) - } - - pub fn pids(&self, ctx: ttrpc::context::Context, req: &super::shim::PidsRequest) -> ::ttrpc::Result { - let mut cres = super::shim::PidsResponse::new(); - ::ttrpc::client_request!(self, ctx, req, "containerd.task.v2.Task", "Pids", cres); - Ok(cres) - } - - pub fn pause(&self, ctx: ttrpc::context::Context, req: &super::shim::PauseRequest) -> ::ttrpc::Result { - let mut cres = super::empty::Empty::new(); - ::ttrpc::client_request!(self, ctx, req, "containerd.task.v2.Task", "Pause", cres); - Ok(cres) - } - - pub fn resume(&self, ctx: ttrpc::context::Context, req: &super::shim::ResumeRequest) -> ::ttrpc::Result { - let mut cres = super::empty::Empty::new(); - ::ttrpc::client_request!(self, ctx, req, "containerd.task.v2.Task", "Resume", cres); - Ok(cres) - } - - pub fn checkpoint(&self, ctx: ttrpc::context::Context, req: &super::shim::CheckpointTaskRequest) -> ::ttrpc::Result { - let mut cres = super::empty::Empty::new(); - ::ttrpc::client_request!(self, ctx, req, "containerd.task.v2.Task", "Checkpoint", cres); - Ok(cres) - } - - pub fn kill(&self, ctx: ttrpc::context::Context, req: &super::shim::KillRequest) -> ::ttrpc::Result { - let mut cres = super::empty::Empty::new(); - ::ttrpc::client_request!(self, ctx, req, "containerd.task.v2.Task", "Kill", cres); - Ok(cres) - } - - pub fn exec(&self, ctx: ttrpc::context::Context, req: &super::shim::ExecProcessRequest) -> ::ttrpc::Result { - let mut cres = super::empty::Empty::new(); - ::ttrpc::client_request!(self, ctx, req, "containerd.task.v2.Task", "Exec", cres); - Ok(cres) - } - - pub fn resize_pty(&self, ctx: ttrpc::context::Context, req: &super::shim::ResizePtyRequest) -> ::ttrpc::Result { - let mut cres = super::empty::Empty::new(); - ::ttrpc::client_request!(self, ctx, req, "containerd.task.v2.Task", "ResizePty", cres); - Ok(cres) - } - - pub fn close_io(&self, ctx: ttrpc::context::Context, req: &super::shim::CloseIORequest) -> ::ttrpc::Result { - let mut cres = super::empty::Empty::new(); - ::ttrpc::client_request!(self, ctx, req, "containerd.task.v2.Task", "CloseIO", cres); - Ok(cres) - } - - pub fn update(&self, ctx: ttrpc::context::Context, req: &super::shim::UpdateTaskRequest) -> ::ttrpc::Result { - let mut cres = super::empty::Empty::new(); - ::ttrpc::client_request!(self, ctx, req, "containerd.task.v2.Task", "Update", cres); - Ok(cres) - } - - pub fn wait(&self, ctx: ttrpc::context::Context, req: &super::shim::WaitRequest) -> ::ttrpc::Result { - let mut cres = super::shim::WaitResponse::new(); - ::ttrpc::client_request!(self, ctx, req, "containerd.task.v2.Task", "Wait", cres); - Ok(cres) - } - - pub fn stats(&self, ctx: ttrpc::context::Context, req: &super::shim::StatsRequest) -> ::ttrpc::Result { - let mut cres = super::shim::StatsResponse::new(); - ::ttrpc::client_request!(self, ctx, req, "containerd.task.v2.Task", "Stats", cres); - Ok(cres) - } - - pub fn connect(&self, ctx: ttrpc::context::Context, req: &super::shim::ConnectRequest) -> ::ttrpc::Result { - let mut cres = super::shim::ConnectResponse::new(); - ::ttrpc::client_request!(self, ctx, req, "containerd.task.v2.Task", "Connect", cres); - Ok(cres) - } - - pub fn shutdown(&self, ctx: ttrpc::context::Context, req: &super::shim::ShutdownRequest) -> ::ttrpc::Result { - let mut cres = super::empty::Empty::new(); - ::ttrpc::client_request!(self, ctx, req, "containerd.task.v2.Task", "Shutdown", cres); - Ok(cres) - } -} - -struct StateMethod { - service: Arc>, -} - -impl ::ttrpc::MethodHandler for StateMethod { - fn handler(&self, ctx: ::ttrpc::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<()> { - ::ttrpc::request_handler!(self, ctx, req, shim, StateRequest, state); - Ok(()) - } -} - -struct CreateMethod { - service: Arc>, -} - -impl ::ttrpc::MethodHandler for CreateMethod { - fn handler(&self, ctx: ::ttrpc::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<()> { - ::ttrpc::request_handler!(self, ctx, req, shim, CreateTaskRequest, create); - Ok(()) - } -} - -struct StartMethod { - service: Arc>, -} - -impl ::ttrpc::MethodHandler for StartMethod { - fn handler(&self, ctx: ::ttrpc::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<()> { - ::ttrpc::request_handler!(self, ctx, req, shim, StartRequest, start); - Ok(()) - } -} - -struct DeleteMethod { - service: Arc>, -} - -impl ::ttrpc::MethodHandler for DeleteMethod { - fn handler(&self, ctx: ::ttrpc::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<()> { - ::ttrpc::request_handler!(self, ctx, req, shim, DeleteRequest, delete); - Ok(()) - } -} - -struct PidsMethod { - service: Arc>, -} - -impl ::ttrpc::MethodHandler for PidsMethod { - fn handler(&self, ctx: ::ttrpc::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<()> { - ::ttrpc::request_handler!(self, ctx, req, shim, PidsRequest, pids); - Ok(()) - } -} - -struct PauseMethod { - service: Arc>, -} - -impl ::ttrpc::MethodHandler for PauseMethod { - fn handler(&self, ctx: ::ttrpc::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<()> { - ::ttrpc::request_handler!(self, ctx, req, shim, PauseRequest, pause); - Ok(()) - } -} - -struct ResumeMethod { - service: Arc>, -} - -impl ::ttrpc::MethodHandler for ResumeMethod { - fn handler(&self, ctx: ::ttrpc::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<()> { - ::ttrpc::request_handler!(self, ctx, req, shim, ResumeRequest, resume); - Ok(()) - } -} - -struct CheckpointMethod { - service: Arc>, -} - -impl ::ttrpc::MethodHandler for CheckpointMethod { - fn handler(&self, ctx: ::ttrpc::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<()> { - ::ttrpc::request_handler!(self, ctx, req, shim, CheckpointTaskRequest, checkpoint); - Ok(()) - } -} - -struct KillMethod { - service: Arc>, -} - -impl ::ttrpc::MethodHandler for KillMethod { - fn handler(&self, ctx: ::ttrpc::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<()> { - ::ttrpc::request_handler!(self, ctx, req, shim, KillRequest, kill); - Ok(()) - } -} - -struct ExecMethod { - service: Arc>, -} - -impl ::ttrpc::MethodHandler for ExecMethod { - fn handler(&self, ctx: ::ttrpc::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<()> { - ::ttrpc::request_handler!(self, ctx, req, shim, ExecProcessRequest, exec); - Ok(()) - } -} - -struct ResizePtyMethod { - service: Arc>, -} - -impl ::ttrpc::MethodHandler for ResizePtyMethod { - fn handler(&self, ctx: ::ttrpc::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<()> { - ::ttrpc::request_handler!(self, ctx, req, shim, ResizePtyRequest, resize_pty); - Ok(()) - } -} - -struct CloseIoMethod { - service: Arc>, -} - -impl ::ttrpc::MethodHandler for CloseIoMethod { - fn handler(&self, ctx: ::ttrpc::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<()> { - ::ttrpc::request_handler!(self, ctx, req, shim, CloseIORequest, close_io); - Ok(()) - } -} - -struct UpdateMethod { - service: Arc>, -} - -impl ::ttrpc::MethodHandler for UpdateMethod { - fn handler(&self, ctx: ::ttrpc::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<()> { - ::ttrpc::request_handler!(self, ctx, req, shim, UpdateTaskRequest, update); - Ok(()) - } -} - -struct WaitMethod { - service: Arc>, -} - -impl ::ttrpc::MethodHandler for WaitMethod { - fn handler(&self, ctx: ::ttrpc::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<()> { - ::ttrpc::request_handler!(self, ctx, req, shim, WaitRequest, wait); - Ok(()) - } -} - -struct StatsMethod { - service: Arc>, -} - -impl ::ttrpc::MethodHandler for StatsMethod { - fn handler(&self, ctx: ::ttrpc::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<()> { - ::ttrpc::request_handler!(self, ctx, req, shim, StatsRequest, stats); - Ok(()) - } -} - -struct ConnectMethod { - service: Arc>, -} - -impl ::ttrpc::MethodHandler for ConnectMethod { - fn handler(&self, ctx: ::ttrpc::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<()> { - ::ttrpc::request_handler!(self, ctx, req, shim, ConnectRequest, connect); - Ok(()) - } -} - -struct ShutdownMethod { - service: Arc>, -} - -impl ::ttrpc::MethodHandler for ShutdownMethod { - fn handler(&self, ctx: ::ttrpc::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<()> { - ::ttrpc::request_handler!(self, ctx, req, shim, ShutdownRequest, shutdown); - Ok(()) - } -} - -pub trait Task { - fn state(&self, _ctx: &::ttrpc::TtrpcContext, _: super::shim::StateRequest) -> ::ttrpc::Result { - Err(::ttrpc::Error::RpcStatus(::ttrpc::get_status(::ttrpc::Code::NOT_FOUND, "/containerd.task.v2.Task/State is not supported".to_string()))) - } - fn create(&self, _ctx: &::ttrpc::TtrpcContext, _: super::shim::CreateTaskRequest) -> ::ttrpc::Result { - Err(::ttrpc::Error::RpcStatus(::ttrpc::get_status(::ttrpc::Code::NOT_FOUND, "/containerd.task.v2.Task/Create is not supported".to_string()))) - } - fn start(&self, _ctx: &::ttrpc::TtrpcContext, _: super::shim::StartRequest) -> ::ttrpc::Result { - Err(::ttrpc::Error::RpcStatus(::ttrpc::get_status(::ttrpc::Code::NOT_FOUND, "/containerd.task.v2.Task/Start is not supported".to_string()))) - } - fn delete(&self, _ctx: &::ttrpc::TtrpcContext, _: super::shim::DeleteRequest) -> ::ttrpc::Result { - Err(::ttrpc::Error::RpcStatus(::ttrpc::get_status(::ttrpc::Code::NOT_FOUND, "/containerd.task.v2.Task/Delete is not supported".to_string()))) - } - fn pids(&self, _ctx: &::ttrpc::TtrpcContext, _: super::shim::PidsRequest) -> ::ttrpc::Result { - Err(::ttrpc::Error::RpcStatus(::ttrpc::get_status(::ttrpc::Code::NOT_FOUND, "/containerd.task.v2.Task/Pids is not supported".to_string()))) - } - fn pause(&self, _ctx: &::ttrpc::TtrpcContext, _: super::shim::PauseRequest) -> ::ttrpc::Result { - Err(::ttrpc::Error::RpcStatus(::ttrpc::get_status(::ttrpc::Code::NOT_FOUND, "/containerd.task.v2.Task/Pause is not supported".to_string()))) - } - fn resume(&self, _ctx: &::ttrpc::TtrpcContext, _: super::shim::ResumeRequest) -> ::ttrpc::Result { - Err(::ttrpc::Error::RpcStatus(::ttrpc::get_status(::ttrpc::Code::NOT_FOUND, "/containerd.task.v2.Task/Resume is not supported".to_string()))) - } - fn checkpoint(&self, _ctx: &::ttrpc::TtrpcContext, _: super::shim::CheckpointTaskRequest) -> ::ttrpc::Result { - Err(::ttrpc::Error::RpcStatus(::ttrpc::get_status(::ttrpc::Code::NOT_FOUND, "/containerd.task.v2.Task/Checkpoint is not supported".to_string()))) - } - fn kill(&self, _ctx: &::ttrpc::TtrpcContext, _: super::shim::KillRequest) -> ::ttrpc::Result { - Err(::ttrpc::Error::RpcStatus(::ttrpc::get_status(::ttrpc::Code::NOT_FOUND, "/containerd.task.v2.Task/Kill is not supported".to_string()))) - } - fn exec(&self, _ctx: &::ttrpc::TtrpcContext, _: super::shim::ExecProcessRequest) -> ::ttrpc::Result { - Err(::ttrpc::Error::RpcStatus(::ttrpc::get_status(::ttrpc::Code::NOT_FOUND, "/containerd.task.v2.Task/Exec is not supported".to_string()))) - } - fn resize_pty(&self, _ctx: &::ttrpc::TtrpcContext, _: super::shim::ResizePtyRequest) -> ::ttrpc::Result { - Err(::ttrpc::Error::RpcStatus(::ttrpc::get_status(::ttrpc::Code::NOT_FOUND, "/containerd.task.v2.Task/ResizePty is not supported".to_string()))) - } - fn close_io(&self, _ctx: &::ttrpc::TtrpcContext, _: super::shim::CloseIORequest) -> ::ttrpc::Result { - Err(::ttrpc::Error::RpcStatus(::ttrpc::get_status(::ttrpc::Code::NOT_FOUND, "/containerd.task.v2.Task/CloseIO is not supported".to_string()))) - } - fn update(&self, _ctx: &::ttrpc::TtrpcContext, _: super::shim::UpdateTaskRequest) -> ::ttrpc::Result { - Err(::ttrpc::Error::RpcStatus(::ttrpc::get_status(::ttrpc::Code::NOT_FOUND, "/containerd.task.v2.Task/Update is not supported".to_string()))) - } - fn wait(&self, _ctx: &::ttrpc::TtrpcContext, _: super::shim::WaitRequest) -> ::ttrpc::Result { - Err(::ttrpc::Error::RpcStatus(::ttrpc::get_status(::ttrpc::Code::NOT_FOUND, "/containerd.task.v2.Task/Wait is not supported".to_string()))) - } - fn stats(&self, _ctx: &::ttrpc::TtrpcContext, _: super::shim::StatsRequest) -> ::ttrpc::Result { - Err(::ttrpc::Error::RpcStatus(::ttrpc::get_status(::ttrpc::Code::NOT_FOUND, "/containerd.task.v2.Task/Stats is not supported".to_string()))) - } - fn connect(&self, _ctx: &::ttrpc::TtrpcContext, _: super::shim::ConnectRequest) -> ::ttrpc::Result { - Err(::ttrpc::Error::RpcStatus(::ttrpc::get_status(::ttrpc::Code::NOT_FOUND, "/containerd.task.v2.Task/Connect is not supported".to_string()))) - } - fn shutdown(&self, _ctx: &::ttrpc::TtrpcContext, _: super::shim::ShutdownRequest) -> ::ttrpc::Result { - Err(::ttrpc::Error::RpcStatus(::ttrpc::get_status(::ttrpc::Code::NOT_FOUND, "/containerd.task.v2.Task/Shutdown is not supported".to_string()))) - } -} - -pub fn create_task(service: Arc>) -> HashMap> { - let mut methods = HashMap::new(); - - methods.insert("/containerd.task.v2.Task/State".to_string(), - Box::new(StateMethod{service: service.clone()}) as Box); - - methods.insert("/containerd.task.v2.Task/Create".to_string(), - Box::new(CreateMethod{service: service.clone()}) as Box); - - methods.insert("/containerd.task.v2.Task/Start".to_string(), - Box::new(StartMethod{service: service.clone()}) as Box); - - methods.insert("/containerd.task.v2.Task/Delete".to_string(), - Box::new(DeleteMethod{service: service.clone()}) as Box); - - methods.insert("/containerd.task.v2.Task/Pids".to_string(), - Box::new(PidsMethod{service: service.clone()}) as Box); - - methods.insert("/containerd.task.v2.Task/Pause".to_string(), - Box::new(PauseMethod{service: service.clone()}) as Box); - - methods.insert("/containerd.task.v2.Task/Resume".to_string(), - Box::new(ResumeMethod{service: service.clone()}) as Box); - - methods.insert("/containerd.task.v2.Task/Checkpoint".to_string(), - Box::new(CheckpointMethod{service: service.clone()}) as Box); - - methods.insert("/containerd.task.v2.Task/Kill".to_string(), - Box::new(KillMethod{service: service.clone()}) as Box); - - methods.insert("/containerd.task.v2.Task/Exec".to_string(), - Box::new(ExecMethod{service: service.clone()}) as Box); - - methods.insert("/containerd.task.v2.Task/ResizePty".to_string(), - Box::new(ResizePtyMethod{service: service.clone()}) as Box); - - methods.insert("/containerd.task.v2.Task/CloseIO".to_string(), - Box::new(CloseIoMethod{service: service.clone()}) as Box); - - methods.insert("/containerd.task.v2.Task/Update".to_string(), - Box::new(UpdateMethod{service: service.clone()}) as Box); - - methods.insert("/containerd.task.v2.Task/Wait".to_string(), - Box::new(WaitMethod{service: service.clone()}) as Box); - - methods.insert("/containerd.task.v2.Task/Stats".to_string(), - Box::new(StatsMethod{service: service.clone()}) as Box); - - methods.insert("/containerd.task.v2.Task/Connect".to_string(), - Box::new(ConnectMethod{service: service.clone()}) as Box); - - methods.insert("/containerd.task.v2.Task/Shutdown".to_string(), - Box::new(ShutdownMethod{service: service.clone()}) as Box); - - methods -} diff --git a/crates/shim-protos/src/shim/shim_ttrpc_async.rs b/crates/shim-protos/src/shim/shim_ttrpc_async.rs deleted file mode 100644 index bc89e5cc..00000000 --- a/crates/shim-protos/src/shim/shim_ttrpc_async.rs +++ /dev/null @@ -1,423 +0,0 @@ -// This file is generated by ttrpc-compiler 0.6.1. Do not edit -// @generated - -// https://github.com/Manishearth/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clipto_camel_casepy)] - -#![cfg_attr(rustfmt, rustfmt_skip)] - -#![allow(box_pointers)] -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unsafe_code)] -#![allow(unused_imports)] -#![allow(unused_results)] -use protobuf::{CodedInputStream, CodedOutputStream, Message}; -use std::collections::HashMap; -use std::sync::Arc; -use async_trait::async_trait; - -#[derive(Clone)] -pub struct TaskClient { - client: ::ttrpc::r#async::Client, -} - -impl TaskClient { - pub fn new(client: ::ttrpc::r#async::Client) -> Self { - TaskClient { - client: client, - } - } - - pub async fn state(&self, ctx: ttrpc::context::Context, req: &super::shim::StateRequest) -> ::ttrpc::Result { - let mut cres = super::shim::StateResponse::new(); - ::ttrpc::async_client_request!(self, ctx, req, "containerd.task.v2.Task", "State", cres); - } - - pub async fn create(&self, ctx: ttrpc::context::Context, req: &super::shim::CreateTaskRequest) -> ::ttrpc::Result { - let mut cres = super::shim::CreateTaskResponse::new(); - ::ttrpc::async_client_request!(self, ctx, req, "containerd.task.v2.Task", "Create", cres); - } - - pub async fn start(&self, ctx: ttrpc::context::Context, req: &super::shim::StartRequest) -> ::ttrpc::Result { - let mut cres = super::shim::StartResponse::new(); - ::ttrpc::async_client_request!(self, ctx, req, "containerd.task.v2.Task", "Start", cres); - } - - pub async fn delete(&self, ctx: ttrpc::context::Context, req: &super::shim::DeleteRequest) -> ::ttrpc::Result { - let mut cres = super::shim::DeleteResponse::new(); - ::ttrpc::async_client_request!(self, ctx, req, "containerd.task.v2.Task", "Delete", cres); - } - - pub async fn pids(&self, ctx: ttrpc::context::Context, req: &super::shim::PidsRequest) -> ::ttrpc::Result { - let mut cres = super::shim::PidsResponse::new(); - ::ttrpc::async_client_request!(self, ctx, req, "containerd.task.v2.Task", "Pids", cres); - } - - pub async fn pause(&self, ctx: ttrpc::context::Context, req: &super::shim::PauseRequest) -> ::ttrpc::Result { - let mut cres = super::empty::Empty::new(); - ::ttrpc::async_client_request!(self, ctx, req, "containerd.task.v2.Task", "Pause", cres); - } - - pub async fn resume(&self, ctx: ttrpc::context::Context, req: &super::shim::ResumeRequest) -> ::ttrpc::Result { - let mut cres = super::empty::Empty::new(); - ::ttrpc::async_client_request!(self, ctx, req, "containerd.task.v2.Task", "Resume", cres); - } - - pub async fn checkpoint(&self, ctx: ttrpc::context::Context, req: &super::shim::CheckpointTaskRequest) -> ::ttrpc::Result { - let mut cres = super::empty::Empty::new(); - ::ttrpc::async_client_request!(self, ctx, req, "containerd.task.v2.Task", "Checkpoint", cres); - } - - pub async fn kill(&self, ctx: ttrpc::context::Context, req: &super::shim::KillRequest) -> ::ttrpc::Result { - let mut cres = super::empty::Empty::new(); - ::ttrpc::async_client_request!(self, ctx, req, "containerd.task.v2.Task", "Kill", cres); - } - - pub async fn exec(&self, ctx: ttrpc::context::Context, req: &super::shim::ExecProcessRequest) -> ::ttrpc::Result { - let mut cres = super::empty::Empty::new(); - ::ttrpc::async_client_request!(self, ctx, req, "containerd.task.v2.Task", "Exec", cres); - } - - pub async fn resize_pty(&self, ctx: ttrpc::context::Context, req: &super::shim::ResizePtyRequest) -> ::ttrpc::Result { - let mut cres = super::empty::Empty::new(); - ::ttrpc::async_client_request!(self, ctx, req, "containerd.task.v2.Task", "ResizePty", cres); - } - - pub async fn close_io(&self, ctx: ttrpc::context::Context, req: &super::shim::CloseIORequest) -> ::ttrpc::Result { - let mut cres = super::empty::Empty::new(); - ::ttrpc::async_client_request!(self, ctx, req, "containerd.task.v2.Task", "CloseIO", cres); - } - - pub async fn update(&self, ctx: ttrpc::context::Context, req: &super::shim::UpdateTaskRequest) -> ::ttrpc::Result { - let mut cres = super::empty::Empty::new(); - ::ttrpc::async_client_request!(self, ctx, req, "containerd.task.v2.Task", "Update", cres); - } - - pub async fn wait(&self, ctx: ttrpc::context::Context, req: &super::shim::WaitRequest) -> ::ttrpc::Result { - let mut cres = super::shim::WaitResponse::new(); - ::ttrpc::async_client_request!(self, ctx, req, "containerd.task.v2.Task", "Wait", cres); - } - - pub async fn stats(&self, ctx: ttrpc::context::Context, req: &super::shim::StatsRequest) -> ::ttrpc::Result { - let mut cres = super::shim::StatsResponse::new(); - ::ttrpc::async_client_request!(self, ctx, req, "containerd.task.v2.Task", "Stats", cres); - } - - pub async fn connect(&self, ctx: ttrpc::context::Context, req: &super::shim::ConnectRequest) -> ::ttrpc::Result { - let mut cres = super::shim::ConnectResponse::new(); - ::ttrpc::async_client_request!(self, ctx, req, "containerd.task.v2.Task", "Connect", cres); - } - - pub async fn shutdown(&self, ctx: ttrpc::context::Context, req: &super::shim::ShutdownRequest) -> ::ttrpc::Result { - let mut cres = super::empty::Empty::new(); - ::ttrpc::async_client_request!(self, ctx, req, "containerd.task.v2.Task", "Shutdown", cres); - } -} - -struct StateMethod { - service: Arc>, -} - -#[async_trait] -impl ::ttrpc::r#async::MethodHandler for StateMethod { - async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<::ttrpc::Response> { - ::ttrpc::async_request_handler!(self, ctx, req, shim, StateRequest, state); - } -} - -struct CreateMethod { - service: Arc>, -} - -#[async_trait] -impl ::ttrpc::r#async::MethodHandler for CreateMethod { - async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<::ttrpc::Response> { - ::ttrpc::async_request_handler!(self, ctx, req, shim, CreateTaskRequest, create); - } -} - -struct StartMethod { - service: Arc>, -} - -#[async_trait] -impl ::ttrpc::r#async::MethodHandler for StartMethod { - async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<::ttrpc::Response> { - ::ttrpc::async_request_handler!(self, ctx, req, shim, StartRequest, start); - } -} - -struct DeleteMethod { - service: Arc>, -} - -#[async_trait] -impl ::ttrpc::r#async::MethodHandler for DeleteMethod { - async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<::ttrpc::Response> { - ::ttrpc::async_request_handler!(self, ctx, req, shim, DeleteRequest, delete); - } -} - -struct PidsMethod { - service: Arc>, -} - -#[async_trait] -impl ::ttrpc::r#async::MethodHandler for PidsMethod { - async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<::ttrpc::Response> { - ::ttrpc::async_request_handler!(self, ctx, req, shim, PidsRequest, pids); - } -} - -struct PauseMethod { - service: Arc>, -} - -#[async_trait] -impl ::ttrpc::r#async::MethodHandler for PauseMethod { - async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<::ttrpc::Response> { - ::ttrpc::async_request_handler!(self, ctx, req, shim, PauseRequest, pause); - } -} - -struct ResumeMethod { - service: Arc>, -} - -#[async_trait] -impl ::ttrpc::r#async::MethodHandler for ResumeMethod { - async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<::ttrpc::Response> { - ::ttrpc::async_request_handler!(self, ctx, req, shim, ResumeRequest, resume); - } -} - -struct CheckpointMethod { - service: Arc>, -} - -#[async_trait] -impl ::ttrpc::r#async::MethodHandler for CheckpointMethod { - async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<::ttrpc::Response> { - ::ttrpc::async_request_handler!(self, ctx, req, shim, CheckpointTaskRequest, checkpoint); - } -} - -struct KillMethod { - service: Arc>, -} - -#[async_trait] -impl ::ttrpc::r#async::MethodHandler for KillMethod { - async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<::ttrpc::Response> { - ::ttrpc::async_request_handler!(self, ctx, req, shim, KillRequest, kill); - } -} - -struct ExecMethod { - service: Arc>, -} - -#[async_trait] -impl ::ttrpc::r#async::MethodHandler for ExecMethod { - async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<::ttrpc::Response> { - ::ttrpc::async_request_handler!(self, ctx, req, shim, ExecProcessRequest, exec); - } -} - -struct ResizePtyMethod { - service: Arc>, -} - -#[async_trait] -impl ::ttrpc::r#async::MethodHandler for ResizePtyMethod { - async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<::ttrpc::Response> { - ::ttrpc::async_request_handler!(self, ctx, req, shim, ResizePtyRequest, resize_pty); - } -} - -struct CloseIoMethod { - service: Arc>, -} - -#[async_trait] -impl ::ttrpc::r#async::MethodHandler for CloseIoMethod { - async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<::ttrpc::Response> { - ::ttrpc::async_request_handler!(self, ctx, req, shim, CloseIORequest, close_io); - } -} - -struct UpdateMethod { - service: Arc>, -} - -#[async_trait] -impl ::ttrpc::r#async::MethodHandler for UpdateMethod { - async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<::ttrpc::Response> { - ::ttrpc::async_request_handler!(self, ctx, req, shim, UpdateTaskRequest, update); - } -} - -struct WaitMethod { - service: Arc>, -} - -#[async_trait] -impl ::ttrpc::r#async::MethodHandler for WaitMethod { - async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<::ttrpc::Response> { - ::ttrpc::async_request_handler!(self, ctx, req, shim, WaitRequest, wait); - } -} - -struct StatsMethod { - service: Arc>, -} - -#[async_trait] -impl ::ttrpc::r#async::MethodHandler for StatsMethod { - async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<::ttrpc::Response> { - ::ttrpc::async_request_handler!(self, ctx, req, shim, StatsRequest, stats); - } -} - -struct ConnectMethod { - service: Arc>, -} - -#[async_trait] -impl ::ttrpc::r#async::MethodHandler for ConnectMethod { - async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<::ttrpc::Response> { - ::ttrpc::async_request_handler!(self, ctx, req, shim, ConnectRequest, connect); - } -} - -struct ShutdownMethod { - service: Arc>, -} - -#[async_trait] -impl ::ttrpc::r#async::MethodHandler for ShutdownMethod { - async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<::ttrpc::Response> { - ::ttrpc::async_request_handler!(self, ctx, req, shim, ShutdownRequest, shutdown); - } -} - -#[async_trait] -pub trait Task: Sync { - async fn state(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _: super::shim::StateRequest) -> ::ttrpc::Result { - Err(::ttrpc::Error::RpcStatus(::ttrpc::get_status(::ttrpc::Code::NOT_FOUND, "/containerd.task.v2.Task/State is not supported".to_string()))) - } - async fn create(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _: super::shim::CreateTaskRequest) -> ::ttrpc::Result { - Err(::ttrpc::Error::RpcStatus(::ttrpc::get_status(::ttrpc::Code::NOT_FOUND, "/containerd.task.v2.Task/Create is not supported".to_string()))) - } - async fn start(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _: super::shim::StartRequest) -> ::ttrpc::Result { - Err(::ttrpc::Error::RpcStatus(::ttrpc::get_status(::ttrpc::Code::NOT_FOUND, "/containerd.task.v2.Task/Start is not supported".to_string()))) - } - async fn delete(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _: super::shim::DeleteRequest) -> ::ttrpc::Result { - Err(::ttrpc::Error::RpcStatus(::ttrpc::get_status(::ttrpc::Code::NOT_FOUND, "/containerd.task.v2.Task/Delete is not supported".to_string()))) - } - async fn pids(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _: super::shim::PidsRequest) -> ::ttrpc::Result { - Err(::ttrpc::Error::RpcStatus(::ttrpc::get_status(::ttrpc::Code::NOT_FOUND, "/containerd.task.v2.Task/Pids is not supported".to_string()))) - } - async fn pause(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _: super::shim::PauseRequest) -> ::ttrpc::Result { - Err(::ttrpc::Error::RpcStatus(::ttrpc::get_status(::ttrpc::Code::NOT_FOUND, "/containerd.task.v2.Task/Pause is not supported".to_string()))) - } - async fn resume(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _: super::shim::ResumeRequest) -> ::ttrpc::Result { - Err(::ttrpc::Error::RpcStatus(::ttrpc::get_status(::ttrpc::Code::NOT_FOUND, "/containerd.task.v2.Task/Resume is not supported".to_string()))) - } - async fn checkpoint(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _: super::shim::CheckpointTaskRequest) -> ::ttrpc::Result { - Err(::ttrpc::Error::RpcStatus(::ttrpc::get_status(::ttrpc::Code::NOT_FOUND, "/containerd.task.v2.Task/Checkpoint is not supported".to_string()))) - } - async fn kill(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _: super::shim::KillRequest) -> ::ttrpc::Result { - Err(::ttrpc::Error::RpcStatus(::ttrpc::get_status(::ttrpc::Code::NOT_FOUND, "/containerd.task.v2.Task/Kill is not supported".to_string()))) - } - async fn exec(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _: super::shim::ExecProcessRequest) -> ::ttrpc::Result { - Err(::ttrpc::Error::RpcStatus(::ttrpc::get_status(::ttrpc::Code::NOT_FOUND, "/containerd.task.v2.Task/Exec is not supported".to_string()))) - } - async fn resize_pty(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _: super::shim::ResizePtyRequest) -> ::ttrpc::Result { - Err(::ttrpc::Error::RpcStatus(::ttrpc::get_status(::ttrpc::Code::NOT_FOUND, "/containerd.task.v2.Task/ResizePty is not supported".to_string()))) - } - async fn close_io(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _: super::shim::CloseIORequest) -> ::ttrpc::Result { - Err(::ttrpc::Error::RpcStatus(::ttrpc::get_status(::ttrpc::Code::NOT_FOUND, "/containerd.task.v2.Task/CloseIO is not supported".to_string()))) - } - async fn update(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _: super::shim::UpdateTaskRequest) -> ::ttrpc::Result { - Err(::ttrpc::Error::RpcStatus(::ttrpc::get_status(::ttrpc::Code::NOT_FOUND, "/containerd.task.v2.Task/Update is not supported".to_string()))) - } - async fn wait(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _: super::shim::WaitRequest) -> ::ttrpc::Result { - Err(::ttrpc::Error::RpcStatus(::ttrpc::get_status(::ttrpc::Code::NOT_FOUND, "/containerd.task.v2.Task/Wait is not supported".to_string()))) - } - async fn stats(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _: super::shim::StatsRequest) -> ::ttrpc::Result { - Err(::ttrpc::Error::RpcStatus(::ttrpc::get_status(::ttrpc::Code::NOT_FOUND, "/containerd.task.v2.Task/Stats is not supported".to_string()))) - } - async fn connect(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _: super::shim::ConnectRequest) -> ::ttrpc::Result { - Err(::ttrpc::Error::RpcStatus(::ttrpc::get_status(::ttrpc::Code::NOT_FOUND, "/containerd.task.v2.Task/Connect is not supported".to_string()))) - } - async fn shutdown(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _: super::shim::ShutdownRequest) -> ::ttrpc::Result { - Err(::ttrpc::Error::RpcStatus(::ttrpc::get_status(::ttrpc::Code::NOT_FOUND, "/containerd.task.v2.Task/Shutdown is not supported".to_string()))) - } -} - -pub fn create_task(service: Arc>) -> HashMap { - let mut ret = HashMap::new(); - let mut methods = HashMap::new(); - let streams = HashMap::new(); - - methods.insert("State".to_string(), - Box::new(StateMethod{service: service.clone()}) as Box); - - methods.insert("Create".to_string(), - Box::new(CreateMethod{service: service.clone()}) as Box); - - methods.insert("Start".to_string(), - Box::new(StartMethod{service: service.clone()}) as Box); - - methods.insert("Delete".to_string(), - Box::new(DeleteMethod{service: service.clone()}) as Box); - - methods.insert("Pids".to_string(), - Box::new(PidsMethod{service: service.clone()}) as Box); - - methods.insert("Pause".to_string(), - Box::new(PauseMethod{service: service.clone()}) as Box); - - methods.insert("Resume".to_string(), - Box::new(ResumeMethod{service: service.clone()}) as Box); - - methods.insert("Checkpoint".to_string(), - Box::new(CheckpointMethod{service: service.clone()}) as Box); - - methods.insert("Kill".to_string(), - Box::new(KillMethod{service: service.clone()}) as Box); - - methods.insert("Exec".to_string(), - Box::new(ExecMethod{service: service.clone()}) as Box); - - methods.insert("ResizePty".to_string(), - Box::new(ResizePtyMethod{service: service.clone()}) as Box); - - methods.insert("CloseIO".to_string(), - Box::new(CloseIoMethod{service: service.clone()}) as Box); - - methods.insert("Update".to_string(), - Box::new(UpdateMethod{service: service.clone()}) as Box); - - methods.insert("Wait".to_string(), - Box::new(WaitMethod{service: service.clone()}) as Box); - - methods.insert("Stats".to_string(), - Box::new(StatsMethod{service: service.clone()}) as Box); - - methods.insert("Connect".to_string(), - Box::new(ConnectMethod{service: service.clone()}) as Box); - - methods.insert("Shutdown".to_string(), - Box::new(ShutdownMethod{service: service.clone()}) as Box); - - ret.insert("containerd.task.v2.Task".to_string(), ::ttrpc::r#async::Service{ methods, streams }); - ret -} diff --git a/crates/shim-protos/src/shim/task.rs b/crates/shim-protos/src/shim/task.rs deleted file mode 100644 index 03ce3978..00000000 --- a/crates/shim-protos/src/shim/task.rs +++ /dev/null @@ -1,3 +0,0 @@ -/// Reexport types::task::* to avoid manually editing other auto-generated source files. - -pub use crate::types::task::*; diff --git a/crates/shim-protos/src/types.rs b/crates/shim-protos/src/types.rs new file mode 100644 index 00000000..292cad94 --- /dev/null +++ b/crates/shim-protos/src/types.rs @@ -0,0 +1,35 @@ +/* + 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. +*/ + +pub mod empty { + include!(concat!(env!("OUT_DIR"), "/types/empty.rs")); +} + +pub mod gogo { + include!(concat!(env!("OUT_DIR"), "/types/gogo.rs")); +} + +pub mod mount { + include!(concat!(env!("OUT_DIR"), "/types/mount.rs")); +} + +pub mod task { + include!(concat!(env!("OUT_DIR"), "/types/task.rs")); +} + +pub mod fieldpath { + include!(concat!(env!("OUT_DIR"), "/types/fieldpath.rs")); +} diff --git a/crates/shim-protos/src/types/empty.rs b/crates/shim-protos/src/types/empty.rs deleted file mode 100644 index 95736848..00000000 --- a/crates/shim-protos/src/types/empty.rs +++ /dev/null @@ -1,165 +0,0 @@ -// This file is generated by rust-protobuf 3.1.0. Do not edit -// .proto file is parsed by pure -// @generated - -// https://github.com/rust-lang/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![allow(unused_attributes)] -#![cfg_attr(rustfmt, rustfmt::skip)] - -#![allow(box_pointers)] -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unused_results)] -#![allow(unused_mut)] - -//! Generated file from `google/protobuf/empty.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_1_0; - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:google.protobuf.Empty) -pub struct Empty { - // special fields - // @@protoc_insertion_point(special_field:google.protobuf.Empty.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a Empty { - fn default() -> &'a Empty { - ::default_instance() - } -} - -impl Empty { - pub fn new() -> Empty { - ::std::default::Default::default() - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(0); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "Empty", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for Empty { - const NAME: &'static str = "Empty"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> Empty { - Empty::new() - } - - fn clear(&mut self) { - self.special_fields.clear(); - } - - fn default_instance() -> &'static Empty { - static instance: Empty = Empty { - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for Empty { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("Empty").unwrap()).clone() - } -} - -impl ::std::fmt::Display for Empty { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for Empty { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x1bgoogle/protobuf/empty.proto\x12\x0fgoogle.protobuf\"\x07\n\x05Empt\ - yB}\n\x13com.google.protobufB\nEmptyProtoP\x01Z.google.golang.org/protob\ - uf/types/known/emptypb\xf8\x01\x01\xa2\x02\x03GPB\xaa\x02\x1eGoogle.Prot\ - obuf.WellKnownTypesb\x06proto3\ -"; - -/// `FileDescriptorProto` object which was a source for this generated file -fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); - file_descriptor_proto_lazy.get(|| { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() - }) -} - -/// `FileDescriptor` object which allows dynamic access to files -pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { - static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); - static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); - file_descriptor.get(|| { - let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { - let mut deps = ::std::vec::Vec::with_capacity(0); - let mut messages = ::std::vec::Vec::with_capacity(1); - messages.push(Empty::generated_message_descriptor_data()); - let mut enums = ::std::vec::Vec::with_capacity(0); - ::protobuf::reflect::GeneratedFileDescriptor::new_generated( - file_descriptor_proto(), - deps, - messages, - enums, - ) - }); - ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) - }) -} diff --git a/crates/shim-protos/src/types/gogo.rs b/crates/shim-protos/src/types/gogo.rs deleted file mode 100644 index a05967a9..00000000 --- a/crates/shim-protos/src/types/gogo.rs +++ /dev/null @@ -1,327 +0,0 @@ -// This file is generated by rust-protobuf 3.1.0. Do not edit -// .proto file is parsed by pure -// @generated - -// https://github.com/rust-lang/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![allow(unused_attributes)] -#![cfg_attr(rustfmt, rustfmt::skip)] - -#![allow(box_pointers)] -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unused_results)] -#![allow(unused_mut)] - -//! Generated file from `gogoproto/gogo.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_1_0; - -/// Extension fields -pub mod exts { - - pub const goproto_enum_prefix: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(62001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_enum_stringer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(62021, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const enum_stringer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(62022, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const enum_customname: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(62023, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); - - pub const enumdecl: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(62024, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const enumvalue_customname: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumValueOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(66001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); - - pub const goproto_getters_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_enum_prefix_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63002, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_stringer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63003, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const verbose_equal_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63004, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const face_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63005, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const gostring_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63006, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const populate_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63007, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const stringer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63008, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const onlyone_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63009, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const equal_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63013, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const description_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63014, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const testgen_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63015, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const benchgen_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63016, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const marshaler_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63017, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const unmarshaler_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63018, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const stable_marshaler_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63019, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const sizer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63020, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_enum_stringer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63021, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const enum_stringer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63022, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const unsafe_marshaler_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63023, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const unsafe_unmarshaler_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63024, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_extensions_map_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63025, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_unrecognized_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63026, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const gogoproto_import: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63027, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const protosizer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63028, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const compare_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63029, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const typedecl_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63030, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const enumdecl_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63031, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_registration: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63032, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const messagename_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63033, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_sizecache_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63034, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_unkeyed_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63035, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_getters: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_stringer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64003, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const verbose_equal: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64004, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const face: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64005, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const gostring: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64006, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const populate: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64007, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const stringer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(67008, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const onlyone: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64009, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const equal: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64013, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const description: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64014, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const testgen: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64015, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const benchgen: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64016, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const marshaler: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64017, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const unmarshaler: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64018, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const stable_marshaler: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64019, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const sizer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64020, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const unsafe_marshaler: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64023, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const unsafe_unmarshaler: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64024, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_extensions_map: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64025, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_unrecognized: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64026, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const protosizer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64028, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const compare: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64029, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const typedecl: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64030, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const messagename: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64033, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_sizecache: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64034, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const goproto_unkeyed: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64035, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const nullable: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(65001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const embed: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(65002, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const customtype: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65003, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); - - pub const customname: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65004, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); - - pub const jsontag: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65005, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); - - pub const moretags: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65006, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); - - pub const casttype: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65007, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); - - pub const castkey: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65008, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); - - pub const castvalue: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65009, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); - - pub const stdtime: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(65010, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const stdduration: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(65011, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); - - pub const wktpointer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(65012, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); -} - -static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x14gogoproto/gogo.proto\x12\tgogoproto\x1a\x20google/protobuf/descrip\ - tor.proto:N\n\x13goproto_enum_prefix\x18\xb1\xe4\x03\x20\x01(\x08\x12\ - \x1c.google.protobuf.EnumOptionsR\x11goprotoEnumPrefix:R\n\x15goproto_en\ - um_stringer\x18\xc5\xe4\x03\x20\x01(\x08\x12\x1c.google.protobuf.EnumOpt\ - ionsR\x13goprotoEnumStringer:C\n\renum_stringer\x18\xc6\xe4\x03\x20\x01(\ - \x08\x12\x1c.google.protobuf.EnumOptionsR\x0cenumStringer:G\n\x0fenum_cu\ - stomname\x18\xc7\xe4\x03\x20\x01(\t\x12\x1c.google.protobuf.EnumOptionsR\ - \x0eenumCustomname::\n\x08enumdecl\x18\xc8\xe4\x03\x20\x01(\x08\x12\x1c.\ - google.protobuf.EnumOptionsR\x08enumdecl:V\n\x14enumvalue_customname\x18\ - \xd1\x83\x04\x20\x01(\t\x12!.google.protobuf.EnumValueOptionsR\x13enumva\ - lueCustomname:N\n\x13goproto_getters_all\x18\x99\xec\x03\x20\x01(\x08\ - \x12\x1c.google.protobuf.FileOptionsR\x11goprotoGettersAll:U\n\x17goprot\ - o_enum_prefix_all\x18\x9a\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.F\ - ileOptionsR\x14goprotoEnumPrefixAll:P\n\x14goproto_stringer_all\x18\x9b\ - \xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x12goprotoStr\ - ingerAll:J\n\x11verbose_equal_all\x18\x9c\xec\x03\x20\x01(\x08\x12\x1c.g\ - oogle.protobuf.FileOptionsR\x0fverboseEqualAll:9\n\x08face_all\x18\x9d\ - \xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x07faceAll:A\ - \n\x0cgostring_all\x18\x9e\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.\ - FileOptionsR\x0bgostringAll:A\n\x0cpopulate_all\x18\x9f\xec\x03\x20\x01(\ - \x08\x12\x1c.google.protobuf.FileOptionsR\x0bpopulateAll:A\n\x0cstringer\ - _all\x18\xa0\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\ - \x0bstringerAll:?\n\x0bonlyone_all\x18\xa1\xec\x03\x20\x01(\x08\x12\x1c.\ - google.protobuf.FileOptionsR\nonlyoneAll:;\n\tequal_all\x18\xa5\xec\x03\ - \x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x08equalAll:G\n\x0fde\ - scription_all\x18\xa6\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileO\ - ptionsR\x0edescriptionAll:?\n\x0btestgen_all\x18\xa7\xec\x03\x20\x01(\ - \x08\x12\x1c.google.protobuf.FileOptionsR\ntestgenAll:A\n\x0cbenchgen_al\ - l\x18\xa8\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x0bb\ - enchgenAll:C\n\rmarshaler_all\x18\xa9\xec\x03\x20\x01(\x08\x12\x1c.googl\ - e.protobuf.FileOptionsR\x0cmarshalerAll:G\n\x0funmarshaler_all\x18\xaa\ - \xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x0eunmarshale\ - rAll:P\n\x14stable_marshaler_all\x18\xab\xec\x03\x20\x01(\x08\x12\x1c.go\ - ogle.protobuf.FileOptionsR\x12stableMarshalerAll:;\n\tsizer_all\x18\xac\ - \xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x08sizerAll:Y\ - \n\x19goproto_enum_stringer_all\x18\xad\xec\x03\x20\x01(\x08\x12\x1c.goo\ - gle.protobuf.FileOptionsR\x16goprotoEnumStringerAll:J\n\x11enum_stringer\ - _all\x18\xae\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\ - \x0fenumStringerAll:P\n\x14unsafe_marshaler_all\x18\xaf\xec\x03\x20\x01(\ - \x08\x12\x1c.google.protobuf.FileOptionsR\x12unsafeMarshalerAll:T\n\x16u\ - nsafe_unmarshaler_all\x18\xb0\xec\x03\x20\x01(\x08\x12\x1c.google.protob\ - uf.FileOptionsR\x14unsafeUnmarshalerAll:[\n\x1agoproto_extensions_map_al\ - l\x18\xb1\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x17g\ - oprotoExtensionsMapAll:X\n\x18goproto_unrecognized_all\x18\xb2\xec\x03\ - \x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x16goprotoUnrecognize\ - dAll:I\n\x10gogoproto_import\x18\xb3\xec\x03\x20\x01(\x08\x12\x1c.google\ - .protobuf.FileOptionsR\x0fgogoprotoImport:E\n\x0eprotosizer_all\x18\xb4\ - \xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\rprotosizerAl\ - l:?\n\x0bcompare_all\x18\xb5\xec\x03\x20\x01(\x08\x12\x1c.google.protobu\ - f.FileOptionsR\ncompareAll:A\n\x0ctypedecl_all\x18\xb6\xec\x03\x20\x01(\ - \x08\x12\x1c.google.protobuf.FileOptionsR\x0btypedeclAll:A\n\x0cenumdecl\ - _all\x18\xb7\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\ - \x0benumdeclAll:Q\n\x14goproto_registration\x18\xb8\xec\x03\x20\x01(\x08\ - \x12\x1c.google.protobuf.FileOptionsR\x13goprotoRegistration:G\n\x0fmess\ - agename_all\x18\xb9\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOpt\ - ionsR\x0emessagenameAll:R\n\x15goproto_sizecache_all\x18\xba\xec\x03\x20\ - \x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x13goprotoSizecacheAll:N\ - \n\x13goproto_unkeyed_all\x18\xbb\xec\x03\x20\x01(\x08\x12\x1c.google.pr\ - otobuf.FileOptionsR\x11goprotoUnkeyedAll:J\n\x0fgoproto_getters\x18\x81\ - \xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x0egoproto\ - Getters:L\n\x10goproto_stringer\x18\x83\xf4\x03\x20\x01(\x08\x12\x1f.goo\ - gle.protobuf.MessageOptionsR\x0fgoprotoStringer:F\n\rverbose_equal\x18\ - \x84\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x0cver\ - boseEqual:5\n\x04face\x18\x85\xf4\x03\x20\x01(\x08\x12\x1f.google.protob\ - uf.MessageOptionsR\x04face:=\n\x08gostring\x18\x86\xf4\x03\x20\x01(\x08\ - \x12\x1f.google.protobuf.MessageOptionsR\x08gostring:=\n\x08populate\x18\ - \x87\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x08pop\ - ulate:=\n\x08stringer\x18\xc0\x8b\x04\x20\x01(\x08\x12\x1f.google.protob\ - uf.MessageOptionsR\x08stringer:;\n\x07onlyone\x18\x89\xf4\x03\x20\x01(\ - \x08\x12\x1f.google.protobuf.MessageOptionsR\x07onlyone:7\n\x05equal\x18\ - \x8d\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x05equ\ - al:C\n\x0bdescription\x18\x8e\xf4\x03\x20\x01(\x08\x12\x1f.google.protob\ - uf.MessageOptionsR\x0bdescription:;\n\x07testgen\x18\x8f\xf4\x03\x20\x01\ - (\x08\x12\x1f.google.protobuf.MessageOptionsR\x07testgen:=\n\x08benchgen\ - \x18\x90\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\ - \x08benchgen:?\n\tmarshaler\x18\x91\xf4\x03\x20\x01(\x08\x12\x1f.google.\ - protobuf.MessageOptionsR\tmarshaler:C\n\x0bunmarshaler\x18\x92\xf4\x03\ - \x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x0bunmarshaler:L\n\ - \x10stable_marshaler\x18\x93\xf4\x03\x20\x01(\x08\x12\x1f.google.protobu\ - f.MessageOptionsR\x0fstableMarshaler:7\n\x05sizer\x18\x94\xf4\x03\x20\ - \x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x05sizer:L\n\x10unsafe\ - _marshaler\x18\x97\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageO\ - ptionsR\x0funsafeMarshaler:P\n\x12unsafe_unmarshaler\x18\x98\xf4\x03\x20\ - \x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x11unsafeUnmarshaler:W\ - \n\x16goproto_extensions_map\x18\x99\xf4\x03\x20\x01(\x08\x12\x1f.google\ - .protobuf.MessageOptionsR\x14goprotoExtensionsMap:T\n\x14goproto_unrecog\ - nized\x18\x9a\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOption\ - sR\x13goprotoUnrecognized:A\n\nprotosizer\x18\x9c\xf4\x03\x20\x01(\x08\ - \x12\x1f.google.protobuf.MessageOptionsR\nprotosizer:;\n\x07compare\x18\ - \x9d\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x07com\ - pare:=\n\x08typedecl\x18\x9e\xf4\x03\x20\x01(\x08\x12\x1f.google.protobu\ - f.MessageOptionsR\x08typedecl:C\n\x0bmessagename\x18\xa1\xf4\x03\x20\x01\ - (\x08\x12\x1f.google.protobuf.MessageOptionsR\x0bmessagename:N\n\x11gopr\ - oto_sizecache\x18\xa2\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.Messa\ - geOptionsR\x10goprotoSizecache:J\n\x0fgoproto_unkeyed\x18\xa3\xf4\x03\ - \x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x0egoprotoUnkeyed:\ - ;\n\x08nullable\x18\xe9\xfb\x03\x20\x01(\x08\x12\x1d.google.protobuf.Fie\ - ldOptionsR\x08nullable:5\n\x05embed\x18\xea\xfb\x03\x20\x01(\x08\x12\x1d\ - .google.protobuf.FieldOptionsR\x05embed:?\n\ncustomtype\x18\xeb\xfb\x03\ - \x20\x01(\t\x12\x1d.google.protobuf.FieldOptionsR\ncustomtype:?\n\ncusto\ - mname\x18\xec\xfb\x03\x20\x01(\t\x12\x1d.google.protobuf.FieldOptionsR\n\ - customname:9\n\x07jsontag\x18\xed\xfb\x03\x20\x01(\t\x12\x1d.google.prot\ - obuf.FieldOptionsR\x07jsontag:;\n\x08moretags\x18\xee\xfb\x03\x20\x01(\t\ - \x12\x1d.google.protobuf.FieldOptionsR\x08moretags:;\n\x08casttype\x18\ - \xef\xfb\x03\x20\x01(\t\x12\x1d.google.protobuf.FieldOptionsR\x08casttyp\ - e:9\n\x07castkey\x18\xf0\xfb\x03\x20\x01(\t\x12\x1d.google.protobuf.Fiel\ - dOptionsR\x07castkey:=\n\tcastvalue\x18\xf1\xfb\x03\x20\x01(\t\x12\x1d.g\ - oogle.protobuf.FieldOptionsR\tcastvalue:9\n\x07stdtime\x18\xf2\xfb\x03\ - \x20\x01(\x08\x12\x1d.google.protobuf.FieldOptionsR\x07stdtime:A\n\x0bst\ - dduration\x18\xf3\xfb\x03\x20\x01(\x08\x12\x1d.google.protobuf.FieldOpti\ - onsR\x0bstdduration:?\n\nwktpointer\x18\xf4\xfb\x03\x20\x01(\x08\x12\x1d\ - .google.protobuf.FieldOptionsR\nwktpointerBE\n\x13com.google.protobufB\n\ - GoGoProtosZ\"github.com/gogo/protobuf/gogoprotob\x06proto2\ -"; - -/// `FileDescriptorProto` object which was a source for this generated file -fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); - file_descriptor_proto_lazy.get(|| { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() - }) -} - -/// `FileDescriptor` object which allows dynamic access to files -pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { - static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); - static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); - file_descriptor.get(|| { - let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { - let mut deps = ::std::vec::Vec::with_capacity(1); - deps.push(::protobuf::descriptor::file_descriptor().clone()); - let mut messages = ::std::vec::Vec::with_capacity(0); - let mut enums = ::std::vec::Vec::with_capacity(0); - ::protobuf::reflect::GeneratedFileDescriptor::new_generated( - file_descriptor_proto(), - deps, - messages, - enums, - ) - }); - ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) - }) -} diff --git a/crates/shim-protos/src/types/mod.rs b/crates/shim-protos/src/types/mod.rs deleted file mode 100644 index 8e87db6d..00000000 --- a/crates/shim-protos/src/types/mod.rs +++ /dev/null @@ -1,6 +0,0 @@ -// @generated - -pub mod empty; -pub mod gogo; -pub mod mount; -pub mod task; diff --git a/crates/shim-protos/src/types/mount.rs b/crates/shim-protos/src/types/mount.rs deleted file mode 100644 index 1b093f04..00000000 --- a/crates/shim-protos/src/types/mount.rs +++ /dev/null @@ -1,344 +0,0 @@ -// This file is generated by rust-protobuf 3.1.0. Do not edit -// .proto file is parsed by pure -// @generated - -// https://github.com/rust-lang/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![allow(unused_attributes)] -#![cfg_attr(rustfmt, rustfmt::skip)] - -#![allow(box_pointers)] -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unused_results)] -#![allow(unused_mut)] - -//! Generated file from `github.com/containerd/containerd/api/types/mount.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_1_0; - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.types.Mount) -pub struct Mount { - // message fields - // @@protoc_insertion_point(field:containerd.types.Mount.type) - pub type_: ::std::string::String, - // @@protoc_insertion_point(field:containerd.types.Mount.source) - pub source: ::std::string::String, - // @@protoc_insertion_point(field:containerd.types.Mount.target) - pub target: ::std::string::String, - // @@protoc_insertion_point(field:containerd.types.Mount.options) - pub options: ::std::vec::Vec<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:containerd.types.Mount.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a Mount { - fn default() -> &'a Mount { - ::default_instance() - } -} - -impl Mount { - pub fn new() -> Mount { - ::std::default::Default::default() - } - - // string type = 1; - - pub fn type_(&self) -> &str { - &self.type_ - } - - pub fn clear_type_(&mut self) { - self.type_.clear(); - } - - // Param is passed by value, moved - pub fn set_type(&mut self, v: ::std::string::String) { - self.type_ = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_type(&mut self) -> &mut ::std::string::String { - &mut self.type_ - } - - // Take field - pub fn take_type_(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.type_, ::std::string::String::new()) - } - - // string source = 2; - - pub fn source(&self) -> &str { - &self.source - } - - pub fn clear_source(&mut self) { - self.source.clear(); - } - - // Param is passed by value, moved - pub fn set_source(&mut self, v: ::std::string::String) { - self.source = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_source(&mut self) -> &mut ::std::string::String { - &mut self.source - } - - // Take field - pub fn take_source(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.source, ::std::string::String::new()) - } - - // string target = 3; - - pub fn target(&self) -> &str { - &self.target - } - - pub fn clear_target(&mut self) { - self.target.clear(); - } - - // Param is passed by value, moved - pub fn set_target(&mut self, v: ::std::string::String) { - self.target = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_target(&mut self) -> &mut ::std::string::String { - &mut self.target - } - - // Take field - pub fn take_target(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.target, ::std::string::String::new()) - } - - // repeated string options = 4; - - pub fn options(&self) -> &[::std::string::String] { - &self.options - } - - pub fn clear_options(&mut self) { - self.options.clear(); - } - - // Param is passed by value, moved - pub fn set_options(&mut self, v: ::std::vec::Vec<::std::string::String>) { - self.options = v; - } - - // Mutable pointer to the field. - pub fn mut_options(&mut self) -> &mut ::std::vec::Vec<::std::string::String> { - &mut self.options - } - - // Take field - pub fn take_options(&mut self) -> ::std::vec::Vec<::std::string::String> { - ::std::mem::replace(&mut self.options, ::std::vec::Vec::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(4); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "type", - |m: &Mount| { &m.type_ }, - |m: &mut Mount| { &mut m.type_ }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "source", - |m: &Mount| { &m.source }, - |m: &mut Mount| { &mut m.source }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "target", - |m: &Mount| { &m.target }, - |m: &mut Mount| { &mut m.target }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "options", - |m: &Mount| { &m.options }, - |m: &mut Mount| { &mut m.options }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "Mount", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for Mount { - const NAME: &'static str = "Mount"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.type_ = is.read_string()?; - }, - 18 => { - self.source = is.read_string()?; - }, - 26 => { - self.target = is.read_string()?; - }, - 34 => { - self.options.push(is.read_string()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.type_.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.type_); - } - if !self.source.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.source); - } - if !self.target.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.target); - } - for value in &self.options { - my_size += ::protobuf::rt::string_size(4, &value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.type_.is_empty() { - os.write_string(1, &self.type_)?; - } - if !self.source.is_empty() { - os.write_string(2, &self.source)?; - } - if !self.target.is_empty() { - os.write_string(3, &self.target)?; - } - for v in &self.options { - os.write_string(4, &v)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> Mount { - Mount::new() - } - - fn clear(&mut self) { - self.type_.clear(); - self.source.clear(); - self.target.clear(); - self.options.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static Mount { - static instance: Mount = Mount { - type_: ::std::string::String::new(), - source: ::std::string::String::new(), - target: ::std::string::String::new(), - options: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for Mount { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("Mount").unwrap()).clone() - } -} - -impl ::std::fmt::Display for Mount { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for Mount { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -static file_descriptor_proto_data: &'static [u8] = b"\ - \n6github.com/containerd/containerd/api/types/mount.proto\x12\x10contain\ - erd.types\x1a\x14gogoproto/gogo.protoX\0\"e\n\x05Mount\x12\x12\n\x04type\ - \x18\x01\x20\x01(\tR\x04type\x12\x16\n\x06source\x18\x02\x20\x01(\tR\x06\ - source\x12\x16\n\x06target\x18\x03\x20\x01(\tR\x06target\x12\x18\n\x07op\ - tions\x18\x04\x20\x03(\tR\x07optionsB2Z0github.com/containerd/containerd\ - /api/types;typesb\x06proto3\ -"; - -/// `FileDescriptorProto` object which was a source for this generated file -fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); - file_descriptor_proto_lazy.get(|| { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() - }) -} - -/// `FileDescriptor` object which allows dynamic access to files -pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { - static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); - static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); - file_descriptor.get(|| { - let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { - let mut deps = ::std::vec::Vec::with_capacity(1); - deps.push(super::gogo::file_descriptor().clone()); - let mut messages = ::std::vec::Vec::with_capacity(1); - messages.push(Mount::generated_message_descriptor_data()); - let mut enums = ::std::vec::Vec::with_capacity(0); - ::protobuf::reflect::GeneratedFileDescriptor::new_generated( - file_descriptor_proto(), - deps, - messages, - enums, - ) - }); - ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) - }) -} diff --git a/crates/shim-protos/src/types/task.rs b/crates/shim-protos/src/types/task.rs deleted file mode 100644 index 9eb9553f..00000000 --- a/crates/shim-protos/src/types/task.rs +++ /dev/null @@ -1,844 +0,0 @@ -// This file is generated by rust-protobuf 3.1.0. Do not edit -// .proto file is parsed by pure -// @generated - -// https://github.com/rust-lang/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![allow(unused_attributes)] -#![cfg_attr(rustfmt, rustfmt::skip)] - -#![allow(box_pointers)] -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unused_results)] -#![allow(unused_mut)] - -//! Generated file from `github.com/containerd/containerd/api/types/task/task.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_1_0; - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.v1.types.Process) -pub struct Process { - // message fields - // @@protoc_insertion_point(field:containerd.v1.types.Process.container_id) - pub container_id: ::std::string::String, - // @@protoc_insertion_point(field:containerd.v1.types.Process.id) - pub id: ::std::string::String, - // @@protoc_insertion_point(field:containerd.v1.types.Process.pid) - pub pid: u32, - // @@protoc_insertion_point(field:containerd.v1.types.Process.status) - pub status: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:containerd.v1.types.Process.stdin) - pub stdin: ::std::string::String, - // @@protoc_insertion_point(field:containerd.v1.types.Process.stdout) - pub stdout: ::std::string::String, - // @@protoc_insertion_point(field:containerd.v1.types.Process.stderr) - pub stderr: ::std::string::String, - // @@protoc_insertion_point(field:containerd.v1.types.Process.terminal) - pub terminal: bool, - // @@protoc_insertion_point(field:containerd.v1.types.Process.exit_status) - pub exit_status: u32, - // @@protoc_insertion_point(field:containerd.v1.types.Process.exited_at) - pub exited_at: ::protobuf::MessageField<::protobuf::well_known_types::timestamp::Timestamp>, - // special fields - // @@protoc_insertion_point(special_field:containerd.v1.types.Process.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a Process { - fn default() -> &'a Process { - ::default_instance() - } -} - -impl Process { - pub fn new() -> Process { - ::std::default::Default::default() - } - - // string container_id = 1; - - pub fn container_id(&self) -> &str { - &self.container_id - } - - pub fn clear_container_id(&mut self) { - self.container_id.clear(); - } - - // Param is passed by value, moved - pub fn set_container_id(&mut self, v: ::std::string::String) { - self.container_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_container_id(&mut self) -> &mut ::std::string::String { - &mut self.container_id - } - - // Take field - pub fn take_container_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.container_id, ::std::string::String::new()) - } - - // string id = 2; - - pub fn id(&self) -> &str { - &self.id - } - - pub fn clear_id(&mut self) { - self.id.clear(); - } - - // Param is passed by value, moved - pub fn set_id(&mut self, v: ::std::string::String) { - self.id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_id(&mut self) -> &mut ::std::string::String { - &mut self.id - } - - // Take field - pub fn take_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.id, ::std::string::String::new()) - } - - // uint32 pid = 3; - - pub fn pid(&self) -> u32 { - self.pid - } - - pub fn clear_pid(&mut self) { - self.pid = 0; - } - - // Param is passed by value, moved - pub fn set_pid(&mut self, v: u32) { - self.pid = v; - } - - // .containerd.v1.types.Status status = 4; - - pub fn status(&self) -> Status { - self.status.enum_value_or_default() - } - - pub fn clear_status(&mut self) { - self.status = ::protobuf::EnumOrUnknown::new(Status::UNKNOWN); - } - - // Param is passed by value, moved - pub fn set_status(&mut self, v: Status) { - self.status = ::protobuf::EnumOrUnknown::new(v); - } - - // string stdin = 5; - - pub fn stdin(&self) -> &str { - &self.stdin - } - - pub fn clear_stdin(&mut self) { - self.stdin.clear(); - } - - // Param is passed by value, moved - pub fn set_stdin(&mut self, v: ::std::string::String) { - self.stdin = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_stdin(&mut self) -> &mut ::std::string::String { - &mut self.stdin - } - - // Take field - pub fn take_stdin(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.stdin, ::std::string::String::new()) - } - - // string stdout = 6; - - pub fn stdout(&self) -> &str { - &self.stdout - } - - pub fn clear_stdout(&mut self) { - self.stdout.clear(); - } - - // Param is passed by value, moved - pub fn set_stdout(&mut self, v: ::std::string::String) { - self.stdout = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_stdout(&mut self) -> &mut ::std::string::String { - &mut self.stdout - } - - // Take field - pub fn take_stdout(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.stdout, ::std::string::String::new()) - } - - // string stderr = 7; - - pub fn stderr(&self) -> &str { - &self.stderr - } - - pub fn clear_stderr(&mut self) { - self.stderr.clear(); - } - - // Param is passed by value, moved - pub fn set_stderr(&mut self, v: ::std::string::String) { - self.stderr = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_stderr(&mut self) -> &mut ::std::string::String { - &mut self.stderr - } - - // Take field - pub fn take_stderr(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.stderr, ::std::string::String::new()) - } - - // bool terminal = 8; - - pub fn terminal(&self) -> bool { - self.terminal - } - - pub fn clear_terminal(&mut self) { - self.terminal = false; - } - - // Param is passed by value, moved - pub fn set_terminal(&mut self, v: bool) { - self.terminal = v; - } - - // uint32 exit_status = 9; - - pub fn exit_status(&self) -> u32 { - self.exit_status - } - - pub fn clear_exit_status(&mut self) { - self.exit_status = 0; - } - - // Param is passed by value, moved - pub fn set_exit_status(&mut self, v: u32) { - self.exit_status = v; - } - - // .google.protobuf.Timestamp exited_at = 10; - - pub fn exited_at(&self) -> &::protobuf::well_known_types::timestamp::Timestamp { - self.exited_at.as_ref().unwrap_or_else(|| <::protobuf::well_known_types::timestamp::Timestamp as ::protobuf::Message>::default_instance()) - } - - pub fn clear_exited_at(&mut self) { - self.exited_at.clear(); - } - - pub fn has_exited_at(&self) -> bool { - self.exited_at.is_some() - } - - // Param is passed by value, moved - pub fn set_exited_at(&mut self, v: ::protobuf::well_known_types::timestamp::Timestamp) { - self.exited_at = ::protobuf::MessageField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_exited_at(&mut self) -> &mut ::protobuf::well_known_types::timestamp::Timestamp { - self.exited_at.mut_or_insert_default() - } - - // Take field - pub fn take_exited_at(&mut self) -> ::protobuf::well_known_types::timestamp::Timestamp { - self.exited_at.take().unwrap_or_else(|| ::protobuf::well_known_types::timestamp::Timestamp::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(10); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "container_id", - |m: &Process| { &m.container_id }, - |m: &mut Process| { &mut m.container_id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "id", - |m: &Process| { &m.id }, - |m: &mut Process| { &mut m.id }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "pid", - |m: &Process| { &m.pid }, - |m: &mut Process| { &mut m.pid }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "status", - |m: &Process| { &m.status }, - |m: &mut Process| { &mut m.status }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "stdin", - |m: &Process| { &m.stdin }, - |m: &mut Process| { &mut m.stdin }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "stdout", - |m: &Process| { &m.stdout }, - |m: &mut Process| { &mut m.stdout }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "stderr", - |m: &Process| { &m.stderr }, - |m: &mut Process| { &mut m.stderr }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "terminal", - |m: &Process| { &m.terminal }, - |m: &mut Process| { &mut m.terminal }, - )); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "exit_status", - |m: &Process| { &m.exit_status }, - |m: &mut Process| { &mut m.exit_status }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ::protobuf::well_known_types::timestamp::Timestamp>( - "exited_at", - |m: &Process| { &m.exited_at }, - |m: &mut Process| { &mut m.exited_at }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "Process", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for Process { - const NAME: &'static str = "Process"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.container_id = is.read_string()?; - }, - 18 => { - self.id = is.read_string()?; - }, - 24 => { - self.pid = is.read_uint32()?; - }, - 32 => { - self.status = is.read_enum_or_unknown()?; - }, - 42 => { - self.stdin = is.read_string()?; - }, - 50 => { - self.stdout = is.read_string()?; - }, - 58 => { - self.stderr = is.read_string()?; - }, - 64 => { - self.terminal = is.read_bool()?; - }, - 72 => { - self.exit_status = is.read_uint32()?; - }, - 82 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.exited_at)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.container_id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.container_id); - } - if !self.id.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.id); - } - if self.pid != 0 { - my_size += ::protobuf::rt::uint32_size(3, self.pid); - } - if self.status != ::protobuf::EnumOrUnknown::new(Status::UNKNOWN) { - my_size += ::protobuf::rt::int32_size(4, self.status.value()); - } - if !self.stdin.is_empty() { - my_size += ::protobuf::rt::string_size(5, &self.stdin); - } - if !self.stdout.is_empty() { - my_size += ::protobuf::rt::string_size(6, &self.stdout); - } - if !self.stderr.is_empty() { - my_size += ::protobuf::rt::string_size(7, &self.stderr); - } - if self.terminal != false { - my_size += 1 + 1; - } - if self.exit_status != 0 { - my_size += ::protobuf::rt::uint32_size(9, self.exit_status); - } - if let Some(v) = self.exited_at.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.container_id.is_empty() { - os.write_string(1, &self.container_id)?; - } - if !self.id.is_empty() { - os.write_string(2, &self.id)?; - } - if self.pid != 0 { - os.write_uint32(3, self.pid)?; - } - if self.status != ::protobuf::EnumOrUnknown::new(Status::UNKNOWN) { - os.write_enum(4, ::protobuf::EnumOrUnknown::value(&self.status))?; - } - if !self.stdin.is_empty() { - os.write_string(5, &self.stdin)?; - } - if !self.stdout.is_empty() { - os.write_string(6, &self.stdout)?; - } - if !self.stderr.is_empty() { - os.write_string(7, &self.stderr)?; - } - if self.terminal != false { - os.write_bool(8, self.terminal)?; - } - if self.exit_status != 0 { - os.write_uint32(9, self.exit_status)?; - } - if let Some(v) = self.exited_at.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(10, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> Process { - Process::new() - } - - fn clear(&mut self) { - self.container_id.clear(); - self.id.clear(); - self.pid = 0; - self.status = ::protobuf::EnumOrUnknown::new(Status::UNKNOWN); - self.stdin.clear(); - self.stdout.clear(); - self.stderr.clear(); - self.terminal = false; - self.exit_status = 0; - self.exited_at.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static Process { - static instance: Process = Process { - container_id: ::std::string::String::new(), - id: ::std::string::String::new(), - pid: 0, - status: ::protobuf::EnumOrUnknown::from_i32(0), - stdin: ::std::string::String::new(), - stdout: ::std::string::String::new(), - stderr: ::std::string::String::new(), - terminal: false, - exit_status: 0, - exited_at: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for Process { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("Process").unwrap()).clone() - } -} - -impl ::std::fmt::Display for Process { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for Process { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:containerd.v1.types.ProcessInfo) -pub struct ProcessInfo { - // message fields - // @@protoc_insertion_point(field:containerd.v1.types.ProcessInfo.pid) - pub pid: u32, - // @@protoc_insertion_point(field:containerd.v1.types.ProcessInfo.info) - pub info: ::protobuf::MessageField<::protobuf::well_known_types::any::Any>, - // special fields - // @@protoc_insertion_point(special_field:containerd.v1.types.ProcessInfo.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ProcessInfo { - fn default() -> &'a ProcessInfo { - ::default_instance() - } -} - -impl ProcessInfo { - pub fn new() -> ProcessInfo { - ::std::default::Default::default() - } - - // uint32 pid = 1; - - pub fn pid(&self) -> u32 { - self.pid - } - - pub fn clear_pid(&mut self) { - self.pid = 0; - } - - // Param is passed by value, moved - pub fn set_pid(&mut self, v: u32) { - self.pid = v; - } - - // .google.protobuf.Any info = 2; - - pub fn info(&self) -> &::protobuf::well_known_types::any::Any { - self.info.as_ref().unwrap_or_else(|| <::protobuf::well_known_types::any::Any as ::protobuf::Message>::default_instance()) - } - - pub fn clear_info(&mut self) { - self.info.clear(); - } - - pub fn has_info(&self) -> bool { - self.info.is_some() - } - - // Param is passed by value, moved - pub fn set_info(&mut self, v: ::protobuf::well_known_types::any::Any) { - self.info = ::protobuf::MessageField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_info(&mut self) -> &mut ::protobuf::well_known_types::any::Any { - self.info.mut_or_insert_default() - } - - // Take field - pub fn take_info(&mut self) -> ::protobuf::well_known_types::any::Any { - self.info.take().unwrap_or_else(|| ::protobuf::well_known_types::any::Any::new()) - } - - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(2); - let mut oneofs = ::std::vec::Vec::with_capacity(0); - fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( - "pid", - |m: &ProcessInfo| { &m.pid }, - |m: &mut ProcessInfo| { &mut m.pid }, - )); - fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ::protobuf::well_known_types::any::Any>( - "info", - |m: &ProcessInfo| { &m.info }, - |m: &mut ProcessInfo| { &mut m.info }, - )); - ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( - "ProcessInfo", - fields, - oneofs, - ) - } -} - -impl ::protobuf::Message for ProcessInfo { - const NAME: &'static str = "ProcessInfo"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.pid = is.read_uint32()?; - }, - 18 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.info)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.pid != 0 { - my_size += ::protobuf::rt::uint32_size(1, self.pid); - } - if let Some(v) = self.info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.pid != 0 { - os.write_uint32(1, self.pid)?; - } - if let Some(v) = self.info.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ProcessInfo { - ProcessInfo::new() - } - - fn clear(&mut self) { - self.pid = 0; - self.info.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static ProcessInfo { - static instance: ProcessInfo = ProcessInfo { - pid: 0, - info: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -impl ::protobuf::MessageFull for ProcessInfo { - fn descriptor() -> ::protobuf::reflect::MessageDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().message_by_package_relative_name("ProcessInfo").unwrap()).clone() - } -} - -impl ::std::fmt::Display for ProcessInfo { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ProcessInfo { - type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; -} - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:containerd.v1.types.Status) -pub enum Status { - // @@protoc_insertion_point(enum_value:containerd.v1.types.Status.UNKNOWN) - UNKNOWN = 0, - // @@protoc_insertion_point(enum_value:containerd.v1.types.Status.CREATED) - CREATED = 1, - // @@protoc_insertion_point(enum_value:containerd.v1.types.Status.RUNNING) - RUNNING = 2, - // @@protoc_insertion_point(enum_value:containerd.v1.types.Status.STOPPED) - STOPPED = 3, - // @@protoc_insertion_point(enum_value:containerd.v1.types.Status.PAUSED) - PAUSED = 4, - // @@protoc_insertion_point(enum_value:containerd.v1.types.Status.PAUSING) - PAUSING = 5, -} - -impl ::protobuf::Enum for Status { - const NAME: &'static str = "Status"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(Status::UNKNOWN), - 1 => ::std::option::Option::Some(Status::CREATED), - 2 => ::std::option::Option::Some(Status::RUNNING), - 3 => ::std::option::Option::Some(Status::STOPPED), - 4 => ::std::option::Option::Some(Status::PAUSED), - 5 => ::std::option::Option::Some(Status::PAUSING), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [Status] = &[ - Status::UNKNOWN, - Status::CREATED, - Status::RUNNING, - Status::STOPPED, - Status::PAUSED, - Status::PAUSING, - ]; -} - -impl ::protobuf::EnumFull for Status { - fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); - descriptor.get(|| file_descriptor().enum_by_package_relative_name("Status").unwrap()).clone() - } - - fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { - let index = *self as usize; - Self::enum_descriptor().value_by_index(index) - } -} - -impl ::std::default::Default for Status { - fn default() -> Self { - Status::UNKNOWN - } -} - -impl Status { - fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { - ::protobuf::reflect::GeneratedEnumDescriptorData::new::("Status") - } -} - -static file_descriptor_proto_data: &'static [u8] = b"\ - \n:github.com/containerd/containerd/api/types/task/task.proto\x12\x13con\ - tainerd.v1.types\x1a\x14gogoproto/gogo.proto\x1a\x1fgoogle/protobuf/time\ - stamp.proto\x1a\x19google/protobuf/any.protoX\0\"\xc9\x02\n\x07Process\ - \x12!\n\x0ccontainer_id\x18\x01\x20\x01(\tR\x0bcontainerId\x12\x0e\n\x02\ - id\x18\x02\x20\x01(\tR\x02id\x12\x10\n\x03pid\x18\x03\x20\x01(\rR\x03pid\ - \x123\n\x06status\x18\x04\x20\x01(\x0e2\x1b.containerd.v1.types.StatusR\ - \x06status\x12\x14\n\x05stdin\x18\x05\x20\x01(\tR\x05stdin\x12\x16\n\x06\ - stdout\x18\x06\x20\x01(\tR\x06stdout\x12\x16\n\x06stderr\x18\x07\x20\x01\ - (\tR\x06stderr\x12\x1a\n\x08terminal\x18\x08\x20\x01(\x08R\x08terminal\ - \x12\x1f\n\x0bexit_status\x18\t\x20\x01(\rR\nexitStatus\x12A\n\texited_a\ - t\x18\n\x20\x01(\x0b2\x1a.google.protobuf.TimestampR\x08exitedAtB\x08\ - \x90\xdf\x1f\x01\xc8\xde\x1f\0\"I\n\x0bProcessInfo\x12\x10\n\x03pid\x18\ - \x01\x20\x01(\rR\x03pid\x12(\n\x04info\x18\x02\x20\x01(\x0b2\x14.google.\ - protobuf.AnyR\x04info*\xd6\x01\n\x06Status\x12\x1e\n\x07UNKNOWN\x10\0\ - \x1a\x11\x8a\x9d\x20\rStatusUnknown\x12\x1e\n\x07CREATED\x10\x01\x1a\x11\ - \x8a\x9d\x20\rStatusCreated\x12\x1e\n\x07RUNNING\x10\x02\x1a\x11\x8a\x9d\ - \x20\rStatusRunning\x12\x1e\n\x07STOPPED\x10\x03\x1a\x11\x8a\x9d\x20\rSt\ - atusStopped\x12\x1c\n\x06PAUSED\x10\x04\x1a\x10\x8a\x9d\x20\x0cStatusPau\ - sed\x12\x1e\n\x07PAUSING\x10\x05\x1a\x11\x8a\x9d\x20\rStatusPausing\x1a\ - \x0e\xba\xa4\x1e\x06Status\x88\xa3\x1e\0b\x06proto3\ -"; - -/// `FileDescriptorProto` object which was a source for this generated file -fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); - file_descriptor_proto_lazy.get(|| { - ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() - }) -} - -/// `FileDescriptor` object which allows dynamic access to files -pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { - static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); - static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); - file_descriptor.get(|| { - let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { - let mut deps = ::std::vec::Vec::with_capacity(3); - deps.push(super::gogo::file_descriptor().clone()); - deps.push(::protobuf::well_known_types::timestamp::file_descriptor().clone()); - deps.push(::protobuf::well_known_types::any::file_descriptor().clone()); - let mut messages = ::std::vec::Vec::with_capacity(2); - messages.push(Process::generated_message_descriptor_data()); - messages.push(ProcessInfo::generated_message_descriptor_data()); - let mut enums = ::std::vec::Vec::with_capacity(1); - enums.push(Status::generated_enum_descriptor_data()); - ::protobuf::reflect::GeneratedFileDescriptor::new_generated( - file_descriptor_proto(), - deps, - messages, - enums, - ) - }); - ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) - }) -}