Include generated code for shim-client
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
This commit is contained in:
parent
97ae630389
commit
3baf235798
|
|
@ -15,3 +15,10 @@ ttrpc = "0.5.2"
|
|||
|
||||
[build-dependencies]
|
||||
ttrpc-codegen = "0.2"
|
||||
|
||||
[features]
|
||||
# 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 = []
|
||||
|
|
|
|||
|
|
@ -14,11 +14,17 @@
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
#![allow(unused_imports)]
|
||||
|
||||
use std::fs;
|
||||
use std::io::prelude::*;
|
||||
use std::io::Write;
|
||||
use std::path::Path;
|
||||
use ttrpc_codegen::{Codegen, ProtobufCustomize};
|
||||
|
||||
#[cfg(not(feature = "generate_bindings"))]
|
||||
fn main() {}
|
||||
|
||||
#[cfg(feature = "generate_bindings")]
|
||||
fn main() {
|
||||
codegen(
|
||||
"src/events",
|
||||
|
|
@ -53,6 +59,7 @@ fn main() {
|
|||
writeln!(f, "pub mod events_ttrpc;").unwrap();
|
||||
}
|
||||
|
||||
#[cfg(feature = "generate_bindings")]
|
||||
fn codegen(path: impl AsRef<Path>, inputs: impl IntoIterator<Item = impl AsRef<Path>>) {
|
||||
let path = path.as_ref();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
# Auto generated modules, don't check in
|
||||
events/
|
||||
shim/
|
||||
|
|
@ -0,0 +1,968 @@
|
|||
// This file is generated by rust-protobuf 2.25.2. Do not edit
|
||||
// @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_imports)]
|
||||
#![allow(unused_results)]
|
||||
//! 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_2_25_2;
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct ContainerCreate {
|
||||
// message fields
|
||||
pub id: ::std::string::String,
|
||||
pub image: ::std::string::String,
|
||||
pub runtime: ::protobuf::SingularPtrField<ContainerCreate_Runtime>,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a ContainerCreate {
|
||||
fn default() -> &'a ContainerCreate {
|
||||
<ContainerCreate as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
impl ContainerCreate {
|
||||
pub fn new() -> ContainerCreate {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
// string id = 1;
|
||||
|
||||
|
||||
pub fn get_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 get_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 get_runtime(&self) -> &ContainerCreate_Runtime {
|
||||
self.runtime.as_ref().unwrap_or_else(|| <ContainerCreate_Runtime as ::protobuf::Message>::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: ContainerCreate_Runtime) {
|
||||
self.runtime = ::protobuf::SingularPtrField::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 ContainerCreate_Runtime {
|
||||
if self.runtime.is_none() {
|
||||
self.runtime.set_default();
|
||||
}
|
||||
self.runtime.as_mut().unwrap()
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_runtime(&mut self) -> ContainerCreate_Runtime {
|
||||
self.runtime.take().unwrap_or_else(|| ContainerCreate_Runtime::new())
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for ContainerCreate {
|
||||
fn is_initialized(&self) -> bool {
|
||||
for v in &self.runtime {
|
||||
if !v.is_initialized() {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
while !is.eof()? {
|
||||
let (field_number, wire_type) = is.read_tag_unpack()?;
|
||||
match field_number {
|
||||
1 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.id)?;
|
||||
},
|
||||
2 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.image)?;
|
||||
},
|
||||
3 => {
|
||||
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.runtime)?;
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
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(ref v) = self.runtime.as_ref() {
|
||||
let len = v.compute_size();
|
||||
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
|
||||
}
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
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(ref v) = self.runtime.as_ref() {
|
||||
os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
|
||||
os.write_raw_varint32(v.get_cached_size())?;
|
||||
v.write_to_with_cached_sizes(os)?;
|
||||
}
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
}
|
||||
|
||||
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
|
||||
&self.unknown_fields
|
||||
}
|
||||
|
||||
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
|
||||
&mut self.unknown_fields
|
||||
}
|
||||
|
||||
fn as_any(&self) -> &dyn (::std::any::Any) {
|
||||
self as &dyn (::std::any::Any)
|
||||
}
|
||||
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
|
||||
self as &mut dyn (::std::any::Any)
|
||||
}
|
||||
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
|
||||
self
|
||||
}
|
||||
|
||||
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> ContainerCreate {
|
||||
ContainerCreate::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
|
||||
descriptor.get(|| {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"id",
|
||||
|m: &ContainerCreate| { &m.id },
|
||||
|m: &mut ContainerCreate| { &mut m.id },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"image",
|
||||
|m: &ContainerCreate| { &m.image },
|
||||
|m: &mut ContainerCreate| { &mut m.image },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<ContainerCreate_Runtime>>(
|
||||
"runtime",
|
||||
|m: &ContainerCreate| { &m.runtime },
|
||||
|m: &mut ContainerCreate| { &mut m.runtime },
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<ContainerCreate>(
|
||||
"ContainerCreate",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static ContainerCreate {
|
||||
static instance: ::protobuf::rt::LazyV2<ContainerCreate> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(ContainerCreate::new)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for ContainerCreate {
|
||||
fn clear(&mut self) {
|
||||
self.id.clear();
|
||||
self.image.clear();
|
||||
self.runtime.clear();
|
||||
self.unknown_fields.clear();
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug 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 {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct ContainerCreate_Runtime {
|
||||
// message fields
|
||||
pub name: ::std::string::String,
|
||||
pub options: ::protobuf::SingularPtrField<::protobuf::well_known_types::Any>,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a ContainerCreate_Runtime {
|
||||
fn default() -> &'a ContainerCreate_Runtime {
|
||||
<ContainerCreate_Runtime as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
impl ContainerCreate_Runtime {
|
||||
pub fn new() -> ContainerCreate_Runtime {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
// string name = 1;
|
||||
|
||||
|
||||
pub fn get_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 get_options(&self) -> &::protobuf::well_known_types::Any {
|
||||
self.options.as_ref().unwrap_or_else(|| <::protobuf::well_known_types::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) {
|
||||
self.options = ::protobuf::SingularPtrField::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 {
|
||||
if self.options.is_none() {
|
||||
self.options.set_default();
|
||||
}
|
||||
self.options.as_mut().unwrap()
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_options(&mut self) -> ::protobuf::well_known_types::Any {
|
||||
self.options.take().unwrap_or_else(|| ::protobuf::well_known_types::Any::new())
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for ContainerCreate_Runtime {
|
||||
fn is_initialized(&self) -> bool {
|
||||
for v in &self.options {
|
||||
if !v.is_initialized() {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
while !is.eof()? {
|
||||
let (field_number, wire_type) = is.read_tag_unpack()?;
|
||||
match field_number {
|
||||
1 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
|
||||
},
|
||||
2 => {
|
||||
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.options)?;
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
let mut my_size = 0;
|
||||
if !self.name.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(1, &self.name);
|
||||
}
|
||||
if let Some(ref v) = self.options.as_ref() {
|
||||
let len = v.compute_size();
|
||||
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
|
||||
}
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
if !self.name.is_empty() {
|
||||
os.write_string(1, &self.name)?;
|
||||
}
|
||||
if let Some(ref v) = self.options.as_ref() {
|
||||
os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
|
||||
os.write_raw_varint32(v.get_cached_size())?;
|
||||
v.write_to_with_cached_sizes(os)?;
|
||||
}
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
}
|
||||
|
||||
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
|
||||
&self.unknown_fields
|
||||
}
|
||||
|
||||
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
|
||||
&mut self.unknown_fields
|
||||
}
|
||||
|
||||
fn as_any(&self) -> &dyn (::std::any::Any) {
|
||||
self as &dyn (::std::any::Any)
|
||||
}
|
||||
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
|
||||
self as &mut dyn (::std::any::Any)
|
||||
}
|
||||
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
|
||||
self
|
||||
}
|
||||
|
||||
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> ContainerCreate_Runtime {
|
||||
ContainerCreate_Runtime::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
|
||||
descriptor.get(|| {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"name",
|
||||
|m: &ContainerCreate_Runtime| { &m.name },
|
||||
|m: &mut ContainerCreate_Runtime| { &mut m.name },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Any>>(
|
||||
"options",
|
||||
|m: &ContainerCreate_Runtime| { &m.options },
|
||||
|m: &mut ContainerCreate_Runtime| { &mut m.options },
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<ContainerCreate_Runtime>(
|
||||
"ContainerCreate.Runtime",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static ContainerCreate_Runtime {
|
||||
static instance: ::protobuf::rt::LazyV2<ContainerCreate_Runtime> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(ContainerCreate_Runtime::new)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for ContainerCreate_Runtime {
|
||||
fn clear(&mut self) {
|
||||
self.name.clear();
|
||||
self.options.clear();
|
||||
self.unknown_fields.clear();
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for ContainerCreate_Runtime {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
||||
::protobuf::text_format::fmt(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for ContainerCreate_Runtime {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct ContainerUpdate {
|
||||
// message fields
|
||||
pub id: ::std::string::String,
|
||||
pub image: ::std::string::String,
|
||||
pub labels: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
||||
pub snapshot_key: ::std::string::String,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a ContainerUpdate {
|
||||
fn default() -> &'a ContainerUpdate {
|
||||
<ContainerUpdate as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
impl ContainerUpdate {
|
||||
pub fn new() -> ContainerUpdate {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
// string id = 1;
|
||||
|
||||
|
||||
pub fn get_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 get_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.labels_MapEntry labels = 3;
|
||||
|
||||
|
||||
pub fn get_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 get_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())
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for ContainerUpdate {
|
||||
fn is_initialized(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
while !is.eof()? {
|
||||
let (field_number, wire_type) = is.read_tag_unpack()?;
|
||||
match field_number {
|
||||
1 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.id)?;
|
||||
},
|
||||
2 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.image)?;
|
||||
},
|
||||
3 => {
|
||||
::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(wire_type, is, &mut self.labels)?;
|
||||
},
|
||||
4 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.snapshot_key)?;
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
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);
|
||||
}
|
||||
my_size += ::protobuf::rt::compute_map_size::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(3, &self.labels);
|
||||
if !self.snapshot_key.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(4, &self.snapshot_key);
|
||||
}
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
if !self.id.is_empty() {
|
||||
os.write_string(1, &self.id)?;
|
||||
}
|
||||
if !self.image.is_empty() {
|
||||
os.write_string(2, &self.image)?;
|
||||
}
|
||||
::protobuf::rt::write_map_with_cached_sizes::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(3, &self.labels, os)?;
|
||||
if !self.snapshot_key.is_empty() {
|
||||
os.write_string(4, &self.snapshot_key)?;
|
||||
}
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
}
|
||||
|
||||
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
|
||||
&self.unknown_fields
|
||||
}
|
||||
|
||||
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
|
||||
&mut self.unknown_fields
|
||||
}
|
||||
|
||||
fn as_any(&self) -> &dyn (::std::any::Any) {
|
||||
self as &dyn (::std::any::Any)
|
||||
}
|
||||
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
|
||||
self as &mut dyn (::std::any::Any)
|
||||
}
|
||||
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
|
||||
self
|
||||
}
|
||||
|
||||
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> ContainerUpdate {
|
||||
ContainerUpdate::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
|
||||
descriptor.get(|| {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"id",
|
||||
|m: &ContainerUpdate| { &m.id },
|
||||
|m: &mut ContainerUpdate| { &mut m.id },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"image",
|
||||
|m: &ContainerUpdate| { &m.image },
|
||||
|m: &mut ContainerUpdate| { &mut m.image },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_map_accessor::<_, ::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(
|
||||
"labels",
|
||||
|m: &ContainerUpdate| { &m.labels },
|
||||
|m: &mut ContainerUpdate| { &mut m.labels },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"snapshot_key",
|
||||
|m: &ContainerUpdate| { &m.snapshot_key },
|
||||
|m: &mut ContainerUpdate| { &mut m.snapshot_key },
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<ContainerUpdate>(
|
||||
"ContainerUpdate",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static ContainerUpdate {
|
||||
static instance: ::protobuf::rt::LazyV2<ContainerUpdate> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(ContainerUpdate::new)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for ContainerUpdate {
|
||||
fn clear(&mut self) {
|
||||
self.id.clear();
|
||||
self.image.clear();
|
||||
self.labels.clear();
|
||||
self.snapshot_key.clear();
|
||||
self.unknown_fields.clear();
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug 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 {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct ContainerDelete {
|
||||
// message fields
|
||||
pub id: ::std::string::String,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a ContainerDelete {
|
||||
fn default() -> &'a ContainerDelete {
|
||||
<ContainerDelete as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
impl ContainerDelete {
|
||||
pub fn new() -> ContainerDelete {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
// string id = 1;
|
||||
|
||||
|
||||
pub fn get_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())
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for ContainerDelete {
|
||||
fn is_initialized(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
while !is.eof()? {
|
||||
let (field_number, wire_type) = is.read_tag_unpack()?;
|
||||
match field_number {
|
||||
1 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.id)?;
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
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.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
if !self.id.is_empty() {
|
||||
os.write_string(1, &self.id)?;
|
||||
}
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
}
|
||||
|
||||
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
|
||||
&self.unknown_fields
|
||||
}
|
||||
|
||||
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
|
||||
&mut self.unknown_fields
|
||||
}
|
||||
|
||||
fn as_any(&self) -> &dyn (::std::any::Any) {
|
||||
self as &dyn (::std::any::Any)
|
||||
}
|
||||
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
|
||||
self as &mut dyn (::std::any::Any)
|
||||
}
|
||||
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
|
||||
self
|
||||
}
|
||||
|
||||
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> ContainerDelete {
|
||||
ContainerDelete::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
|
||||
descriptor.get(|| {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"id",
|
||||
|m: &ContainerDelete| { &m.id },
|
||||
|m: &mut ContainerDelete| { &mut m.id },
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<ContainerDelete>(
|
||||
"ContainerDelete",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static ContainerDelete {
|
||||
static instance: ::protobuf::rt::LazyV2<ContainerDelete> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(ContainerDelete::new)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for ContainerDelete {
|
||||
fn clear(&mut self) {
|
||||
self.id.clear();
|
||||
self.unknown_fields.clear();
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug 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 {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
}
|
||||
|
||||
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\"\xda\x01\n\x0fContainerCreate\x12\x10\n\x02id\x18\x01\x20\
|
||||
\x01(\tR\x02idB\0\x12\x16\n\x05image\x18\x02\x20\x01(\tR\x05imageB\0\x12\
|
||||
F\n\x07runtime\x18\x03\x20\x01(\x0b2*.containerd.events.ContainerCreate.\
|
||||
RuntimeR\x07runtimeB\0\x1aS\n\x07Runtime\x12\x14\n\x04name\x18\x01\x20\
|
||||
\x01(\tR\x04nameB\0\x120\n\x07options\x18\x02\x20\x01(\x0b2\x14.google.p\
|
||||
rotobuf.AnyR\x07optionsB\0:\0:\0\"\xeb\x01\n\x0fContainerUpdate\x12\x10\
|
||||
\n\x02id\x18\x01\x20\x01(\tR\x02idB\0\x12\x16\n\x05image\x18\x02\x20\x01\
|
||||
(\tR\x05imageB\0\x12L\n\x06labels\x18\x03\x20\x03(\x0b22.containerd.even\
|
||||
ts.ContainerUpdate.labels_MapEntryR\x06labelsB\0\x12#\n\x0csnapshot_key\
|
||||
\x18\x04\x20\x01(\tR\x0bsnapshotKeyB\0\x1a9\n\x0flabels_MapEntry\x12\x0e\
|
||||
\n\x03key\x18\x01(\tR\x03key\x12\x12\n\x05value\x18\x02(\tR\x05value:\
|
||||
\x028\x01:\0\"%\n\x0fContainerDelete\x12\x10\n\x02id\x18\x01\x20\x01(\tR\
|
||||
\x02idB\0:\0B\x04\xa0\xf4\x1e\x01b\x06proto3\
|
||||
";
|
||||
|
||||
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
|
||||
|
||||
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
|
||||
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
|
||||
}
|
||||
|
||||
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
|
||||
file_descriptor_proto_lazy.get(|| {
|
||||
parse_descriptor_proto()
|
||||
})
|
||||
}
|
||||
|
|
@ -0,0 +1,204 @@
|
|||
// This file is generated by rust-protobuf 2.25.2. Do not edit
|
||||
// @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_imports)]
|
||||
#![allow(unused_results)]
|
||||
//! 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_2_25_2;
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct ContentDelete {
|
||||
// message fields
|
||||
pub digest: ::std::string::String,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a ContentDelete {
|
||||
fn default() -> &'a ContentDelete {
|
||||
<ContentDelete as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
impl ContentDelete {
|
||||
pub fn new() -> ContentDelete {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
// string digest = 1;
|
||||
|
||||
|
||||
pub fn get_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())
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for ContentDelete {
|
||||
fn is_initialized(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
while !is.eof()? {
|
||||
let (field_number, wire_type) = is.read_tag_unpack()?;
|
||||
match field_number {
|
||||
1 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.digest)?;
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
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.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
if !self.digest.is_empty() {
|
||||
os.write_string(1, &self.digest)?;
|
||||
}
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
}
|
||||
|
||||
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
|
||||
&self.unknown_fields
|
||||
}
|
||||
|
||||
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
|
||||
&mut self.unknown_fields
|
||||
}
|
||||
|
||||
fn as_any(&self) -> &dyn (::std::any::Any) {
|
||||
self as &dyn (::std::any::Any)
|
||||
}
|
||||
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
|
||||
self as &mut dyn (::std::any::Any)
|
||||
}
|
||||
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
|
||||
self
|
||||
}
|
||||
|
||||
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> ContentDelete {
|
||||
ContentDelete::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
|
||||
descriptor.get(|| {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"digest",
|
||||
|m: &ContentDelete| { &m.digest },
|
||||
|m: &mut ContentDelete| { &mut m.digest },
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<ContentDelete>(
|
||||
"ContentDelete",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static ContentDelete {
|
||||
static instance: ::protobuf::rt::LazyV2<ContentDelete> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(ContentDelete::new)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for ContentDelete {
|
||||
fn clear(&mut self) {
|
||||
self.digest.clear();
|
||||
self.unknown_fields.clear();
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug 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 {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
}
|
||||
|
||||
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\0:\0B\x04\xa0\xf4\x1e\x01b\x06pr\
|
||||
oto3\
|
||||
";
|
||||
|
||||
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
|
||||
|
||||
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
|
||||
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
|
||||
}
|
||||
|
||||
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
|
||||
file_descriptor_proto_lazy.get(|| {
|
||||
parse_descriptor_proto()
|
||||
})
|
||||
}
|
||||
|
|
@ -0,0 +1,603 @@
|
|||
// This file is generated by rust-protobuf 2.25.2. Do not edit
|
||||
// @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_imports)]
|
||||
#![allow(unused_results)]
|
||||
//! 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_2_25_2;
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct ImageCreate {
|
||||
// message fields
|
||||
pub name: ::std::string::String,
|
||||
pub labels: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a ImageCreate {
|
||||
fn default() -> &'a ImageCreate {
|
||||
<ImageCreate as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
impl ImageCreate {
|
||||
pub fn new() -> ImageCreate {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
// string name = 1;
|
||||
|
||||
|
||||
pub fn get_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.labels_MapEntry labels = 2;
|
||||
|
||||
|
||||
pub fn get_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())
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for ImageCreate {
|
||||
fn is_initialized(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
while !is.eof()? {
|
||||
let (field_number, wire_type) = is.read_tag_unpack()?;
|
||||
match field_number {
|
||||
1 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
|
||||
},
|
||||
2 => {
|
||||
::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(wire_type, is, &mut self.labels)?;
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
let mut my_size = 0;
|
||||
if !self.name.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(1, &self.name);
|
||||
}
|
||||
my_size += ::protobuf::rt::compute_map_size::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(2, &self.labels);
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
if !self.name.is_empty() {
|
||||
os.write_string(1, &self.name)?;
|
||||
}
|
||||
::protobuf::rt::write_map_with_cached_sizes::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(2, &self.labels, os)?;
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
}
|
||||
|
||||
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
|
||||
&self.unknown_fields
|
||||
}
|
||||
|
||||
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
|
||||
&mut self.unknown_fields
|
||||
}
|
||||
|
||||
fn as_any(&self) -> &dyn (::std::any::Any) {
|
||||
self as &dyn (::std::any::Any)
|
||||
}
|
||||
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
|
||||
self as &mut dyn (::std::any::Any)
|
||||
}
|
||||
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
|
||||
self
|
||||
}
|
||||
|
||||
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> ImageCreate {
|
||||
ImageCreate::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
|
||||
descriptor.get(|| {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"name",
|
||||
|m: &ImageCreate| { &m.name },
|
||||
|m: &mut ImageCreate| { &mut m.name },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_map_accessor::<_, ::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(
|
||||
"labels",
|
||||
|m: &ImageCreate| { &m.labels },
|
||||
|m: &mut ImageCreate| { &mut m.labels },
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<ImageCreate>(
|
||||
"ImageCreate",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static ImageCreate {
|
||||
static instance: ::protobuf::rt::LazyV2<ImageCreate> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(ImageCreate::new)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for ImageCreate {
|
||||
fn clear(&mut self) {
|
||||
self.name.clear();
|
||||
self.labels.clear();
|
||||
self.unknown_fields.clear();
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug 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 {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct ImageUpdate {
|
||||
// message fields
|
||||
pub name: ::std::string::String,
|
||||
pub labels: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a ImageUpdate {
|
||||
fn default() -> &'a ImageUpdate {
|
||||
<ImageUpdate as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
impl ImageUpdate {
|
||||
pub fn new() -> ImageUpdate {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
// string name = 1;
|
||||
|
||||
|
||||
pub fn get_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.labels_MapEntry labels = 2;
|
||||
|
||||
|
||||
pub fn get_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())
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for ImageUpdate {
|
||||
fn is_initialized(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
while !is.eof()? {
|
||||
let (field_number, wire_type) = is.read_tag_unpack()?;
|
||||
match field_number {
|
||||
1 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
|
||||
},
|
||||
2 => {
|
||||
::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(wire_type, is, &mut self.labels)?;
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
let mut my_size = 0;
|
||||
if !self.name.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(1, &self.name);
|
||||
}
|
||||
my_size += ::protobuf::rt::compute_map_size::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(2, &self.labels);
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
if !self.name.is_empty() {
|
||||
os.write_string(1, &self.name)?;
|
||||
}
|
||||
::protobuf::rt::write_map_with_cached_sizes::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(2, &self.labels, os)?;
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
}
|
||||
|
||||
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
|
||||
&self.unknown_fields
|
||||
}
|
||||
|
||||
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
|
||||
&mut self.unknown_fields
|
||||
}
|
||||
|
||||
fn as_any(&self) -> &dyn (::std::any::Any) {
|
||||
self as &dyn (::std::any::Any)
|
||||
}
|
||||
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
|
||||
self as &mut dyn (::std::any::Any)
|
||||
}
|
||||
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
|
||||
self
|
||||
}
|
||||
|
||||
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> ImageUpdate {
|
||||
ImageUpdate::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
|
||||
descriptor.get(|| {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"name",
|
||||
|m: &ImageUpdate| { &m.name },
|
||||
|m: &mut ImageUpdate| { &mut m.name },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_map_accessor::<_, ::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(
|
||||
"labels",
|
||||
|m: &ImageUpdate| { &m.labels },
|
||||
|m: &mut ImageUpdate| { &mut m.labels },
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<ImageUpdate>(
|
||||
"ImageUpdate",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static ImageUpdate {
|
||||
static instance: ::protobuf::rt::LazyV2<ImageUpdate> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(ImageUpdate::new)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for ImageUpdate {
|
||||
fn clear(&mut self) {
|
||||
self.name.clear();
|
||||
self.labels.clear();
|
||||
self.unknown_fields.clear();
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug 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 {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct ImageDelete {
|
||||
// message fields
|
||||
pub name: ::std::string::String,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a ImageDelete {
|
||||
fn default() -> &'a ImageDelete {
|
||||
<ImageDelete as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
impl ImageDelete {
|
||||
pub fn new() -> ImageDelete {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
// string name = 1;
|
||||
|
||||
|
||||
pub fn get_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())
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for ImageDelete {
|
||||
fn is_initialized(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
while !is.eof()? {
|
||||
let (field_number, wire_type) = is.read_tag_unpack()?;
|
||||
match field_number {
|
||||
1 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
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.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
if !self.name.is_empty() {
|
||||
os.write_string(1, &self.name)?;
|
||||
}
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
}
|
||||
|
||||
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
|
||||
&self.unknown_fields
|
||||
}
|
||||
|
||||
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
|
||||
&mut self.unknown_fields
|
||||
}
|
||||
|
||||
fn as_any(&self) -> &dyn (::std::any::Any) {
|
||||
self as &dyn (::std::any::Any)
|
||||
}
|
||||
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
|
||||
self as &mut dyn (::std::any::Any)
|
||||
}
|
||||
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
|
||||
self
|
||||
}
|
||||
|
||||
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> ImageDelete {
|
||||
ImageDelete::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
|
||||
descriptor.get(|| {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"name",
|
||||
|m: &ImageDelete| { &m.name },
|
||||
|m: &mut ImageDelete| { &mut m.name },
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<ImageDelete>(
|
||||
"ImageDelete",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static ImageDelete {
|
||||
static instance: ::protobuf::rt::LazyV2<ImageDelete> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(ImageDelete::new)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for ImageDelete {
|
||||
fn clear(&mut self) {
|
||||
self.name.clear();
|
||||
self.unknown_fields.clear();
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug 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 {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
}
|
||||
|
||||
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\"\xb6\x01\n\x0bImageCreate\x12\x14\n\x04name\x18\
|
||||
\x01\x20\x01(\tR\x04nameB\0\x12T\n\x06labels\x18\x02\x20\x03(\x0b2:.cont\
|
||||
ainerd.services.images.v1.ImageCreate.labels_MapEntryR\x06labelsB\0\x1a9\
|
||||
\n\x0flabels_MapEntry\x12\x0e\n\x03key\x18\x01(\tR\x03key\x12\x12\n\x05v\
|
||||
alue\x18\x02(\tR\x05value:\x028\x01:\0\"\xb6\x01\n\x0bImageUpdate\x12\
|
||||
\x14\n\x04name\x18\x01\x20\x01(\tR\x04nameB\0\x12T\n\x06labels\x18\x02\
|
||||
\x20\x03(\x0b2:.containerd.services.images.v1.ImageUpdate.labels_MapEntr\
|
||||
yR\x06labelsB\0\x1a9\n\x0flabels_MapEntry\x12\x0e\n\x03key\x18\x01(\tR\
|
||||
\x03key\x12\x12\n\x05value\x18\x02(\tR\x05value:\x028\x01:\0\"%\n\x0bIma\
|
||||
geDelete\x12\x14\n\x04name\x18\x01\x20\x01(\tR\x04nameB\0:\0B\x04\xa0\
|
||||
\xf4\x1e\x01b\x06proto3\
|
||||
";
|
||||
|
||||
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
|
||||
|
||||
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
|
||||
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
|
||||
}
|
||||
|
||||
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
|
||||
file_descriptor_proto_lazy.get(|| {
|
||||
parse_descriptor_proto()
|
||||
})
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
// @generated
|
||||
|
||||
pub mod container;
|
||||
pub mod content;
|
||||
pub mod image;
|
||||
pub mod namespace;
|
||||
pub mod snapshot;
|
||||
pub mod task;
|
||||
pub mod mount;
|
||||
|
|
@ -0,0 +1,328 @@
|
|||
// This file is generated by rust-protobuf 2.25.2. Do not edit
|
||||
// @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_imports)]
|
||||
#![allow(unused_results)]
|
||||
//! 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_2_25_2;
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct Mount {
|
||||
// message fields
|
||||
pub field_type: ::std::string::String,
|
||||
pub source: ::std::string::String,
|
||||
pub target: ::std::string::String,
|
||||
pub options: ::protobuf::RepeatedField<::std::string::String>,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a Mount {
|
||||
fn default() -> &'a Mount {
|
||||
<Mount as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
impl Mount {
|
||||
pub fn new() -> Mount {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
// string type = 1;
|
||||
|
||||
|
||||
pub fn get_field_type(&self) -> &str {
|
||||
&self.field_type
|
||||
}
|
||||
pub fn clear_field_type(&mut self) {
|
||||
self.field_type.clear();
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_field_type(&mut self, v: ::std::string::String) {
|
||||
self.field_type = v;
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
// If field is not initialized, it is initialized with default value first.
|
||||
pub fn mut_field_type(&mut self) -> &mut ::std::string::String {
|
||||
&mut self.field_type
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_field_type(&mut self) -> ::std::string::String {
|
||||
::std::mem::replace(&mut self.field_type, ::std::string::String::new())
|
||||
}
|
||||
|
||||
// string source = 2;
|
||||
|
||||
|
||||
pub fn get_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 get_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 get_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: ::protobuf::RepeatedField<::std::string::String>) {
|
||||
self.options = v;
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
pub fn mut_options(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> {
|
||||
&mut self.options
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_options(&mut self) -> ::protobuf::RepeatedField<::std::string::String> {
|
||||
::std::mem::replace(&mut self.options, ::protobuf::RepeatedField::new())
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for Mount {
|
||||
fn is_initialized(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
while !is.eof()? {
|
||||
let (field_number, wire_type) = is.read_tag_unpack()?;
|
||||
match field_number {
|
||||
1 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.field_type)?;
|
||||
},
|
||||
2 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.source)?;
|
||||
},
|
||||
3 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.target)?;
|
||||
},
|
||||
4 => {
|
||||
::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.options)?;
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
let mut my_size = 0;
|
||||
if !self.field_type.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(1, &self.field_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.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
if !self.field_type.is_empty() {
|
||||
os.write_string(1, &self.field_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.get_unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
}
|
||||
|
||||
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
|
||||
&self.unknown_fields
|
||||
}
|
||||
|
||||
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
|
||||
&mut self.unknown_fields
|
||||
}
|
||||
|
||||
fn as_any(&self) -> &dyn (::std::any::Any) {
|
||||
self as &dyn (::std::any::Any)
|
||||
}
|
||||
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
|
||||
self as &mut dyn (::std::any::Any)
|
||||
}
|
||||
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
|
||||
self
|
||||
}
|
||||
|
||||
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> Mount {
|
||||
Mount::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
|
||||
descriptor.get(|| {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"type",
|
||||
|m: &Mount| { &m.field_type },
|
||||
|m: &mut Mount| { &mut m.field_type },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"source",
|
||||
|m: &Mount| { &m.source },
|
||||
|m: &mut Mount| { &mut m.source },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"target",
|
||||
|m: &Mount| { &m.target },
|
||||
|m: &mut Mount| { &mut m.target },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"options",
|
||||
|m: &Mount| { &m.options },
|
||||
|m: &mut Mount| { &mut m.options },
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<Mount>(
|
||||
"Mount",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static Mount {
|
||||
static instance: ::protobuf::rt::LazyV2<Mount> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(Mount::new)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for Mount {
|
||||
fn clear(&mut self) {
|
||||
self.field_type.clear();
|
||||
self.source.clear();
|
||||
self.target.clear();
|
||||
self.options.clear();
|
||||
self.unknown_fields.clear();
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug 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 {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
}
|
||||
|
||||
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\"o\n\x05Mount\x12\x14\n\x04type\
|
||||
\x18\x01\x20\x01(\tR\x04typeB\0\x12\x18\n\x06source\x18\x02\x20\x01(\tR\
|
||||
\x06sourceB\0\x12\x18\n\x06target\x18\x03\x20\x01(\tR\x06targetB\0\x12\
|
||||
\x1a\n\x07options\x18\x04\x20\x03(\tR\x07optionsB\0:\0B\0b\x06proto3\
|
||||
";
|
||||
|
||||
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
|
||||
|
||||
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
|
||||
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
|
||||
}
|
||||
|
||||
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
|
||||
file_descriptor_proto_lazy.get(|| {
|
||||
parse_descriptor_proto()
|
||||
})
|
||||
}
|
||||
|
|
@ -0,0 +1,603 @@
|
|||
// This file is generated by rust-protobuf 2.25.2. Do not edit
|
||||
// @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_imports)]
|
||||
#![allow(unused_results)]
|
||||
//! 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_2_25_2;
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct NamespaceCreate {
|
||||
// message fields
|
||||
pub name: ::std::string::String,
|
||||
pub labels: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a NamespaceCreate {
|
||||
fn default() -> &'a NamespaceCreate {
|
||||
<NamespaceCreate as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
impl NamespaceCreate {
|
||||
pub fn new() -> NamespaceCreate {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
// string name = 1;
|
||||
|
||||
|
||||
pub fn get_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.labels_MapEntry labels = 2;
|
||||
|
||||
|
||||
pub fn get_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())
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for NamespaceCreate {
|
||||
fn is_initialized(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
while !is.eof()? {
|
||||
let (field_number, wire_type) = is.read_tag_unpack()?;
|
||||
match field_number {
|
||||
1 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
|
||||
},
|
||||
2 => {
|
||||
::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(wire_type, is, &mut self.labels)?;
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
let mut my_size = 0;
|
||||
if !self.name.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(1, &self.name);
|
||||
}
|
||||
my_size += ::protobuf::rt::compute_map_size::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(2, &self.labels);
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
if !self.name.is_empty() {
|
||||
os.write_string(1, &self.name)?;
|
||||
}
|
||||
::protobuf::rt::write_map_with_cached_sizes::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(2, &self.labels, os)?;
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
}
|
||||
|
||||
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
|
||||
&self.unknown_fields
|
||||
}
|
||||
|
||||
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
|
||||
&mut self.unknown_fields
|
||||
}
|
||||
|
||||
fn as_any(&self) -> &dyn (::std::any::Any) {
|
||||
self as &dyn (::std::any::Any)
|
||||
}
|
||||
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
|
||||
self as &mut dyn (::std::any::Any)
|
||||
}
|
||||
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
|
||||
self
|
||||
}
|
||||
|
||||
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> NamespaceCreate {
|
||||
NamespaceCreate::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
|
||||
descriptor.get(|| {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"name",
|
||||
|m: &NamespaceCreate| { &m.name },
|
||||
|m: &mut NamespaceCreate| { &mut m.name },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_map_accessor::<_, ::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(
|
||||
"labels",
|
||||
|m: &NamespaceCreate| { &m.labels },
|
||||
|m: &mut NamespaceCreate| { &mut m.labels },
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<NamespaceCreate>(
|
||||
"NamespaceCreate",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static NamespaceCreate {
|
||||
static instance: ::protobuf::rt::LazyV2<NamespaceCreate> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(NamespaceCreate::new)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for NamespaceCreate {
|
||||
fn clear(&mut self) {
|
||||
self.name.clear();
|
||||
self.labels.clear();
|
||||
self.unknown_fields.clear();
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug 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 {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct NamespaceUpdate {
|
||||
// message fields
|
||||
pub name: ::std::string::String,
|
||||
pub labels: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a NamespaceUpdate {
|
||||
fn default() -> &'a NamespaceUpdate {
|
||||
<NamespaceUpdate as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
impl NamespaceUpdate {
|
||||
pub fn new() -> NamespaceUpdate {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
// string name = 1;
|
||||
|
||||
|
||||
pub fn get_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.labels_MapEntry labels = 2;
|
||||
|
||||
|
||||
pub fn get_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())
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for NamespaceUpdate {
|
||||
fn is_initialized(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
while !is.eof()? {
|
||||
let (field_number, wire_type) = is.read_tag_unpack()?;
|
||||
match field_number {
|
||||
1 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
|
||||
},
|
||||
2 => {
|
||||
::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(wire_type, is, &mut self.labels)?;
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
let mut my_size = 0;
|
||||
if !self.name.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(1, &self.name);
|
||||
}
|
||||
my_size += ::protobuf::rt::compute_map_size::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(2, &self.labels);
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
if !self.name.is_empty() {
|
||||
os.write_string(1, &self.name)?;
|
||||
}
|
||||
::protobuf::rt::write_map_with_cached_sizes::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(2, &self.labels, os)?;
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
}
|
||||
|
||||
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
|
||||
&self.unknown_fields
|
||||
}
|
||||
|
||||
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
|
||||
&mut self.unknown_fields
|
||||
}
|
||||
|
||||
fn as_any(&self) -> &dyn (::std::any::Any) {
|
||||
self as &dyn (::std::any::Any)
|
||||
}
|
||||
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
|
||||
self as &mut dyn (::std::any::Any)
|
||||
}
|
||||
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
|
||||
self
|
||||
}
|
||||
|
||||
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> NamespaceUpdate {
|
||||
NamespaceUpdate::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
|
||||
descriptor.get(|| {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"name",
|
||||
|m: &NamespaceUpdate| { &m.name },
|
||||
|m: &mut NamespaceUpdate| { &mut m.name },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_map_accessor::<_, ::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(
|
||||
"labels",
|
||||
|m: &NamespaceUpdate| { &m.labels },
|
||||
|m: &mut NamespaceUpdate| { &mut m.labels },
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<NamespaceUpdate>(
|
||||
"NamespaceUpdate",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static NamespaceUpdate {
|
||||
static instance: ::protobuf::rt::LazyV2<NamespaceUpdate> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(NamespaceUpdate::new)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for NamespaceUpdate {
|
||||
fn clear(&mut self) {
|
||||
self.name.clear();
|
||||
self.labels.clear();
|
||||
self.unknown_fields.clear();
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug 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 {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct NamespaceDelete {
|
||||
// message fields
|
||||
pub name: ::std::string::String,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a NamespaceDelete {
|
||||
fn default() -> &'a NamespaceDelete {
|
||||
<NamespaceDelete as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
impl NamespaceDelete {
|
||||
pub fn new() -> NamespaceDelete {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
// string name = 1;
|
||||
|
||||
|
||||
pub fn get_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())
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for NamespaceDelete {
|
||||
fn is_initialized(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
while !is.eof()? {
|
||||
let (field_number, wire_type) = is.read_tag_unpack()?;
|
||||
match field_number {
|
||||
1 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
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.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
if !self.name.is_empty() {
|
||||
os.write_string(1, &self.name)?;
|
||||
}
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
}
|
||||
|
||||
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
|
||||
&self.unknown_fields
|
||||
}
|
||||
|
||||
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
|
||||
&mut self.unknown_fields
|
||||
}
|
||||
|
||||
fn as_any(&self) -> &dyn (::std::any::Any) {
|
||||
self as &dyn (::std::any::Any)
|
||||
}
|
||||
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
|
||||
self as &mut dyn (::std::any::Any)
|
||||
}
|
||||
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
|
||||
self
|
||||
}
|
||||
|
||||
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> NamespaceDelete {
|
||||
NamespaceDelete::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
|
||||
descriptor.get(|| {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"name",
|
||||
|m: &NamespaceDelete| { &m.name },
|
||||
|m: &mut NamespaceDelete| { &mut m.name },
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<NamespaceDelete>(
|
||||
"NamespaceDelete",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static NamespaceDelete {
|
||||
static instance: ::protobuf::rt::LazyV2<NamespaceDelete> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(NamespaceDelete::new)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for NamespaceDelete {
|
||||
fn clear(&mut self) {
|
||||
self.name.clear();
|
||||
self.unknown_fields.clear();
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug 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 {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
}
|
||||
|
||||
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\"\xb2\x01\n\x0fNamespac\
|
||||
eCreate\x12\x14\n\x04name\x18\x01\x20\x01(\tR\x04nameB\0\x12L\n\x06label\
|
||||
s\x18\x02\x20\x03(\x0b22.containerd.events.NamespaceCreate.labels_MapEnt\
|
||||
ryR\x06labelsB\0\x1a9\n\x0flabels_MapEntry\x12\x0e\n\x03key\x18\x01(\tR\
|
||||
\x03key\x12\x12\n\x05value\x18\x02(\tR\x05value:\x028\x01:\0\"\xb2\x01\n\
|
||||
\x0fNamespaceUpdate\x12\x14\n\x04name\x18\x01\x20\x01(\tR\x04nameB\0\x12\
|
||||
L\n\x06labels\x18\x02\x20\x03(\x0b22.containerd.events.NamespaceUpdate.l\
|
||||
abels_MapEntryR\x06labelsB\0\x1a9\n\x0flabels_MapEntry\x12\x0e\n\x03key\
|
||||
\x18\x01(\tR\x03key\x12\x12\n\x05value\x18\x02(\tR\x05value:\x028\x01:\0\
|
||||
\")\n\x0fNamespaceDelete\x12\x14\n\x04name\x18\x01\x20\x01(\tR\x04nameB\
|
||||
\0:\0B\x04\xa0\xf4\x1e\x01b\x06proto3\
|
||||
";
|
||||
|
||||
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
|
||||
|
||||
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
|
||||
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
|
||||
}
|
||||
|
||||
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
|
||||
file_descriptor_proto_lazy.get(|| {
|
||||
parse_descriptor_proto()
|
||||
})
|
||||
}
|
||||
|
|
@ -0,0 +1,608 @@
|
|||
// This file is generated by rust-protobuf 2.25.2. Do not edit
|
||||
// @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_imports)]
|
||||
#![allow(unused_results)]
|
||||
//! 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_2_25_2;
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct SnapshotPrepare {
|
||||
// message fields
|
||||
pub key: ::std::string::String,
|
||||
pub parent: ::std::string::String,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a SnapshotPrepare {
|
||||
fn default() -> &'a SnapshotPrepare {
|
||||
<SnapshotPrepare as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
impl SnapshotPrepare {
|
||||
pub fn new() -> SnapshotPrepare {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
// string key = 1;
|
||||
|
||||
|
||||
pub fn get_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 get_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())
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for SnapshotPrepare {
|
||||
fn is_initialized(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
while !is.eof()? {
|
||||
let (field_number, wire_type) = is.read_tag_unpack()?;
|
||||
match field_number {
|
||||
1 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.key)?;
|
||||
},
|
||||
2 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.parent)?;
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
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.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
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.get_unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
}
|
||||
|
||||
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
|
||||
&self.unknown_fields
|
||||
}
|
||||
|
||||
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
|
||||
&mut self.unknown_fields
|
||||
}
|
||||
|
||||
fn as_any(&self) -> &dyn (::std::any::Any) {
|
||||
self as &dyn (::std::any::Any)
|
||||
}
|
||||
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
|
||||
self as &mut dyn (::std::any::Any)
|
||||
}
|
||||
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
|
||||
self
|
||||
}
|
||||
|
||||
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> SnapshotPrepare {
|
||||
SnapshotPrepare::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
|
||||
descriptor.get(|| {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"key",
|
||||
|m: &SnapshotPrepare| { &m.key },
|
||||
|m: &mut SnapshotPrepare| { &mut m.key },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"parent",
|
||||
|m: &SnapshotPrepare| { &m.parent },
|
||||
|m: &mut SnapshotPrepare| { &mut m.parent },
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<SnapshotPrepare>(
|
||||
"SnapshotPrepare",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static SnapshotPrepare {
|
||||
static instance: ::protobuf::rt::LazyV2<SnapshotPrepare> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(SnapshotPrepare::new)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for SnapshotPrepare {
|
||||
fn clear(&mut self) {
|
||||
self.key.clear();
|
||||
self.parent.clear();
|
||||
self.unknown_fields.clear();
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug 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 {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct SnapshotCommit {
|
||||
// message fields
|
||||
pub key: ::std::string::String,
|
||||
pub name: ::std::string::String,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a SnapshotCommit {
|
||||
fn default() -> &'a SnapshotCommit {
|
||||
<SnapshotCommit as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
impl SnapshotCommit {
|
||||
pub fn new() -> SnapshotCommit {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
// string key = 1;
|
||||
|
||||
|
||||
pub fn get_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 get_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())
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for SnapshotCommit {
|
||||
fn is_initialized(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
while !is.eof()? {
|
||||
let (field_number, wire_type) = is.read_tag_unpack()?;
|
||||
match field_number {
|
||||
1 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.key)?;
|
||||
},
|
||||
2 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
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.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
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.get_unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
}
|
||||
|
||||
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
|
||||
&self.unknown_fields
|
||||
}
|
||||
|
||||
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
|
||||
&mut self.unknown_fields
|
||||
}
|
||||
|
||||
fn as_any(&self) -> &dyn (::std::any::Any) {
|
||||
self as &dyn (::std::any::Any)
|
||||
}
|
||||
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
|
||||
self as &mut dyn (::std::any::Any)
|
||||
}
|
||||
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
|
||||
self
|
||||
}
|
||||
|
||||
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> SnapshotCommit {
|
||||
SnapshotCommit::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
|
||||
descriptor.get(|| {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"key",
|
||||
|m: &SnapshotCommit| { &m.key },
|
||||
|m: &mut SnapshotCommit| { &mut m.key },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"name",
|
||||
|m: &SnapshotCommit| { &m.name },
|
||||
|m: &mut SnapshotCommit| { &mut m.name },
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<SnapshotCommit>(
|
||||
"SnapshotCommit",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static SnapshotCommit {
|
||||
static instance: ::protobuf::rt::LazyV2<SnapshotCommit> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(SnapshotCommit::new)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for SnapshotCommit {
|
||||
fn clear(&mut self) {
|
||||
self.key.clear();
|
||||
self.name.clear();
|
||||
self.unknown_fields.clear();
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug 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 {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct SnapshotRemove {
|
||||
// message fields
|
||||
pub key: ::std::string::String,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a SnapshotRemove {
|
||||
fn default() -> &'a SnapshotRemove {
|
||||
<SnapshotRemove as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
impl SnapshotRemove {
|
||||
pub fn new() -> SnapshotRemove {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
// string key = 1;
|
||||
|
||||
|
||||
pub fn get_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())
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for SnapshotRemove {
|
||||
fn is_initialized(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
while !is.eof()? {
|
||||
let (field_number, wire_type) = is.read_tag_unpack()?;
|
||||
match field_number {
|
||||
1 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.key)?;
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
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.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
if !self.key.is_empty() {
|
||||
os.write_string(1, &self.key)?;
|
||||
}
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
}
|
||||
|
||||
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
|
||||
&self.unknown_fields
|
||||
}
|
||||
|
||||
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
|
||||
&mut self.unknown_fields
|
||||
}
|
||||
|
||||
fn as_any(&self) -> &dyn (::std::any::Any) {
|
||||
self as &dyn (::std::any::Any)
|
||||
}
|
||||
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
|
||||
self as &mut dyn (::std::any::Any)
|
||||
}
|
||||
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
|
||||
self
|
||||
}
|
||||
|
||||
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> SnapshotRemove {
|
||||
SnapshotRemove::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
|
||||
descriptor.get(|| {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"key",
|
||||
|m: &SnapshotRemove| { &m.key },
|
||||
|m: &mut SnapshotRemove| { &mut m.key },
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<SnapshotRemove>(
|
||||
"SnapshotRemove",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static SnapshotRemove {
|
||||
static instance: ::protobuf::rt::LazyV2<SnapshotRemove> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(SnapshotRemove::new)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for SnapshotRemove {
|
||||
fn clear(&mut self) {
|
||||
self.key.clear();
|
||||
self.unknown_fields.clear();
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug 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 {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
}
|
||||
|
||||
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\"A\n\x0fSnapshotPrepare\x12\x12\n\x03key\x18\x01\x20\x01(\
|
||||
\tR\x03keyB\0\x12\x18\n\x06parent\x18\x02\x20\x01(\tR\x06parentB\0:\0\"<\
|
||||
\n\x0eSnapshotCommit\x12\x12\n\x03key\x18\x01\x20\x01(\tR\x03keyB\0\x12\
|
||||
\x14\n\x04name\x18\x02\x20\x01(\tR\x04nameB\0:\0\"&\n\x0eSnapshotRemove\
|
||||
\x12\x12\n\x03key\x18\x01\x20\x01(\tR\x03keyB\0:\0B\x04\xa0\xf4\x1e\x01b\
|
||||
\x06proto3\
|
||||
";
|
||||
|
||||
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
|
||||
|
||||
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
|
||||
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
|
||||
}
|
||||
|
||||
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
|
||||
file_descriptor_proto_lazy.get(|| {
|
||||
parse_descriptor_proto()
|
||||
})
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,157 @@
|
|||
// This file is generated by rust-protobuf 2.25.2. Do not edit
|
||||
// @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_imports)]
|
||||
#![allow(unused_results)]
|
||||
//! 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_2_25_2;
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct Empty {
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a Empty {
|
||||
fn default() -> &'a Empty {
|
||||
<Empty as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
impl Empty {
|
||||
pub fn new() -> Empty {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for Empty {
|
||||
fn is_initialized(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
while !is.eof()? {
|
||||
let (field_number, wire_type) = is.read_tag_unpack()?;
|
||||
match field_number {
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
let mut my_size = 0;
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
}
|
||||
|
||||
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
|
||||
&self.unknown_fields
|
||||
}
|
||||
|
||||
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
|
||||
&mut self.unknown_fields
|
||||
}
|
||||
|
||||
fn as_any(&self) -> &dyn (::std::any::Any) {
|
||||
self as &dyn (::std::any::Any)
|
||||
}
|
||||
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
|
||||
self as &mut dyn (::std::any::Any)
|
||||
}
|
||||
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
|
||||
self
|
||||
}
|
||||
|
||||
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> Empty {
|
||||
Empty::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
|
||||
descriptor.get(|| {
|
||||
let fields = ::std::vec::Vec::new();
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<Empty>(
|
||||
"Empty",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static Empty {
|
||||
static instance: ::protobuf::rt::LazyV2<Empty> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(Empty::new)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for Empty {
|
||||
fn clear(&mut self) {
|
||||
self.unknown_fields.clear();
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug 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 {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
}
|
||||
|
||||
static file_descriptor_proto_data: &'static [u8] = b"\
|
||||
\n\x1bgoogle/protobuf/empty.proto\x12\x0fgoogle.protobuf\"\t\n\x05Empty:\
|
||||
\0B\0b\x06proto3\
|
||||
";
|
||||
|
||||
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
|
||||
|
||||
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
|
||||
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
|
||||
}
|
||||
|
||||
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
|
||||
file_descriptor_proto_lazy.get(|| {
|
||||
parse_descriptor_proto()
|
||||
})
|
||||
}
|
||||
|
|
@ -0,0 +1,540 @@
|
|||
// This file is generated by rust-protobuf 2.25.2. Do not edit
|
||||
// @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_imports)]
|
||||
#![allow(unused_results)]
|
||||
//! 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_2_25_2;
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct ForwardRequest {
|
||||
// message fields
|
||||
pub envelope: ::protobuf::SingularPtrField<Envelope>,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a ForwardRequest {
|
||||
fn default() -> &'a ForwardRequest {
|
||||
<ForwardRequest as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
impl ForwardRequest {
|
||||
pub fn new() -> ForwardRequest {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
// .containerd.services.events.ttrpc.v1.Envelope envelope = 1;
|
||||
|
||||
|
||||
pub fn get_envelope(&self) -> &Envelope {
|
||||
self.envelope.as_ref().unwrap_or_else(|| <Envelope as ::protobuf::Message>::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::SingularPtrField::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 {
|
||||
if self.envelope.is_none() {
|
||||
self.envelope.set_default();
|
||||
}
|
||||
self.envelope.as_mut().unwrap()
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_envelope(&mut self) -> Envelope {
|
||||
self.envelope.take().unwrap_or_else(|| Envelope::new())
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for ForwardRequest {
|
||||
fn is_initialized(&self) -> bool {
|
||||
for v in &self.envelope {
|
||||
if !v.is_initialized() {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
while !is.eof()? {
|
||||
let (field_number, wire_type) = is.read_tag_unpack()?;
|
||||
match field_number {
|
||||
1 => {
|
||||
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.envelope)?;
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
let mut my_size = 0;
|
||||
if let Some(ref v) = self.envelope.as_ref() {
|
||||
let len = v.compute_size();
|
||||
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
|
||||
}
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
if let Some(ref v) = self.envelope.as_ref() {
|
||||
os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
|
||||
os.write_raw_varint32(v.get_cached_size())?;
|
||||
v.write_to_with_cached_sizes(os)?;
|
||||
}
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
}
|
||||
|
||||
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
|
||||
&self.unknown_fields
|
||||
}
|
||||
|
||||
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
|
||||
&mut self.unknown_fields
|
||||
}
|
||||
|
||||
fn as_any(&self) -> &dyn (::std::any::Any) {
|
||||
self as &dyn (::std::any::Any)
|
||||
}
|
||||
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
|
||||
self as &mut dyn (::std::any::Any)
|
||||
}
|
||||
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
|
||||
self
|
||||
}
|
||||
|
||||
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> ForwardRequest {
|
||||
ForwardRequest::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
|
||||
descriptor.get(|| {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Envelope>>(
|
||||
"envelope",
|
||||
|m: &ForwardRequest| { &m.envelope },
|
||||
|m: &mut ForwardRequest| { &mut m.envelope },
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<ForwardRequest>(
|
||||
"ForwardRequest",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static ForwardRequest {
|
||||
static instance: ::protobuf::rt::LazyV2<ForwardRequest> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(ForwardRequest::new)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for ForwardRequest {
|
||||
fn clear(&mut self) {
|
||||
self.envelope.clear();
|
||||
self.unknown_fields.clear();
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug 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 {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct Envelope {
|
||||
// message fields
|
||||
pub timestamp: ::protobuf::SingularPtrField<::protobuf::well_known_types::Timestamp>,
|
||||
pub namespace: ::std::string::String,
|
||||
pub topic: ::std::string::String,
|
||||
pub event: ::protobuf::SingularPtrField<::protobuf::well_known_types::Any>,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a Envelope {
|
||||
fn default() -> &'a Envelope {
|
||||
<Envelope as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
impl Envelope {
|
||||
pub fn new() -> Envelope {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
// .google.protobuf.Timestamp timestamp = 1;
|
||||
|
||||
|
||||
pub fn get_timestamp(&self) -> &::protobuf::well_known_types::Timestamp {
|
||||
self.timestamp.as_ref().unwrap_or_else(|| <::protobuf::well_known_types::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) {
|
||||
self.timestamp = ::protobuf::SingularPtrField::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 {
|
||||
if self.timestamp.is_none() {
|
||||
self.timestamp.set_default();
|
||||
}
|
||||
self.timestamp.as_mut().unwrap()
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_timestamp(&mut self) -> ::protobuf::well_known_types::Timestamp {
|
||||
self.timestamp.take().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::new())
|
||||
}
|
||||
|
||||
// string namespace = 2;
|
||||
|
||||
|
||||
pub fn get_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 get_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 get_event(&self) -> &::protobuf::well_known_types::Any {
|
||||
self.event.as_ref().unwrap_or_else(|| <::protobuf::well_known_types::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) {
|
||||
self.event = ::protobuf::SingularPtrField::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 {
|
||||
if self.event.is_none() {
|
||||
self.event.set_default();
|
||||
}
|
||||
self.event.as_mut().unwrap()
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_event(&mut self) -> ::protobuf::well_known_types::Any {
|
||||
self.event.take().unwrap_or_else(|| ::protobuf::well_known_types::Any::new())
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for Envelope {
|
||||
fn is_initialized(&self) -> bool {
|
||||
for v in &self.timestamp {
|
||||
if !v.is_initialized() {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
for v in &self.event {
|
||||
if !v.is_initialized() {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
while !is.eof()? {
|
||||
let (field_number, wire_type) = is.read_tag_unpack()?;
|
||||
match field_number {
|
||||
1 => {
|
||||
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.timestamp)?;
|
||||
},
|
||||
2 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.namespace)?;
|
||||
},
|
||||
3 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.topic)?;
|
||||
},
|
||||
4 => {
|
||||
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.event)?;
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
let mut my_size = 0;
|
||||
if let Some(ref v) = self.timestamp.as_ref() {
|
||||
let len = v.compute_size();
|
||||
my_size += 1 + ::protobuf::rt::compute_raw_varint32_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(ref v) = self.event.as_ref() {
|
||||
let len = v.compute_size();
|
||||
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
|
||||
}
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
if let Some(ref v) = self.timestamp.as_ref() {
|
||||
os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
|
||||
os.write_raw_varint32(v.get_cached_size())?;
|
||||
v.write_to_with_cached_sizes(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(ref v) = self.event.as_ref() {
|
||||
os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?;
|
||||
os.write_raw_varint32(v.get_cached_size())?;
|
||||
v.write_to_with_cached_sizes(os)?;
|
||||
}
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
}
|
||||
|
||||
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
|
||||
&self.unknown_fields
|
||||
}
|
||||
|
||||
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
|
||||
&mut self.unknown_fields
|
||||
}
|
||||
|
||||
fn as_any(&self) -> &dyn (::std::any::Any) {
|
||||
self as &dyn (::std::any::Any)
|
||||
}
|
||||
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
|
||||
self as &mut dyn (::std::any::Any)
|
||||
}
|
||||
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
|
||||
self
|
||||
}
|
||||
|
||||
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> Envelope {
|
||||
Envelope::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
|
||||
descriptor.get(|| {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Timestamp>>(
|
||||
"timestamp",
|
||||
|m: &Envelope| { &m.timestamp },
|
||||
|m: &mut Envelope| { &mut m.timestamp },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"namespace",
|
||||
|m: &Envelope| { &m.namespace },
|
||||
|m: &mut Envelope| { &mut m.namespace },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"topic",
|
||||
|m: &Envelope| { &m.topic },
|
||||
|m: &mut Envelope| { &mut m.topic },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Any>>(
|
||||
"event",
|
||||
|m: &Envelope| { &m.event },
|
||||
|m: &mut Envelope| { &mut m.event },
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<Envelope>(
|
||||
"Envelope",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static Envelope {
|
||||
static instance: ::protobuf::rt::LazyV2<Envelope> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(Envelope::new)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for Envelope {
|
||||
fn clear(&mut self) {
|
||||
self.timestamp.clear();
|
||||
self.namespace.clear();
|
||||
self.topic.clear();
|
||||
self.event.clear();
|
||||
self.unknown_fields.clear();
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug 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 {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
}
|
||||
|
||||
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\x12K\
|
||||
\n\x08envelope\x18\x01\x20\x01(\x0b2-.containerd.services.events.ttrpc.v\
|
||||
1.EnvelopeR\x08envelopeB\0:\0\"\xba\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\x1e\n\tnamespace\x18\x02\x20\x01(\tR\
|
||||
\tnamespaceB\0\x12\x16\n\x05topic\x18\x03\x20\x01(\tR\x05topicB\0\x12,\n\
|
||||
\x05event\x18\x04\x20\x01(\x0b2\x14.google.protobuf.AnyR\x05eventB\0:\
|
||||
\x04\x80\xb9\x1f\x01B\0b\x06proto3\
|
||||
";
|
||||
|
||||
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
|
||||
|
||||
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
|
||||
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
|
||||
}
|
||||
|
||||
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
|
||||
file_descriptor_proto_lazy.get(|| {
|
||||
parse_descriptor_proto()
|
||||
})
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
// This file is generated by ttrpc-compiler 0.4.0. 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<super::empty::Empty> {
|
||||
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<std::boxed::Box<dyn Events + Send + Sync>>,
|
||||
}
|
||||
|
||||
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, _req: super::events::ForwardRequest) -> ::ttrpc::Result<super::empty::Empty> {
|
||||
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<std::boxed::Box<dyn Events + Send + Sync>>) -> HashMap <String, Box<dyn ::ttrpc::MethodHandler + Send + Sync>> {
|
||||
let mut methods = HashMap::new();
|
||||
|
||||
methods.insert("/containerd.services.events.ttrpc.v1.Events/Forward".to_string(),
|
||||
std::boxed::Box::new(ForwardMethod{service: service.clone()}) as std::boxed::Box<dyn ::ttrpc::MethodHandler + Send + Sync>);
|
||||
|
||||
methods
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
// @generated
|
||||
|
||||
pub mod shim;
|
||||
pub mod mount;
|
||||
pub mod task;
|
||||
pub mod events;
|
||||
pub mod empty;
|
||||
pub mod shim_ttrpc;
|
||||
pub mod events_ttrpc;
|
||||
|
|
@ -0,0 +1,328 @@
|
|||
// This file is generated by rust-protobuf 2.25.2. Do not edit
|
||||
// @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_imports)]
|
||||
#![allow(unused_results)]
|
||||
//! 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_2_25_2;
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct Mount {
|
||||
// message fields
|
||||
pub field_type: ::std::string::String,
|
||||
pub source: ::std::string::String,
|
||||
pub target: ::std::string::String,
|
||||
pub options: ::protobuf::RepeatedField<::std::string::String>,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a Mount {
|
||||
fn default() -> &'a Mount {
|
||||
<Mount as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
impl Mount {
|
||||
pub fn new() -> Mount {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
// string type = 1;
|
||||
|
||||
|
||||
pub fn get_field_type(&self) -> &str {
|
||||
&self.field_type
|
||||
}
|
||||
pub fn clear_field_type(&mut self) {
|
||||
self.field_type.clear();
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_field_type(&mut self, v: ::std::string::String) {
|
||||
self.field_type = v;
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
// If field is not initialized, it is initialized with default value first.
|
||||
pub fn mut_field_type(&mut self) -> &mut ::std::string::String {
|
||||
&mut self.field_type
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_field_type(&mut self) -> ::std::string::String {
|
||||
::std::mem::replace(&mut self.field_type, ::std::string::String::new())
|
||||
}
|
||||
|
||||
// string source = 2;
|
||||
|
||||
|
||||
pub fn get_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 get_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 get_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: ::protobuf::RepeatedField<::std::string::String>) {
|
||||
self.options = v;
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
pub fn mut_options(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> {
|
||||
&mut self.options
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_options(&mut self) -> ::protobuf::RepeatedField<::std::string::String> {
|
||||
::std::mem::replace(&mut self.options, ::protobuf::RepeatedField::new())
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for Mount {
|
||||
fn is_initialized(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
while !is.eof()? {
|
||||
let (field_number, wire_type) = is.read_tag_unpack()?;
|
||||
match field_number {
|
||||
1 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.field_type)?;
|
||||
},
|
||||
2 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.source)?;
|
||||
},
|
||||
3 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.target)?;
|
||||
},
|
||||
4 => {
|
||||
::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.options)?;
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
let mut my_size = 0;
|
||||
if !self.field_type.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(1, &self.field_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.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
if !self.field_type.is_empty() {
|
||||
os.write_string(1, &self.field_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.get_unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
}
|
||||
|
||||
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
|
||||
&self.unknown_fields
|
||||
}
|
||||
|
||||
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
|
||||
&mut self.unknown_fields
|
||||
}
|
||||
|
||||
fn as_any(&self) -> &dyn (::std::any::Any) {
|
||||
self as &dyn (::std::any::Any)
|
||||
}
|
||||
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
|
||||
self as &mut dyn (::std::any::Any)
|
||||
}
|
||||
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
|
||||
self
|
||||
}
|
||||
|
||||
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> Mount {
|
||||
Mount::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
|
||||
descriptor.get(|| {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"type",
|
||||
|m: &Mount| { &m.field_type },
|
||||
|m: &mut Mount| { &mut m.field_type },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"source",
|
||||
|m: &Mount| { &m.source },
|
||||
|m: &mut Mount| { &mut m.source },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"target",
|
||||
|m: &Mount| { &m.target },
|
||||
|m: &mut Mount| { &mut m.target },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"options",
|
||||
|m: &Mount| { &m.options },
|
||||
|m: &mut Mount| { &mut m.options },
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<Mount>(
|
||||
"Mount",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static Mount {
|
||||
static instance: ::protobuf::rt::LazyV2<Mount> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(Mount::new)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for Mount {
|
||||
fn clear(&mut self) {
|
||||
self.field_type.clear();
|
||||
self.source.clear();
|
||||
self.target.clear();
|
||||
self.options.clear();
|
||||
self.unknown_fields.clear();
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug 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 {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
}
|
||||
|
||||
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\"o\n\x05Mount\x12\x14\n\x04type\
|
||||
\x18\x01\x20\x01(\tR\x04typeB\0\x12\x18\n\x06source\x18\x02\x20\x01(\tR\
|
||||
\x06sourceB\0\x12\x18\n\x06target\x18\x03\x20\x01(\tR\x06targetB\0\x12\
|
||||
\x1a\n\x07options\x18\x04\x20\x03(\tR\x07optionsB\0:\0B\0b\x06proto3\
|
||||
";
|
||||
|
||||
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
|
||||
|
||||
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
|
||||
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
|
||||
}
|
||||
|
||||
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
|
||||
file_descriptor_proto_lazy.get(|| {
|
||||
parse_descriptor_proto()
|
||||
})
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,435 @@
|
|||
// This file is generated by ttrpc-compiler 0.4.0. 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<super::shim::StateResponse> {
|
||||
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<super::shim::CreateTaskResponse> {
|
||||
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<super::shim::StartResponse> {
|
||||
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<super::shim::DeleteResponse> {
|
||||
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<super::shim::PidsResponse> {
|
||||
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<super::empty::Empty> {
|
||||
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<super::empty::Empty> {
|
||||
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<super::empty::Empty> {
|
||||
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<super::empty::Empty> {
|
||||
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<super::empty::Empty> {
|
||||
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<super::empty::Empty> {
|
||||
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<super::empty::Empty> {
|
||||
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<super::empty::Empty> {
|
||||
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<super::shim::WaitResponse> {
|
||||
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<super::shim::StatsResponse> {
|
||||
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<super::shim::ConnectResponse> {
|
||||
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<super::empty::Empty> {
|
||||
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<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
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<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
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<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
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<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
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<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
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<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
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<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
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<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
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<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
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<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
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<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
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<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
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<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
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<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
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<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
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<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
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<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
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, _req: super::shim::StateRequest) -> ::ttrpc::Result<super::shim::StateResponse> {
|
||||
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, _req: super::shim::CreateTaskRequest) -> ::ttrpc::Result<super::shim::CreateTaskResponse> {
|
||||
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, _req: super::shim::StartRequest) -> ::ttrpc::Result<super::shim::StartResponse> {
|
||||
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, _req: super::shim::DeleteRequest) -> ::ttrpc::Result<super::shim::DeleteResponse> {
|
||||
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, _req: super::shim::PidsRequest) -> ::ttrpc::Result<super::shim::PidsResponse> {
|
||||
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, _req: super::shim::PauseRequest) -> ::ttrpc::Result<super::empty::Empty> {
|
||||
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, _req: super::shim::ResumeRequest) -> ::ttrpc::Result<super::empty::Empty> {
|
||||
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, _req: super::shim::CheckpointTaskRequest) -> ::ttrpc::Result<super::empty::Empty> {
|
||||
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, _req: super::shim::KillRequest) -> ::ttrpc::Result<super::empty::Empty> {
|
||||
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, _req: super::shim::ExecProcessRequest) -> ::ttrpc::Result<super::empty::Empty> {
|
||||
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, _req: super::shim::ResizePtyRequest) -> ::ttrpc::Result<super::empty::Empty> {
|
||||
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, _req: super::shim::CloseIORequest) -> ::ttrpc::Result<super::empty::Empty> {
|
||||
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, _req: super::shim::UpdateTaskRequest) -> ::ttrpc::Result<super::empty::Empty> {
|
||||
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, _req: super::shim::WaitRequest) -> ::ttrpc::Result<super::shim::WaitResponse> {
|
||||
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, _req: super::shim::StatsRequest) -> ::ttrpc::Result<super::shim::StatsResponse> {
|
||||
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, _req: super::shim::ConnectRequest) -> ::ttrpc::Result<super::shim::ConnectResponse> {
|
||||
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, _req: super::shim::ShutdownRequest) -> ::ttrpc::Result<super::empty::Empty> {
|
||||
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<std::boxed::Box<dyn Task + Send + Sync>>) -> HashMap <String, Box<dyn ::ttrpc::MethodHandler + Send + Sync>> {
|
||||
let mut methods = HashMap::new();
|
||||
|
||||
methods.insert("/containerd.task.v2.Task/State".to_string(),
|
||||
std::boxed::Box::new(StateMethod{service: service.clone()}) as std::boxed::Box<dyn ::ttrpc::MethodHandler + Send + Sync>);
|
||||
|
||||
methods.insert("/containerd.task.v2.Task/Create".to_string(),
|
||||
std::boxed::Box::new(CreateMethod{service: service.clone()}) as std::boxed::Box<dyn ::ttrpc::MethodHandler + Send + Sync>);
|
||||
|
||||
methods.insert("/containerd.task.v2.Task/Start".to_string(),
|
||||
std::boxed::Box::new(StartMethod{service: service.clone()}) as std::boxed::Box<dyn ::ttrpc::MethodHandler + Send + Sync>);
|
||||
|
||||
methods.insert("/containerd.task.v2.Task/Delete".to_string(),
|
||||
std::boxed::Box::new(DeleteMethod{service: service.clone()}) as std::boxed::Box<dyn ::ttrpc::MethodHandler + Send + Sync>);
|
||||
|
||||
methods.insert("/containerd.task.v2.Task/Pids".to_string(),
|
||||
std::boxed::Box::new(PidsMethod{service: service.clone()}) as std::boxed::Box<dyn ::ttrpc::MethodHandler + Send + Sync>);
|
||||
|
||||
methods.insert("/containerd.task.v2.Task/Pause".to_string(),
|
||||
std::boxed::Box::new(PauseMethod{service: service.clone()}) as std::boxed::Box<dyn ::ttrpc::MethodHandler + Send + Sync>);
|
||||
|
||||
methods.insert("/containerd.task.v2.Task/Resume".to_string(),
|
||||
std::boxed::Box::new(ResumeMethod{service: service.clone()}) as std::boxed::Box<dyn ::ttrpc::MethodHandler + Send + Sync>);
|
||||
|
||||
methods.insert("/containerd.task.v2.Task/Checkpoint".to_string(),
|
||||
std::boxed::Box::new(CheckpointMethod{service: service.clone()}) as std::boxed::Box<dyn ::ttrpc::MethodHandler + Send + Sync>);
|
||||
|
||||
methods.insert("/containerd.task.v2.Task/Kill".to_string(),
|
||||
std::boxed::Box::new(KillMethod{service: service.clone()}) as std::boxed::Box<dyn ::ttrpc::MethodHandler + Send + Sync>);
|
||||
|
||||
methods.insert("/containerd.task.v2.Task/Exec".to_string(),
|
||||
std::boxed::Box::new(ExecMethod{service: service.clone()}) as std::boxed::Box<dyn ::ttrpc::MethodHandler + Send + Sync>);
|
||||
|
||||
methods.insert("/containerd.task.v2.Task/ResizePty".to_string(),
|
||||
std::boxed::Box::new(ResizePtyMethod{service: service.clone()}) as std::boxed::Box<dyn ::ttrpc::MethodHandler + Send + Sync>);
|
||||
|
||||
methods.insert("/containerd.task.v2.Task/CloseIO".to_string(),
|
||||
std::boxed::Box::new(CloseIoMethod{service: service.clone()}) as std::boxed::Box<dyn ::ttrpc::MethodHandler + Send + Sync>);
|
||||
|
||||
methods.insert("/containerd.task.v2.Task/Update".to_string(),
|
||||
std::boxed::Box::new(UpdateMethod{service: service.clone()}) as std::boxed::Box<dyn ::ttrpc::MethodHandler + Send + Sync>);
|
||||
|
||||
methods.insert("/containerd.task.v2.Task/Wait".to_string(),
|
||||
std::boxed::Box::new(WaitMethod{service: service.clone()}) as std::boxed::Box<dyn ::ttrpc::MethodHandler + Send + Sync>);
|
||||
|
||||
methods.insert("/containerd.task.v2.Task/Stats".to_string(),
|
||||
std::boxed::Box::new(StatsMethod{service: service.clone()}) as std::boxed::Box<dyn ::ttrpc::MethodHandler + Send + Sync>);
|
||||
|
||||
methods.insert("/containerd.task.v2.Task/Connect".to_string(),
|
||||
std::boxed::Box::new(ConnectMethod{service: service.clone()}) as std::boxed::Box<dyn ::ttrpc::MethodHandler + Send + Sync>);
|
||||
|
||||
methods.insert("/containerd.task.v2.Task/Shutdown".to_string(),
|
||||
std::boxed::Box::new(ShutdownMethod{service: service.clone()}) as std::boxed::Box<dyn ::ttrpc::MethodHandler + Send + Sync>);
|
||||
|
||||
methods
|
||||
}
|
||||
|
|
@ -0,0 +1,848 @@
|
|||
// This file is generated by rust-protobuf 2.25.2. Do not edit
|
||||
// @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_imports)]
|
||||
#![allow(unused_results)]
|
||||
//! 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_2_25_2;
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct Process {
|
||||
// message fields
|
||||
pub container_id: ::std::string::String,
|
||||
pub id: ::std::string::String,
|
||||
pub pid: u32,
|
||||
pub status: Status,
|
||||
pub stdin: ::std::string::String,
|
||||
pub stdout: ::std::string::String,
|
||||
pub stderr: ::std::string::String,
|
||||
pub terminal: bool,
|
||||
pub exit_status: u32,
|
||||
pub exited_at: ::protobuf::SingularPtrField<::protobuf::well_known_types::Timestamp>,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a Process {
|
||||
fn default() -> &'a Process {
|
||||
<Process as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
impl Process {
|
||||
pub fn new() -> Process {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
// string container_id = 1;
|
||||
|
||||
|
||||
pub fn get_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 get_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 get_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 get_status(&self) -> Status {
|
||||
self.status
|
||||
}
|
||||
pub fn clear_status(&mut self) {
|
||||
self.status = Status::UNKNOWN;
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_status(&mut self, v: Status) {
|
||||
self.status = v;
|
||||
}
|
||||
|
||||
// string stdin = 5;
|
||||
|
||||
|
||||
pub fn get_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 get_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 get_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 get_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 get_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 get_exited_at(&self) -> &::protobuf::well_known_types::Timestamp {
|
||||
self.exited_at.as_ref().unwrap_or_else(|| <::protobuf::well_known_types::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) {
|
||||
self.exited_at = ::protobuf::SingularPtrField::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 {
|
||||
if self.exited_at.is_none() {
|
||||
self.exited_at.set_default();
|
||||
}
|
||||
self.exited_at.as_mut().unwrap()
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_exited_at(&mut self) -> ::protobuf::well_known_types::Timestamp {
|
||||
self.exited_at.take().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::new())
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for Process {
|
||||
fn is_initialized(&self) -> bool {
|
||||
for v in &self.exited_at {
|
||||
if !v.is_initialized() {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
while !is.eof()? {
|
||||
let (field_number, wire_type) = is.read_tag_unpack()?;
|
||||
match field_number {
|
||||
1 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.container_id)?;
|
||||
},
|
||||
2 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.id)?;
|
||||
},
|
||||
3 => {
|
||||
if wire_type != ::protobuf::wire_format::WireTypeVarint {
|
||||
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
|
||||
}
|
||||
let tmp = is.read_uint32()?;
|
||||
self.pid = tmp;
|
||||
},
|
||||
4 => {
|
||||
::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.status, 4, &mut self.unknown_fields)?
|
||||
},
|
||||
5 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.stdin)?;
|
||||
},
|
||||
6 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.stdout)?;
|
||||
},
|
||||
7 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.stderr)?;
|
||||
},
|
||||
8 => {
|
||||
if wire_type != ::protobuf::wire_format::WireTypeVarint {
|
||||
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
|
||||
}
|
||||
let tmp = is.read_bool()?;
|
||||
self.terminal = tmp;
|
||||
},
|
||||
9 => {
|
||||
if wire_type != ::protobuf::wire_format::WireTypeVarint {
|
||||
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
|
||||
}
|
||||
let tmp = is.read_uint32()?;
|
||||
self.exit_status = tmp;
|
||||
},
|
||||
10 => {
|
||||
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.exited_at)?;
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
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::value_size(3, self.pid, ::protobuf::wire_format::WireTypeVarint);
|
||||
}
|
||||
if self.status != Status::UNKNOWN {
|
||||
my_size += ::protobuf::rt::enum_size(4, self.status);
|
||||
}
|
||||
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 += 2;
|
||||
}
|
||||
if self.exit_status != 0 {
|
||||
my_size += ::protobuf::rt::value_size(9, self.exit_status, ::protobuf::wire_format::WireTypeVarint);
|
||||
}
|
||||
if let Some(ref v) = self.exited_at.as_ref() {
|
||||
let len = v.compute_size();
|
||||
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
|
||||
}
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
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 != Status::UNKNOWN {
|
||||
os.write_enum(4, ::protobuf::ProtobufEnum::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(ref v) = self.exited_at.as_ref() {
|
||||
os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?;
|
||||
os.write_raw_varint32(v.get_cached_size())?;
|
||||
v.write_to_with_cached_sizes(os)?;
|
||||
}
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
}
|
||||
|
||||
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
|
||||
&self.unknown_fields
|
||||
}
|
||||
|
||||
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
|
||||
&mut self.unknown_fields
|
||||
}
|
||||
|
||||
fn as_any(&self) -> &dyn (::std::any::Any) {
|
||||
self as &dyn (::std::any::Any)
|
||||
}
|
||||
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
|
||||
self as &mut dyn (::std::any::Any)
|
||||
}
|
||||
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
|
||||
self
|
||||
}
|
||||
|
||||
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> Process {
|
||||
Process::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
|
||||
descriptor.get(|| {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"container_id",
|
||||
|m: &Process| { &m.container_id },
|
||||
|m: &mut Process| { &mut m.container_id },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"id",
|
||||
|m: &Process| { &m.id },
|
||||
|m: &mut Process| { &mut m.id },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
|
||||
"pid",
|
||||
|m: &Process| { &m.pid },
|
||||
|m: &mut Process| { &mut m.pid },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<Status>>(
|
||||
"status",
|
||||
|m: &Process| { &m.status },
|
||||
|m: &mut Process| { &mut m.status },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"stdin",
|
||||
|m: &Process| { &m.stdin },
|
||||
|m: &mut Process| { &mut m.stdin },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"stdout",
|
||||
|m: &Process| { &m.stdout },
|
||||
|m: &mut Process| { &mut m.stdout },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"stderr",
|
||||
|m: &Process| { &m.stderr },
|
||||
|m: &mut Process| { &mut m.stderr },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
|
||||
"terminal",
|
||||
|m: &Process| { &m.terminal },
|
||||
|m: &mut Process| { &mut m.terminal },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
|
||||
"exit_status",
|
||||
|m: &Process| { &m.exit_status },
|
||||
|m: &mut Process| { &mut m.exit_status },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Timestamp>>(
|
||||
"exited_at",
|
||||
|m: &Process| { &m.exited_at },
|
||||
|m: &mut Process| { &mut m.exited_at },
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<Process>(
|
||||
"Process",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static Process {
|
||||
static instance: ::protobuf::rt::LazyV2<Process> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(Process::new)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for Process {
|
||||
fn clear(&mut self) {
|
||||
self.container_id.clear();
|
||||
self.id.clear();
|
||||
self.pid = 0;
|
||||
self.status = Status::UNKNOWN;
|
||||
self.stdin.clear();
|
||||
self.stdout.clear();
|
||||
self.stderr.clear();
|
||||
self.terminal = false;
|
||||
self.exit_status = 0;
|
||||
self.exited_at.clear();
|
||||
self.unknown_fields.clear();
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug 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 {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct ProcessInfo {
|
||||
// message fields
|
||||
pub pid: u32,
|
||||
pub info: ::protobuf::SingularPtrField<::protobuf::well_known_types::Any>,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a ProcessInfo {
|
||||
fn default() -> &'a ProcessInfo {
|
||||
<ProcessInfo as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
impl ProcessInfo {
|
||||
pub fn new() -> ProcessInfo {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
// uint32 pid = 1;
|
||||
|
||||
|
||||
pub fn get_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 get_info(&self) -> &::protobuf::well_known_types::Any {
|
||||
self.info.as_ref().unwrap_or_else(|| <::protobuf::well_known_types::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) {
|
||||
self.info = ::protobuf::SingularPtrField::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 {
|
||||
if self.info.is_none() {
|
||||
self.info.set_default();
|
||||
}
|
||||
self.info.as_mut().unwrap()
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_info(&mut self) -> ::protobuf::well_known_types::Any {
|
||||
self.info.take().unwrap_or_else(|| ::protobuf::well_known_types::Any::new())
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for ProcessInfo {
|
||||
fn is_initialized(&self) -> bool {
|
||||
for v in &self.info {
|
||||
if !v.is_initialized() {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
while !is.eof()? {
|
||||
let (field_number, wire_type) = is.read_tag_unpack()?;
|
||||
match field_number {
|
||||
1 => {
|
||||
if wire_type != ::protobuf::wire_format::WireTypeVarint {
|
||||
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
|
||||
}
|
||||
let tmp = is.read_uint32()?;
|
||||
self.pid = tmp;
|
||||
},
|
||||
2 => {
|
||||
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.info)?;
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
let mut my_size = 0;
|
||||
if self.pid != 0 {
|
||||
my_size += ::protobuf::rt::value_size(1, self.pid, ::protobuf::wire_format::WireTypeVarint);
|
||||
}
|
||||
if let Some(ref v) = self.info.as_ref() {
|
||||
let len = v.compute_size();
|
||||
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
|
||||
}
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
if self.pid != 0 {
|
||||
os.write_uint32(1, self.pid)?;
|
||||
}
|
||||
if let Some(ref v) = self.info.as_ref() {
|
||||
os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
|
||||
os.write_raw_varint32(v.get_cached_size())?;
|
||||
v.write_to_with_cached_sizes(os)?;
|
||||
}
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
}
|
||||
|
||||
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
|
||||
&self.unknown_fields
|
||||
}
|
||||
|
||||
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
|
||||
&mut self.unknown_fields
|
||||
}
|
||||
|
||||
fn as_any(&self) -> &dyn (::std::any::Any) {
|
||||
self as &dyn (::std::any::Any)
|
||||
}
|
||||
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
|
||||
self as &mut dyn (::std::any::Any)
|
||||
}
|
||||
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
|
||||
self
|
||||
}
|
||||
|
||||
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> ProcessInfo {
|
||||
ProcessInfo::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
|
||||
descriptor.get(|| {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
|
||||
"pid",
|
||||
|m: &ProcessInfo| { &m.pid },
|
||||
|m: &mut ProcessInfo| { &mut m.pid },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<::protobuf::well_known_types::Any>>(
|
||||
"info",
|
||||
|m: &ProcessInfo| { &m.info },
|
||||
|m: &mut ProcessInfo| { &mut m.info },
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<ProcessInfo>(
|
||||
"ProcessInfo",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static ProcessInfo {
|
||||
static instance: ::protobuf::rt::LazyV2<ProcessInfo> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(ProcessInfo::new)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for ProcessInfo {
|
||||
fn clear(&mut self) {
|
||||
self.pid = 0;
|
||||
self.info.clear();
|
||||
self.unknown_fields.clear();
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug 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 {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
|
||||
pub enum Status {
|
||||
UNKNOWN = 0,
|
||||
CREATED = 1,
|
||||
RUNNING = 2,
|
||||
STOPPED = 3,
|
||||
PAUSED = 4,
|
||||
PAUSING = 5,
|
||||
}
|
||||
|
||||
impl ::protobuf::ProtobufEnum for Status {
|
||||
fn value(&self) -> i32 {
|
||||
*self as i32
|
||||
}
|
||||
|
||||
fn from_i32(value: i32) -> ::std::option::Option<Status> {
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
fn values() -> &'static [Self] {
|
||||
static values: &'static [Status] = &[
|
||||
Status::UNKNOWN,
|
||||
Status::CREATED,
|
||||
Status::RUNNING,
|
||||
Status::STOPPED,
|
||||
Status::PAUSED,
|
||||
Status::PAUSING,
|
||||
];
|
||||
values
|
||||
}
|
||||
|
||||
fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
|
||||
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
|
||||
descriptor.get(|| {
|
||||
::protobuf::reflect::EnumDescriptor::new_pb_name::<Status>("Status", file_descriptor_proto())
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::marker::Copy for Status {
|
||||
}
|
||||
|
||||
impl ::std::default::Default for Status {
|
||||
fn default() -> Self {
|
||||
Status::UNKNOWN
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for Status {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
|
||||
}
|
||||
}
|
||||
|
||||
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\"\xdd\x02\n\x07Process\
|
||||
\x12#\n\x0ccontainer_id\x18\x01\x20\x01(\tR\x0bcontainerIdB\0\x12\x10\n\
|
||||
\x02id\x18\x02\x20\x01(\tR\x02idB\0\x12\x12\n\x03pid\x18\x03\x20\x01(\rR\
|
||||
\x03pidB\0\x125\n\x06status\x18\x04\x20\x01(\x0e2\x1b.containerd.v1.type\
|
||||
s.StatusR\x06statusB\0\x12\x16\n\x05stdin\x18\x05\x20\x01(\tR\x05stdinB\
|
||||
\0\x12\x18\n\x06stdout\x18\x06\x20\x01(\tR\x06stdoutB\0\x12\x18\n\x06std\
|
||||
err\x18\x07\x20\x01(\tR\x06stderrB\0\x12\x1c\n\x08terminal\x18\x08\x20\
|
||||
\x01(\x08R\x08terminalB\0\x12!\n\x0bexit_status\x18\t\x20\x01(\rR\nexitS\
|
||||
tatusB\0\x12A\n\texited_at\x18\n\x20\x01(\x0b2\x1a.google.protobuf.Times\
|
||||
tampR\x08exitedAtB\x08\x90\xdf\x1f\x01\xc8\xde\x1f\0:\0\"O\n\x0bProcessI\
|
||||
nfo\x12\x12\n\x03pid\x18\x01\x20\x01(\rR\x03pidB\0\x12*\n\x04info\x18\
|
||||
\x02\x20\x01(\x0b2\x14.google.protobuf.AnyR\x04infoB\0:\0*e\n\x06Status\
|
||||
\x12\x0b\n\x07UNKNOWN\x10\0\x12\x0b\n\x07CREATED\x10\x01\x12\x0b\n\x07RU\
|
||||
NNING\x10\x02\x12\x0b\n\x07STOPPED\x10\x03\x12\n\n\x06PAUSED\x10\x04\x12\
|
||||
\x0b\n\x07PAUSING\x10\x05\x1a\x0e\xba\xa4\x1e\x06Status\x88\xa3\x1e\0B\0\
|
||||
b\x06proto3\
|
||||
";
|
||||
|
||||
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
|
||||
|
||||
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
|
||||
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
|
||||
}
|
||||
|
||||
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
|
||||
file_descriptor_proto_lazy.get(|| {
|
||||
parse_descriptor_proto()
|
||||
})
|
||||
}
|
||||
Loading…
Reference in New Issue