Merge pull request #95 from mxpv/ttrpc
This commit is contained in:
commit
97d00b4947
|
|
@ -23,7 +23,7 @@ async = ["containerd-shim/async", "runc/async", "tokio", "futures", "async-trait
|
|||
|
||||
[dependencies]
|
||||
log = "0.4"
|
||||
nix = "0.24.1"
|
||||
nix = "0.25"
|
||||
libc = "0.2.95"
|
||||
time = { version = "0.3.7", features = ["serde", "std"] }
|
||||
serde = { version = "1.0.133", features = ["derive"] }
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ use containerd_shim::asynchronous::{spawn, ExitSignal, Shim};
|
|||
use containerd_shim::event::Event;
|
||||
use containerd_shim::monitor::{Subject, Topic};
|
||||
use containerd_shim::protos::events::task::TaskExit;
|
||||
use containerd_shim::protos::protobuf::{Message, SingularPtrField};
|
||||
use containerd_shim::protos::protobuf::MessageDyn;
|
||||
use containerd_shim::util::{convert_to_timestamp, timestamp};
|
||||
use containerd_shim::util::{read_options, read_runtime, read_spec, write_str_to_file};
|
||||
use containerd_shim::{io_error, Config, Context, DeleteResponse, Error, StartOpts};
|
||||
|
|
@ -103,8 +103,8 @@ impl Shim for Service {
|
|||
.unwrap_or_else(|e| warn!("failed to remove runc container: {}", e));
|
||||
let mut resp = DeleteResponse::new();
|
||||
// sigkill
|
||||
resp.exit_status = 137;
|
||||
resp.exited_at = SingularPtrField::some(timestamp()?);
|
||||
resp.set_exit_status(137);
|
||||
resp.set_exited_at(timestamp()?);
|
||||
Ok(resp)
|
||||
}
|
||||
|
||||
|
|
@ -128,7 +128,7 @@ impl Shim for Service {
|
|||
async fn process_exits(
|
||||
s: Subscription,
|
||||
task: &TaskService<RuncFactory, RuncContainer>,
|
||||
tx: Sender<(String, Box<dyn Message>)>,
|
||||
tx: Sender<(String, Box<dyn MessageDyn>)>,
|
||||
) {
|
||||
let containers = task.containers.clone();
|
||||
let mut s = s;
|
||||
|
|
@ -162,7 +162,7 @@ async fn process_exits(
|
|||
id: cont.id.to_string(),
|
||||
pid: cont.pid().await as u32,
|
||||
exit_status: code as u32,
|
||||
exited_at: SingularPtrField::some(ts),
|
||||
exited_at: Some(ts).into(),
|
||||
..Default::default()
|
||||
};
|
||||
let topic = event.topic();
|
||||
|
|
@ -192,7 +192,7 @@ async fn process_exits(
|
|||
async fn forward(
|
||||
publisher: RemotePublisher,
|
||||
ns: String,
|
||||
mut rx: Receiver<(String, Box<dyn Message>)>,
|
||||
mut rx: Receiver<(String, Box<dyn MessageDyn>)>,
|
||||
) {
|
||||
tokio::spawn(async move {
|
||||
while let Some((topic, e)) = rx.recv().await {
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ impl ContainerFactory<RuncContainer> for RuncFactory {
|
|||
ns: &str,
|
||||
req: &CreateTaskRequest,
|
||||
) -> containerd_shim::Result<RuncContainer> {
|
||||
let bundle = req.get_bundle();
|
||||
let bundle = req.bundle();
|
||||
let mut opts = Options::new();
|
||||
if let Some(any) = req.options.as_ref() {
|
||||
let mut input = CodedInputStream::from_bytes(any.value.as_ref());
|
||||
|
|
@ -84,7 +84,7 @@ impl ContainerFactory<RuncContainer> for RuncFactory {
|
|||
write_options(bundle, &opts).await?;
|
||||
write_runtime(bundle, runtime).await?;
|
||||
|
||||
let rootfs_vec = req.get_rootfs().to_vec();
|
||||
let rootfs_vec = req.rootfs().to_vec();
|
||||
let rootfs = if !rootfs_vec.is_empty() {
|
||||
let tmp_rootfs = Path::new(bundle).join("rootfs");
|
||||
mkdir(&tmp_rootfs, 0o711).await?;
|
||||
|
|
@ -105,13 +105,8 @@ impl ContainerFactory<RuncContainer> for RuncFactory {
|
|||
Some(Arc::new(ShimExecutor::default())),
|
||||
)?;
|
||||
|
||||
let id = req.get_id();
|
||||
let stdio = Stdio::new(
|
||||
req.get_stdin(),
|
||||
req.get_stdout(),
|
||||
req.get_stderr(),
|
||||
req.get_terminal(),
|
||||
);
|
||||
let id = req.id();
|
||||
let stdio = Stdio::new(req.stdin(), req.stdout(), req.stderr(), req.terminal());
|
||||
|
||||
let mut init = InitProcess::new(
|
||||
id,
|
||||
|
|
@ -324,7 +319,7 @@ impl RuncInitLifecycle {
|
|||
pub fn new(runtime: Runc, opts: Options, bundle: &str) -> Self {
|
||||
let work_dir = Path::new(bundle).join("work");
|
||||
let mut opts = opts;
|
||||
if opts.get_criu_path().is_empty() {
|
||||
if opts.criu_path().is_empty() {
|
||||
opts.criu_path = work_dir.to_string_lossy().to_string();
|
||||
}
|
||||
Self {
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ pub fn get_spec_from_request(
|
|||
req: &ExecProcessRequest,
|
||||
) -> containerd_shim::Result<oci_spec::runtime::Process> {
|
||||
if let Some(val) = req.spec.as_ref() {
|
||||
let mut p = serde_json::from_slice::<oci_spec::runtime::Process>(val.get_value())?;
|
||||
let mut p = serde_json::from_slice::<oci_spec::runtime::Process>(val.value.as_slice())?;
|
||||
p.set_terminal(Some(req.terminal));
|
||||
Ok(p)
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -221,7 +221,7 @@ impl Process for CommonProcess {
|
|||
fn state(&self) -> StateResponse {
|
||||
let mut resp = StateResponse::new();
|
||||
resp.id = self.id.to_string();
|
||||
resp.status = self.state;
|
||||
resp.set_status(self.state);
|
||||
resp.pid = self.pid as u32;
|
||||
resp.terminal = self.stdio.terminal;
|
||||
resp.stdin = self.stdio.stdin.to_string();
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ use shim::monitor::{monitor_subscribe, wait_pid, ExitEvent, Subject, Subscriptio
|
|||
use shim::mount::mount_rootfs;
|
||||
use shim::protos::api::ProcessInfo;
|
||||
use shim::protos::cgroups::metrics::Metrics;
|
||||
use shim::protos::protobuf::{CodedInputStream, Message, RepeatedField};
|
||||
use shim::protos::protobuf::{CodedInputStream, Message};
|
||||
use shim::protos::shim::oci::ProcessDetails;
|
||||
use shim::util::{convert_to_any, read_spec_from_file, write_options, write_runtime, IntoOption};
|
||||
use shim::Console;
|
||||
|
|
@ -72,7 +72,7 @@ impl ContainerFactory<RuncContainer> for RuncFactory {
|
|||
write_options(bundle, &opts)?;
|
||||
write_runtime(bundle, runtime)?;
|
||||
|
||||
let rootfs_vec = req.get_rootfs().to_vec();
|
||||
let rootfs_vec = req.rootfs().to_vec();
|
||||
let rootfs = if !rootfs_vec.is_empty() {
|
||||
let tmp_rootfs = Path::new(bundle).join("rootfs");
|
||||
if !tmp_rootfs.as_path().exists() {
|
||||
|
|
@ -87,7 +87,7 @@ impl ContainerFactory<RuncContainer> for RuncFactory {
|
|||
.to_str()
|
||||
.ok_or_else(|| other!("failed to convert rootfs to str"))?;
|
||||
for m in rootfs_vec {
|
||||
let mount_type = m.field_type.as_str().none_if(|&x| x.is_empty());
|
||||
let mount_type = m.type_.as_str().none_if(|&x| x.is_empty());
|
||||
let source = m.source.as_str().none_if(|&x| x.is_empty());
|
||||
mount_rootfs(mount_type, source, &m.options.to_vec(), rootfs)?;
|
||||
}
|
||||
|
|
@ -100,12 +100,12 @@ impl ContainerFactory<RuncContainer> for RuncFactory {
|
|||
Some(Arc::new(ShimExecutor::default())),
|
||||
)?;
|
||||
|
||||
let id = req.get_id();
|
||||
let id = req.id();
|
||||
let stdio = Stdio {
|
||||
stdin: req.get_stdin().to_string(),
|
||||
stdout: req.get_stdout().to_string(),
|
||||
stderr: req.get_stderr().to_string(),
|
||||
terminal: req.get_terminal(),
|
||||
stdin: req.stdin().to_string(),
|
||||
stdout: req.stdout().to_string(),
|
||||
stderr: req.stderr().to_string(),
|
||||
terminal: req.terminal(),
|
||||
};
|
||||
|
||||
let mut init = InitProcess::new(id, bundle, runc, stdio);
|
||||
|
|
@ -116,14 +116,14 @@ impl ContainerFactory<RuncContainer> for RuncFactory {
|
|||
.to_str()
|
||||
.ok_or_else(|| other!("failed to get work_dir str"))?;
|
||||
init.work_dir = work_dir.to_string();
|
||||
init.io_uid = opts.get_io_uid();
|
||||
init.io_gid = opts.get_io_gid();
|
||||
init.no_pivot_root = opts.get_no_pivot_root();
|
||||
init.no_new_key_ring = opts.get_no_new_keyring();
|
||||
init.criu_work_path = if opts.get_criu_path().is_empty() {
|
||||
init.io_uid = opts.io_uid();
|
||||
init.io_gid = opts.io_gid();
|
||||
init.no_pivot_root = opts.no_pivot_root();
|
||||
init.no_new_key_ring = opts.no_new_keyring();
|
||||
init.criu_work_path = if opts.criu_path().is_empty() {
|
||||
work_dir.to_string()
|
||||
} else {
|
||||
opts.get_criu_path().to_string()
|
||||
opts.criu_path().to_string()
|
||||
};
|
||||
|
||||
let config = CreateConfig::default();
|
||||
|
|
@ -341,7 +341,7 @@ impl Container for RuncContainer {
|
|||
processes.push(p_info);
|
||||
}
|
||||
let resp = PidsResponse {
|
||||
processes: RepeatedField::from(processes),
|
||||
processes,
|
||||
..Default::default()
|
||||
};
|
||||
Ok(resp)
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ use shim::error::{Error, Result};
|
|||
use shim::event::Event;
|
||||
use shim::monitor::{monitor_subscribe, Subject, Subscription, Topic};
|
||||
use shim::protos::events::task::TaskExit;
|
||||
use shim::protos::protobuf::{Message, SingularPtrField};
|
||||
use shim::protos::protobuf::{Message, MessageDyn};
|
||||
use shim::publisher::RemotePublisher;
|
||||
use shim::util::{
|
||||
convert_to_timestamp, read_options, read_runtime, read_spec_from_file, timestamp, write_address,
|
||||
|
|
@ -97,8 +97,8 @@ impl Shim for Service {
|
|||
.unwrap_or_else(|e| warn!("failed to remove runc container: {}", e));
|
||||
let mut resp = DeleteResponse::new();
|
||||
// sigkill
|
||||
resp.exit_status = 137;
|
||||
resp.exited_at = SingularPtrField::some(timestamp()?);
|
||||
resp.set_exit_status(137);
|
||||
resp.set_exited_at(timestamp()?);
|
||||
Ok(resp)
|
||||
}
|
||||
|
||||
|
|
@ -127,7 +127,7 @@ impl Service {
|
|||
&self,
|
||||
s: Subscription,
|
||||
task: &ShimTask<RuncFactory, RuncContainer>,
|
||||
tx: Sender<(String, Box<dyn Message>)>,
|
||||
tx: Sender<(String, Box<dyn MessageDyn>)>,
|
||||
) {
|
||||
let containers = task.containers.clone();
|
||||
std::thread::spawn(move || {
|
||||
|
|
@ -160,7 +160,7 @@ impl Service {
|
|||
id: cont.id(),
|
||||
pid: cont.pid() as u32,
|
||||
exit_status: code as u32,
|
||||
exited_at: SingularPtrField::some(ts),
|
||||
exited_at: Some(ts).into(),
|
||||
..Default::default()
|
||||
};
|
||||
let topic = event.topic();
|
||||
|
|
@ -186,7 +186,7 @@ impl Service {
|
|||
}
|
||||
}
|
||||
|
||||
fn forward(publisher: RemotePublisher, ns: String, rx: Receiver<(String, Box<dyn Message>)>) {
|
||||
fn forward(publisher: RemotePublisher, ns: String, rx: Receiver<(String, Box<dyn MessageDyn>)>) {
|
||||
std::thread::spawn(move || {
|
||||
for (topic, e) in rx.iter() {
|
||||
publisher
|
||||
|
|
|
|||
|
|
@ -29,13 +29,13 @@ use shim::event::Event;
|
|||
use shim::protos::events::task::{
|
||||
TaskCreate, TaskDelete, TaskExecAdded, TaskExecStarted, TaskIO, TaskStart,
|
||||
};
|
||||
use shim::protos::protobuf::{Message, SingularPtrField};
|
||||
use shim::protos::protobuf::MessageDyn;
|
||||
use shim::util::{convert_to_any, convert_to_timestamp, IntoOption};
|
||||
use shim::{other_error, Error, ExitSignal, Task, TtrpcContext, TtrpcResult};
|
||||
|
||||
use crate::synchronous::container::{Container, ContainerFactory};
|
||||
|
||||
type EventSender = Sender<(String, Box<dyn Message>)>;
|
||||
type EventSender = Sender<(String, Box<dyn MessageDyn>)>;
|
||||
|
||||
pub struct ShimTask<F, C> {
|
||||
pub containers: Arc<Mutex<HashMap<String, C>>>,
|
||||
|
|
@ -113,14 +113,14 @@ where
|
|||
container_id: req.id.to_string(),
|
||||
bundle: req.bundle.to_string(),
|
||||
rootfs: req.rootfs,
|
||||
io: SingularPtrField::some(TaskIO {
|
||||
io: Some(TaskIO {
|
||||
stdin: req.stdin.to_string(),
|
||||
stdout: req.stdout.to_string(),
|
||||
stderr: req.stderr.to_string(),
|
||||
terminal: req.terminal,
|
||||
unknown_fields: Default::default(),
|
||||
cached_size: Default::default(),
|
||||
}),
|
||||
..Default::default()
|
||||
})
|
||||
.into(),
|
||||
checkpoint: req.checkpoint.to_string(),
|
||||
pid,
|
||||
..Default::default()
|
||||
|
|
@ -133,8 +133,8 @@ where
|
|||
fn start(&self, _ctx: &TtrpcContext, req: StartRequest) -> TtrpcResult<StartResponse> {
|
||||
info!("Start request for {:?}", &req);
|
||||
let mut containers = self.containers.lock().unwrap();
|
||||
let container = containers.get_mut(req.get_id()).ok_or_else(|| {
|
||||
Error::NotFoundError(format!("can not find container by id {}", req.get_id()))
|
||||
let container = containers.get_mut(req.id()).ok_or_else(|| {
|
||||
Error::NotFoundError(format!("can not find container by id {}", req.id()))
|
||||
})?;
|
||||
let pid = container.start(req.exec_id.as_str().none_if(|&x| x.is_empty()))?;
|
||||
|
||||
|
|
@ -156,20 +156,20 @@ where
|
|||
});
|
||||
};
|
||||
|
||||
info!("Start request for {:?} returns pid {}", req, resp.get_pid());
|
||||
info!("Start request for {:?} returns pid {}", req, resp.pid());
|
||||
Ok(resp)
|
||||
}
|
||||
|
||||
fn delete(&self, _ctx: &TtrpcContext, req: DeleteRequest) -> TtrpcResult<DeleteResponse> {
|
||||
info!("Delete request for {:?}", &req);
|
||||
let mut containers = self.containers.lock().unwrap();
|
||||
let container = containers.get_mut(req.get_id()).ok_or_else(|| {
|
||||
Error::NotFoundError(format!("can not find container by id {}", req.get_id()))
|
||||
let container = containers.get_mut(req.id()).ok_or_else(|| {
|
||||
Error::NotFoundError(format!("can not find container by id {}", req.id()))
|
||||
})?;
|
||||
let id = container.id();
|
||||
let exec_id_opt = req.get_exec_id().none_if(|x| x.is_empty());
|
||||
let exec_id_opt = req.exec_id().none_if(|x| x.is_empty());
|
||||
let (pid, exit_status, exited_at) = container.delete(exec_id_opt)?;
|
||||
if req.get_exec_id().is_empty() {
|
||||
if req.exec_id().is_empty() {
|
||||
containers.remove(req.id.as_str());
|
||||
}
|
||||
|
||||
|
|
@ -178,7 +178,7 @@ where
|
|||
container_id: id,
|
||||
pid: pid as u32,
|
||||
exit_status: exit_status as u32,
|
||||
exited_at: SingularPtrField::some(ts.clone()),
|
||||
exited_at: Some(ts.clone()).into(),
|
||||
..Default::default()
|
||||
});
|
||||
|
||||
|
|
@ -188,8 +188,8 @@ where
|
|||
resp.set_exit_status(exit_status as u32);
|
||||
info!(
|
||||
"Delete request for {} {} returns {:?}",
|
||||
req.get_id(),
|
||||
req.get_exec_id(),
|
||||
req.id(),
|
||||
req.exec_id(),
|
||||
resp
|
||||
);
|
||||
Ok(resp)
|
||||
|
|
@ -198,9 +198,9 @@ where
|
|||
fn pids(&self, _ctx: &TtrpcContext, req: PidsRequest) -> TtrpcResult<PidsResponse> {
|
||||
debug!("Pids request for {:?}", req);
|
||||
let containers = self.containers.lock().unwrap();
|
||||
let container = containers.get(req.get_id()).ok_or_else(|| {
|
||||
Error::Other(format!("can not find container by id {}", req.get_id()))
|
||||
})?;
|
||||
let container = containers
|
||||
.get(&req.id)
|
||||
.ok_or_else(|| Error::Other(format!("can not find container by id {}", &req.id)))?;
|
||||
|
||||
let resp = container.pids()?;
|
||||
Ok(resp)
|
||||
|
|
@ -209,8 +209,8 @@ where
|
|||
fn kill(&self, _ctx: &TtrpcContext, req: KillRequest) -> TtrpcResult<Empty> {
|
||||
info!("Kill request for {:?}", req);
|
||||
let mut containers = self.containers.lock().unwrap();
|
||||
let container = containers.get_mut(req.get_id()).ok_or_else(|| {
|
||||
Error::NotFoundError(format!("can not find container by id {}", req.get_id()))
|
||||
let container = containers.get_mut(req.id()).ok_or_else(|| {
|
||||
Error::NotFoundError(format!("can not find container by id {}", req.id()))
|
||||
})?;
|
||||
container.kill(
|
||||
req.exec_id.as_str().none_if(|&x| x.is_empty()),
|
||||
|
|
@ -222,16 +222,16 @@ where
|
|||
}
|
||||
|
||||
fn exec(&self, _ctx: &TtrpcContext, req: ExecProcessRequest) -> TtrpcResult<Empty> {
|
||||
let exec_id = req.get_exec_id().to_string();
|
||||
let exec_id = req.exec_id().to_string();
|
||||
info!(
|
||||
"Exec request for id: {} exec_id: {}",
|
||||
req.get_id(),
|
||||
req.get_exec_id()
|
||||
req.id(),
|
||||
req.exec_id()
|
||||
);
|
||||
let mut containers = self.containers.lock().unwrap();
|
||||
let container = containers.get_mut(req.get_id()).ok_or_else(|| {
|
||||
Error::Other(format!("can not find container by id {}", req.get_id()))
|
||||
})?;
|
||||
let container = containers
|
||||
.get_mut(req.id())
|
||||
.ok_or_else(|| Error::Other(format!("can not find container by id {}", req.id())))?;
|
||||
container.exec(req)?;
|
||||
|
||||
self.send_event(TaskExecAdded {
|
||||
|
|
@ -249,11 +249,11 @@ where
|
|||
&req.id, &req.exec_id
|
||||
);
|
||||
let mut containers = self.containers.lock().unwrap();
|
||||
let container = containers.get_mut(req.get_id()).ok_or_else(|| {
|
||||
Error::Other(format!("can not find container by id {}", req.get_id()))
|
||||
})?;
|
||||
let container = containers
|
||||
.get_mut(req.id())
|
||||
.ok_or_else(|| Error::Other(format!("can not find container by id {}", req.id())))?;
|
||||
container.resize_pty(
|
||||
req.get_exec_id().none_if(|&x| x.is_empty()),
|
||||
req.exec_id.as_str().none_if(|&x| x.is_empty()),
|
||||
req.height,
|
||||
req.width,
|
||||
)?;
|
||||
|
|
@ -268,25 +268,32 @@ where
|
|||
fn update(&self, _ctx: &TtrpcContext, req: UpdateTaskRequest) -> TtrpcResult<Empty> {
|
||||
debug!("Update request for {:?}", req);
|
||||
let mut containers = self.containers.lock().unwrap();
|
||||
let container = containers.get_mut(req.get_id()).ok_or_else(|| {
|
||||
Error::Other(format!("can not find container by id {}", req.get_id()))
|
||||
})?;
|
||||
let container = containers
|
||||
.get_mut(&req.id)
|
||||
.ok_or_else(|| Error::Other(format!("can not find container by id {}", &req.id)))?;
|
||||
|
||||
let resources: LinuxResources = serde_json::from_slice(req.get_resources().get_value())
|
||||
.map_err(other_error!(e, "failed to parse spec"))?;
|
||||
let data = req
|
||||
.resources
|
||||
.into_option()
|
||||
.map(|r| r.value)
|
||||
.unwrap_or_default();
|
||||
|
||||
let resources: LinuxResources =
|
||||
serde_json::from_slice(&data).map_err(other_error!(e, "failed to parse spec"))?;
|
||||
container.update(&resources)?;
|
||||
|
||||
Ok(Empty::new())
|
||||
}
|
||||
|
||||
fn wait(&self, _ctx: &TtrpcContext, req: WaitRequest) -> TtrpcResult<WaitResponse> {
|
||||
info!("Wait request for {:?}", req);
|
||||
let mut containers = self.containers.lock().unwrap();
|
||||
let container = containers.get_mut(req.get_id()).ok_or_else(|| {
|
||||
Error::Other(format!("can not find container by id {}", req.get_id()))
|
||||
})?;
|
||||
let container = containers
|
||||
.get_mut(&req.id)
|
||||
.ok_or_else(|| Error::Other(format!("can not find container by id {}", &req.id)))?;
|
||||
let exec_id = req.exec_id.as_str().none_if(|&x| x.is_empty());
|
||||
let state = container.state(exec_id)?;
|
||||
if state.status != Status::RUNNING && state.status != Status::CREATED {
|
||||
if state.status() != Status::RUNNING && state.status() != Status::CREATED {
|
||||
let mut resp = WaitResponse::new();
|
||||
resp.exit_status = state.exit_status;
|
||||
resp.exited_at = state.exited_at;
|
||||
|
|
@ -301,14 +308,16 @@ where
|
|||
.expect_err("wait channel should be closed directly");
|
||||
// get lock again.
|
||||
let mut containers = self.containers.lock().unwrap();
|
||||
let container = containers.get_mut(req.get_id()).ok_or_else(|| {
|
||||
Error::Other(format!("can not find container by id {}", req.get_id()))
|
||||
})?;
|
||||
let container = containers
|
||||
.get_mut(req.id())
|
||||
.ok_or_else(|| Error::Other(format!("can not find container by id {}", req.id())))?;
|
||||
let (_, code, exited_at) = container.get_exit_info(exec_id)?;
|
||||
|
||||
let mut resp = WaitResponse::new();
|
||||
resp.exit_status = code as u32;
|
||||
resp.set_exit_status(code as u32);
|
||||
let ts = convert_to_timestamp(exited_at);
|
||||
resp.exited_at = SingularPtrField::some(ts);
|
||||
resp.set_exited_at(ts);
|
||||
|
||||
info!("Wait request for {:?} returns {:?}", req, &resp);
|
||||
Ok(resp)
|
||||
}
|
||||
|
|
@ -316,9 +325,9 @@ where
|
|||
fn stats(&self, _ctx: &TtrpcContext, req: StatsRequest) -> TtrpcResult<StatsResponse> {
|
||||
debug!("Stats request for {:?}", req);
|
||||
let containers = self.containers.lock().unwrap();
|
||||
let container = containers.get(req.get_id()).ok_or_else(|| {
|
||||
Error::Other(format!("can not find container by id {}", req.get_id()))
|
||||
})?;
|
||||
let container = containers
|
||||
.get(req.id())
|
||||
.ok_or_else(|| Error::Other(format!("can not find container by id {}", req.id())))?;
|
||||
let stats = container.stats()?;
|
||||
|
||||
let mut resp = StatsResponse::new();
|
||||
|
|
@ -344,8 +353,8 @@ where
|
|||
info!("Connect request for {:?}", req);
|
||||
|
||||
let containers = self.containers.lock().unwrap();
|
||||
let container = containers.get(req.get_id()).ok_or_else(|| {
|
||||
Error::NotFoundError(format!("can not find container by id {}", req.get_id()))
|
||||
let container = containers.get(req.id()).ok_or_else(|| {
|
||||
Error::NotFoundError(format!("can not find container by id {}", req.id()))
|
||||
})?;
|
||||
|
||||
let resp = ConnectResponse {
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ async = ["tokio", "async-trait", "futures", "tokio-pipe"]
|
|||
[dependencies]
|
||||
libc = "0.2.112"
|
||||
log = "0.4.14"
|
||||
nix = "0.24.1"
|
||||
nix = "0.25"
|
||||
oci-spec = "0.5.4"
|
||||
path-absolutize = "3.0.11"
|
||||
rand = "0.8.4"
|
||||
|
|
|
|||
|
|
@ -11,18 +11,18 @@ categories = ["api-bindings"]
|
|||
homepage = "https://containerd.io"
|
||||
|
||||
[dependencies]
|
||||
protobuf = "2.23.0"
|
||||
ttrpc = "0.6.0"
|
||||
protobuf = "3.1"
|
||||
ttrpc = "0.7"
|
||||
async-trait = { version = "0.1.48", optional = true}
|
||||
|
||||
[build-dependencies]
|
||||
ttrpc-codegen = { version = "0.3.0", optional = true }
|
||||
ttrpc-codegen = { version = "0.4", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
ctrlc = { version = "3.0", features = ["termination"] }
|
||||
log = "0.4"
|
||||
simple_logger = { version = "2.0", default-features = false, features = ["stderr"] }
|
||||
tokio = { version = "1.17.0", features = ["full"] }
|
||||
tokio = { version = "1.18", features = ["full"] }
|
||||
|
||||
[features]
|
||||
default = []
|
||||
|
|
|
|||
|
|
@ -29,7 +29,10 @@ fn main() {}
|
|||
fn main() {
|
||||
codegen(
|
||||
"src/cgroups",
|
||||
&["vendor/github.com/containerd/cgroups/stats/v1/metrics.proto"],
|
||||
&[
|
||||
"vendor/gogoproto/gogo.proto",
|
||||
"vendor/github.com/containerd/cgroups/stats/v1/metrics.proto",
|
||||
],
|
||||
true,
|
||||
false,
|
||||
);
|
||||
|
|
@ -37,6 +40,8 @@ fn main() {
|
|||
codegen(
|
||||
"src/events",
|
||||
&[
|
||||
"vendor/gogoproto/gogo.proto",
|
||||
"vendor/github.com/containerd/containerd/protobuf/plugin/fieldpath.proto",
|
||||
"vendor/github.com/containerd/containerd/api/events/container.proto",
|
||||
"vendor/github.com/containerd/containerd/api/events/content.proto",
|
||||
"vendor/github.com/containerd/containerd/api/events/image.proto",
|
||||
|
|
@ -52,6 +57,8 @@ fn main() {
|
|||
codegen(
|
||||
"src/shim",
|
||||
&[
|
||||
"vendor/gogoproto/gogo.proto",
|
||||
"vendor/github.com/containerd/containerd/protobuf/plugin/fieldpath.proto",
|
||||
"vendor/github.com/containerd/containerd/runtime/v2/task/shim.proto",
|
||||
"vendor/github.com/containerd/containerd/api/services/ttrpc/events/v1/events.proto",
|
||||
],
|
||||
|
|
@ -75,6 +82,7 @@ fn main() {
|
|||
codegen(
|
||||
"src/types",
|
||||
&[
|
||||
"vendor/gogoproto/gogo.proto",
|
||||
"vendor/github.com/containerd/containerd/api/types/mount.proto",
|
||||
"vendor/github.com/containerd/containerd/api/types/task/task.proto",
|
||||
"vendor/google/protobuf/empty.proto",
|
||||
|
|
@ -99,10 +107,11 @@ fn codegen(
|
|||
.inputs(inputs)
|
||||
.include("vendor/")
|
||||
.rust_protobuf()
|
||||
.rust_protobuf_customize(ProtobufCustomize {
|
||||
gen_mod_rs: Some(gen_mod_rs),
|
||||
..Default::default()
|
||||
})
|
||||
.rust_protobuf_customize(
|
||||
ProtobufCustomize::default()
|
||||
.gen_mod_rs(gen_mod_rs)
|
||||
.generate_accessors(true),
|
||||
)
|
||||
.customize(Customize {
|
||||
async_all,
|
||||
..Default::default()
|
||||
|
|
|
|||
|
|
@ -0,0 +1,327 @@
|
|||
// This file is generated by rust-protobuf 3.1.0. Do not edit
|
||||
// .proto file is parsed by pure
|
||||
// @generated
|
||||
|
||||
// https://github.com/rust-lang/rust-clippy/issues/702
|
||||
#![allow(unknown_lints)]
|
||||
#![allow(clippy::all)]
|
||||
|
||||
#![allow(unused_attributes)]
|
||||
#![cfg_attr(rustfmt, rustfmt::skip)]
|
||||
|
||||
#![allow(box_pointers)]
|
||||
#![allow(dead_code)]
|
||||
#![allow(missing_docs)]
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(non_snake_case)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![allow(trivial_casts)]
|
||||
#![allow(unused_results)]
|
||||
#![allow(unused_mut)]
|
||||
|
||||
//! Generated file from `gogoproto/gogo.proto`
|
||||
|
||||
/// Generated files are compatible only with the same version
|
||||
/// of protobuf runtime.
|
||||
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_1_0;
|
||||
|
||||
/// Extension fields
|
||||
pub mod exts {
|
||||
|
||||
pub const goproto_enum_prefix: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(62001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_enum_stringer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(62021, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const enum_stringer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(62022, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const enum_customname: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(62023, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING);
|
||||
|
||||
pub const enumdecl: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(62024, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const enumvalue_customname: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumValueOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(66001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING);
|
||||
|
||||
pub const goproto_getters_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_enum_prefix_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63002, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_stringer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63003, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const verbose_equal_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63004, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const face_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63005, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const gostring_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63006, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const populate_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63007, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const stringer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63008, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const onlyone_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63009, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const equal_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63013, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const description_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63014, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const testgen_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63015, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const benchgen_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63016, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const marshaler_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63017, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const unmarshaler_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63018, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const stable_marshaler_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63019, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const sizer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63020, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_enum_stringer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63021, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const enum_stringer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63022, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const unsafe_marshaler_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63023, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const unsafe_unmarshaler_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63024, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_extensions_map_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63025, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_unrecognized_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63026, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const gogoproto_import: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63027, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const protosizer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63028, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const compare_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63029, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const typedecl_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63030, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const enumdecl_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63031, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_registration: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63032, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const messagename_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63033, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_sizecache_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63034, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_unkeyed_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63035, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_getters: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_stringer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64003, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const verbose_equal: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64004, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const face: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64005, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const gostring: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64006, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const populate: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64007, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const stringer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(67008, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const onlyone: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64009, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const equal: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64013, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const description: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64014, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const testgen: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64015, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const benchgen: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64016, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const marshaler: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64017, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const unmarshaler: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64018, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const stable_marshaler: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64019, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const sizer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64020, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const unsafe_marshaler: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64023, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const unsafe_unmarshaler: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64024, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_extensions_map: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64025, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_unrecognized: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64026, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const protosizer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64028, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const compare: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64029, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const typedecl: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64030, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const messagename: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64033, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_sizecache: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64034, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_unkeyed: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64035, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const nullable: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(65001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const embed: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(65002, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const customtype: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65003, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING);
|
||||
|
||||
pub const customname: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65004, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING);
|
||||
|
||||
pub const jsontag: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65005, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING);
|
||||
|
||||
pub const moretags: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65006, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING);
|
||||
|
||||
pub const casttype: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65007, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING);
|
||||
|
||||
pub const castkey: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65008, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING);
|
||||
|
||||
pub const castvalue: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65009, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING);
|
||||
|
||||
pub const stdtime: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(65010, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const stdduration: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(65011, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const wktpointer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(65012, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
}
|
||||
|
||||
static file_descriptor_proto_data: &'static [u8] = b"\
|
||||
\n\x14gogoproto/gogo.proto\x12\tgogoproto\x1a\x20google/protobuf/descrip\
|
||||
tor.proto:N\n\x13goproto_enum_prefix\x18\xb1\xe4\x03\x20\x01(\x08\x12\
|
||||
\x1c.google.protobuf.EnumOptionsR\x11goprotoEnumPrefix:R\n\x15goproto_en\
|
||||
um_stringer\x18\xc5\xe4\x03\x20\x01(\x08\x12\x1c.google.protobuf.EnumOpt\
|
||||
ionsR\x13goprotoEnumStringer:C\n\renum_stringer\x18\xc6\xe4\x03\x20\x01(\
|
||||
\x08\x12\x1c.google.protobuf.EnumOptionsR\x0cenumStringer:G\n\x0fenum_cu\
|
||||
stomname\x18\xc7\xe4\x03\x20\x01(\t\x12\x1c.google.protobuf.EnumOptionsR\
|
||||
\x0eenumCustomname::\n\x08enumdecl\x18\xc8\xe4\x03\x20\x01(\x08\x12\x1c.\
|
||||
google.protobuf.EnumOptionsR\x08enumdecl:V\n\x14enumvalue_customname\x18\
|
||||
\xd1\x83\x04\x20\x01(\t\x12!.google.protobuf.EnumValueOptionsR\x13enumva\
|
||||
lueCustomname:N\n\x13goproto_getters_all\x18\x99\xec\x03\x20\x01(\x08\
|
||||
\x12\x1c.google.protobuf.FileOptionsR\x11goprotoGettersAll:U\n\x17goprot\
|
||||
o_enum_prefix_all\x18\x9a\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.F\
|
||||
ileOptionsR\x14goprotoEnumPrefixAll:P\n\x14goproto_stringer_all\x18\x9b\
|
||||
\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x12goprotoStr\
|
||||
ingerAll:J\n\x11verbose_equal_all\x18\x9c\xec\x03\x20\x01(\x08\x12\x1c.g\
|
||||
oogle.protobuf.FileOptionsR\x0fverboseEqualAll:9\n\x08face_all\x18\x9d\
|
||||
\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x07faceAll:A\
|
||||
\n\x0cgostring_all\x18\x9e\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.\
|
||||
FileOptionsR\x0bgostringAll:A\n\x0cpopulate_all\x18\x9f\xec\x03\x20\x01(\
|
||||
\x08\x12\x1c.google.protobuf.FileOptionsR\x0bpopulateAll:A\n\x0cstringer\
|
||||
_all\x18\xa0\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\
|
||||
\x0bstringerAll:?\n\x0bonlyone_all\x18\xa1\xec\x03\x20\x01(\x08\x12\x1c.\
|
||||
google.protobuf.FileOptionsR\nonlyoneAll:;\n\tequal_all\x18\xa5\xec\x03\
|
||||
\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x08equalAll:G\n\x0fde\
|
||||
scription_all\x18\xa6\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileO\
|
||||
ptionsR\x0edescriptionAll:?\n\x0btestgen_all\x18\xa7\xec\x03\x20\x01(\
|
||||
\x08\x12\x1c.google.protobuf.FileOptionsR\ntestgenAll:A\n\x0cbenchgen_al\
|
||||
l\x18\xa8\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x0bb\
|
||||
enchgenAll:C\n\rmarshaler_all\x18\xa9\xec\x03\x20\x01(\x08\x12\x1c.googl\
|
||||
e.protobuf.FileOptionsR\x0cmarshalerAll:G\n\x0funmarshaler_all\x18\xaa\
|
||||
\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x0eunmarshale\
|
||||
rAll:P\n\x14stable_marshaler_all\x18\xab\xec\x03\x20\x01(\x08\x12\x1c.go\
|
||||
ogle.protobuf.FileOptionsR\x12stableMarshalerAll:;\n\tsizer_all\x18\xac\
|
||||
\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x08sizerAll:Y\
|
||||
\n\x19goproto_enum_stringer_all\x18\xad\xec\x03\x20\x01(\x08\x12\x1c.goo\
|
||||
gle.protobuf.FileOptionsR\x16goprotoEnumStringerAll:J\n\x11enum_stringer\
|
||||
_all\x18\xae\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\
|
||||
\x0fenumStringerAll:P\n\x14unsafe_marshaler_all\x18\xaf\xec\x03\x20\x01(\
|
||||
\x08\x12\x1c.google.protobuf.FileOptionsR\x12unsafeMarshalerAll:T\n\x16u\
|
||||
nsafe_unmarshaler_all\x18\xb0\xec\x03\x20\x01(\x08\x12\x1c.google.protob\
|
||||
uf.FileOptionsR\x14unsafeUnmarshalerAll:[\n\x1agoproto_extensions_map_al\
|
||||
l\x18\xb1\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x17g\
|
||||
oprotoExtensionsMapAll:X\n\x18goproto_unrecognized_all\x18\xb2\xec\x03\
|
||||
\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x16goprotoUnrecognize\
|
||||
dAll:I\n\x10gogoproto_import\x18\xb3\xec\x03\x20\x01(\x08\x12\x1c.google\
|
||||
.protobuf.FileOptionsR\x0fgogoprotoImport:E\n\x0eprotosizer_all\x18\xb4\
|
||||
\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\rprotosizerAl\
|
||||
l:?\n\x0bcompare_all\x18\xb5\xec\x03\x20\x01(\x08\x12\x1c.google.protobu\
|
||||
f.FileOptionsR\ncompareAll:A\n\x0ctypedecl_all\x18\xb6\xec\x03\x20\x01(\
|
||||
\x08\x12\x1c.google.protobuf.FileOptionsR\x0btypedeclAll:A\n\x0cenumdecl\
|
||||
_all\x18\xb7\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\
|
||||
\x0benumdeclAll:Q\n\x14goproto_registration\x18\xb8\xec\x03\x20\x01(\x08\
|
||||
\x12\x1c.google.protobuf.FileOptionsR\x13goprotoRegistration:G\n\x0fmess\
|
||||
agename_all\x18\xb9\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOpt\
|
||||
ionsR\x0emessagenameAll:R\n\x15goproto_sizecache_all\x18\xba\xec\x03\x20\
|
||||
\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x13goprotoSizecacheAll:N\
|
||||
\n\x13goproto_unkeyed_all\x18\xbb\xec\x03\x20\x01(\x08\x12\x1c.google.pr\
|
||||
otobuf.FileOptionsR\x11goprotoUnkeyedAll:J\n\x0fgoproto_getters\x18\x81\
|
||||
\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x0egoproto\
|
||||
Getters:L\n\x10goproto_stringer\x18\x83\xf4\x03\x20\x01(\x08\x12\x1f.goo\
|
||||
gle.protobuf.MessageOptionsR\x0fgoprotoStringer:F\n\rverbose_equal\x18\
|
||||
\x84\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x0cver\
|
||||
boseEqual:5\n\x04face\x18\x85\xf4\x03\x20\x01(\x08\x12\x1f.google.protob\
|
||||
uf.MessageOptionsR\x04face:=\n\x08gostring\x18\x86\xf4\x03\x20\x01(\x08\
|
||||
\x12\x1f.google.protobuf.MessageOptionsR\x08gostring:=\n\x08populate\x18\
|
||||
\x87\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x08pop\
|
||||
ulate:=\n\x08stringer\x18\xc0\x8b\x04\x20\x01(\x08\x12\x1f.google.protob\
|
||||
uf.MessageOptionsR\x08stringer:;\n\x07onlyone\x18\x89\xf4\x03\x20\x01(\
|
||||
\x08\x12\x1f.google.protobuf.MessageOptionsR\x07onlyone:7\n\x05equal\x18\
|
||||
\x8d\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x05equ\
|
||||
al:C\n\x0bdescription\x18\x8e\xf4\x03\x20\x01(\x08\x12\x1f.google.protob\
|
||||
uf.MessageOptionsR\x0bdescription:;\n\x07testgen\x18\x8f\xf4\x03\x20\x01\
|
||||
(\x08\x12\x1f.google.protobuf.MessageOptionsR\x07testgen:=\n\x08benchgen\
|
||||
\x18\x90\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\
|
||||
\x08benchgen:?\n\tmarshaler\x18\x91\xf4\x03\x20\x01(\x08\x12\x1f.google.\
|
||||
protobuf.MessageOptionsR\tmarshaler:C\n\x0bunmarshaler\x18\x92\xf4\x03\
|
||||
\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x0bunmarshaler:L\n\
|
||||
\x10stable_marshaler\x18\x93\xf4\x03\x20\x01(\x08\x12\x1f.google.protobu\
|
||||
f.MessageOptionsR\x0fstableMarshaler:7\n\x05sizer\x18\x94\xf4\x03\x20\
|
||||
\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x05sizer:L\n\x10unsafe\
|
||||
_marshaler\x18\x97\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageO\
|
||||
ptionsR\x0funsafeMarshaler:P\n\x12unsafe_unmarshaler\x18\x98\xf4\x03\x20\
|
||||
\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x11unsafeUnmarshaler:W\
|
||||
\n\x16goproto_extensions_map\x18\x99\xf4\x03\x20\x01(\x08\x12\x1f.google\
|
||||
.protobuf.MessageOptionsR\x14goprotoExtensionsMap:T\n\x14goproto_unrecog\
|
||||
nized\x18\x9a\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOption\
|
||||
sR\x13goprotoUnrecognized:A\n\nprotosizer\x18\x9c\xf4\x03\x20\x01(\x08\
|
||||
\x12\x1f.google.protobuf.MessageOptionsR\nprotosizer:;\n\x07compare\x18\
|
||||
\x9d\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x07com\
|
||||
pare:=\n\x08typedecl\x18\x9e\xf4\x03\x20\x01(\x08\x12\x1f.google.protobu\
|
||||
f.MessageOptionsR\x08typedecl:C\n\x0bmessagename\x18\xa1\xf4\x03\x20\x01\
|
||||
(\x08\x12\x1f.google.protobuf.MessageOptionsR\x0bmessagename:N\n\x11gopr\
|
||||
oto_sizecache\x18\xa2\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.Messa\
|
||||
geOptionsR\x10goprotoSizecache:J\n\x0fgoproto_unkeyed\x18\xa3\xf4\x03\
|
||||
\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x0egoprotoUnkeyed:\
|
||||
;\n\x08nullable\x18\xe9\xfb\x03\x20\x01(\x08\x12\x1d.google.protobuf.Fie\
|
||||
ldOptionsR\x08nullable:5\n\x05embed\x18\xea\xfb\x03\x20\x01(\x08\x12\x1d\
|
||||
.google.protobuf.FieldOptionsR\x05embed:?\n\ncustomtype\x18\xeb\xfb\x03\
|
||||
\x20\x01(\t\x12\x1d.google.protobuf.FieldOptionsR\ncustomtype:?\n\ncusto\
|
||||
mname\x18\xec\xfb\x03\x20\x01(\t\x12\x1d.google.protobuf.FieldOptionsR\n\
|
||||
customname:9\n\x07jsontag\x18\xed\xfb\x03\x20\x01(\t\x12\x1d.google.prot\
|
||||
obuf.FieldOptionsR\x07jsontag:;\n\x08moretags\x18\xee\xfb\x03\x20\x01(\t\
|
||||
\x12\x1d.google.protobuf.FieldOptionsR\x08moretags:;\n\x08casttype\x18\
|
||||
\xef\xfb\x03\x20\x01(\t\x12\x1d.google.protobuf.FieldOptionsR\x08casttyp\
|
||||
e:9\n\x07castkey\x18\xf0\xfb\x03\x20\x01(\t\x12\x1d.google.protobuf.Fiel\
|
||||
dOptionsR\x07castkey:=\n\tcastvalue\x18\xf1\xfb\x03\x20\x01(\t\x12\x1d.g\
|
||||
oogle.protobuf.FieldOptionsR\tcastvalue:9\n\x07stdtime\x18\xf2\xfb\x03\
|
||||
\x20\x01(\x08\x12\x1d.google.protobuf.FieldOptionsR\x07stdtime:A\n\x0bst\
|
||||
dduration\x18\xf3\xfb\x03\x20\x01(\x08\x12\x1d.google.protobuf.FieldOpti\
|
||||
onsR\x0bstdduration:?\n\nwktpointer\x18\xf4\xfb\x03\x20\x01(\x08\x12\x1d\
|
||||
.google.protobuf.FieldOptionsR\nwktpointerBE\n\x13com.google.protobufB\n\
|
||||
GoGoProtosZ\"github.com/gogo/protobuf/gogoprotob\x06proto2\
|
||||
";
|
||||
|
||||
/// `FileDescriptorProto` object which was a source for this generated file
|
||||
fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
|
||||
static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
|
||||
file_descriptor_proto_lazy.get(|| {
|
||||
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
|
||||
})
|
||||
}
|
||||
|
||||
/// `FileDescriptor` object which allows dynamic access to files
|
||||
pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
|
||||
static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
|
||||
static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
|
||||
file_descriptor.get(|| {
|
||||
let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
|
||||
let mut deps = ::std::vec::Vec::with_capacity(1);
|
||||
deps.push(::protobuf::descriptor::file_descriptor().clone());
|
||||
let mut messages = ::std::vec::Vec::with_capacity(0);
|
||||
let mut enums = ::std::vec::Vec::with_capacity(0);
|
||||
::protobuf::reflect::GeneratedFileDescriptor::new_generated(
|
||||
file_descriptor_proto(),
|
||||
deps,
|
||||
messages,
|
||||
enums,
|
||||
)
|
||||
});
|
||||
::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
|
||||
})
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,3 +1,4 @@
|
|||
// @generated
|
||||
|
||||
pub mod gogo;
|
||||
pub mod metrics;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,4 +1,5 @@
|
|||
// This file is generated by rust-protobuf 2.27.1. Do not edit
|
||||
// This file is generated by rust-protobuf 3.1.0. Do not edit
|
||||
// .proto file is parsed by pure
|
||||
// @generated
|
||||
|
||||
// https://github.com/rust-lang/rust-clippy/issues/702
|
||||
|
|
@ -15,21 +16,24 @@
|
|||
#![allow(non_snake_case)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![allow(trivial_casts)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(unused_results)]
|
||||
#![allow(unused_mut)]
|
||||
|
||||
//! Generated file from `github.com/containerd/containerd/api/events/content.proto`
|
||||
|
||||
/// Generated files are compatible only with the same version
|
||||
/// of protobuf runtime.
|
||||
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_27_1;
|
||||
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_1_0;
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
#[derive(PartialEq,Clone,Default,Debug)]
|
||||
// @@protoc_insertion_point(message:containerd.events.ContentDelete)
|
||||
pub struct ContentDelete {
|
||||
// message fields
|
||||
// @@protoc_insertion_point(field:containerd.events.ContentDelete.digest)
|
||||
pub digest: ::std::string::String,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
// @@protoc_insertion_point(special_field:containerd.events.ContentDelete.special_fields)
|
||||
pub special_fields: ::protobuf::SpecialFields,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a ContentDelete {
|
||||
|
|
@ -45,10 +49,10 @@ impl ContentDelete {
|
|||
|
||||
// string digest = 1;
|
||||
|
||||
|
||||
pub fn get_digest(&self) -> &str {
|
||||
pub fn digest(&self) -> &str {
|
||||
&self.digest
|
||||
}
|
||||
|
||||
pub fn clear_digest(&mut self) {
|
||||
self.digest.clear();
|
||||
}
|
||||
|
|
@ -68,22 +72,38 @@ impl ContentDelete {
|
|||
pub fn take_digest(&mut self) -> ::std::string::String {
|
||||
::std::mem::replace(&mut self.digest, ::std::string::String::new())
|
||||
}
|
||||
|
||||
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
|
||||
let mut fields = ::std::vec::Vec::with_capacity(1);
|
||||
let mut oneofs = ::std::vec::Vec::with_capacity(0);
|
||||
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
|
||||
"digest",
|
||||
|m: &ContentDelete| { &m.digest },
|
||||
|m: &mut ContentDelete| { &mut m.digest },
|
||||
));
|
||||
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<ContentDelete>(
|
||||
"ContentDelete",
|
||||
fields,
|
||||
oneofs,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for ContentDelete {
|
||||
const NAME: &'static str = "ContentDelete";
|
||||
|
||||
fn is_initialized(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::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)?;
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
|
||||
while let Some(tag) = is.read_raw_tag_or_eof()? {
|
||||
match tag {
|
||||
10 => {
|
||||
self.digest = is.read_string()?;
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
tag => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
@ -92,113 +112,103 @@ impl ::protobuf::Message for ContentDelete {
|
|||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
fn compute_size(&self) -> u64 {
|
||||
let mut my_size = 0;
|
||||
if !self.digest.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(1, &self.digest);
|
||||
}
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
|
||||
self.special_fields.cached_size().set(my_size as u32);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
|
||||
if !self.digest.is_empty() {
|
||||
os.write_string(1, &self.digest)?;
|
||||
}
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
os.write_unknown_fields(self.special_fields.unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
fn special_fields(&self) -> &::protobuf::SpecialFields {
|
||||
&self.special_fields
|
||||
}
|
||||
|
||||
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 mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
|
||||
&mut self.special_fields
|
||||
}
|
||||
|
||||
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 clear(&mut self) {
|
||||
self.digest.clear();
|
||||
self.special_fields.clear();
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static ContentDelete {
|
||||
static instance: ::protobuf::rt::LazyV2<ContentDelete> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(ContentDelete::new)
|
||||
static instance: ContentDelete = ContentDelete {
|
||||
digest: ::std::string::String::new(),
|
||||
special_fields: ::protobuf::SpecialFields::new(),
|
||||
};
|
||||
&instance
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for ContentDelete {
|
||||
fn clear(&mut self) {
|
||||
self.digest.clear();
|
||||
self.unknown_fields.clear();
|
||||
impl ::protobuf::MessageFull for ContentDelete {
|
||||
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
|
||||
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
|
||||
descriptor.get(|| file_descriptor().message_by_package_relative_name("ContentDelete").unwrap()).clone()
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for ContentDelete {
|
||||
impl ::std::fmt::Display for ContentDelete {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
||||
::protobuf::text_format::fmt(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for ContentDelete {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<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\
|
||||
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\
|
||||
containers/go-digest.Digest\xc8\xde\x1f\0B8Z2github.com/containerd/conta\
|
||||
inerd/api/events;events\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 {
|
||||
/// `FileDescriptorProto` object which was a source for this generated file
|
||||
fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
|
||||
static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
|
||||
file_descriptor_proto_lazy.get(|| {
|
||||
parse_descriptor_proto()
|
||||
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
|
||||
})
|
||||
}
|
||||
|
||||
/// `FileDescriptor` object which allows dynamic access to files
|
||||
pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
|
||||
static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
|
||||
static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
|
||||
file_descriptor.get(|| {
|
||||
let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
|
||||
let mut deps = ::std::vec::Vec::with_capacity(2);
|
||||
deps.push(super::gogo::file_descriptor().clone());
|
||||
deps.push(super::fieldpath::file_descriptor().clone());
|
||||
let mut messages = ::std::vec::Vec::with_capacity(1);
|
||||
messages.push(ContentDelete::generated_message_descriptor_data());
|
||||
let mut enums = ::std::vec::Vec::with_capacity(0);
|
||||
::protobuf::reflect::GeneratedFileDescriptor::new_generated(
|
||||
file_descriptor_proto(),
|
||||
deps,
|
||||
messages,
|
||||
enums,
|
||||
)
|
||||
});
|
||||
::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,71 @@
|
|||
// This file is generated by rust-protobuf 3.1.0. Do not edit
|
||||
// .proto file is parsed by pure
|
||||
// @generated
|
||||
|
||||
// https://github.com/rust-lang/rust-clippy/issues/702
|
||||
#![allow(unknown_lints)]
|
||||
#![allow(clippy::all)]
|
||||
|
||||
#![allow(unused_attributes)]
|
||||
#![cfg_attr(rustfmt, rustfmt::skip)]
|
||||
|
||||
#![allow(box_pointers)]
|
||||
#![allow(dead_code)]
|
||||
#![allow(missing_docs)]
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(non_snake_case)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![allow(trivial_casts)]
|
||||
#![allow(unused_results)]
|
||||
#![allow(unused_mut)]
|
||||
|
||||
//! Generated file from `github.com/containerd/containerd/protobuf/plugin/fieldpath.proto`
|
||||
|
||||
/// Generated files are compatible only with the same version
|
||||
/// of protobuf runtime.
|
||||
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_1_0;
|
||||
|
||||
/// Extension fields
|
||||
pub mod exts {
|
||||
|
||||
pub const fieldpath_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63300, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const fieldpath: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64400, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
}
|
||||
|
||||
static file_descriptor_proto_data: &'static [u8] = b"\
|
||||
\n@github.com/containerd/containerd/protobuf/plugin/fieldpath.proto\x12\
|
||||
\x11containerd.plugin\x1a\x20google/protobuf/descriptor.proto:C\n\rfield\
|
||||
path_all\x18\xc4\xee\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOption\
|
||||
sR\x0cfieldpathAll:?\n\tfieldpath\x18\x90\xf7\x03\x20\x01(\x08\x12\x1f.g\
|
||||
oogle.protobuf.MessageOptionsR\tfieldpathb\x06proto2\
|
||||
";
|
||||
|
||||
/// `FileDescriptorProto` object which was a source for this generated file
|
||||
fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
|
||||
static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
|
||||
file_descriptor_proto_lazy.get(|| {
|
||||
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
|
||||
})
|
||||
}
|
||||
|
||||
/// `FileDescriptor` object which allows dynamic access to files
|
||||
pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
|
||||
static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
|
||||
static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
|
||||
file_descriptor.get(|| {
|
||||
let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
|
||||
let mut deps = ::std::vec::Vec::with_capacity(1);
|
||||
deps.push(::protobuf::descriptor::file_descriptor().clone());
|
||||
let mut messages = ::std::vec::Vec::with_capacity(0);
|
||||
let mut enums = ::std::vec::Vec::with_capacity(0);
|
||||
::protobuf::reflect::GeneratedFileDescriptor::new_generated(
|
||||
file_descriptor_proto(),
|
||||
deps,
|
||||
messages,
|
||||
enums,
|
||||
)
|
||||
});
|
||||
::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
|
||||
})
|
||||
}
|
||||
|
|
@ -0,0 +1,327 @@
|
|||
// This file is generated by rust-protobuf 3.1.0. Do not edit
|
||||
// .proto file is parsed by pure
|
||||
// @generated
|
||||
|
||||
// https://github.com/rust-lang/rust-clippy/issues/702
|
||||
#![allow(unknown_lints)]
|
||||
#![allow(clippy::all)]
|
||||
|
||||
#![allow(unused_attributes)]
|
||||
#![cfg_attr(rustfmt, rustfmt::skip)]
|
||||
|
||||
#![allow(box_pointers)]
|
||||
#![allow(dead_code)]
|
||||
#![allow(missing_docs)]
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(non_snake_case)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![allow(trivial_casts)]
|
||||
#![allow(unused_results)]
|
||||
#![allow(unused_mut)]
|
||||
|
||||
//! Generated file from `gogoproto/gogo.proto`
|
||||
|
||||
/// Generated files are compatible only with the same version
|
||||
/// of protobuf runtime.
|
||||
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_1_0;
|
||||
|
||||
/// Extension fields
|
||||
pub mod exts {
|
||||
|
||||
pub const goproto_enum_prefix: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(62001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_enum_stringer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(62021, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const enum_stringer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(62022, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const enum_customname: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(62023, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING);
|
||||
|
||||
pub const enumdecl: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(62024, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const enumvalue_customname: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumValueOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(66001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING);
|
||||
|
||||
pub const goproto_getters_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_enum_prefix_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63002, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_stringer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63003, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const verbose_equal_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63004, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const face_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63005, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const gostring_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63006, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const populate_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63007, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const stringer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63008, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const onlyone_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63009, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const equal_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63013, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const description_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63014, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const testgen_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63015, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const benchgen_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63016, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const marshaler_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63017, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const unmarshaler_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63018, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const stable_marshaler_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63019, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const sizer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63020, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_enum_stringer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63021, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const enum_stringer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63022, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const unsafe_marshaler_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63023, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const unsafe_unmarshaler_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63024, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_extensions_map_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63025, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_unrecognized_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63026, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const gogoproto_import: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63027, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const protosizer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63028, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const compare_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63029, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const typedecl_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63030, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const enumdecl_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63031, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_registration: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63032, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const messagename_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63033, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_sizecache_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63034, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_unkeyed_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63035, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_getters: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_stringer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64003, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const verbose_equal: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64004, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const face: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64005, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const gostring: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64006, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const populate: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64007, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const stringer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(67008, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const onlyone: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64009, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const equal: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64013, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const description: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64014, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const testgen: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64015, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const benchgen: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64016, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const marshaler: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64017, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const unmarshaler: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64018, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const stable_marshaler: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64019, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const sizer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64020, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const unsafe_marshaler: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64023, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const unsafe_unmarshaler: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64024, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_extensions_map: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64025, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_unrecognized: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64026, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const protosizer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64028, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const compare: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64029, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const typedecl: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64030, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const messagename: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64033, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_sizecache: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64034, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_unkeyed: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64035, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const nullable: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(65001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const embed: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(65002, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const customtype: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65003, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING);
|
||||
|
||||
pub const customname: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65004, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING);
|
||||
|
||||
pub const jsontag: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65005, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING);
|
||||
|
||||
pub const moretags: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65006, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING);
|
||||
|
||||
pub const casttype: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65007, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING);
|
||||
|
||||
pub const castkey: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65008, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING);
|
||||
|
||||
pub const castvalue: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65009, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING);
|
||||
|
||||
pub const stdtime: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(65010, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const stdduration: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(65011, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const wktpointer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(65012, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
}
|
||||
|
||||
static file_descriptor_proto_data: &'static [u8] = b"\
|
||||
\n\x14gogoproto/gogo.proto\x12\tgogoproto\x1a\x20google/protobuf/descrip\
|
||||
tor.proto:N\n\x13goproto_enum_prefix\x18\xb1\xe4\x03\x20\x01(\x08\x12\
|
||||
\x1c.google.protobuf.EnumOptionsR\x11goprotoEnumPrefix:R\n\x15goproto_en\
|
||||
um_stringer\x18\xc5\xe4\x03\x20\x01(\x08\x12\x1c.google.protobuf.EnumOpt\
|
||||
ionsR\x13goprotoEnumStringer:C\n\renum_stringer\x18\xc6\xe4\x03\x20\x01(\
|
||||
\x08\x12\x1c.google.protobuf.EnumOptionsR\x0cenumStringer:G\n\x0fenum_cu\
|
||||
stomname\x18\xc7\xe4\x03\x20\x01(\t\x12\x1c.google.protobuf.EnumOptionsR\
|
||||
\x0eenumCustomname::\n\x08enumdecl\x18\xc8\xe4\x03\x20\x01(\x08\x12\x1c.\
|
||||
google.protobuf.EnumOptionsR\x08enumdecl:V\n\x14enumvalue_customname\x18\
|
||||
\xd1\x83\x04\x20\x01(\t\x12!.google.protobuf.EnumValueOptionsR\x13enumva\
|
||||
lueCustomname:N\n\x13goproto_getters_all\x18\x99\xec\x03\x20\x01(\x08\
|
||||
\x12\x1c.google.protobuf.FileOptionsR\x11goprotoGettersAll:U\n\x17goprot\
|
||||
o_enum_prefix_all\x18\x9a\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.F\
|
||||
ileOptionsR\x14goprotoEnumPrefixAll:P\n\x14goproto_stringer_all\x18\x9b\
|
||||
\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x12goprotoStr\
|
||||
ingerAll:J\n\x11verbose_equal_all\x18\x9c\xec\x03\x20\x01(\x08\x12\x1c.g\
|
||||
oogle.protobuf.FileOptionsR\x0fverboseEqualAll:9\n\x08face_all\x18\x9d\
|
||||
\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x07faceAll:A\
|
||||
\n\x0cgostring_all\x18\x9e\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.\
|
||||
FileOptionsR\x0bgostringAll:A\n\x0cpopulate_all\x18\x9f\xec\x03\x20\x01(\
|
||||
\x08\x12\x1c.google.protobuf.FileOptionsR\x0bpopulateAll:A\n\x0cstringer\
|
||||
_all\x18\xa0\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\
|
||||
\x0bstringerAll:?\n\x0bonlyone_all\x18\xa1\xec\x03\x20\x01(\x08\x12\x1c.\
|
||||
google.protobuf.FileOptionsR\nonlyoneAll:;\n\tequal_all\x18\xa5\xec\x03\
|
||||
\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x08equalAll:G\n\x0fde\
|
||||
scription_all\x18\xa6\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileO\
|
||||
ptionsR\x0edescriptionAll:?\n\x0btestgen_all\x18\xa7\xec\x03\x20\x01(\
|
||||
\x08\x12\x1c.google.protobuf.FileOptionsR\ntestgenAll:A\n\x0cbenchgen_al\
|
||||
l\x18\xa8\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x0bb\
|
||||
enchgenAll:C\n\rmarshaler_all\x18\xa9\xec\x03\x20\x01(\x08\x12\x1c.googl\
|
||||
e.protobuf.FileOptionsR\x0cmarshalerAll:G\n\x0funmarshaler_all\x18\xaa\
|
||||
\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x0eunmarshale\
|
||||
rAll:P\n\x14stable_marshaler_all\x18\xab\xec\x03\x20\x01(\x08\x12\x1c.go\
|
||||
ogle.protobuf.FileOptionsR\x12stableMarshalerAll:;\n\tsizer_all\x18\xac\
|
||||
\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x08sizerAll:Y\
|
||||
\n\x19goproto_enum_stringer_all\x18\xad\xec\x03\x20\x01(\x08\x12\x1c.goo\
|
||||
gle.protobuf.FileOptionsR\x16goprotoEnumStringerAll:J\n\x11enum_stringer\
|
||||
_all\x18\xae\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\
|
||||
\x0fenumStringerAll:P\n\x14unsafe_marshaler_all\x18\xaf\xec\x03\x20\x01(\
|
||||
\x08\x12\x1c.google.protobuf.FileOptionsR\x12unsafeMarshalerAll:T\n\x16u\
|
||||
nsafe_unmarshaler_all\x18\xb0\xec\x03\x20\x01(\x08\x12\x1c.google.protob\
|
||||
uf.FileOptionsR\x14unsafeUnmarshalerAll:[\n\x1agoproto_extensions_map_al\
|
||||
l\x18\xb1\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x17g\
|
||||
oprotoExtensionsMapAll:X\n\x18goproto_unrecognized_all\x18\xb2\xec\x03\
|
||||
\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x16goprotoUnrecognize\
|
||||
dAll:I\n\x10gogoproto_import\x18\xb3\xec\x03\x20\x01(\x08\x12\x1c.google\
|
||||
.protobuf.FileOptionsR\x0fgogoprotoImport:E\n\x0eprotosizer_all\x18\xb4\
|
||||
\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\rprotosizerAl\
|
||||
l:?\n\x0bcompare_all\x18\xb5\xec\x03\x20\x01(\x08\x12\x1c.google.protobu\
|
||||
f.FileOptionsR\ncompareAll:A\n\x0ctypedecl_all\x18\xb6\xec\x03\x20\x01(\
|
||||
\x08\x12\x1c.google.protobuf.FileOptionsR\x0btypedeclAll:A\n\x0cenumdecl\
|
||||
_all\x18\xb7\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\
|
||||
\x0benumdeclAll:Q\n\x14goproto_registration\x18\xb8\xec\x03\x20\x01(\x08\
|
||||
\x12\x1c.google.protobuf.FileOptionsR\x13goprotoRegistration:G\n\x0fmess\
|
||||
agename_all\x18\xb9\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOpt\
|
||||
ionsR\x0emessagenameAll:R\n\x15goproto_sizecache_all\x18\xba\xec\x03\x20\
|
||||
\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x13goprotoSizecacheAll:N\
|
||||
\n\x13goproto_unkeyed_all\x18\xbb\xec\x03\x20\x01(\x08\x12\x1c.google.pr\
|
||||
otobuf.FileOptionsR\x11goprotoUnkeyedAll:J\n\x0fgoproto_getters\x18\x81\
|
||||
\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x0egoproto\
|
||||
Getters:L\n\x10goproto_stringer\x18\x83\xf4\x03\x20\x01(\x08\x12\x1f.goo\
|
||||
gle.protobuf.MessageOptionsR\x0fgoprotoStringer:F\n\rverbose_equal\x18\
|
||||
\x84\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x0cver\
|
||||
boseEqual:5\n\x04face\x18\x85\xf4\x03\x20\x01(\x08\x12\x1f.google.protob\
|
||||
uf.MessageOptionsR\x04face:=\n\x08gostring\x18\x86\xf4\x03\x20\x01(\x08\
|
||||
\x12\x1f.google.protobuf.MessageOptionsR\x08gostring:=\n\x08populate\x18\
|
||||
\x87\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x08pop\
|
||||
ulate:=\n\x08stringer\x18\xc0\x8b\x04\x20\x01(\x08\x12\x1f.google.protob\
|
||||
uf.MessageOptionsR\x08stringer:;\n\x07onlyone\x18\x89\xf4\x03\x20\x01(\
|
||||
\x08\x12\x1f.google.protobuf.MessageOptionsR\x07onlyone:7\n\x05equal\x18\
|
||||
\x8d\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x05equ\
|
||||
al:C\n\x0bdescription\x18\x8e\xf4\x03\x20\x01(\x08\x12\x1f.google.protob\
|
||||
uf.MessageOptionsR\x0bdescription:;\n\x07testgen\x18\x8f\xf4\x03\x20\x01\
|
||||
(\x08\x12\x1f.google.protobuf.MessageOptionsR\x07testgen:=\n\x08benchgen\
|
||||
\x18\x90\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\
|
||||
\x08benchgen:?\n\tmarshaler\x18\x91\xf4\x03\x20\x01(\x08\x12\x1f.google.\
|
||||
protobuf.MessageOptionsR\tmarshaler:C\n\x0bunmarshaler\x18\x92\xf4\x03\
|
||||
\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x0bunmarshaler:L\n\
|
||||
\x10stable_marshaler\x18\x93\xf4\x03\x20\x01(\x08\x12\x1f.google.protobu\
|
||||
f.MessageOptionsR\x0fstableMarshaler:7\n\x05sizer\x18\x94\xf4\x03\x20\
|
||||
\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x05sizer:L\n\x10unsafe\
|
||||
_marshaler\x18\x97\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageO\
|
||||
ptionsR\x0funsafeMarshaler:P\n\x12unsafe_unmarshaler\x18\x98\xf4\x03\x20\
|
||||
\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x11unsafeUnmarshaler:W\
|
||||
\n\x16goproto_extensions_map\x18\x99\xf4\x03\x20\x01(\x08\x12\x1f.google\
|
||||
.protobuf.MessageOptionsR\x14goprotoExtensionsMap:T\n\x14goproto_unrecog\
|
||||
nized\x18\x9a\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOption\
|
||||
sR\x13goprotoUnrecognized:A\n\nprotosizer\x18\x9c\xf4\x03\x20\x01(\x08\
|
||||
\x12\x1f.google.protobuf.MessageOptionsR\nprotosizer:;\n\x07compare\x18\
|
||||
\x9d\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x07com\
|
||||
pare:=\n\x08typedecl\x18\x9e\xf4\x03\x20\x01(\x08\x12\x1f.google.protobu\
|
||||
f.MessageOptionsR\x08typedecl:C\n\x0bmessagename\x18\xa1\xf4\x03\x20\x01\
|
||||
(\x08\x12\x1f.google.protobuf.MessageOptionsR\x0bmessagename:N\n\x11gopr\
|
||||
oto_sizecache\x18\xa2\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.Messa\
|
||||
geOptionsR\x10goprotoSizecache:J\n\x0fgoproto_unkeyed\x18\xa3\xf4\x03\
|
||||
\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x0egoprotoUnkeyed:\
|
||||
;\n\x08nullable\x18\xe9\xfb\x03\x20\x01(\x08\x12\x1d.google.protobuf.Fie\
|
||||
ldOptionsR\x08nullable:5\n\x05embed\x18\xea\xfb\x03\x20\x01(\x08\x12\x1d\
|
||||
.google.protobuf.FieldOptionsR\x05embed:?\n\ncustomtype\x18\xeb\xfb\x03\
|
||||
\x20\x01(\t\x12\x1d.google.protobuf.FieldOptionsR\ncustomtype:?\n\ncusto\
|
||||
mname\x18\xec\xfb\x03\x20\x01(\t\x12\x1d.google.protobuf.FieldOptionsR\n\
|
||||
customname:9\n\x07jsontag\x18\xed\xfb\x03\x20\x01(\t\x12\x1d.google.prot\
|
||||
obuf.FieldOptionsR\x07jsontag:;\n\x08moretags\x18\xee\xfb\x03\x20\x01(\t\
|
||||
\x12\x1d.google.protobuf.FieldOptionsR\x08moretags:;\n\x08casttype\x18\
|
||||
\xef\xfb\x03\x20\x01(\t\x12\x1d.google.protobuf.FieldOptionsR\x08casttyp\
|
||||
e:9\n\x07castkey\x18\xf0\xfb\x03\x20\x01(\t\x12\x1d.google.protobuf.Fiel\
|
||||
dOptionsR\x07castkey:=\n\tcastvalue\x18\xf1\xfb\x03\x20\x01(\t\x12\x1d.g\
|
||||
oogle.protobuf.FieldOptionsR\tcastvalue:9\n\x07stdtime\x18\xf2\xfb\x03\
|
||||
\x20\x01(\x08\x12\x1d.google.protobuf.FieldOptionsR\x07stdtime:A\n\x0bst\
|
||||
dduration\x18\xf3\xfb\x03\x20\x01(\x08\x12\x1d.google.protobuf.FieldOpti\
|
||||
onsR\x0bstdduration:?\n\nwktpointer\x18\xf4\xfb\x03\x20\x01(\x08\x12\x1d\
|
||||
.google.protobuf.FieldOptionsR\nwktpointerBE\n\x13com.google.protobufB\n\
|
||||
GoGoProtosZ\"github.com/gogo/protobuf/gogoprotob\x06proto2\
|
||||
";
|
||||
|
||||
/// `FileDescriptorProto` object which was a source for this generated file
|
||||
fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
|
||||
static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
|
||||
file_descriptor_proto_lazy.get(|| {
|
||||
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
|
||||
})
|
||||
}
|
||||
|
||||
/// `FileDescriptor` object which allows dynamic access to files
|
||||
pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
|
||||
static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
|
||||
static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
|
||||
file_descriptor.get(|| {
|
||||
let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
|
||||
let mut deps = ::std::vec::Vec::with_capacity(1);
|
||||
deps.push(::protobuf::descriptor::file_descriptor().clone());
|
||||
let mut messages = ::std::vec::Vec::with_capacity(0);
|
||||
let mut enums = ::std::vec::Vec::with_capacity(0);
|
||||
::protobuf::reflect::GeneratedFileDescriptor::new_generated(
|
||||
file_descriptor_proto(),
|
||||
deps,
|
||||
messages,
|
||||
enums,
|
||||
)
|
||||
});
|
||||
::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
|
||||
})
|
||||
}
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
// This file is generated by rust-protobuf 2.27.1. Do not edit
|
||||
// This file is generated by rust-protobuf 3.1.0. Do not edit
|
||||
// .proto file is parsed by pure
|
||||
// @generated
|
||||
|
||||
// https://github.com/rust-lang/rust-clippy/issues/702
|
||||
|
|
@ -15,22 +16,26 @@
|
|||
#![allow(non_snake_case)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![allow(trivial_casts)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(unused_results)]
|
||||
#![allow(unused_mut)]
|
||||
|
||||
//! Generated file from `github.com/containerd/containerd/api/events/image.proto`
|
||||
|
||||
/// Generated files are compatible only with the same version
|
||||
/// of protobuf runtime.
|
||||
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_27_1;
|
||||
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_1_0;
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
#[derive(PartialEq,Clone,Default,Debug)]
|
||||
// @@protoc_insertion_point(message:containerd.services.images.v1.ImageCreate)
|
||||
pub struct ImageCreate {
|
||||
// message fields
|
||||
// @@protoc_insertion_point(field:containerd.services.images.v1.ImageCreate.name)
|
||||
pub name: ::std::string::String,
|
||||
// @@protoc_insertion_point(field:containerd.services.images.v1.ImageCreate.labels)
|
||||
pub labels: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
// @@protoc_insertion_point(special_field:containerd.services.images.v1.ImageCreate.special_fields)
|
||||
pub special_fields: ::protobuf::SpecialFields,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a ImageCreate {
|
||||
|
|
@ -46,10 +51,10 @@ impl ImageCreate {
|
|||
|
||||
// string name = 1;
|
||||
|
||||
|
||||
pub fn get_name(&self) -> &str {
|
||||
pub fn name(&self) -> &str {
|
||||
&self.name
|
||||
}
|
||||
|
||||
pub fn clear_name(&mut self) {
|
||||
self.name.clear();
|
||||
}
|
||||
|
|
@ -70,12 +75,12 @@ impl ImageCreate {
|
|||
::std::mem::replace(&mut self.name, ::std::string::String::new())
|
||||
}
|
||||
|
||||
// repeated .containerd.services.images.v1.ImageCreate.labels_MapEntry labels = 2;
|
||||
// repeated .containerd.services.images.v1.ImageCreate.LabelsEntry labels = 2;
|
||||
|
||||
|
||||
pub fn get_labels(&self) -> &::std::collections::HashMap<::std::string::String, ::std::string::String> {
|
||||
pub fn labels(&self) -> &::std::collections::HashMap<::std::string::String, ::std::string::String> {
|
||||
&self.labels
|
||||
}
|
||||
|
||||
pub fn clear_labels(&mut self) {
|
||||
self.labels.clear();
|
||||
}
|
||||
|
|
@ -94,25 +99,58 @@ impl ImageCreate {
|
|||
pub fn take_labels(&mut self) -> ::std::collections::HashMap<::std::string::String, ::std::string::String> {
|
||||
::std::mem::replace(&mut self.labels, ::std::collections::HashMap::new())
|
||||
}
|
||||
|
||||
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
|
||||
let mut fields = ::std::vec::Vec::with_capacity(2);
|
||||
let mut oneofs = ::std::vec::Vec::with_capacity(0);
|
||||
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
|
||||
"name",
|
||||
|m: &ImageCreate| { &m.name },
|
||||
|m: &mut ImageCreate| { &mut m.name },
|
||||
));
|
||||
fields.push(::protobuf::reflect::rt::v2::make_map_simpler_accessor::<_, _, _>(
|
||||
"labels",
|
||||
|m: &ImageCreate| { &m.labels },
|
||||
|m: &mut ImageCreate| { &mut m.labels },
|
||||
));
|
||||
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<ImageCreate>(
|
||||
"ImageCreate",
|
||||
fields,
|
||||
oneofs,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for ImageCreate {
|
||||
const NAME: &'static str = "ImageCreate";
|
||||
|
||||
fn is_initialized(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::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)?;
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
|
||||
while let Some(tag) = is.read_raw_tag_or_eof()? {
|
||||
match tag {
|
||||
10 => {
|
||||
self.name = is.read_string()?;
|
||||
},
|
||||
2 => {
|
||||
::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(wire_type, is, &mut self.labels)?;
|
||||
18 => {
|
||||
let len = is.read_raw_varint32()?;
|
||||
let old_limit = is.push_limit(len as u64)?;
|
||||
let mut key = ::std::default::Default::default();
|
||||
let mut value = ::std::default::Default::default();
|
||||
while let Some(tag) = is.read_raw_tag_or_eof()? {
|
||||
match tag {
|
||||
10 => key = is.read_string()?,
|
||||
18 => value = is.read_string()?,
|
||||
_ => ::protobuf::rt::skip_field_for_tag(tag, is)?,
|
||||
};
|
||||
}
|
||||
is.pop_limit(old_limit);
|
||||
self.labels.insert(key, value);
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
tag => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
@ -121,112 +159,91 @@ impl ::protobuf::Message for ImageCreate {
|
|||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
fn compute_size(&self) -> u64 {
|
||||
let mut my_size = 0;
|
||||
if !self.name.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(1, &self.name);
|
||||
}
|
||||
my_size += ::protobuf::rt::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);
|
||||
for (k, v) in &self.labels {
|
||||
let mut entry_size = 0;
|
||||
entry_size += ::protobuf::rt::string_size(1, &k);
|
||||
entry_size += ::protobuf::rt::string_size(2, &v);
|
||||
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(entry_size) + entry_size
|
||||
};
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
|
||||
self.special_fields.cached_size().set(my_size as u32);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
|
||||
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())?;
|
||||
for (k, v) in &self.labels {
|
||||
let mut entry_size = 0;
|
||||
entry_size += ::protobuf::rt::string_size(1, &k);
|
||||
entry_size += ::protobuf::rt::string_size(2, &v);
|
||||
os.write_raw_varint32(18)?; // Tag.
|
||||
os.write_raw_varint32(entry_size as u32)?;
|
||||
os.write_string(1, &k)?;
|
||||
os.write_string(2, &v)?;
|
||||
};
|
||||
os.write_unknown_fields(self.special_fields.unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
fn special_fields(&self) -> &::protobuf::SpecialFields {
|
||||
&self.special_fields
|
||||
}
|
||||
|
||||
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 mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
|
||||
&mut self.special_fields
|
||||
}
|
||||
|
||||
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 clear(&mut self) {
|
||||
self.name.clear();
|
||||
self.labels.clear();
|
||||
self.special_fields.clear();
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static ImageCreate {
|
||||
static instance: ::protobuf::rt::LazyV2<ImageCreate> = ::protobuf::rt::LazyV2::INIT;
|
||||
static instance: ::protobuf::rt::Lazy<ImageCreate> = ::protobuf::rt::Lazy::new();
|
||||
instance.get(ImageCreate::new)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for ImageCreate {
|
||||
fn clear(&mut self) {
|
||||
self.name.clear();
|
||||
self.labels.clear();
|
||||
self.unknown_fields.clear();
|
||||
impl ::protobuf::MessageFull for ImageCreate {
|
||||
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
|
||||
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
|
||||
descriptor.get(|| file_descriptor().message_by_package_relative_name("ImageCreate").unwrap()).clone()
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for ImageCreate {
|
||||
impl ::std::fmt::Display for ImageCreate {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
||||
::protobuf::text_format::fmt(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for ImageCreate {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
|
||||
}
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
#[derive(PartialEq,Clone,Default,Debug)]
|
||||
// @@protoc_insertion_point(message:containerd.services.images.v1.ImageUpdate)
|
||||
pub struct ImageUpdate {
|
||||
// message fields
|
||||
// @@protoc_insertion_point(field:containerd.services.images.v1.ImageUpdate.name)
|
||||
pub name: ::std::string::String,
|
||||
// @@protoc_insertion_point(field:containerd.services.images.v1.ImageUpdate.labels)
|
||||
pub labels: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
// @@protoc_insertion_point(special_field:containerd.services.images.v1.ImageUpdate.special_fields)
|
||||
pub special_fields: ::protobuf::SpecialFields,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a ImageUpdate {
|
||||
|
|
@ -242,10 +259,10 @@ impl ImageUpdate {
|
|||
|
||||
// string name = 1;
|
||||
|
||||
|
||||
pub fn get_name(&self) -> &str {
|
||||
pub fn name(&self) -> &str {
|
||||
&self.name
|
||||
}
|
||||
|
||||
pub fn clear_name(&mut self) {
|
||||
self.name.clear();
|
||||
}
|
||||
|
|
@ -266,12 +283,12 @@ impl ImageUpdate {
|
|||
::std::mem::replace(&mut self.name, ::std::string::String::new())
|
||||
}
|
||||
|
||||
// repeated .containerd.services.images.v1.ImageUpdate.labels_MapEntry labels = 2;
|
||||
// repeated .containerd.services.images.v1.ImageUpdate.LabelsEntry labels = 2;
|
||||
|
||||
|
||||
pub fn get_labels(&self) -> &::std::collections::HashMap<::std::string::String, ::std::string::String> {
|
||||
pub fn labels(&self) -> &::std::collections::HashMap<::std::string::String, ::std::string::String> {
|
||||
&self.labels
|
||||
}
|
||||
|
||||
pub fn clear_labels(&mut self) {
|
||||
self.labels.clear();
|
||||
}
|
||||
|
|
@ -290,25 +307,58 @@ impl ImageUpdate {
|
|||
pub fn take_labels(&mut self) -> ::std::collections::HashMap<::std::string::String, ::std::string::String> {
|
||||
::std::mem::replace(&mut self.labels, ::std::collections::HashMap::new())
|
||||
}
|
||||
|
||||
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
|
||||
let mut fields = ::std::vec::Vec::with_capacity(2);
|
||||
let mut oneofs = ::std::vec::Vec::with_capacity(0);
|
||||
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
|
||||
"name",
|
||||
|m: &ImageUpdate| { &m.name },
|
||||
|m: &mut ImageUpdate| { &mut m.name },
|
||||
));
|
||||
fields.push(::protobuf::reflect::rt::v2::make_map_simpler_accessor::<_, _, _>(
|
||||
"labels",
|
||||
|m: &ImageUpdate| { &m.labels },
|
||||
|m: &mut ImageUpdate| { &mut m.labels },
|
||||
));
|
||||
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<ImageUpdate>(
|
||||
"ImageUpdate",
|
||||
fields,
|
||||
oneofs,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for ImageUpdate {
|
||||
const NAME: &'static str = "ImageUpdate";
|
||||
|
||||
fn is_initialized(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::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)?;
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
|
||||
while let Some(tag) = is.read_raw_tag_or_eof()? {
|
||||
match tag {
|
||||
10 => {
|
||||
self.name = is.read_string()?;
|
||||
},
|
||||
2 => {
|
||||
::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(wire_type, is, &mut self.labels)?;
|
||||
18 => {
|
||||
let len = is.read_raw_varint32()?;
|
||||
let old_limit = is.push_limit(len as u64)?;
|
||||
let mut key = ::std::default::Default::default();
|
||||
let mut value = ::std::default::Default::default();
|
||||
while let Some(tag) = is.read_raw_tag_or_eof()? {
|
||||
match tag {
|
||||
10 => key = is.read_string()?,
|
||||
18 => value = is.read_string()?,
|
||||
_ => ::protobuf::rt::skip_field_for_tag(tag, is)?,
|
||||
};
|
||||
}
|
||||
is.pop_limit(old_limit);
|
||||
self.labels.insert(key, value);
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
tag => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
@ -317,111 +367,89 @@ impl ::protobuf::Message for ImageUpdate {
|
|||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
fn compute_size(&self) -> u64 {
|
||||
let mut my_size = 0;
|
||||
if !self.name.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(1, &self.name);
|
||||
}
|
||||
my_size += ::protobuf::rt::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);
|
||||
for (k, v) in &self.labels {
|
||||
let mut entry_size = 0;
|
||||
entry_size += ::protobuf::rt::string_size(1, &k);
|
||||
entry_size += ::protobuf::rt::string_size(2, &v);
|
||||
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(entry_size) + entry_size
|
||||
};
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
|
||||
self.special_fields.cached_size().set(my_size as u32);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
|
||||
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())?;
|
||||
for (k, v) in &self.labels {
|
||||
let mut entry_size = 0;
|
||||
entry_size += ::protobuf::rt::string_size(1, &k);
|
||||
entry_size += ::protobuf::rt::string_size(2, &v);
|
||||
os.write_raw_varint32(18)?; // Tag.
|
||||
os.write_raw_varint32(entry_size as u32)?;
|
||||
os.write_string(1, &k)?;
|
||||
os.write_string(2, &v)?;
|
||||
};
|
||||
os.write_unknown_fields(self.special_fields.unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
fn special_fields(&self) -> &::protobuf::SpecialFields {
|
||||
&self.special_fields
|
||||
}
|
||||
|
||||
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 mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
|
||||
&mut self.special_fields
|
||||
}
|
||||
|
||||
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 clear(&mut self) {
|
||||
self.name.clear();
|
||||
self.labels.clear();
|
||||
self.special_fields.clear();
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static ImageUpdate {
|
||||
static instance: ::protobuf::rt::LazyV2<ImageUpdate> = ::protobuf::rt::LazyV2::INIT;
|
||||
static instance: ::protobuf::rt::Lazy<ImageUpdate> = ::protobuf::rt::Lazy::new();
|
||||
instance.get(ImageUpdate::new)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for ImageUpdate {
|
||||
fn clear(&mut self) {
|
||||
self.name.clear();
|
||||
self.labels.clear();
|
||||
self.unknown_fields.clear();
|
||||
impl ::protobuf::MessageFull for ImageUpdate {
|
||||
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
|
||||
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
|
||||
descriptor.get(|| file_descriptor().message_by_package_relative_name("ImageUpdate").unwrap()).clone()
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for ImageUpdate {
|
||||
impl ::std::fmt::Display for ImageUpdate {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
||||
::protobuf::text_format::fmt(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for ImageUpdate {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
|
||||
}
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
#[derive(PartialEq,Clone,Default,Debug)]
|
||||
// @@protoc_insertion_point(message:containerd.services.images.v1.ImageDelete)
|
||||
pub struct ImageDelete {
|
||||
// message fields
|
||||
// @@protoc_insertion_point(field:containerd.services.images.v1.ImageDelete.name)
|
||||
pub name: ::std::string::String,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
// @@protoc_insertion_point(special_field:containerd.services.images.v1.ImageDelete.special_fields)
|
||||
pub special_fields: ::protobuf::SpecialFields,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a ImageDelete {
|
||||
|
|
@ -437,10 +465,10 @@ impl ImageDelete {
|
|||
|
||||
// string name = 1;
|
||||
|
||||
|
||||
pub fn get_name(&self) -> &str {
|
||||
pub fn name(&self) -> &str {
|
||||
&self.name
|
||||
}
|
||||
|
||||
pub fn clear_name(&mut self) {
|
||||
self.name.clear();
|
||||
}
|
||||
|
|
@ -460,22 +488,38 @@ impl ImageDelete {
|
|||
pub fn take_name(&mut self) -> ::std::string::String {
|
||||
::std::mem::replace(&mut self.name, ::std::string::String::new())
|
||||
}
|
||||
|
||||
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
|
||||
let mut fields = ::std::vec::Vec::with_capacity(1);
|
||||
let mut oneofs = ::std::vec::Vec::with_capacity(0);
|
||||
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
|
||||
"name",
|
||||
|m: &ImageDelete| { &m.name },
|
||||
|m: &mut ImageDelete| { &mut m.name },
|
||||
));
|
||||
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<ImageDelete>(
|
||||
"ImageDelete",
|
||||
fields,
|
||||
oneofs,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for ImageDelete {
|
||||
const NAME: &'static str = "ImageDelete";
|
||||
|
||||
fn is_initialized(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::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)?;
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
|
||||
while let Some(tag) = is.read_raw_tag_or_eof()? {
|
||||
match tag {
|
||||
10 => {
|
||||
self.name = is.read_string()?;
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
tag => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
@ -484,120 +528,111 @@ impl ::protobuf::Message for ImageDelete {
|
|||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
fn compute_size(&self) -> u64 {
|
||||
let mut my_size = 0;
|
||||
if !self.name.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(1, &self.name);
|
||||
}
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
|
||||
self.special_fields.cached_size().set(my_size as u32);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
|
||||
if !self.name.is_empty() {
|
||||
os.write_string(1, &self.name)?;
|
||||
}
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
os.write_unknown_fields(self.special_fields.unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
fn special_fields(&self) -> &::protobuf::SpecialFields {
|
||||
&self.special_fields
|
||||
}
|
||||
|
||||
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 mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
|
||||
&mut self.special_fields
|
||||
}
|
||||
|
||||
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 clear(&mut self) {
|
||||
self.name.clear();
|
||||
self.special_fields.clear();
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static ImageDelete {
|
||||
static instance: ::protobuf::rt::LazyV2<ImageDelete> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(ImageDelete::new)
|
||||
static instance: ImageDelete = ImageDelete {
|
||||
name: ::std::string::String::new(),
|
||||
special_fields: ::protobuf::SpecialFields::new(),
|
||||
};
|
||||
&instance
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for ImageDelete {
|
||||
fn clear(&mut self) {
|
||||
self.name.clear();
|
||||
self.unknown_fields.clear();
|
||||
impl ::protobuf::MessageFull for ImageDelete {
|
||||
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
|
||||
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
|
||||
descriptor.get(|| file_descriptor().message_by_package_relative_name("ImageDelete").unwrap()).clone()
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for ImageDelete {
|
||||
impl ::std::fmt::Display for ImageDelete {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
||||
::protobuf::text_format::fmt(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for ImageDelete {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<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\
|
||||
ugin/fieldpath.protoX\0\"\xac\x01\n\x0bImageCreate\x12\x12\n\x04name\x18\
|
||||
\x01\x20\x01(\tR\x04name\x12N\n\x06labels\x18\x02\x20\x03(\x0b26.contain\
|
||||
erd.services.images.v1.ImageCreate.LabelsEntryR\x06labels\x1a9\n\x0bLabe\
|
||||
lsEntry\x12\x10\n\x03key\x18\x01\x20\x01(\tR\x03key\x12\x14\n\x05value\
|
||||
\x18\x02\x20\x01(\tR\x05value:\x028\x01\"\xac\x01\n\x0bImageUpdate\x12\
|
||||
\x12\n\x04name\x18\x01\x20\x01(\tR\x04name\x12N\n\x06labels\x18\x02\x20\
|
||||
\x03(\x0b26.containerd.services.images.v1.ImageUpdate.LabelsEntryR\x06la\
|
||||
bels\x1a9\n\x0bLabelsEntry\x12\x10\n\x03key\x18\x01\x20\x01(\tR\x03key\
|
||||
\x12\x14\n\x05value\x18\x02\x20\x01(\tR\x05value:\x028\x01\"!\n\x0bImage\
|
||||
Delete\x12\x12\n\x04name\x18\x01\x20\x01(\tR\x04nameB8Z2github.com/conta\
|
||||
inerd/containerd/api/events;events\xa0\xf4\x1e\x01b\x06proto3\
|
||||
";
|
||||
|
||||
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 {
|
||||
/// `FileDescriptorProto` object which was a source for this generated file
|
||||
fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
|
||||
static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
|
||||
file_descriptor_proto_lazy.get(|| {
|
||||
parse_descriptor_proto()
|
||||
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
|
||||
})
|
||||
}
|
||||
|
||||
/// `FileDescriptor` object which allows dynamic access to files
|
||||
pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
|
||||
static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
|
||||
static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
|
||||
file_descriptor.get(|| {
|
||||
let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
|
||||
let mut deps = ::std::vec::Vec::with_capacity(1);
|
||||
deps.push(super::fieldpath::file_descriptor().clone());
|
||||
let mut messages = ::std::vec::Vec::with_capacity(3);
|
||||
messages.push(ImageCreate::generated_message_descriptor_data());
|
||||
messages.push(ImageUpdate::generated_message_descriptor_data());
|
||||
messages.push(ImageDelete::generated_message_descriptor_data());
|
||||
let mut enums = ::std::vec::Vec::with_capacity(0);
|
||||
::protobuf::reflect::GeneratedFileDescriptor::new_generated(
|
||||
file_descriptor_proto(),
|
||||
deps,
|
||||
messages,
|
||||
enums,
|
||||
)
|
||||
});
|
||||
::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,3 +6,6 @@ pub mod snapshot;
|
|||
pub mod task;
|
||||
|
||||
pub(crate) mod mount;
|
||||
|
||||
mod fieldpath;
|
||||
mod gogo;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
// This file is generated by rust-protobuf 2.27.1. Do not edit
|
||||
// This file is generated by rust-protobuf 3.1.0. Do not edit
|
||||
// .proto file is parsed by pure
|
||||
// @generated
|
||||
|
||||
// https://github.com/rust-lang/rust-clippy/issues/702
|
||||
|
|
@ -15,22 +16,26 @@
|
|||
#![allow(non_snake_case)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![allow(trivial_casts)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(unused_results)]
|
||||
#![allow(unused_mut)]
|
||||
|
||||
//! Generated file from `github.com/containerd/containerd/api/events/namespace.proto`
|
||||
|
||||
/// Generated files are compatible only with the same version
|
||||
/// of protobuf runtime.
|
||||
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_27_1;
|
||||
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_1_0;
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
#[derive(PartialEq,Clone,Default,Debug)]
|
||||
// @@protoc_insertion_point(message:containerd.events.NamespaceCreate)
|
||||
pub struct NamespaceCreate {
|
||||
// message fields
|
||||
// @@protoc_insertion_point(field:containerd.events.NamespaceCreate.name)
|
||||
pub name: ::std::string::String,
|
||||
// @@protoc_insertion_point(field:containerd.events.NamespaceCreate.labels)
|
||||
pub labels: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
// @@protoc_insertion_point(special_field:containerd.events.NamespaceCreate.special_fields)
|
||||
pub special_fields: ::protobuf::SpecialFields,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a NamespaceCreate {
|
||||
|
|
@ -46,10 +51,10 @@ impl NamespaceCreate {
|
|||
|
||||
// string name = 1;
|
||||
|
||||
|
||||
pub fn get_name(&self) -> &str {
|
||||
pub fn name(&self) -> &str {
|
||||
&self.name
|
||||
}
|
||||
|
||||
pub fn clear_name(&mut self) {
|
||||
self.name.clear();
|
||||
}
|
||||
|
|
@ -70,12 +75,12 @@ impl NamespaceCreate {
|
|||
::std::mem::replace(&mut self.name, ::std::string::String::new())
|
||||
}
|
||||
|
||||
// repeated .containerd.events.NamespaceCreate.labels_MapEntry labels = 2;
|
||||
// repeated .containerd.events.NamespaceCreate.LabelsEntry labels = 2;
|
||||
|
||||
|
||||
pub fn get_labels(&self) -> &::std::collections::HashMap<::std::string::String, ::std::string::String> {
|
||||
pub fn labels(&self) -> &::std::collections::HashMap<::std::string::String, ::std::string::String> {
|
||||
&self.labels
|
||||
}
|
||||
|
||||
pub fn clear_labels(&mut self) {
|
||||
self.labels.clear();
|
||||
}
|
||||
|
|
@ -94,25 +99,58 @@ impl NamespaceCreate {
|
|||
pub fn take_labels(&mut self) -> ::std::collections::HashMap<::std::string::String, ::std::string::String> {
|
||||
::std::mem::replace(&mut self.labels, ::std::collections::HashMap::new())
|
||||
}
|
||||
|
||||
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
|
||||
let mut fields = ::std::vec::Vec::with_capacity(2);
|
||||
let mut oneofs = ::std::vec::Vec::with_capacity(0);
|
||||
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
|
||||
"name",
|
||||
|m: &NamespaceCreate| { &m.name },
|
||||
|m: &mut NamespaceCreate| { &mut m.name },
|
||||
));
|
||||
fields.push(::protobuf::reflect::rt::v2::make_map_simpler_accessor::<_, _, _>(
|
||||
"labels",
|
||||
|m: &NamespaceCreate| { &m.labels },
|
||||
|m: &mut NamespaceCreate| { &mut m.labels },
|
||||
));
|
||||
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<NamespaceCreate>(
|
||||
"NamespaceCreate",
|
||||
fields,
|
||||
oneofs,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for NamespaceCreate {
|
||||
const NAME: &'static str = "NamespaceCreate";
|
||||
|
||||
fn is_initialized(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::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)?;
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
|
||||
while let Some(tag) = is.read_raw_tag_or_eof()? {
|
||||
match tag {
|
||||
10 => {
|
||||
self.name = is.read_string()?;
|
||||
},
|
||||
2 => {
|
||||
::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(wire_type, is, &mut self.labels)?;
|
||||
18 => {
|
||||
let len = is.read_raw_varint32()?;
|
||||
let old_limit = is.push_limit(len as u64)?;
|
||||
let mut key = ::std::default::Default::default();
|
||||
let mut value = ::std::default::Default::default();
|
||||
while let Some(tag) = is.read_raw_tag_or_eof()? {
|
||||
match tag {
|
||||
10 => key = is.read_string()?,
|
||||
18 => value = is.read_string()?,
|
||||
_ => ::protobuf::rt::skip_field_for_tag(tag, is)?,
|
||||
};
|
||||
}
|
||||
is.pop_limit(old_limit);
|
||||
self.labels.insert(key, value);
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
tag => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
@ -121,112 +159,91 @@ impl ::protobuf::Message for NamespaceCreate {
|
|||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
fn compute_size(&self) -> u64 {
|
||||
let mut my_size = 0;
|
||||
if !self.name.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(1, &self.name);
|
||||
}
|
||||
my_size += ::protobuf::rt::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);
|
||||
for (k, v) in &self.labels {
|
||||
let mut entry_size = 0;
|
||||
entry_size += ::protobuf::rt::string_size(1, &k);
|
||||
entry_size += ::protobuf::rt::string_size(2, &v);
|
||||
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(entry_size) + entry_size
|
||||
};
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
|
||||
self.special_fields.cached_size().set(my_size as u32);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
|
||||
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())?;
|
||||
for (k, v) in &self.labels {
|
||||
let mut entry_size = 0;
|
||||
entry_size += ::protobuf::rt::string_size(1, &k);
|
||||
entry_size += ::protobuf::rt::string_size(2, &v);
|
||||
os.write_raw_varint32(18)?; // Tag.
|
||||
os.write_raw_varint32(entry_size as u32)?;
|
||||
os.write_string(1, &k)?;
|
||||
os.write_string(2, &v)?;
|
||||
};
|
||||
os.write_unknown_fields(self.special_fields.unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
fn special_fields(&self) -> &::protobuf::SpecialFields {
|
||||
&self.special_fields
|
||||
}
|
||||
|
||||
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 mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
|
||||
&mut self.special_fields
|
||||
}
|
||||
|
||||
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 clear(&mut self) {
|
||||
self.name.clear();
|
||||
self.labels.clear();
|
||||
self.special_fields.clear();
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static NamespaceCreate {
|
||||
static instance: ::protobuf::rt::LazyV2<NamespaceCreate> = ::protobuf::rt::LazyV2::INIT;
|
||||
static instance: ::protobuf::rt::Lazy<NamespaceCreate> = ::protobuf::rt::Lazy::new();
|
||||
instance.get(NamespaceCreate::new)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for NamespaceCreate {
|
||||
fn clear(&mut self) {
|
||||
self.name.clear();
|
||||
self.labels.clear();
|
||||
self.unknown_fields.clear();
|
||||
impl ::protobuf::MessageFull for NamespaceCreate {
|
||||
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
|
||||
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
|
||||
descriptor.get(|| file_descriptor().message_by_package_relative_name("NamespaceCreate").unwrap()).clone()
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for NamespaceCreate {
|
||||
impl ::std::fmt::Display for NamespaceCreate {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
||||
::protobuf::text_format::fmt(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for NamespaceCreate {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
|
||||
}
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
#[derive(PartialEq,Clone,Default,Debug)]
|
||||
// @@protoc_insertion_point(message:containerd.events.NamespaceUpdate)
|
||||
pub struct NamespaceUpdate {
|
||||
// message fields
|
||||
// @@protoc_insertion_point(field:containerd.events.NamespaceUpdate.name)
|
||||
pub name: ::std::string::String,
|
||||
// @@protoc_insertion_point(field:containerd.events.NamespaceUpdate.labels)
|
||||
pub labels: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
// @@protoc_insertion_point(special_field:containerd.events.NamespaceUpdate.special_fields)
|
||||
pub special_fields: ::protobuf::SpecialFields,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a NamespaceUpdate {
|
||||
|
|
@ -242,10 +259,10 @@ impl NamespaceUpdate {
|
|||
|
||||
// string name = 1;
|
||||
|
||||
|
||||
pub fn get_name(&self) -> &str {
|
||||
pub fn name(&self) -> &str {
|
||||
&self.name
|
||||
}
|
||||
|
||||
pub fn clear_name(&mut self) {
|
||||
self.name.clear();
|
||||
}
|
||||
|
|
@ -266,12 +283,12 @@ impl NamespaceUpdate {
|
|||
::std::mem::replace(&mut self.name, ::std::string::String::new())
|
||||
}
|
||||
|
||||
// repeated .containerd.events.NamespaceUpdate.labels_MapEntry labels = 2;
|
||||
// repeated .containerd.events.NamespaceUpdate.LabelsEntry labels = 2;
|
||||
|
||||
|
||||
pub fn get_labels(&self) -> &::std::collections::HashMap<::std::string::String, ::std::string::String> {
|
||||
pub fn labels(&self) -> &::std::collections::HashMap<::std::string::String, ::std::string::String> {
|
||||
&self.labels
|
||||
}
|
||||
|
||||
pub fn clear_labels(&mut self) {
|
||||
self.labels.clear();
|
||||
}
|
||||
|
|
@ -290,25 +307,58 @@ impl NamespaceUpdate {
|
|||
pub fn take_labels(&mut self) -> ::std::collections::HashMap<::std::string::String, ::std::string::String> {
|
||||
::std::mem::replace(&mut self.labels, ::std::collections::HashMap::new())
|
||||
}
|
||||
|
||||
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
|
||||
let mut fields = ::std::vec::Vec::with_capacity(2);
|
||||
let mut oneofs = ::std::vec::Vec::with_capacity(0);
|
||||
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
|
||||
"name",
|
||||
|m: &NamespaceUpdate| { &m.name },
|
||||
|m: &mut NamespaceUpdate| { &mut m.name },
|
||||
));
|
||||
fields.push(::protobuf::reflect::rt::v2::make_map_simpler_accessor::<_, _, _>(
|
||||
"labels",
|
||||
|m: &NamespaceUpdate| { &m.labels },
|
||||
|m: &mut NamespaceUpdate| { &mut m.labels },
|
||||
));
|
||||
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<NamespaceUpdate>(
|
||||
"NamespaceUpdate",
|
||||
fields,
|
||||
oneofs,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for NamespaceUpdate {
|
||||
const NAME: &'static str = "NamespaceUpdate";
|
||||
|
||||
fn is_initialized(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::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)?;
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
|
||||
while let Some(tag) = is.read_raw_tag_or_eof()? {
|
||||
match tag {
|
||||
10 => {
|
||||
self.name = is.read_string()?;
|
||||
},
|
||||
2 => {
|
||||
::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(wire_type, is, &mut self.labels)?;
|
||||
18 => {
|
||||
let len = is.read_raw_varint32()?;
|
||||
let old_limit = is.push_limit(len as u64)?;
|
||||
let mut key = ::std::default::Default::default();
|
||||
let mut value = ::std::default::Default::default();
|
||||
while let Some(tag) = is.read_raw_tag_or_eof()? {
|
||||
match tag {
|
||||
10 => key = is.read_string()?,
|
||||
18 => value = is.read_string()?,
|
||||
_ => ::protobuf::rt::skip_field_for_tag(tag, is)?,
|
||||
};
|
||||
}
|
||||
is.pop_limit(old_limit);
|
||||
self.labels.insert(key, value);
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
tag => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
@ -317,111 +367,89 @@ impl ::protobuf::Message for NamespaceUpdate {
|
|||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
fn compute_size(&self) -> u64 {
|
||||
let mut my_size = 0;
|
||||
if !self.name.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(1, &self.name);
|
||||
}
|
||||
my_size += ::protobuf::rt::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);
|
||||
for (k, v) in &self.labels {
|
||||
let mut entry_size = 0;
|
||||
entry_size += ::protobuf::rt::string_size(1, &k);
|
||||
entry_size += ::protobuf::rt::string_size(2, &v);
|
||||
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(entry_size) + entry_size
|
||||
};
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
|
||||
self.special_fields.cached_size().set(my_size as u32);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
|
||||
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())?;
|
||||
for (k, v) in &self.labels {
|
||||
let mut entry_size = 0;
|
||||
entry_size += ::protobuf::rt::string_size(1, &k);
|
||||
entry_size += ::protobuf::rt::string_size(2, &v);
|
||||
os.write_raw_varint32(18)?; // Tag.
|
||||
os.write_raw_varint32(entry_size as u32)?;
|
||||
os.write_string(1, &k)?;
|
||||
os.write_string(2, &v)?;
|
||||
};
|
||||
os.write_unknown_fields(self.special_fields.unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
fn special_fields(&self) -> &::protobuf::SpecialFields {
|
||||
&self.special_fields
|
||||
}
|
||||
|
||||
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 mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
|
||||
&mut self.special_fields
|
||||
}
|
||||
|
||||
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 clear(&mut self) {
|
||||
self.name.clear();
|
||||
self.labels.clear();
|
||||
self.special_fields.clear();
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static NamespaceUpdate {
|
||||
static instance: ::protobuf::rt::LazyV2<NamespaceUpdate> = ::protobuf::rt::LazyV2::INIT;
|
||||
static instance: ::protobuf::rt::Lazy<NamespaceUpdate> = ::protobuf::rt::Lazy::new();
|
||||
instance.get(NamespaceUpdate::new)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for NamespaceUpdate {
|
||||
fn clear(&mut self) {
|
||||
self.name.clear();
|
||||
self.labels.clear();
|
||||
self.unknown_fields.clear();
|
||||
impl ::protobuf::MessageFull for NamespaceUpdate {
|
||||
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
|
||||
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
|
||||
descriptor.get(|| file_descriptor().message_by_package_relative_name("NamespaceUpdate").unwrap()).clone()
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for NamespaceUpdate {
|
||||
impl ::std::fmt::Display for NamespaceUpdate {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
||||
::protobuf::text_format::fmt(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for NamespaceUpdate {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
|
||||
}
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
#[derive(PartialEq,Clone,Default,Debug)]
|
||||
// @@protoc_insertion_point(message:containerd.events.NamespaceDelete)
|
||||
pub struct NamespaceDelete {
|
||||
// message fields
|
||||
// @@protoc_insertion_point(field:containerd.events.NamespaceDelete.name)
|
||||
pub name: ::std::string::String,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
// @@protoc_insertion_point(special_field:containerd.events.NamespaceDelete.special_fields)
|
||||
pub special_fields: ::protobuf::SpecialFields,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a NamespaceDelete {
|
||||
|
|
@ -437,10 +465,10 @@ impl NamespaceDelete {
|
|||
|
||||
// string name = 1;
|
||||
|
||||
|
||||
pub fn get_name(&self) -> &str {
|
||||
pub fn name(&self) -> &str {
|
||||
&self.name
|
||||
}
|
||||
|
||||
pub fn clear_name(&mut self) {
|
||||
self.name.clear();
|
||||
}
|
||||
|
|
@ -460,22 +488,38 @@ impl NamespaceDelete {
|
|||
pub fn take_name(&mut self) -> ::std::string::String {
|
||||
::std::mem::replace(&mut self.name, ::std::string::String::new())
|
||||
}
|
||||
|
||||
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
|
||||
let mut fields = ::std::vec::Vec::with_capacity(1);
|
||||
let mut oneofs = ::std::vec::Vec::with_capacity(0);
|
||||
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
|
||||
"name",
|
||||
|m: &NamespaceDelete| { &m.name },
|
||||
|m: &mut NamespaceDelete| { &mut m.name },
|
||||
));
|
||||
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<NamespaceDelete>(
|
||||
"NamespaceDelete",
|
||||
fields,
|
||||
oneofs,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for NamespaceDelete {
|
||||
const NAME: &'static str = "NamespaceDelete";
|
||||
|
||||
fn is_initialized(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::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)?;
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
|
||||
while let Some(tag) = is.read_raw_tag_or_eof()? {
|
||||
match tag {
|
||||
10 => {
|
||||
self.name = is.read_string()?;
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
tag => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
@ -484,120 +528,113 @@ impl ::protobuf::Message for NamespaceDelete {
|
|||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
fn compute_size(&self) -> u64 {
|
||||
let mut my_size = 0;
|
||||
if !self.name.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(1, &self.name);
|
||||
}
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
|
||||
self.special_fields.cached_size().set(my_size as u32);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
|
||||
if !self.name.is_empty() {
|
||||
os.write_string(1, &self.name)?;
|
||||
}
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
os.write_unknown_fields(self.special_fields.unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
fn special_fields(&self) -> &::protobuf::SpecialFields {
|
||||
&self.special_fields
|
||||
}
|
||||
|
||||
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 mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
|
||||
&mut self.special_fields
|
||||
}
|
||||
|
||||
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 clear(&mut self) {
|
||||
self.name.clear();
|
||||
self.special_fields.clear();
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static NamespaceDelete {
|
||||
static instance: ::protobuf::rt::LazyV2<NamespaceDelete> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(NamespaceDelete::new)
|
||||
static instance: NamespaceDelete = NamespaceDelete {
|
||||
name: ::std::string::String::new(),
|
||||
special_fields: ::protobuf::SpecialFields::new(),
|
||||
};
|
||||
&instance
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for NamespaceDelete {
|
||||
fn clear(&mut self) {
|
||||
self.name.clear();
|
||||
self.unknown_fields.clear();
|
||||
impl ::protobuf::MessageFull for NamespaceDelete {
|
||||
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
|
||||
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
|
||||
descriptor.get(|| file_descriptor().message_by_package_relative_name("NamespaceDelete").unwrap()).clone()
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for NamespaceDelete {
|
||||
impl ::std::fmt::Display for NamespaceDelete {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
||||
::protobuf::text_format::fmt(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for NamespaceDelete {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<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\
|
||||
ntainerd/protobuf/plugin/fieldpath.protoX\0X\x01\"\xa8\x01\n\x0fNamespac\
|
||||
eCreate\x12\x12\n\x04name\x18\x01\x20\x01(\tR\x04name\x12F\n\x06labels\
|
||||
\x18\x02\x20\x03(\x0b2..containerd.events.NamespaceCreate.LabelsEntryR\
|
||||
\x06labels\x1a9\n\x0bLabelsEntry\x12\x10\n\x03key\x18\x01\x20\x01(\tR\
|
||||
\x03key\x12\x14\n\x05value\x18\x02\x20\x01(\tR\x05value:\x028\x01\"\xa8\
|
||||
\x01\n\x0fNamespaceUpdate\x12\x12\n\x04name\x18\x01\x20\x01(\tR\x04name\
|
||||
\x12F\n\x06labels\x18\x02\x20\x03(\x0b2..containerd.events.NamespaceUpda\
|
||||
te.LabelsEntryR\x06labels\x1a9\n\x0bLabelsEntry\x12\x10\n\x03key\x18\x01\
|
||||
\x20\x01(\tR\x03key\x12\x14\n\x05value\x18\x02\x20\x01(\tR\x05value:\x02\
|
||||
8\x01\"%\n\x0fNamespaceDelete\x12\x12\n\x04name\x18\x01\x20\x01(\tR\x04n\
|
||||
ameB8Z2github.com/containerd/containerd/api/events;events\xa0\xf4\x1e\
|
||||
\x01b\x06proto3\
|
||||
";
|
||||
|
||||
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 {
|
||||
/// `FileDescriptorProto` object which was a source for this generated file
|
||||
fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
|
||||
static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
|
||||
file_descriptor_proto_lazy.get(|| {
|
||||
parse_descriptor_proto()
|
||||
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
|
||||
})
|
||||
}
|
||||
|
||||
/// `FileDescriptor` object which allows dynamic access to files
|
||||
pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
|
||||
static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
|
||||
static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
|
||||
file_descriptor.get(|| {
|
||||
let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
|
||||
let mut deps = ::std::vec::Vec::with_capacity(2);
|
||||
deps.push(super::gogo::file_descriptor().clone());
|
||||
deps.push(super::fieldpath::file_descriptor().clone());
|
||||
let mut messages = ::std::vec::Vec::with_capacity(3);
|
||||
messages.push(NamespaceCreate::generated_message_descriptor_data());
|
||||
messages.push(NamespaceUpdate::generated_message_descriptor_data());
|
||||
messages.push(NamespaceDelete::generated_message_descriptor_data());
|
||||
let mut enums = ::std::vec::Vec::with_capacity(0);
|
||||
::protobuf::reflect::GeneratedFileDescriptor::new_generated(
|
||||
file_descriptor_proto(),
|
||||
deps,
|
||||
messages,
|
||||
enums,
|
||||
)
|
||||
});
|
||||
::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
// This file is generated by rust-protobuf 2.27.1. Do not edit
|
||||
// This file is generated by rust-protobuf 3.1.0. Do not edit
|
||||
// .proto file is parsed by pure
|
||||
// @generated
|
||||
|
||||
// https://github.com/rust-lang/rust-clippy/issues/702
|
||||
|
|
@ -15,22 +16,26 @@
|
|||
#![allow(non_snake_case)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![allow(trivial_casts)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(unused_results)]
|
||||
#![allow(unused_mut)]
|
||||
|
||||
//! Generated file from `github.com/containerd/containerd/api/events/snapshot.proto`
|
||||
|
||||
/// Generated files are compatible only with the same version
|
||||
/// of protobuf runtime.
|
||||
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_27_1;
|
||||
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_1_0;
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
#[derive(PartialEq,Clone,Default,Debug)]
|
||||
// @@protoc_insertion_point(message:containerd.events.SnapshotPrepare)
|
||||
pub struct SnapshotPrepare {
|
||||
// message fields
|
||||
// @@protoc_insertion_point(field:containerd.events.SnapshotPrepare.key)
|
||||
pub key: ::std::string::String,
|
||||
// @@protoc_insertion_point(field:containerd.events.SnapshotPrepare.parent)
|
||||
pub parent: ::std::string::String,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
// @@protoc_insertion_point(special_field:containerd.events.SnapshotPrepare.special_fields)
|
||||
pub special_fields: ::protobuf::SpecialFields,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a SnapshotPrepare {
|
||||
|
|
@ -46,10 +51,10 @@ impl SnapshotPrepare {
|
|||
|
||||
// string key = 1;
|
||||
|
||||
|
||||
pub fn get_key(&self) -> &str {
|
||||
pub fn key(&self) -> &str {
|
||||
&self.key
|
||||
}
|
||||
|
||||
pub fn clear_key(&mut self) {
|
||||
self.key.clear();
|
||||
}
|
||||
|
|
@ -72,10 +77,10 @@ impl SnapshotPrepare {
|
|||
|
||||
// string parent = 2;
|
||||
|
||||
|
||||
pub fn get_parent(&self) -> &str {
|
||||
pub fn parent(&self) -> &str {
|
||||
&self.parent
|
||||
}
|
||||
|
||||
pub fn clear_parent(&mut self) {
|
||||
self.parent.clear();
|
||||
}
|
||||
|
|
@ -95,25 +100,46 @@ impl SnapshotPrepare {
|
|||
pub fn take_parent(&mut self) -> ::std::string::String {
|
||||
::std::mem::replace(&mut self.parent, ::std::string::String::new())
|
||||
}
|
||||
|
||||
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
|
||||
let mut fields = ::std::vec::Vec::with_capacity(2);
|
||||
let mut oneofs = ::std::vec::Vec::with_capacity(0);
|
||||
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
|
||||
"key",
|
||||
|m: &SnapshotPrepare| { &m.key },
|
||||
|m: &mut SnapshotPrepare| { &mut m.key },
|
||||
));
|
||||
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
|
||||
"parent",
|
||||
|m: &SnapshotPrepare| { &m.parent },
|
||||
|m: &mut SnapshotPrepare| { &mut m.parent },
|
||||
));
|
||||
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<SnapshotPrepare>(
|
||||
"SnapshotPrepare",
|
||||
fields,
|
||||
oneofs,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for SnapshotPrepare {
|
||||
const NAME: &'static str = "SnapshotPrepare";
|
||||
|
||||
fn is_initialized(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::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)?;
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
|
||||
while let Some(tag) = is.read_raw_tag_or_eof()? {
|
||||
match tag {
|
||||
10 => {
|
||||
self.key = is.read_string()?;
|
||||
},
|
||||
2 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.parent)?;
|
||||
18 => {
|
||||
self.parent = is.read_string()?;
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
tag => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
@ -122,7 +148,7 @@ impl ::protobuf::Message for SnapshotPrepare {
|
|||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
fn compute_size(&self) -> u64 {
|
||||
let mut my_size = 0;
|
||||
if !self.key.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(1, &self.key);
|
||||
|
|
@ -130,108 +156,78 @@ impl ::protobuf::Message for SnapshotPrepare {
|
|||
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 += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
|
||||
self.special_fields.cached_size().set(my_size as u32);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
|
||||
if !self.key.is_empty() {
|
||||
os.write_string(1, &self.key)?;
|
||||
}
|
||||
if !self.parent.is_empty() {
|
||||
os.write_string(2, &self.parent)?;
|
||||
}
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
os.write_unknown_fields(self.special_fields.unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
fn special_fields(&self) -> &::protobuf::SpecialFields {
|
||||
&self.special_fields
|
||||
}
|
||||
|
||||
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 mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
|
||||
&mut self.special_fields
|
||||
}
|
||||
|
||||
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();
|
||||
self.special_fields.clear();
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static SnapshotPrepare {
|
||||
static instance: SnapshotPrepare = SnapshotPrepare {
|
||||
key: ::std::string::String::new(),
|
||||
parent: ::std::string::String::new(),
|
||||
special_fields: ::protobuf::SpecialFields::new(),
|
||||
};
|
||||
&instance
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for SnapshotPrepare {
|
||||
impl ::protobuf::MessageFull for SnapshotPrepare {
|
||||
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
|
||||
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
|
||||
descriptor.get(|| file_descriptor().message_by_package_relative_name("SnapshotPrepare").unwrap()).clone()
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Display for SnapshotPrepare {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
||||
::protobuf::text_format::fmt(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for SnapshotPrepare {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
|
||||
}
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
#[derive(PartialEq,Clone,Default,Debug)]
|
||||
// @@protoc_insertion_point(message:containerd.events.SnapshotCommit)
|
||||
pub struct SnapshotCommit {
|
||||
// message fields
|
||||
// @@protoc_insertion_point(field:containerd.events.SnapshotCommit.key)
|
||||
pub key: ::std::string::String,
|
||||
// @@protoc_insertion_point(field:containerd.events.SnapshotCommit.name)
|
||||
pub name: ::std::string::String,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
// @@protoc_insertion_point(special_field:containerd.events.SnapshotCommit.special_fields)
|
||||
pub special_fields: ::protobuf::SpecialFields,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a SnapshotCommit {
|
||||
|
|
@ -247,10 +243,10 @@ impl SnapshotCommit {
|
|||
|
||||
// string key = 1;
|
||||
|
||||
|
||||
pub fn get_key(&self) -> &str {
|
||||
pub fn key(&self) -> &str {
|
||||
&self.key
|
||||
}
|
||||
|
||||
pub fn clear_key(&mut self) {
|
||||
self.key.clear();
|
||||
}
|
||||
|
|
@ -273,10 +269,10 @@ impl SnapshotCommit {
|
|||
|
||||
// string name = 2;
|
||||
|
||||
|
||||
pub fn get_name(&self) -> &str {
|
||||
pub fn name(&self) -> &str {
|
||||
&self.name
|
||||
}
|
||||
|
||||
pub fn clear_name(&mut self) {
|
||||
self.name.clear();
|
||||
}
|
||||
|
|
@ -296,25 +292,46 @@ impl SnapshotCommit {
|
|||
pub fn take_name(&mut self) -> ::std::string::String {
|
||||
::std::mem::replace(&mut self.name, ::std::string::String::new())
|
||||
}
|
||||
|
||||
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
|
||||
let mut fields = ::std::vec::Vec::with_capacity(2);
|
||||
let mut oneofs = ::std::vec::Vec::with_capacity(0);
|
||||
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
|
||||
"key",
|
||||
|m: &SnapshotCommit| { &m.key },
|
||||
|m: &mut SnapshotCommit| { &mut m.key },
|
||||
));
|
||||
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
|
||||
"name",
|
||||
|m: &SnapshotCommit| { &m.name },
|
||||
|m: &mut SnapshotCommit| { &mut m.name },
|
||||
));
|
||||
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<SnapshotCommit>(
|
||||
"SnapshotCommit",
|
||||
fields,
|
||||
oneofs,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for SnapshotCommit {
|
||||
const NAME: &'static str = "SnapshotCommit";
|
||||
|
||||
fn is_initialized(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::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)?;
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
|
||||
while let Some(tag) = is.read_raw_tag_or_eof()? {
|
||||
match tag {
|
||||
10 => {
|
||||
self.key = is.read_string()?;
|
||||
},
|
||||
2 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
|
||||
18 => {
|
||||
self.name = is.read_string()?;
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
tag => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
@ -323,7 +340,7 @@ impl ::protobuf::Message for SnapshotCommit {
|
|||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
fn compute_size(&self) -> u64 {
|
||||
let mut my_size = 0;
|
||||
if !self.key.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(1, &self.key);
|
||||
|
|
@ -331,107 +348,76 @@ impl ::protobuf::Message for SnapshotCommit {
|
|||
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 += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
|
||||
self.special_fields.cached_size().set(my_size as u32);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
|
||||
if !self.key.is_empty() {
|
||||
os.write_string(1, &self.key)?;
|
||||
}
|
||||
if !self.name.is_empty() {
|
||||
os.write_string(2, &self.name)?;
|
||||
}
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
os.write_unknown_fields(self.special_fields.unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
fn special_fields(&self) -> &::protobuf::SpecialFields {
|
||||
&self.special_fields
|
||||
}
|
||||
|
||||
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 mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
|
||||
&mut self.special_fields
|
||||
}
|
||||
|
||||
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();
|
||||
self.special_fields.clear();
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static SnapshotCommit {
|
||||
static instance: SnapshotCommit = SnapshotCommit {
|
||||
key: ::std::string::String::new(),
|
||||
name: ::std::string::String::new(),
|
||||
special_fields: ::protobuf::SpecialFields::new(),
|
||||
};
|
||||
&instance
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for SnapshotCommit {
|
||||
impl ::protobuf::MessageFull for SnapshotCommit {
|
||||
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
|
||||
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
|
||||
descriptor.get(|| file_descriptor().message_by_package_relative_name("SnapshotCommit").unwrap()).clone()
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Display for SnapshotCommit {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
||||
::protobuf::text_format::fmt(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for SnapshotCommit {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
|
||||
}
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
#[derive(PartialEq,Clone,Default,Debug)]
|
||||
// @@protoc_insertion_point(message:containerd.events.SnapshotRemove)
|
||||
pub struct SnapshotRemove {
|
||||
// message fields
|
||||
// @@protoc_insertion_point(field:containerd.events.SnapshotRemove.key)
|
||||
pub key: ::std::string::String,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
// @@protoc_insertion_point(special_field:containerd.events.SnapshotRemove.special_fields)
|
||||
pub special_fields: ::protobuf::SpecialFields,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a SnapshotRemove {
|
||||
|
|
@ -447,10 +433,10 @@ impl SnapshotRemove {
|
|||
|
||||
// string key = 1;
|
||||
|
||||
|
||||
pub fn get_key(&self) -> &str {
|
||||
pub fn key(&self) -> &str {
|
||||
&self.key
|
||||
}
|
||||
|
||||
pub fn clear_key(&mut self) {
|
||||
self.key.clear();
|
||||
}
|
||||
|
|
@ -470,22 +456,38 @@ impl SnapshotRemove {
|
|||
pub fn take_key(&mut self) -> ::std::string::String {
|
||||
::std::mem::replace(&mut self.key, ::std::string::String::new())
|
||||
}
|
||||
|
||||
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
|
||||
let mut fields = ::std::vec::Vec::with_capacity(1);
|
||||
let mut oneofs = ::std::vec::Vec::with_capacity(0);
|
||||
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
|
||||
"key",
|
||||
|m: &SnapshotRemove| { &m.key },
|
||||
|m: &mut SnapshotRemove| { &mut m.key },
|
||||
));
|
||||
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<SnapshotRemove>(
|
||||
"SnapshotRemove",
|
||||
fields,
|
||||
oneofs,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for SnapshotRemove {
|
||||
const NAME: &'static str = "SnapshotRemove";
|
||||
|
||||
fn is_initialized(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::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)?;
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
|
||||
while let Some(tag) = is.read_raw_tag_or_eof()? {
|
||||
match tag {
|
||||
10 => {
|
||||
self.key = is.read_string()?;
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
tag => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
@ -494,115 +496,106 @@ impl ::protobuf::Message for SnapshotRemove {
|
|||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
fn compute_size(&self) -> u64 {
|
||||
let mut my_size = 0;
|
||||
if !self.key.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(1, &self.key);
|
||||
}
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
|
||||
self.special_fields.cached_size().set(my_size as u32);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
|
||||
if !self.key.is_empty() {
|
||||
os.write_string(1, &self.key)?;
|
||||
}
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
os.write_unknown_fields(self.special_fields.unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
fn special_fields(&self) -> &::protobuf::SpecialFields {
|
||||
&self.special_fields
|
||||
}
|
||||
|
||||
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 mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
|
||||
&mut self.special_fields
|
||||
}
|
||||
|
||||
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 clear(&mut self) {
|
||||
self.key.clear();
|
||||
self.special_fields.clear();
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static SnapshotRemove {
|
||||
static instance: ::protobuf::rt::LazyV2<SnapshotRemove> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(SnapshotRemove::new)
|
||||
static instance: SnapshotRemove = SnapshotRemove {
|
||||
key: ::std::string::String::new(),
|
||||
special_fields: ::protobuf::SpecialFields::new(),
|
||||
};
|
||||
&instance
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for SnapshotRemove {
|
||||
fn clear(&mut self) {
|
||||
self.key.clear();
|
||||
self.unknown_fields.clear();
|
||||
impl ::protobuf::MessageFull for SnapshotRemove {
|
||||
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
|
||||
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
|
||||
descriptor.get(|| file_descriptor().message_by_package_relative_name("SnapshotRemove").unwrap()).clone()
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for SnapshotRemove {
|
||||
impl ::std::fmt::Display for SnapshotRemove {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
||||
::protobuf::text_format::fmt(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for SnapshotRemove {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<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\
|
||||
dpath.protoX\0\";\n\x0fSnapshotPrepare\x12\x10\n\x03key\x18\x01\x20\x01(\
|
||||
\tR\x03key\x12\x16\n\x06parent\x18\x02\x20\x01(\tR\x06parent\"6\n\x0eSna\
|
||||
pshotCommit\x12\x10\n\x03key\x18\x01\x20\x01(\tR\x03key\x12\x12\n\x04nam\
|
||||
e\x18\x02\x20\x01(\tR\x04name\"\"\n\x0eSnapshotRemove\x12\x10\n\x03key\
|
||||
\x18\x01\x20\x01(\tR\x03keyB8Z2github.com/containerd/containerd/api/even\
|
||||
ts;events\xa0\xf4\x1e\x01b\x06proto3\
|
||||
";
|
||||
|
||||
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 {
|
||||
/// `FileDescriptorProto` object which was a source for this generated file
|
||||
fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
|
||||
static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
|
||||
file_descriptor_proto_lazy.get(|| {
|
||||
parse_descriptor_proto()
|
||||
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
|
||||
})
|
||||
}
|
||||
|
||||
/// `FileDescriptor` object which allows dynamic access to files
|
||||
pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
|
||||
static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
|
||||
static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
|
||||
file_descriptor.get(|| {
|
||||
let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
|
||||
let mut deps = ::std::vec::Vec::with_capacity(1);
|
||||
deps.push(super::fieldpath::file_descriptor().clone());
|
||||
let mut messages = ::std::vec::Vec::with_capacity(3);
|
||||
messages.push(SnapshotPrepare::generated_message_descriptor_data());
|
||||
messages.push(SnapshotCommit::generated_message_descriptor_data());
|
||||
messages.push(SnapshotRemove::generated_message_descriptor_data());
|
||||
let mut enums = ::std::vec::Vec::with_capacity(0);
|
||||
::protobuf::reflect::GeneratedFileDescriptor::new_generated(
|
||||
file_descriptor_proto(),
|
||||
deps,
|
||||
messages,
|
||||
enums,
|
||||
)
|
||||
});
|
||||
::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
|
||||
})
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,4 +1,5 @@
|
|||
// This file is generated by rust-protobuf 2.27.1. Do not edit
|
||||
// This file is generated by rust-protobuf 3.1.0. Do not edit
|
||||
// .proto file is parsed by pure
|
||||
// @generated
|
||||
|
||||
// https://github.com/rust-lang/rust-clippy/issues/702
|
||||
|
|
@ -15,21 +16,24 @@
|
|||
#![allow(non_snake_case)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![allow(trivial_casts)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(unused_results)]
|
||||
#![allow(unused_mut)]
|
||||
|
||||
//! Generated file from `github.com/containerd/containerd/api/services/ttrpc/events/v1/events.proto`
|
||||
|
||||
/// Generated files are compatible only with the same version
|
||||
/// of protobuf runtime.
|
||||
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_27_1;
|
||||
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_1_0;
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
#[derive(PartialEq,Clone,Default,Debug)]
|
||||
// @@protoc_insertion_point(message:containerd.services.events.ttrpc.v1.ForwardRequest)
|
||||
pub struct ForwardRequest {
|
||||
// message fields
|
||||
pub envelope: ::protobuf::SingularPtrField<Envelope>,
|
||||
// @@protoc_insertion_point(field:containerd.services.events.ttrpc.v1.ForwardRequest.envelope)
|
||||
pub envelope: ::protobuf::MessageField<Envelope>,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
// @@protoc_insertion_point(special_field:containerd.services.events.ttrpc.v1.ForwardRequest.special_fields)
|
||||
pub special_fields: ::protobuf::SpecialFields,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a ForwardRequest {
|
||||
|
|
@ -45,10 +49,10 @@ impl ForwardRequest {
|
|||
|
||||
// .containerd.services.events.ttrpc.v1.Envelope envelope = 1;
|
||||
|
||||
|
||||
pub fn get_envelope(&self) -> &Envelope {
|
||||
pub fn 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();
|
||||
}
|
||||
|
|
@ -59,43 +63,51 @@ impl ForwardRequest {
|
|||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_envelope(&mut self, v: Envelope) {
|
||||
self.envelope = ::protobuf::SingularPtrField::some(v);
|
||||
self.envelope = ::protobuf::MessageField::some(v);
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
// If field is not initialized, it is initialized with default value first.
|
||||
pub fn mut_envelope(&mut self) -> &mut Envelope {
|
||||
if self.envelope.is_none() {
|
||||
self.envelope.set_default();
|
||||
}
|
||||
self.envelope.as_mut().unwrap()
|
||||
self.envelope.mut_or_insert_default()
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_envelope(&mut self) -> Envelope {
|
||||
self.envelope.take().unwrap_or_else(|| Envelope::new())
|
||||
}
|
||||
|
||||
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
|
||||
let mut fields = ::std::vec::Vec::with_capacity(1);
|
||||
let mut oneofs = ::std::vec::Vec::with_capacity(0);
|
||||
fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Envelope>(
|
||||
"envelope",
|
||||
|m: &ForwardRequest| { &m.envelope },
|
||||
|m: &mut ForwardRequest| { &mut m.envelope },
|
||||
));
|
||||
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<ForwardRequest>(
|
||||
"ForwardRequest",
|
||||
fields,
|
||||
oneofs,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for ForwardRequest {
|
||||
const NAME: &'static str = "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)?;
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
|
||||
while let Some(tag) = is.read_raw_tag_or_eof()? {
|
||||
match tag {
|
||||
10 => {
|
||||
::protobuf::rt::read_singular_message_into_field(is, &mut self.envelope)?;
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
tag => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
@ -104,109 +116,83 @@ impl ::protobuf::Message for ForwardRequest {
|
|||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
fn compute_size(&self) -> u64 {
|
||||
let mut my_size = 0;
|
||||
if let Some(ref v) = self.envelope.as_ref() {
|
||||
if let Some(v) = self.envelope.as_ref() {
|
||||
let len = v.compute_size();
|
||||
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
|
||||
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
|
||||
}
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
|
||||
self.special_fields.cached_size().set(my_size as u32);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::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)?;
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
|
||||
if let Some(v) = self.envelope.as_ref() {
|
||||
::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
|
||||
}
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
os.write_unknown_fields(self.special_fields.unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
fn special_fields(&self) -> &::protobuf::SpecialFields {
|
||||
&self.special_fields
|
||||
}
|
||||
|
||||
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 mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
|
||||
&mut self.special_fields
|
||||
}
|
||||
|
||||
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 clear(&mut self) {
|
||||
self.envelope.clear();
|
||||
self.special_fields.clear();
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static ForwardRequest {
|
||||
static instance: ::protobuf::rt::LazyV2<ForwardRequest> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(ForwardRequest::new)
|
||||
static instance: ForwardRequest = ForwardRequest {
|
||||
envelope: ::protobuf::MessageField::none(),
|
||||
special_fields: ::protobuf::SpecialFields::new(),
|
||||
};
|
||||
&instance
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for ForwardRequest {
|
||||
fn clear(&mut self) {
|
||||
self.envelope.clear();
|
||||
self.unknown_fields.clear();
|
||||
impl ::protobuf::MessageFull for ForwardRequest {
|
||||
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
|
||||
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
|
||||
descriptor.get(|| file_descriptor().message_by_package_relative_name("ForwardRequest").unwrap()).clone()
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for ForwardRequest {
|
||||
impl ::std::fmt::Display for ForwardRequest {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
||||
::protobuf::text_format::fmt(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for ForwardRequest {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
|
||||
}
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
#[derive(PartialEq,Clone,Default,Debug)]
|
||||
// @@protoc_insertion_point(message:containerd.services.events.ttrpc.v1.Envelope)
|
||||
pub struct Envelope {
|
||||
// message fields
|
||||
pub timestamp: ::protobuf::SingularPtrField<::protobuf::well_known_types::Timestamp>,
|
||||
// @@protoc_insertion_point(field:containerd.services.events.ttrpc.v1.Envelope.timestamp)
|
||||
pub timestamp: ::protobuf::MessageField<::protobuf::well_known_types::timestamp::Timestamp>,
|
||||
// @@protoc_insertion_point(field:containerd.services.events.ttrpc.v1.Envelope.namespace)
|
||||
pub namespace: ::std::string::String,
|
||||
// @@protoc_insertion_point(field:containerd.services.events.ttrpc.v1.Envelope.topic)
|
||||
pub topic: ::std::string::String,
|
||||
pub event: ::protobuf::SingularPtrField<::protobuf::well_known_types::Any>,
|
||||
// @@protoc_insertion_point(field:containerd.services.events.ttrpc.v1.Envelope.event)
|
||||
pub event: ::protobuf::MessageField<::protobuf::well_known_types::any::Any>,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
// @@protoc_insertion_point(special_field:containerd.services.events.ttrpc.v1.Envelope.special_fields)
|
||||
pub special_fields: ::protobuf::SpecialFields,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a Envelope {
|
||||
|
|
@ -222,10 +208,10 @@ impl Envelope {
|
|||
|
||||
// .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 timestamp(&self) -> &::protobuf::well_known_types::timestamp::Timestamp {
|
||||
self.timestamp.as_ref().unwrap_or_else(|| <::protobuf::well_known_types::timestamp::Timestamp as ::protobuf::Message>::default_instance())
|
||||
}
|
||||
|
||||
pub fn clear_timestamp(&mut self) {
|
||||
self.timestamp.clear();
|
||||
}
|
||||
|
|
@ -235,30 +221,27 @@ impl Envelope {
|
|||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_timestamp(&mut self, v: ::protobuf::well_known_types::Timestamp) {
|
||||
self.timestamp = ::protobuf::SingularPtrField::some(v);
|
||||
pub fn set_timestamp(&mut self, v: ::protobuf::well_known_types::timestamp::Timestamp) {
|
||||
self.timestamp = ::protobuf::MessageField::some(v);
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
// If field is not initialized, it is initialized with default value first.
|
||||
pub fn mut_timestamp(&mut self) -> &mut ::protobuf::well_known_types::Timestamp {
|
||||
if self.timestamp.is_none() {
|
||||
self.timestamp.set_default();
|
||||
}
|
||||
self.timestamp.as_mut().unwrap()
|
||||
pub fn mut_timestamp(&mut self) -> &mut ::protobuf::well_known_types::timestamp::Timestamp {
|
||||
self.timestamp.mut_or_insert_default()
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_timestamp(&mut self) -> ::protobuf::well_known_types::Timestamp {
|
||||
self.timestamp.take().unwrap_or_else(|| ::protobuf::well_known_types::Timestamp::new())
|
||||
pub fn take_timestamp(&mut self) -> ::protobuf::well_known_types::timestamp::Timestamp {
|
||||
self.timestamp.take().unwrap_or_else(|| ::protobuf::well_known_types::timestamp::Timestamp::new())
|
||||
}
|
||||
|
||||
// string namespace = 2;
|
||||
|
||||
|
||||
pub fn get_namespace(&self) -> &str {
|
||||
pub fn namespace(&self) -> &str {
|
||||
&self.namespace
|
||||
}
|
||||
|
||||
pub fn clear_namespace(&mut self) {
|
||||
self.namespace.clear();
|
||||
}
|
||||
|
|
@ -281,10 +264,10 @@ impl Envelope {
|
|||
|
||||
// string topic = 3;
|
||||
|
||||
|
||||
pub fn get_topic(&self) -> &str {
|
||||
pub fn topic(&self) -> &str {
|
||||
&self.topic
|
||||
}
|
||||
|
||||
pub fn clear_topic(&mut self) {
|
||||
self.topic.clear();
|
||||
}
|
||||
|
|
@ -307,10 +290,10 @@ impl Envelope {
|
|||
|
||||
// .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 event(&self) -> &::protobuf::well_known_types::any::Any {
|
||||
self.event.as_ref().unwrap_or_else(|| <::protobuf::well_known_types::any::Any as ::protobuf::Message>::default_instance())
|
||||
}
|
||||
|
||||
pub fn clear_event(&mut self) {
|
||||
self.event.clear();
|
||||
}
|
||||
|
|
@ -320,58 +303,76 @@ impl Envelope {
|
|||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_event(&mut self, v: ::protobuf::well_known_types::Any) {
|
||||
self.event = ::protobuf::SingularPtrField::some(v);
|
||||
pub fn set_event(&mut self, v: ::protobuf::well_known_types::any::Any) {
|
||||
self.event = ::protobuf::MessageField::some(v);
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
// If field is not initialized, it is initialized with default value first.
|
||||
pub fn mut_event(&mut self) -> &mut ::protobuf::well_known_types::Any {
|
||||
if self.event.is_none() {
|
||||
self.event.set_default();
|
||||
}
|
||||
self.event.as_mut().unwrap()
|
||||
pub fn mut_event(&mut self) -> &mut ::protobuf::well_known_types::any::Any {
|
||||
self.event.mut_or_insert_default()
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_event(&mut self) -> ::protobuf::well_known_types::Any {
|
||||
self.event.take().unwrap_or_else(|| ::protobuf::well_known_types::Any::new())
|
||||
pub fn take_event(&mut self) -> ::protobuf::well_known_types::any::Any {
|
||||
self.event.take().unwrap_or_else(|| ::protobuf::well_known_types::any::Any::new())
|
||||
}
|
||||
|
||||
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
|
||||
let mut fields = ::std::vec::Vec::with_capacity(4);
|
||||
let mut oneofs = ::std::vec::Vec::with_capacity(0);
|
||||
fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ::protobuf::well_known_types::timestamp::Timestamp>(
|
||||
"timestamp",
|
||||
|m: &Envelope| { &m.timestamp },
|
||||
|m: &mut Envelope| { &mut m.timestamp },
|
||||
));
|
||||
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
|
||||
"namespace",
|
||||
|m: &Envelope| { &m.namespace },
|
||||
|m: &mut Envelope| { &mut m.namespace },
|
||||
));
|
||||
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
|
||||
"topic",
|
||||
|m: &Envelope| { &m.topic },
|
||||
|m: &mut Envelope| { &mut m.topic },
|
||||
));
|
||||
fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ::protobuf::well_known_types::any::Any>(
|
||||
"event",
|
||||
|m: &Envelope| { &m.event },
|
||||
|m: &mut Envelope| { &mut m.event },
|
||||
));
|
||||
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Envelope>(
|
||||
"Envelope",
|
||||
fields,
|
||||
oneofs,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for Envelope {
|
||||
const NAME: &'static str = "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)?;
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
|
||||
while let Some(tag) = is.read_raw_tag_or_eof()? {
|
||||
match tag {
|
||||
10 => {
|
||||
::protobuf::rt::read_singular_message_into_field(is, &mut self.timestamp)?;
|
||||
},
|
||||
2 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.namespace)?;
|
||||
18 => {
|
||||
self.namespace = is.read_string()?;
|
||||
},
|
||||
3 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.topic)?;
|
||||
26 => {
|
||||
self.topic = is.read_string()?;
|
||||
},
|
||||
4 => {
|
||||
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.event)?;
|
||||
34 => {
|
||||
::protobuf::rt::read_singular_message_into_field(is, &mut self.event)?;
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
tag => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
@ -380,11 +381,11 @@ impl ::protobuf::Message for Envelope {
|
|||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
fn compute_size(&self) -> u64 {
|
||||
let mut my_size = 0;
|
||||
if let Some(ref v) = self.timestamp.as_ref() {
|
||||
if let Some(v) = self.timestamp.as_ref() {
|
||||
let len = v.compute_size();
|
||||
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
|
||||
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
|
||||
}
|
||||
if !self.namespace.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(2, &self.namespace);
|
||||
|
|
@ -392,20 +393,18 @@ impl ::protobuf::Message for Envelope {
|
|||
if !self.topic.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(3, &self.topic);
|
||||
}
|
||||
if let Some(ref v) = self.event.as_ref() {
|
||||
if let Some(v) = self.event.as_ref() {
|
||||
let len = v.compute_size();
|
||||
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
|
||||
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
|
||||
}
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
|
||||
self.special_fields.cached_size().set(my_size as u32);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::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)?;
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
|
||||
if let Some(v) = self.timestamp.as_ref() {
|
||||
::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
|
||||
}
|
||||
if !self.namespace.is_empty() {
|
||||
os.write_string(2, &self.namespace)?;
|
||||
|
|
@ -413,103 +412,60 @@ impl ::protobuf::Message for Envelope {
|
|||
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)?;
|
||||
if let Some(v) = self.event.as_ref() {
|
||||
::protobuf::rt::write_message_field_with_cached_size(4, v, os)?;
|
||||
}
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
os.write_unknown_fields(self.special_fields.unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
fn special_fields(&self) -> &::protobuf::SpecialFields {
|
||||
&self.special_fields
|
||||
}
|
||||
|
||||
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 mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
|
||||
&mut self.special_fields
|
||||
}
|
||||
|
||||
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();
|
||||
self.special_fields.clear();
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static Envelope {
|
||||
static instance: Envelope = Envelope {
|
||||
timestamp: ::protobuf::MessageField::none(),
|
||||
namespace: ::std::string::String::new(),
|
||||
topic: ::std::string::String::new(),
|
||||
event: ::protobuf::MessageField::none(),
|
||||
special_fields: ::protobuf::SpecialFields::new(),
|
||||
};
|
||||
&instance
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for Envelope {
|
||||
impl ::protobuf::MessageFull for Envelope {
|
||||
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
|
||||
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
|
||||
descriptor.get(|| file_descriptor().message_by_package_relative_name("Envelope").unwrap()).clone()
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Display for Envelope {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
||||
::protobuf::text_format::fmt(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for Envelope {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
|
||||
}
|
||||
|
||||
static file_descriptor_proto_data: &'static [u8] = b"\
|
||||
|
|
@ -517,24 +473,49 @@ static file_descriptor_proto_data: &'static [u8] = b"\
|
|||
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\
|
||||
\x1fgoogle/protobuf/timestamp.protoX\0X\x01\"[\n\x0eForwardRequest\x12I\
|
||||
\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\
|
||||
1.EnvelopeR\x08envelope\"\xb4\x01\n\x08Envelope\x12B\n\ttimestamp\x18\
|
||||
\x01\x20\x01(\x0b2\x1a.google.protobuf.TimestampR\ttimestampB\x08\x90\
|
||||
\xdf\x1f\x01\xc8\xde\x1f\0\x12\x1c\n\tnamespace\x18\x02\x20\x01(\tR\tnam\
|
||||
espace\x12\x14\n\x05topic\x18\x03\x20\x01(\tR\x05topic\x12*\n\x05event\
|
||||
\x18\x04\x20\x01(\x0b2\x14.google.protobuf.AnyR\x05event:\x04\x80\xb9\
|
||||
\x1f\x012`\n\x06Events\x12V\n\x07Forward\x123.containerd.services.events\
|
||||
.ttrpc.v1.ForwardRequest\x1a\x16.google.protobuf.EmptyBFZDgithub.com/con\
|
||||
tainerd/containerd/api/services/ttrpc/events/v1;eventsb\x06proto3\
|
||||
";
|
||||
|
||||
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 {
|
||||
/// `FileDescriptorProto` object which was a source for this generated file
|
||||
fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
|
||||
static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
|
||||
file_descriptor_proto_lazy.get(|| {
|
||||
parse_descriptor_proto()
|
||||
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
|
||||
})
|
||||
}
|
||||
|
||||
/// `FileDescriptor` object which allows dynamic access to files
|
||||
pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
|
||||
static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
|
||||
static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
|
||||
file_descriptor.get(|| {
|
||||
let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
|
||||
let mut deps = ::std::vec::Vec::with_capacity(5);
|
||||
deps.push(super::fieldpath::file_descriptor().clone());
|
||||
deps.push(super::gogo::file_descriptor().clone());
|
||||
deps.push(::protobuf::well_known_types::any::file_descriptor().clone());
|
||||
deps.push(::protobuf::well_known_types::empty::file_descriptor().clone());
|
||||
deps.push(::protobuf::well_known_types::timestamp::file_descriptor().clone());
|
||||
let mut messages = ::std::vec::Vec::with_capacity(2);
|
||||
messages.push(ForwardRequest::generated_message_descriptor_data());
|
||||
messages.push(Envelope::generated_message_descriptor_data());
|
||||
let mut enums = ::std::vec::Vec::with_capacity(0);
|
||||
::protobuf::reflect::GeneratedFileDescriptor::new_generated(
|
||||
file_descriptor_proto(),
|
||||
deps,
|
||||
messages,
|
||||
enums,
|
||||
)
|
||||
});
|
||||
::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// This file is generated by ttrpc-compiler 0.5.1. Do not edit
|
||||
// This file is generated by ttrpc-compiler 0.6.1. Do not edit
|
||||
// @generated
|
||||
|
||||
// https://github.com/Manishearth/rust-clippy/issues/702
|
||||
|
|
@ -41,7 +41,7 @@ impl EventsClient {
|
|||
}
|
||||
|
||||
struct ForwardMethod {
|
||||
service: Arc<std::boxed::Box<dyn Events + Send + Sync>>,
|
||||
service: Arc<Box<dyn Events + Send + Sync>>,
|
||||
}
|
||||
|
||||
impl ::ttrpc::MethodHandler for ForwardMethod {
|
||||
|
|
@ -52,16 +52,16 @@ impl ::ttrpc::MethodHandler for ForwardMethod {
|
|||
}
|
||||
|
||||
pub trait Events {
|
||||
fn forward(&self, _ctx: &::ttrpc::TtrpcContext, _req: super::events::ForwardRequest) -> ::ttrpc::Result<super::empty::Empty> {
|
||||
fn forward(&self, _ctx: &::ttrpc::TtrpcContext, _: 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>> {
|
||||
pub fn create_events(service: Arc<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>);
|
||||
Box::new(ForwardMethod{service: service.clone()}) as Box<dyn ::ttrpc::MethodHandler + Send + Sync>);
|
||||
|
||||
methods
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// This file is generated by ttrpc-compiler 0.5.1. Do not edit
|
||||
// This file is generated by ttrpc-compiler 0.6.1. Do not edit
|
||||
// @generated
|
||||
|
||||
// https://github.com/Manishearth/rust-clippy/issues/702
|
||||
|
|
@ -41,28 +41,31 @@ impl EventsClient {
|
|||
}
|
||||
|
||||
struct ForwardMethod {
|
||||
service: Arc<std::boxed::Box<dyn Events + Send + Sync>>,
|
||||
service: Arc<Box<dyn Events + Send + Sync>>,
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl ::ttrpc::r#async::MethodHandler for ForwardMethod {
|
||||
async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<(u32, Vec<u8>)> {
|
||||
async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<::ttrpc::Response> {
|
||||
::ttrpc::async_request_handler!(self, ctx, req, events, ForwardRequest, forward);
|
||||
}
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
pub trait Events: Sync {
|
||||
async fn forward(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _req: super::events::ForwardRequest) -> ::ttrpc::Result<super::empty::Empty> {
|
||||
async fn forward(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _: 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::r#async::MethodHandler + Send + Sync>> {
|
||||
pub fn create_events(service: Arc<Box<dyn Events + Send + Sync>>) -> HashMap<String, ::ttrpc::r#async::Service> {
|
||||
let mut ret = HashMap::new();
|
||||
let mut methods = HashMap::new();
|
||||
let streams = 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::r#async::MethodHandler + Send + Sync>);
|
||||
methods.insert("Forward".to_string(),
|
||||
Box::new(ForwardMethod{service: service.clone()}) as Box<dyn ::ttrpc::r#async::MethodHandler + Send + Sync>);
|
||||
|
||||
methods
|
||||
ret.insert("containerd.services.events.ttrpc.v1.Events".to_string(), ::ttrpc::r#async::Service{ methods, streams });
|
||||
ret
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,71 @@
|
|||
// This file is generated by rust-protobuf 3.1.0. Do not edit
|
||||
// .proto file is parsed by pure
|
||||
// @generated
|
||||
|
||||
// https://github.com/rust-lang/rust-clippy/issues/702
|
||||
#![allow(unknown_lints)]
|
||||
#![allow(clippy::all)]
|
||||
|
||||
#![allow(unused_attributes)]
|
||||
#![cfg_attr(rustfmt, rustfmt::skip)]
|
||||
|
||||
#![allow(box_pointers)]
|
||||
#![allow(dead_code)]
|
||||
#![allow(missing_docs)]
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(non_snake_case)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![allow(trivial_casts)]
|
||||
#![allow(unused_results)]
|
||||
#![allow(unused_mut)]
|
||||
|
||||
//! Generated file from `github.com/containerd/containerd/protobuf/plugin/fieldpath.proto`
|
||||
|
||||
/// Generated files are compatible only with the same version
|
||||
/// of protobuf runtime.
|
||||
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_1_0;
|
||||
|
||||
/// Extension fields
|
||||
pub mod exts {
|
||||
|
||||
pub const fieldpath_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63300, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const fieldpath: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64400, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
}
|
||||
|
||||
static file_descriptor_proto_data: &'static [u8] = b"\
|
||||
\n@github.com/containerd/containerd/protobuf/plugin/fieldpath.proto\x12\
|
||||
\x11containerd.plugin\x1a\x20google/protobuf/descriptor.proto:C\n\rfield\
|
||||
path_all\x18\xc4\xee\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOption\
|
||||
sR\x0cfieldpathAll:?\n\tfieldpath\x18\x90\xf7\x03\x20\x01(\x08\x12\x1f.g\
|
||||
oogle.protobuf.MessageOptionsR\tfieldpathb\x06proto2\
|
||||
";
|
||||
|
||||
/// `FileDescriptorProto` object which was a source for this generated file
|
||||
fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
|
||||
static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
|
||||
file_descriptor_proto_lazy.get(|| {
|
||||
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
|
||||
})
|
||||
}
|
||||
|
||||
/// `FileDescriptor` object which allows dynamic access to files
|
||||
pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
|
||||
static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
|
||||
static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
|
||||
file_descriptor.get(|| {
|
||||
let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
|
||||
let mut deps = ::std::vec::Vec::with_capacity(1);
|
||||
deps.push(::protobuf::descriptor::file_descriptor().clone());
|
||||
let mut messages = ::std::vec::Vec::with_capacity(0);
|
||||
let mut enums = ::std::vec::Vec::with_capacity(0);
|
||||
::protobuf::reflect::GeneratedFileDescriptor::new_generated(
|
||||
file_descriptor_proto(),
|
||||
deps,
|
||||
messages,
|
||||
enums,
|
||||
)
|
||||
});
|
||||
::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
|
||||
})
|
||||
}
|
||||
|
|
@ -0,0 +1,327 @@
|
|||
// This file is generated by rust-protobuf 3.1.0. Do not edit
|
||||
// .proto file is parsed by pure
|
||||
// @generated
|
||||
|
||||
// https://github.com/rust-lang/rust-clippy/issues/702
|
||||
#![allow(unknown_lints)]
|
||||
#![allow(clippy::all)]
|
||||
|
||||
#![allow(unused_attributes)]
|
||||
#![cfg_attr(rustfmt, rustfmt::skip)]
|
||||
|
||||
#![allow(box_pointers)]
|
||||
#![allow(dead_code)]
|
||||
#![allow(missing_docs)]
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(non_snake_case)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![allow(trivial_casts)]
|
||||
#![allow(unused_results)]
|
||||
#![allow(unused_mut)]
|
||||
|
||||
//! Generated file from `gogoproto/gogo.proto`
|
||||
|
||||
/// Generated files are compatible only with the same version
|
||||
/// of protobuf runtime.
|
||||
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_1_0;
|
||||
|
||||
/// Extension fields
|
||||
pub mod exts {
|
||||
|
||||
pub const goproto_enum_prefix: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(62001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_enum_stringer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(62021, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const enum_stringer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(62022, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const enum_customname: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(62023, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING);
|
||||
|
||||
pub const enumdecl: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(62024, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const enumvalue_customname: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumValueOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(66001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING);
|
||||
|
||||
pub const goproto_getters_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_enum_prefix_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63002, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_stringer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63003, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const verbose_equal_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63004, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const face_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63005, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const gostring_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63006, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const populate_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63007, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const stringer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63008, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const onlyone_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63009, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const equal_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63013, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const description_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63014, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const testgen_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63015, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const benchgen_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63016, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const marshaler_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63017, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const unmarshaler_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63018, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const stable_marshaler_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63019, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const sizer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63020, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_enum_stringer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63021, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const enum_stringer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63022, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const unsafe_marshaler_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63023, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const unsafe_unmarshaler_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63024, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_extensions_map_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63025, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_unrecognized_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63026, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const gogoproto_import: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63027, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const protosizer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63028, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const compare_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63029, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const typedecl_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63030, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const enumdecl_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63031, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_registration: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63032, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const messagename_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63033, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_sizecache_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63034, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_unkeyed_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63035, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_getters: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_stringer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64003, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const verbose_equal: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64004, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const face: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64005, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const gostring: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64006, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const populate: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64007, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const stringer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(67008, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const onlyone: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64009, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const equal: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64013, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const description: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64014, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const testgen: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64015, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const benchgen: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64016, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const marshaler: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64017, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const unmarshaler: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64018, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const stable_marshaler: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64019, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const sizer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64020, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const unsafe_marshaler: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64023, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const unsafe_unmarshaler: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64024, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_extensions_map: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64025, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_unrecognized: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64026, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const protosizer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64028, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const compare: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64029, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const typedecl: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64030, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const messagename: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64033, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_sizecache: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64034, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_unkeyed: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64035, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const nullable: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(65001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const embed: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(65002, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const customtype: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65003, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING);
|
||||
|
||||
pub const customname: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65004, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING);
|
||||
|
||||
pub const jsontag: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65005, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING);
|
||||
|
||||
pub const moretags: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65006, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING);
|
||||
|
||||
pub const casttype: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65007, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING);
|
||||
|
||||
pub const castkey: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65008, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING);
|
||||
|
||||
pub const castvalue: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65009, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING);
|
||||
|
||||
pub const stdtime: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(65010, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const stdduration: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(65011, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const wktpointer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(65012, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
}
|
||||
|
||||
static file_descriptor_proto_data: &'static [u8] = b"\
|
||||
\n\x14gogoproto/gogo.proto\x12\tgogoproto\x1a\x20google/protobuf/descrip\
|
||||
tor.proto:N\n\x13goproto_enum_prefix\x18\xb1\xe4\x03\x20\x01(\x08\x12\
|
||||
\x1c.google.protobuf.EnumOptionsR\x11goprotoEnumPrefix:R\n\x15goproto_en\
|
||||
um_stringer\x18\xc5\xe4\x03\x20\x01(\x08\x12\x1c.google.protobuf.EnumOpt\
|
||||
ionsR\x13goprotoEnumStringer:C\n\renum_stringer\x18\xc6\xe4\x03\x20\x01(\
|
||||
\x08\x12\x1c.google.protobuf.EnumOptionsR\x0cenumStringer:G\n\x0fenum_cu\
|
||||
stomname\x18\xc7\xe4\x03\x20\x01(\t\x12\x1c.google.protobuf.EnumOptionsR\
|
||||
\x0eenumCustomname::\n\x08enumdecl\x18\xc8\xe4\x03\x20\x01(\x08\x12\x1c.\
|
||||
google.protobuf.EnumOptionsR\x08enumdecl:V\n\x14enumvalue_customname\x18\
|
||||
\xd1\x83\x04\x20\x01(\t\x12!.google.protobuf.EnumValueOptionsR\x13enumva\
|
||||
lueCustomname:N\n\x13goproto_getters_all\x18\x99\xec\x03\x20\x01(\x08\
|
||||
\x12\x1c.google.protobuf.FileOptionsR\x11goprotoGettersAll:U\n\x17goprot\
|
||||
o_enum_prefix_all\x18\x9a\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.F\
|
||||
ileOptionsR\x14goprotoEnumPrefixAll:P\n\x14goproto_stringer_all\x18\x9b\
|
||||
\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x12goprotoStr\
|
||||
ingerAll:J\n\x11verbose_equal_all\x18\x9c\xec\x03\x20\x01(\x08\x12\x1c.g\
|
||||
oogle.protobuf.FileOptionsR\x0fverboseEqualAll:9\n\x08face_all\x18\x9d\
|
||||
\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x07faceAll:A\
|
||||
\n\x0cgostring_all\x18\x9e\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.\
|
||||
FileOptionsR\x0bgostringAll:A\n\x0cpopulate_all\x18\x9f\xec\x03\x20\x01(\
|
||||
\x08\x12\x1c.google.protobuf.FileOptionsR\x0bpopulateAll:A\n\x0cstringer\
|
||||
_all\x18\xa0\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\
|
||||
\x0bstringerAll:?\n\x0bonlyone_all\x18\xa1\xec\x03\x20\x01(\x08\x12\x1c.\
|
||||
google.protobuf.FileOptionsR\nonlyoneAll:;\n\tequal_all\x18\xa5\xec\x03\
|
||||
\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x08equalAll:G\n\x0fde\
|
||||
scription_all\x18\xa6\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileO\
|
||||
ptionsR\x0edescriptionAll:?\n\x0btestgen_all\x18\xa7\xec\x03\x20\x01(\
|
||||
\x08\x12\x1c.google.protobuf.FileOptionsR\ntestgenAll:A\n\x0cbenchgen_al\
|
||||
l\x18\xa8\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x0bb\
|
||||
enchgenAll:C\n\rmarshaler_all\x18\xa9\xec\x03\x20\x01(\x08\x12\x1c.googl\
|
||||
e.protobuf.FileOptionsR\x0cmarshalerAll:G\n\x0funmarshaler_all\x18\xaa\
|
||||
\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x0eunmarshale\
|
||||
rAll:P\n\x14stable_marshaler_all\x18\xab\xec\x03\x20\x01(\x08\x12\x1c.go\
|
||||
ogle.protobuf.FileOptionsR\x12stableMarshalerAll:;\n\tsizer_all\x18\xac\
|
||||
\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x08sizerAll:Y\
|
||||
\n\x19goproto_enum_stringer_all\x18\xad\xec\x03\x20\x01(\x08\x12\x1c.goo\
|
||||
gle.protobuf.FileOptionsR\x16goprotoEnumStringerAll:J\n\x11enum_stringer\
|
||||
_all\x18\xae\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\
|
||||
\x0fenumStringerAll:P\n\x14unsafe_marshaler_all\x18\xaf\xec\x03\x20\x01(\
|
||||
\x08\x12\x1c.google.protobuf.FileOptionsR\x12unsafeMarshalerAll:T\n\x16u\
|
||||
nsafe_unmarshaler_all\x18\xb0\xec\x03\x20\x01(\x08\x12\x1c.google.protob\
|
||||
uf.FileOptionsR\x14unsafeUnmarshalerAll:[\n\x1agoproto_extensions_map_al\
|
||||
l\x18\xb1\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x17g\
|
||||
oprotoExtensionsMapAll:X\n\x18goproto_unrecognized_all\x18\xb2\xec\x03\
|
||||
\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x16goprotoUnrecognize\
|
||||
dAll:I\n\x10gogoproto_import\x18\xb3\xec\x03\x20\x01(\x08\x12\x1c.google\
|
||||
.protobuf.FileOptionsR\x0fgogoprotoImport:E\n\x0eprotosizer_all\x18\xb4\
|
||||
\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\rprotosizerAl\
|
||||
l:?\n\x0bcompare_all\x18\xb5\xec\x03\x20\x01(\x08\x12\x1c.google.protobu\
|
||||
f.FileOptionsR\ncompareAll:A\n\x0ctypedecl_all\x18\xb6\xec\x03\x20\x01(\
|
||||
\x08\x12\x1c.google.protobuf.FileOptionsR\x0btypedeclAll:A\n\x0cenumdecl\
|
||||
_all\x18\xb7\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\
|
||||
\x0benumdeclAll:Q\n\x14goproto_registration\x18\xb8\xec\x03\x20\x01(\x08\
|
||||
\x12\x1c.google.protobuf.FileOptionsR\x13goprotoRegistration:G\n\x0fmess\
|
||||
agename_all\x18\xb9\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOpt\
|
||||
ionsR\x0emessagenameAll:R\n\x15goproto_sizecache_all\x18\xba\xec\x03\x20\
|
||||
\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x13goprotoSizecacheAll:N\
|
||||
\n\x13goproto_unkeyed_all\x18\xbb\xec\x03\x20\x01(\x08\x12\x1c.google.pr\
|
||||
otobuf.FileOptionsR\x11goprotoUnkeyedAll:J\n\x0fgoproto_getters\x18\x81\
|
||||
\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x0egoproto\
|
||||
Getters:L\n\x10goproto_stringer\x18\x83\xf4\x03\x20\x01(\x08\x12\x1f.goo\
|
||||
gle.protobuf.MessageOptionsR\x0fgoprotoStringer:F\n\rverbose_equal\x18\
|
||||
\x84\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x0cver\
|
||||
boseEqual:5\n\x04face\x18\x85\xf4\x03\x20\x01(\x08\x12\x1f.google.protob\
|
||||
uf.MessageOptionsR\x04face:=\n\x08gostring\x18\x86\xf4\x03\x20\x01(\x08\
|
||||
\x12\x1f.google.protobuf.MessageOptionsR\x08gostring:=\n\x08populate\x18\
|
||||
\x87\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x08pop\
|
||||
ulate:=\n\x08stringer\x18\xc0\x8b\x04\x20\x01(\x08\x12\x1f.google.protob\
|
||||
uf.MessageOptionsR\x08stringer:;\n\x07onlyone\x18\x89\xf4\x03\x20\x01(\
|
||||
\x08\x12\x1f.google.protobuf.MessageOptionsR\x07onlyone:7\n\x05equal\x18\
|
||||
\x8d\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x05equ\
|
||||
al:C\n\x0bdescription\x18\x8e\xf4\x03\x20\x01(\x08\x12\x1f.google.protob\
|
||||
uf.MessageOptionsR\x0bdescription:;\n\x07testgen\x18\x8f\xf4\x03\x20\x01\
|
||||
(\x08\x12\x1f.google.protobuf.MessageOptionsR\x07testgen:=\n\x08benchgen\
|
||||
\x18\x90\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\
|
||||
\x08benchgen:?\n\tmarshaler\x18\x91\xf4\x03\x20\x01(\x08\x12\x1f.google.\
|
||||
protobuf.MessageOptionsR\tmarshaler:C\n\x0bunmarshaler\x18\x92\xf4\x03\
|
||||
\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x0bunmarshaler:L\n\
|
||||
\x10stable_marshaler\x18\x93\xf4\x03\x20\x01(\x08\x12\x1f.google.protobu\
|
||||
f.MessageOptionsR\x0fstableMarshaler:7\n\x05sizer\x18\x94\xf4\x03\x20\
|
||||
\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x05sizer:L\n\x10unsafe\
|
||||
_marshaler\x18\x97\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageO\
|
||||
ptionsR\x0funsafeMarshaler:P\n\x12unsafe_unmarshaler\x18\x98\xf4\x03\x20\
|
||||
\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x11unsafeUnmarshaler:W\
|
||||
\n\x16goproto_extensions_map\x18\x99\xf4\x03\x20\x01(\x08\x12\x1f.google\
|
||||
.protobuf.MessageOptionsR\x14goprotoExtensionsMap:T\n\x14goproto_unrecog\
|
||||
nized\x18\x9a\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOption\
|
||||
sR\x13goprotoUnrecognized:A\n\nprotosizer\x18\x9c\xf4\x03\x20\x01(\x08\
|
||||
\x12\x1f.google.protobuf.MessageOptionsR\nprotosizer:;\n\x07compare\x18\
|
||||
\x9d\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x07com\
|
||||
pare:=\n\x08typedecl\x18\x9e\xf4\x03\x20\x01(\x08\x12\x1f.google.protobu\
|
||||
f.MessageOptionsR\x08typedecl:C\n\x0bmessagename\x18\xa1\xf4\x03\x20\x01\
|
||||
(\x08\x12\x1f.google.protobuf.MessageOptionsR\x0bmessagename:N\n\x11gopr\
|
||||
oto_sizecache\x18\xa2\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.Messa\
|
||||
geOptionsR\x10goprotoSizecache:J\n\x0fgoproto_unkeyed\x18\xa3\xf4\x03\
|
||||
\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x0egoprotoUnkeyed:\
|
||||
;\n\x08nullable\x18\xe9\xfb\x03\x20\x01(\x08\x12\x1d.google.protobuf.Fie\
|
||||
ldOptionsR\x08nullable:5\n\x05embed\x18\xea\xfb\x03\x20\x01(\x08\x12\x1d\
|
||||
.google.protobuf.FieldOptionsR\x05embed:?\n\ncustomtype\x18\xeb\xfb\x03\
|
||||
\x20\x01(\t\x12\x1d.google.protobuf.FieldOptionsR\ncustomtype:?\n\ncusto\
|
||||
mname\x18\xec\xfb\x03\x20\x01(\t\x12\x1d.google.protobuf.FieldOptionsR\n\
|
||||
customname:9\n\x07jsontag\x18\xed\xfb\x03\x20\x01(\t\x12\x1d.google.prot\
|
||||
obuf.FieldOptionsR\x07jsontag:;\n\x08moretags\x18\xee\xfb\x03\x20\x01(\t\
|
||||
\x12\x1d.google.protobuf.FieldOptionsR\x08moretags:;\n\x08casttype\x18\
|
||||
\xef\xfb\x03\x20\x01(\t\x12\x1d.google.protobuf.FieldOptionsR\x08casttyp\
|
||||
e:9\n\x07castkey\x18\xf0\xfb\x03\x20\x01(\t\x12\x1d.google.protobuf.Fiel\
|
||||
dOptionsR\x07castkey:=\n\tcastvalue\x18\xf1\xfb\x03\x20\x01(\t\x12\x1d.g\
|
||||
oogle.protobuf.FieldOptionsR\tcastvalue:9\n\x07stdtime\x18\xf2\xfb\x03\
|
||||
\x20\x01(\x08\x12\x1d.google.protobuf.FieldOptionsR\x07stdtime:A\n\x0bst\
|
||||
dduration\x18\xf3\xfb\x03\x20\x01(\x08\x12\x1d.google.protobuf.FieldOpti\
|
||||
onsR\x0bstdduration:?\n\nwktpointer\x18\xf4\xfb\x03\x20\x01(\x08\x12\x1d\
|
||||
.google.protobuf.FieldOptionsR\nwktpointerBE\n\x13com.google.protobufB\n\
|
||||
GoGoProtosZ\"github.com/gogo/protobuf/gogoprotob\x06proto2\
|
||||
";
|
||||
|
||||
/// `FileDescriptorProto` object which was a source for this generated file
|
||||
fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
|
||||
static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
|
||||
file_descriptor_proto_lazy.get(|| {
|
||||
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
|
||||
})
|
||||
}
|
||||
|
||||
/// `FileDescriptor` object which allows dynamic access to files
|
||||
pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
|
||||
static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
|
||||
static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
|
||||
file_descriptor.get(|| {
|
||||
let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
|
||||
let mut deps = ::std::vec::Vec::with_capacity(1);
|
||||
deps.push(::protobuf::descriptor::file_descriptor().clone());
|
||||
let mut messages = ::std::vec::Vec::with_capacity(0);
|
||||
let mut enums = ::std::vec::Vec::with_capacity(0);
|
||||
::protobuf::reflect::GeneratedFileDescriptor::new_generated(
|
||||
file_descriptor_proto(),
|
||||
deps,
|
||||
messages,
|
||||
enums,
|
||||
)
|
||||
});
|
||||
::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
|
||||
})
|
||||
}
|
||||
|
|
@ -13,3 +13,6 @@ pub mod shim_ttrpc_async;
|
|||
pub(crate) mod empty;
|
||||
pub(crate) mod mount;
|
||||
pub(crate) mod task;
|
||||
|
||||
mod fieldpath;
|
||||
mod gogo;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -1,4 +1,4 @@
|
|||
// This file is generated by ttrpc-compiler 0.5.1. Do not edit
|
||||
// This file is generated by ttrpc-compiler 0.6.1. Do not edit
|
||||
// @generated
|
||||
|
||||
// https://github.com/Manishearth/rust-clippy/issues/702
|
||||
|
|
@ -137,7 +137,7 @@ impl TaskClient {
|
|||
}
|
||||
|
||||
struct StateMethod {
|
||||
service: Arc<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
service: Arc<Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
impl ::ttrpc::MethodHandler for StateMethod {
|
||||
|
|
@ -148,7 +148,7 @@ impl ::ttrpc::MethodHandler for StateMethod {
|
|||
}
|
||||
|
||||
struct CreateMethod {
|
||||
service: Arc<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
service: Arc<Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
impl ::ttrpc::MethodHandler for CreateMethod {
|
||||
|
|
@ -159,7 +159,7 @@ impl ::ttrpc::MethodHandler for CreateMethod {
|
|||
}
|
||||
|
||||
struct StartMethod {
|
||||
service: Arc<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
service: Arc<Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
impl ::ttrpc::MethodHandler for StartMethod {
|
||||
|
|
@ -170,7 +170,7 @@ impl ::ttrpc::MethodHandler for StartMethod {
|
|||
}
|
||||
|
||||
struct DeleteMethod {
|
||||
service: Arc<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
service: Arc<Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
impl ::ttrpc::MethodHandler for DeleteMethod {
|
||||
|
|
@ -181,7 +181,7 @@ impl ::ttrpc::MethodHandler for DeleteMethod {
|
|||
}
|
||||
|
||||
struct PidsMethod {
|
||||
service: Arc<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
service: Arc<Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
impl ::ttrpc::MethodHandler for PidsMethod {
|
||||
|
|
@ -192,7 +192,7 @@ impl ::ttrpc::MethodHandler for PidsMethod {
|
|||
}
|
||||
|
||||
struct PauseMethod {
|
||||
service: Arc<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
service: Arc<Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
impl ::ttrpc::MethodHandler for PauseMethod {
|
||||
|
|
@ -203,7 +203,7 @@ impl ::ttrpc::MethodHandler for PauseMethod {
|
|||
}
|
||||
|
||||
struct ResumeMethod {
|
||||
service: Arc<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
service: Arc<Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
impl ::ttrpc::MethodHandler for ResumeMethod {
|
||||
|
|
@ -214,7 +214,7 @@ impl ::ttrpc::MethodHandler for ResumeMethod {
|
|||
}
|
||||
|
||||
struct CheckpointMethod {
|
||||
service: Arc<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
service: Arc<Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
impl ::ttrpc::MethodHandler for CheckpointMethod {
|
||||
|
|
@ -225,7 +225,7 @@ impl ::ttrpc::MethodHandler for CheckpointMethod {
|
|||
}
|
||||
|
||||
struct KillMethod {
|
||||
service: Arc<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
service: Arc<Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
impl ::ttrpc::MethodHandler for KillMethod {
|
||||
|
|
@ -236,7 +236,7 @@ impl ::ttrpc::MethodHandler for KillMethod {
|
|||
}
|
||||
|
||||
struct ExecMethod {
|
||||
service: Arc<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
service: Arc<Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
impl ::ttrpc::MethodHandler for ExecMethod {
|
||||
|
|
@ -247,7 +247,7 @@ impl ::ttrpc::MethodHandler for ExecMethod {
|
|||
}
|
||||
|
||||
struct ResizePtyMethod {
|
||||
service: Arc<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
service: Arc<Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
impl ::ttrpc::MethodHandler for ResizePtyMethod {
|
||||
|
|
@ -258,7 +258,7 @@ impl ::ttrpc::MethodHandler for ResizePtyMethod {
|
|||
}
|
||||
|
||||
struct CloseIoMethod {
|
||||
service: Arc<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
service: Arc<Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
impl ::ttrpc::MethodHandler for CloseIoMethod {
|
||||
|
|
@ -269,7 +269,7 @@ impl ::ttrpc::MethodHandler for CloseIoMethod {
|
|||
}
|
||||
|
||||
struct UpdateMethod {
|
||||
service: Arc<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
service: Arc<Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
impl ::ttrpc::MethodHandler for UpdateMethod {
|
||||
|
|
@ -280,7 +280,7 @@ impl ::ttrpc::MethodHandler for UpdateMethod {
|
|||
}
|
||||
|
||||
struct WaitMethod {
|
||||
service: Arc<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
service: Arc<Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
impl ::ttrpc::MethodHandler for WaitMethod {
|
||||
|
|
@ -291,7 +291,7 @@ impl ::ttrpc::MethodHandler for WaitMethod {
|
|||
}
|
||||
|
||||
struct StatsMethod {
|
||||
service: Arc<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
service: Arc<Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
impl ::ttrpc::MethodHandler for StatsMethod {
|
||||
|
|
@ -302,7 +302,7 @@ impl ::ttrpc::MethodHandler for StatsMethod {
|
|||
}
|
||||
|
||||
struct ConnectMethod {
|
||||
service: Arc<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
service: Arc<Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
impl ::ttrpc::MethodHandler for ConnectMethod {
|
||||
|
|
@ -313,7 +313,7 @@ impl ::ttrpc::MethodHandler for ConnectMethod {
|
|||
}
|
||||
|
||||
struct ShutdownMethod {
|
||||
service: Arc<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
service: Arc<Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
impl ::ttrpc::MethodHandler for ShutdownMethod {
|
||||
|
|
@ -324,112 +324,112 @@ impl ::ttrpc::MethodHandler for ShutdownMethod {
|
|||
}
|
||||
|
||||
pub trait Task {
|
||||
fn state(&self, _ctx: &::ttrpc::TtrpcContext, _req: super::shim::StateRequest) -> ::ttrpc::Result<super::shim::StateResponse> {
|
||||
fn state(&self, _ctx: &::ttrpc::TtrpcContext, _: 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> {
|
||||
fn create(&self, _ctx: &::ttrpc::TtrpcContext, _: 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> {
|
||||
fn start(&self, _ctx: &::ttrpc::TtrpcContext, _: 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> {
|
||||
fn delete(&self, _ctx: &::ttrpc::TtrpcContext, _: 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> {
|
||||
fn pids(&self, _ctx: &::ttrpc::TtrpcContext, _: 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> {
|
||||
fn pause(&self, _ctx: &::ttrpc::TtrpcContext, _: 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> {
|
||||
fn resume(&self, _ctx: &::ttrpc::TtrpcContext, _: 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> {
|
||||
fn checkpoint(&self, _ctx: &::ttrpc::TtrpcContext, _: 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> {
|
||||
fn kill(&self, _ctx: &::ttrpc::TtrpcContext, _: 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> {
|
||||
fn exec(&self, _ctx: &::ttrpc::TtrpcContext, _: 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> {
|
||||
fn resize_pty(&self, _ctx: &::ttrpc::TtrpcContext, _: 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> {
|
||||
fn close_io(&self, _ctx: &::ttrpc::TtrpcContext, _: 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> {
|
||||
fn update(&self, _ctx: &::ttrpc::TtrpcContext, _: 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> {
|
||||
fn wait(&self, _ctx: &::ttrpc::TtrpcContext, _: 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> {
|
||||
fn stats(&self, _ctx: &::ttrpc::TtrpcContext, _: 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> {
|
||||
fn connect(&self, _ctx: &::ttrpc::TtrpcContext, _: 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> {
|
||||
fn shutdown(&self, _ctx: &::ttrpc::TtrpcContext, _: 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>> {
|
||||
pub fn create_task(service: Arc<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>);
|
||||
Box::new(StateMethod{service: service.clone()}) as 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>);
|
||||
Box::new(CreateMethod{service: service.clone()}) as 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>);
|
||||
Box::new(StartMethod{service: service.clone()}) as 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>);
|
||||
Box::new(DeleteMethod{service: service.clone()}) as 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>);
|
||||
Box::new(PidsMethod{service: service.clone()}) as 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>);
|
||||
Box::new(PauseMethod{service: service.clone()}) as 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>);
|
||||
Box::new(ResumeMethod{service: service.clone()}) as 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>);
|
||||
Box::new(CheckpointMethod{service: service.clone()}) as 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>);
|
||||
Box::new(KillMethod{service: service.clone()}) as 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>);
|
||||
Box::new(ExecMethod{service: service.clone()}) as 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>);
|
||||
Box::new(ResizePtyMethod{service: service.clone()}) as 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>);
|
||||
Box::new(CloseIoMethod{service: service.clone()}) as 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>);
|
||||
Box::new(UpdateMethod{service: service.clone()}) as 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>);
|
||||
Box::new(WaitMethod{service: service.clone()}) as 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>);
|
||||
Box::new(StatsMethod{service: service.clone()}) as 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>);
|
||||
Box::new(ConnectMethod{service: service.clone()}) as 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>);
|
||||
Box::new(ShutdownMethod{service: service.clone()}) as Box<dyn ::ttrpc::MethodHandler + Send + Sync>);
|
||||
|
||||
methods
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// This file is generated by ttrpc-compiler 0.5.1. Do not edit
|
||||
// This file is generated by ttrpc-compiler 0.6.1. Do not edit
|
||||
// @generated
|
||||
|
||||
// https://github.com/Manishearth/rust-clippy/issues/702
|
||||
|
|
@ -121,300 +121,303 @@ impl TaskClient {
|
|||
}
|
||||
|
||||
struct StateMethod {
|
||||
service: Arc<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
service: Arc<Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl ::ttrpc::r#async::MethodHandler for StateMethod {
|
||||
async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<(u32, Vec<u8>)> {
|
||||
async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<::ttrpc::Response> {
|
||||
::ttrpc::async_request_handler!(self, ctx, req, shim, StateRequest, state);
|
||||
}
|
||||
}
|
||||
|
||||
struct CreateMethod {
|
||||
service: Arc<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
service: Arc<Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl ::ttrpc::r#async::MethodHandler for CreateMethod {
|
||||
async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<(u32, Vec<u8>)> {
|
||||
async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<::ttrpc::Response> {
|
||||
::ttrpc::async_request_handler!(self, ctx, req, shim, CreateTaskRequest, create);
|
||||
}
|
||||
}
|
||||
|
||||
struct StartMethod {
|
||||
service: Arc<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
service: Arc<Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl ::ttrpc::r#async::MethodHandler for StartMethod {
|
||||
async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<(u32, Vec<u8>)> {
|
||||
async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<::ttrpc::Response> {
|
||||
::ttrpc::async_request_handler!(self, ctx, req, shim, StartRequest, start);
|
||||
}
|
||||
}
|
||||
|
||||
struct DeleteMethod {
|
||||
service: Arc<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
service: Arc<Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl ::ttrpc::r#async::MethodHandler for DeleteMethod {
|
||||
async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<(u32, Vec<u8>)> {
|
||||
async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<::ttrpc::Response> {
|
||||
::ttrpc::async_request_handler!(self, ctx, req, shim, DeleteRequest, delete);
|
||||
}
|
||||
}
|
||||
|
||||
struct PidsMethod {
|
||||
service: Arc<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
service: Arc<Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl ::ttrpc::r#async::MethodHandler for PidsMethod {
|
||||
async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<(u32, Vec<u8>)> {
|
||||
async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<::ttrpc::Response> {
|
||||
::ttrpc::async_request_handler!(self, ctx, req, shim, PidsRequest, pids);
|
||||
}
|
||||
}
|
||||
|
||||
struct PauseMethod {
|
||||
service: Arc<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
service: Arc<Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl ::ttrpc::r#async::MethodHandler for PauseMethod {
|
||||
async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<(u32, Vec<u8>)> {
|
||||
async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<::ttrpc::Response> {
|
||||
::ttrpc::async_request_handler!(self, ctx, req, shim, PauseRequest, pause);
|
||||
}
|
||||
}
|
||||
|
||||
struct ResumeMethod {
|
||||
service: Arc<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
service: Arc<Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl ::ttrpc::r#async::MethodHandler for ResumeMethod {
|
||||
async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<(u32, Vec<u8>)> {
|
||||
async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<::ttrpc::Response> {
|
||||
::ttrpc::async_request_handler!(self, ctx, req, shim, ResumeRequest, resume);
|
||||
}
|
||||
}
|
||||
|
||||
struct CheckpointMethod {
|
||||
service: Arc<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
service: Arc<Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl ::ttrpc::r#async::MethodHandler for CheckpointMethod {
|
||||
async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<(u32, Vec<u8>)> {
|
||||
async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<::ttrpc::Response> {
|
||||
::ttrpc::async_request_handler!(self, ctx, req, shim, CheckpointTaskRequest, checkpoint);
|
||||
}
|
||||
}
|
||||
|
||||
struct KillMethod {
|
||||
service: Arc<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
service: Arc<Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl ::ttrpc::r#async::MethodHandler for KillMethod {
|
||||
async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<(u32, Vec<u8>)> {
|
||||
async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<::ttrpc::Response> {
|
||||
::ttrpc::async_request_handler!(self, ctx, req, shim, KillRequest, kill);
|
||||
}
|
||||
}
|
||||
|
||||
struct ExecMethod {
|
||||
service: Arc<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
service: Arc<Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl ::ttrpc::r#async::MethodHandler for ExecMethod {
|
||||
async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<(u32, Vec<u8>)> {
|
||||
async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<::ttrpc::Response> {
|
||||
::ttrpc::async_request_handler!(self, ctx, req, shim, ExecProcessRequest, exec);
|
||||
}
|
||||
}
|
||||
|
||||
struct ResizePtyMethod {
|
||||
service: Arc<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
service: Arc<Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl ::ttrpc::r#async::MethodHandler for ResizePtyMethod {
|
||||
async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<(u32, Vec<u8>)> {
|
||||
async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<::ttrpc::Response> {
|
||||
::ttrpc::async_request_handler!(self, ctx, req, shim, ResizePtyRequest, resize_pty);
|
||||
}
|
||||
}
|
||||
|
||||
struct CloseIoMethod {
|
||||
service: Arc<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
service: Arc<Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl ::ttrpc::r#async::MethodHandler for CloseIoMethod {
|
||||
async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<(u32, Vec<u8>)> {
|
||||
async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<::ttrpc::Response> {
|
||||
::ttrpc::async_request_handler!(self, ctx, req, shim, CloseIORequest, close_io);
|
||||
}
|
||||
}
|
||||
|
||||
struct UpdateMethod {
|
||||
service: Arc<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
service: Arc<Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl ::ttrpc::r#async::MethodHandler for UpdateMethod {
|
||||
async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<(u32, Vec<u8>)> {
|
||||
async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<::ttrpc::Response> {
|
||||
::ttrpc::async_request_handler!(self, ctx, req, shim, UpdateTaskRequest, update);
|
||||
}
|
||||
}
|
||||
|
||||
struct WaitMethod {
|
||||
service: Arc<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
service: Arc<Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl ::ttrpc::r#async::MethodHandler for WaitMethod {
|
||||
async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<(u32, Vec<u8>)> {
|
||||
async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<::ttrpc::Response> {
|
||||
::ttrpc::async_request_handler!(self, ctx, req, shim, WaitRequest, wait);
|
||||
}
|
||||
}
|
||||
|
||||
struct StatsMethod {
|
||||
service: Arc<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
service: Arc<Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl ::ttrpc::r#async::MethodHandler for StatsMethod {
|
||||
async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<(u32, Vec<u8>)> {
|
||||
async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<::ttrpc::Response> {
|
||||
::ttrpc::async_request_handler!(self, ctx, req, shim, StatsRequest, stats);
|
||||
}
|
||||
}
|
||||
|
||||
struct ConnectMethod {
|
||||
service: Arc<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
service: Arc<Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl ::ttrpc::r#async::MethodHandler for ConnectMethod {
|
||||
async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<(u32, Vec<u8>)> {
|
||||
async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<::ttrpc::Response> {
|
||||
::ttrpc::async_request_handler!(self, ctx, req, shim, ConnectRequest, connect);
|
||||
}
|
||||
}
|
||||
|
||||
struct ShutdownMethod {
|
||||
service: Arc<std::boxed::Box<dyn Task + Send + Sync>>,
|
||||
service: Arc<Box<dyn Task + Send + Sync>>,
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl ::ttrpc::r#async::MethodHandler for ShutdownMethod {
|
||||
async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<(u32, Vec<u8>)> {
|
||||
async fn handler(&self, ctx: ::ttrpc::r#async::TtrpcContext, req: ::ttrpc::Request) -> ::ttrpc::Result<::ttrpc::Response> {
|
||||
::ttrpc::async_request_handler!(self, ctx, req, shim, ShutdownRequest, shutdown);
|
||||
}
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
pub trait Task: Sync {
|
||||
async fn state(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _req: super::shim::StateRequest) -> ::ttrpc::Result<super::shim::StateResponse> {
|
||||
async fn state(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _: 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())))
|
||||
}
|
||||
async fn create(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _req: super::shim::CreateTaskRequest) -> ::ttrpc::Result<super::shim::CreateTaskResponse> {
|
||||
async fn create(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _: 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())))
|
||||
}
|
||||
async fn start(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _req: super::shim::StartRequest) -> ::ttrpc::Result<super::shim::StartResponse> {
|
||||
async fn start(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _: 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())))
|
||||
}
|
||||
async fn delete(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _req: super::shim::DeleteRequest) -> ::ttrpc::Result<super::shim::DeleteResponse> {
|
||||
async fn delete(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _: 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())))
|
||||
}
|
||||
async fn pids(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _req: super::shim::PidsRequest) -> ::ttrpc::Result<super::shim::PidsResponse> {
|
||||
async fn pids(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _: 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())))
|
||||
}
|
||||
async fn pause(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _req: super::shim::PauseRequest) -> ::ttrpc::Result<super::empty::Empty> {
|
||||
async fn pause(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _: 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())))
|
||||
}
|
||||
async fn resume(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _req: super::shim::ResumeRequest) -> ::ttrpc::Result<super::empty::Empty> {
|
||||
async fn resume(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _: 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())))
|
||||
}
|
||||
async fn checkpoint(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _req: super::shim::CheckpointTaskRequest) -> ::ttrpc::Result<super::empty::Empty> {
|
||||
async fn checkpoint(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _: 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())))
|
||||
}
|
||||
async fn kill(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _req: super::shim::KillRequest) -> ::ttrpc::Result<super::empty::Empty> {
|
||||
async fn kill(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _: 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())))
|
||||
}
|
||||
async fn exec(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _req: super::shim::ExecProcessRequest) -> ::ttrpc::Result<super::empty::Empty> {
|
||||
async fn exec(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _: 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())))
|
||||
}
|
||||
async fn resize_pty(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _req: super::shim::ResizePtyRequest) -> ::ttrpc::Result<super::empty::Empty> {
|
||||
async fn resize_pty(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _: 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())))
|
||||
}
|
||||
async fn close_io(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _req: super::shim::CloseIORequest) -> ::ttrpc::Result<super::empty::Empty> {
|
||||
async fn close_io(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _: 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())))
|
||||
}
|
||||
async fn update(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _req: super::shim::UpdateTaskRequest) -> ::ttrpc::Result<super::empty::Empty> {
|
||||
async fn update(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _: 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())))
|
||||
}
|
||||
async fn wait(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _req: super::shim::WaitRequest) -> ::ttrpc::Result<super::shim::WaitResponse> {
|
||||
async fn wait(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _: 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())))
|
||||
}
|
||||
async fn stats(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _req: super::shim::StatsRequest) -> ::ttrpc::Result<super::shim::StatsResponse> {
|
||||
async fn stats(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _: 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())))
|
||||
}
|
||||
async fn connect(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _req: super::shim::ConnectRequest) -> ::ttrpc::Result<super::shim::ConnectResponse> {
|
||||
async fn connect(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _: 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())))
|
||||
}
|
||||
async fn shutdown(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _req: super::shim::ShutdownRequest) -> ::ttrpc::Result<super::empty::Empty> {
|
||||
async fn shutdown(&self, _ctx: &::ttrpc::r#async::TtrpcContext, _: 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::r#async::MethodHandler + Send + Sync>> {
|
||||
pub fn create_task(service: Arc<Box<dyn Task + Send + Sync>>) -> HashMap<String, ::ttrpc::r#async::Service> {
|
||||
let mut ret = HashMap::new();
|
||||
let mut methods = HashMap::new();
|
||||
let streams = 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::r#async::MethodHandler + Send + Sync>);
|
||||
methods.insert("State".to_string(),
|
||||
Box::new(StateMethod{service: service.clone()}) as Box<dyn ::ttrpc::r#async::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::r#async::MethodHandler + Send + Sync>);
|
||||
methods.insert("Create".to_string(),
|
||||
Box::new(CreateMethod{service: service.clone()}) as Box<dyn ::ttrpc::r#async::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::r#async::MethodHandler + Send + Sync>);
|
||||
methods.insert("Start".to_string(),
|
||||
Box::new(StartMethod{service: service.clone()}) as Box<dyn ::ttrpc::r#async::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::r#async::MethodHandler + Send + Sync>);
|
||||
methods.insert("Delete".to_string(),
|
||||
Box::new(DeleteMethod{service: service.clone()}) as Box<dyn ::ttrpc::r#async::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::r#async::MethodHandler + Send + Sync>);
|
||||
methods.insert("Pids".to_string(),
|
||||
Box::new(PidsMethod{service: service.clone()}) as Box<dyn ::ttrpc::r#async::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::r#async::MethodHandler + Send + Sync>);
|
||||
methods.insert("Pause".to_string(),
|
||||
Box::new(PauseMethod{service: service.clone()}) as Box<dyn ::ttrpc::r#async::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::r#async::MethodHandler + Send + Sync>);
|
||||
methods.insert("Resume".to_string(),
|
||||
Box::new(ResumeMethod{service: service.clone()}) as Box<dyn ::ttrpc::r#async::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::r#async::MethodHandler + Send + Sync>);
|
||||
methods.insert("Checkpoint".to_string(),
|
||||
Box::new(CheckpointMethod{service: service.clone()}) as Box<dyn ::ttrpc::r#async::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::r#async::MethodHandler + Send + Sync>);
|
||||
methods.insert("Kill".to_string(),
|
||||
Box::new(KillMethod{service: service.clone()}) as Box<dyn ::ttrpc::r#async::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::r#async::MethodHandler + Send + Sync>);
|
||||
methods.insert("Exec".to_string(),
|
||||
Box::new(ExecMethod{service: service.clone()}) as Box<dyn ::ttrpc::r#async::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::r#async::MethodHandler + Send + Sync>);
|
||||
methods.insert("ResizePty".to_string(),
|
||||
Box::new(ResizePtyMethod{service: service.clone()}) as Box<dyn ::ttrpc::r#async::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::r#async::MethodHandler + Send + Sync>);
|
||||
methods.insert("CloseIO".to_string(),
|
||||
Box::new(CloseIoMethod{service: service.clone()}) as Box<dyn ::ttrpc::r#async::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::r#async::MethodHandler + Send + Sync>);
|
||||
methods.insert("Update".to_string(),
|
||||
Box::new(UpdateMethod{service: service.clone()}) as Box<dyn ::ttrpc::r#async::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::r#async::MethodHandler + Send + Sync>);
|
||||
methods.insert("Wait".to_string(),
|
||||
Box::new(WaitMethod{service: service.clone()}) as Box<dyn ::ttrpc::r#async::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::r#async::MethodHandler + Send + Sync>);
|
||||
methods.insert("Stats".to_string(),
|
||||
Box::new(StatsMethod{service: service.clone()}) as Box<dyn ::ttrpc::r#async::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::r#async::MethodHandler + Send + Sync>);
|
||||
methods.insert("Connect".to_string(),
|
||||
Box::new(ConnectMethod{service: service.clone()}) as Box<dyn ::ttrpc::r#async::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::r#async::MethodHandler + Send + Sync>);
|
||||
methods.insert("Shutdown".to_string(),
|
||||
Box::new(ShutdownMethod{service: service.clone()}) as Box<dyn ::ttrpc::r#async::MethodHandler + Send + Sync>);
|
||||
|
||||
methods
|
||||
ret.insert("containerd.task.v2.Task".to_string(), ::ttrpc::r#async::Service{ methods, streams });
|
||||
ret
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
// This file is generated by rust-protobuf 2.27.1. Do not edit
|
||||
// This file is generated by rust-protobuf 3.1.0. Do not edit
|
||||
// .proto file is parsed by pure
|
||||
// @generated
|
||||
|
||||
// https://github.com/rust-lang/rust-clippy/issues/702
|
||||
|
|
@ -15,19 +16,21 @@
|
|||
#![allow(non_snake_case)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![allow(trivial_casts)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(unused_results)]
|
||||
#![allow(unused_mut)]
|
||||
|
||||
//! Generated file from `google/protobuf/empty.proto`
|
||||
|
||||
/// Generated files are compatible only with the same version
|
||||
/// of protobuf runtime.
|
||||
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_27_1;
|
||||
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_1_0;
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
#[derive(PartialEq,Clone,Default,Debug)]
|
||||
// @@protoc_insertion_point(message:google.protobuf.Empty)
|
||||
pub struct Empty {
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
// @@protoc_insertion_point(special_field:google.protobuf.Empty.special_fields)
|
||||
pub special_fields: ::protobuf::SpecialFields,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a Empty {
|
||||
|
|
@ -40,19 +43,30 @@ impl Empty {
|
|||
pub fn new() -> Empty {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
|
||||
let mut fields = ::std::vec::Vec::with_capacity(0);
|
||||
let mut oneofs = ::std::vec::Vec::with_capacity(0);
|
||||
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Empty>(
|
||||
"Empty",
|
||||
fields,
|
||||
oneofs,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for Empty {
|
||||
const NAME: &'static str = "Empty";
|
||||
|
||||
fn is_initialized(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::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())?;
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
|
||||
while let Some(tag) = is.read_raw_tag_or_eof()? {
|
||||
match tag {
|
||||
tag => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
@ -61,97 +75,91 @@ impl ::protobuf::Message for Empty {
|
|||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
fn compute_size(&self) -> u64 {
|
||||
let mut my_size = 0;
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
|
||||
self.special_fields.cached_size().set(my_size as u32);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
|
||||
os.write_unknown_fields(self.special_fields.unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
fn special_fields(&self) -> &::protobuf::SpecialFields {
|
||||
&self.special_fields
|
||||
}
|
||||
|
||||
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 mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
|
||||
&mut self.special_fields
|
||||
}
|
||||
|
||||
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 clear(&mut self) {
|
||||
self.special_fields.clear();
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static Empty {
|
||||
static instance: ::protobuf::rt::LazyV2<Empty> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(Empty::new)
|
||||
static instance: Empty = Empty {
|
||||
special_fields: ::protobuf::SpecialFields::new(),
|
||||
};
|
||||
&instance
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for Empty {
|
||||
fn clear(&mut self) {
|
||||
self.unknown_fields.clear();
|
||||
impl ::protobuf::MessageFull for Empty {
|
||||
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
|
||||
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
|
||||
descriptor.get(|| file_descriptor().message_by_package_relative_name("Empty").unwrap()).clone()
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for Empty {
|
||||
impl ::std::fmt::Display for Empty {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
||||
::protobuf::text_format::fmt(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for Empty {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
|
||||
}
|
||||
|
||||
static file_descriptor_proto_data: &'static [u8] = b"\
|
||||
\n\x1bgoogle/protobuf/empty.proto\x12\x0fgoogle.protobuf\"\t\n\x05Empty:\
|
||||
\0B\0b\x06proto3\
|
||||
\n\x1bgoogle/protobuf/empty.proto\x12\x0fgoogle.protobuf\"\x07\n\x05Empt\
|
||||
yB}\n\x13com.google.protobufB\nEmptyProtoP\x01Z.google.golang.org/protob\
|
||||
uf/types/known/emptypb\xf8\x01\x01\xa2\x02\x03GPB\xaa\x02\x1eGoogle.Prot\
|
||||
obuf.WellKnownTypesb\x06proto3\
|
||||
";
|
||||
|
||||
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 {
|
||||
/// `FileDescriptorProto` object which was a source for this generated file
|
||||
fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
|
||||
static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
|
||||
file_descriptor_proto_lazy.get(|| {
|
||||
parse_descriptor_proto()
|
||||
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
|
||||
})
|
||||
}
|
||||
|
||||
/// `FileDescriptor` object which allows dynamic access to files
|
||||
pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
|
||||
static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
|
||||
static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
|
||||
file_descriptor.get(|| {
|
||||
let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
|
||||
let mut deps = ::std::vec::Vec::with_capacity(0);
|
||||
let mut messages = ::std::vec::Vec::with_capacity(1);
|
||||
messages.push(Empty::generated_message_descriptor_data());
|
||||
let mut enums = ::std::vec::Vec::with_capacity(0);
|
||||
::protobuf::reflect::GeneratedFileDescriptor::new_generated(
|
||||
file_descriptor_proto(),
|
||||
deps,
|
||||
messages,
|
||||
enums,
|
||||
)
|
||||
});
|
||||
::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,327 @@
|
|||
// This file is generated by rust-protobuf 3.1.0. Do not edit
|
||||
// .proto file is parsed by pure
|
||||
// @generated
|
||||
|
||||
// https://github.com/rust-lang/rust-clippy/issues/702
|
||||
#![allow(unknown_lints)]
|
||||
#![allow(clippy::all)]
|
||||
|
||||
#![allow(unused_attributes)]
|
||||
#![cfg_attr(rustfmt, rustfmt::skip)]
|
||||
|
||||
#![allow(box_pointers)]
|
||||
#![allow(dead_code)]
|
||||
#![allow(missing_docs)]
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(non_snake_case)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![allow(trivial_casts)]
|
||||
#![allow(unused_results)]
|
||||
#![allow(unused_mut)]
|
||||
|
||||
//! Generated file from `gogoproto/gogo.proto`
|
||||
|
||||
/// Generated files are compatible only with the same version
|
||||
/// of protobuf runtime.
|
||||
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_1_0;
|
||||
|
||||
/// Extension fields
|
||||
pub mod exts {
|
||||
|
||||
pub const goproto_enum_prefix: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(62001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_enum_stringer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(62021, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const enum_stringer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(62022, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const enum_customname: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(62023, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING);
|
||||
|
||||
pub const enumdecl: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(62024, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const enumvalue_customname: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::EnumValueOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(66001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING);
|
||||
|
||||
pub const goproto_getters_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_enum_prefix_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63002, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_stringer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63003, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const verbose_equal_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63004, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const face_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63005, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const gostring_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63006, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const populate_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63007, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const stringer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63008, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const onlyone_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63009, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const equal_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63013, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const description_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63014, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const testgen_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63015, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const benchgen_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63016, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const marshaler_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63017, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const unmarshaler_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63018, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const stable_marshaler_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63019, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const sizer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63020, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_enum_stringer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63021, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const enum_stringer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63022, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const unsafe_marshaler_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63023, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const unsafe_unmarshaler_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63024, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_extensions_map_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63025, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_unrecognized_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63026, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const gogoproto_import: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63027, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const protosizer_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63028, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const compare_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63029, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const typedecl_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63030, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const enumdecl_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63031, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_registration: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63032, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const messagename_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63033, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_sizecache_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63034, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_unkeyed_all: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FileOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(63035, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_getters: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_stringer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64003, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const verbose_equal: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64004, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const face: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64005, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const gostring: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64006, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const populate: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64007, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const stringer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(67008, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const onlyone: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64009, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const equal: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64013, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const description: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64014, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const testgen: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64015, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const benchgen: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64016, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const marshaler: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64017, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const unmarshaler: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64018, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const stable_marshaler: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64019, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const sizer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64020, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const unsafe_marshaler: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64023, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const unsafe_unmarshaler: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64024, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_extensions_map: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64025, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_unrecognized: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64026, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const protosizer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64028, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const compare: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64029, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const typedecl: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64030, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const messagename: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64033, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_sizecache: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64034, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const goproto_unkeyed: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(64035, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const nullable: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(65001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const embed: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(65002, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const customtype: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65003, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING);
|
||||
|
||||
pub const customname: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65004, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING);
|
||||
|
||||
pub const jsontag: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65005, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING);
|
||||
|
||||
pub const moretags: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65006, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING);
|
||||
|
||||
pub const casttype: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65007, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING);
|
||||
|
||||
pub const castkey: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65008, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING);
|
||||
|
||||
pub const castvalue: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(65009, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING);
|
||||
|
||||
pub const stdtime: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(65010, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const stdduration: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(65011, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
|
||||
pub const wktpointer: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(65012, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL);
|
||||
}
|
||||
|
||||
static file_descriptor_proto_data: &'static [u8] = b"\
|
||||
\n\x14gogoproto/gogo.proto\x12\tgogoproto\x1a\x20google/protobuf/descrip\
|
||||
tor.proto:N\n\x13goproto_enum_prefix\x18\xb1\xe4\x03\x20\x01(\x08\x12\
|
||||
\x1c.google.protobuf.EnumOptionsR\x11goprotoEnumPrefix:R\n\x15goproto_en\
|
||||
um_stringer\x18\xc5\xe4\x03\x20\x01(\x08\x12\x1c.google.protobuf.EnumOpt\
|
||||
ionsR\x13goprotoEnumStringer:C\n\renum_stringer\x18\xc6\xe4\x03\x20\x01(\
|
||||
\x08\x12\x1c.google.protobuf.EnumOptionsR\x0cenumStringer:G\n\x0fenum_cu\
|
||||
stomname\x18\xc7\xe4\x03\x20\x01(\t\x12\x1c.google.protobuf.EnumOptionsR\
|
||||
\x0eenumCustomname::\n\x08enumdecl\x18\xc8\xe4\x03\x20\x01(\x08\x12\x1c.\
|
||||
google.protobuf.EnumOptionsR\x08enumdecl:V\n\x14enumvalue_customname\x18\
|
||||
\xd1\x83\x04\x20\x01(\t\x12!.google.protobuf.EnumValueOptionsR\x13enumva\
|
||||
lueCustomname:N\n\x13goproto_getters_all\x18\x99\xec\x03\x20\x01(\x08\
|
||||
\x12\x1c.google.protobuf.FileOptionsR\x11goprotoGettersAll:U\n\x17goprot\
|
||||
o_enum_prefix_all\x18\x9a\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.F\
|
||||
ileOptionsR\x14goprotoEnumPrefixAll:P\n\x14goproto_stringer_all\x18\x9b\
|
||||
\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x12goprotoStr\
|
||||
ingerAll:J\n\x11verbose_equal_all\x18\x9c\xec\x03\x20\x01(\x08\x12\x1c.g\
|
||||
oogle.protobuf.FileOptionsR\x0fverboseEqualAll:9\n\x08face_all\x18\x9d\
|
||||
\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x07faceAll:A\
|
||||
\n\x0cgostring_all\x18\x9e\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.\
|
||||
FileOptionsR\x0bgostringAll:A\n\x0cpopulate_all\x18\x9f\xec\x03\x20\x01(\
|
||||
\x08\x12\x1c.google.protobuf.FileOptionsR\x0bpopulateAll:A\n\x0cstringer\
|
||||
_all\x18\xa0\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\
|
||||
\x0bstringerAll:?\n\x0bonlyone_all\x18\xa1\xec\x03\x20\x01(\x08\x12\x1c.\
|
||||
google.protobuf.FileOptionsR\nonlyoneAll:;\n\tequal_all\x18\xa5\xec\x03\
|
||||
\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x08equalAll:G\n\x0fde\
|
||||
scription_all\x18\xa6\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileO\
|
||||
ptionsR\x0edescriptionAll:?\n\x0btestgen_all\x18\xa7\xec\x03\x20\x01(\
|
||||
\x08\x12\x1c.google.protobuf.FileOptionsR\ntestgenAll:A\n\x0cbenchgen_al\
|
||||
l\x18\xa8\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x0bb\
|
||||
enchgenAll:C\n\rmarshaler_all\x18\xa9\xec\x03\x20\x01(\x08\x12\x1c.googl\
|
||||
e.protobuf.FileOptionsR\x0cmarshalerAll:G\n\x0funmarshaler_all\x18\xaa\
|
||||
\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x0eunmarshale\
|
||||
rAll:P\n\x14stable_marshaler_all\x18\xab\xec\x03\x20\x01(\x08\x12\x1c.go\
|
||||
ogle.protobuf.FileOptionsR\x12stableMarshalerAll:;\n\tsizer_all\x18\xac\
|
||||
\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x08sizerAll:Y\
|
||||
\n\x19goproto_enum_stringer_all\x18\xad\xec\x03\x20\x01(\x08\x12\x1c.goo\
|
||||
gle.protobuf.FileOptionsR\x16goprotoEnumStringerAll:J\n\x11enum_stringer\
|
||||
_all\x18\xae\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\
|
||||
\x0fenumStringerAll:P\n\x14unsafe_marshaler_all\x18\xaf\xec\x03\x20\x01(\
|
||||
\x08\x12\x1c.google.protobuf.FileOptionsR\x12unsafeMarshalerAll:T\n\x16u\
|
||||
nsafe_unmarshaler_all\x18\xb0\xec\x03\x20\x01(\x08\x12\x1c.google.protob\
|
||||
uf.FileOptionsR\x14unsafeUnmarshalerAll:[\n\x1agoproto_extensions_map_al\
|
||||
l\x18\xb1\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x17g\
|
||||
oprotoExtensionsMapAll:X\n\x18goproto_unrecognized_all\x18\xb2\xec\x03\
|
||||
\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x16goprotoUnrecognize\
|
||||
dAll:I\n\x10gogoproto_import\x18\xb3\xec\x03\x20\x01(\x08\x12\x1c.google\
|
||||
.protobuf.FileOptionsR\x0fgogoprotoImport:E\n\x0eprotosizer_all\x18\xb4\
|
||||
\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\rprotosizerAl\
|
||||
l:?\n\x0bcompare_all\x18\xb5\xec\x03\x20\x01(\x08\x12\x1c.google.protobu\
|
||||
f.FileOptionsR\ncompareAll:A\n\x0ctypedecl_all\x18\xb6\xec\x03\x20\x01(\
|
||||
\x08\x12\x1c.google.protobuf.FileOptionsR\x0btypedeclAll:A\n\x0cenumdecl\
|
||||
_all\x18\xb7\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\
|
||||
\x0benumdeclAll:Q\n\x14goproto_registration\x18\xb8\xec\x03\x20\x01(\x08\
|
||||
\x12\x1c.google.protobuf.FileOptionsR\x13goprotoRegistration:G\n\x0fmess\
|
||||
agename_all\x18\xb9\xec\x03\x20\x01(\x08\x12\x1c.google.protobuf.FileOpt\
|
||||
ionsR\x0emessagenameAll:R\n\x15goproto_sizecache_all\x18\xba\xec\x03\x20\
|
||||
\x01(\x08\x12\x1c.google.protobuf.FileOptionsR\x13goprotoSizecacheAll:N\
|
||||
\n\x13goproto_unkeyed_all\x18\xbb\xec\x03\x20\x01(\x08\x12\x1c.google.pr\
|
||||
otobuf.FileOptionsR\x11goprotoUnkeyedAll:J\n\x0fgoproto_getters\x18\x81\
|
||||
\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x0egoproto\
|
||||
Getters:L\n\x10goproto_stringer\x18\x83\xf4\x03\x20\x01(\x08\x12\x1f.goo\
|
||||
gle.protobuf.MessageOptionsR\x0fgoprotoStringer:F\n\rverbose_equal\x18\
|
||||
\x84\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x0cver\
|
||||
boseEqual:5\n\x04face\x18\x85\xf4\x03\x20\x01(\x08\x12\x1f.google.protob\
|
||||
uf.MessageOptionsR\x04face:=\n\x08gostring\x18\x86\xf4\x03\x20\x01(\x08\
|
||||
\x12\x1f.google.protobuf.MessageOptionsR\x08gostring:=\n\x08populate\x18\
|
||||
\x87\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x08pop\
|
||||
ulate:=\n\x08stringer\x18\xc0\x8b\x04\x20\x01(\x08\x12\x1f.google.protob\
|
||||
uf.MessageOptionsR\x08stringer:;\n\x07onlyone\x18\x89\xf4\x03\x20\x01(\
|
||||
\x08\x12\x1f.google.protobuf.MessageOptionsR\x07onlyone:7\n\x05equal\x18\
|
||||
\x8d\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x05equ\
|
||||
al:C\n\x0bdescription\x18\x8e\xf4\x03\x20\x01(\x08\x12\x1f.google.protob\
|
||||
uf.MessageOptionsR\x0bdescription:;\n\x07testgen\x18\x8f\xf4\x03\x20\x01\
|
||||
(\x08\x12\x1f.google.protobuf.MessageOptionsR\x07testgen:=\n\x08benchgen\
|
||||
\x18\x90\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\
|
||||
\x08benchgen:?\n\tmarshaler\x18\x91\xf4\x03\x20\x01(\x08\x12\x1f.google.\
|
||||
protobuf.MessageOptionsR\tmarshaler:C\n\x0bunmarshaler\x18\x92\xf4\x03\
|
||||
\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x0bunmarshaler:L\n\
|
||||
\x10stable_marshaler\x18\x93\xf4\x03\x20\x01(\x08\x12\x1f.google.protobu\
|
||||
f.MessageOptionsR\x0fstableMarshaler:7\n\x05sizer\x18\x94\xf4\x03\x20\
|
||||
\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x05sizer:L\n\x10unsafe\
|
||||
_marshaler\x18\x97\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageO\
|
||||
ptionsR\x0funsafeMarshaler:P\n\x12unsafe_unmarshaler\x18\x98\xf4\x03\x20\
|
||||
\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x11unsafeUnmarshaler:W\
|
||||
\n\x16goproto_extensions_map\x18\x99\xf4\x03\x20\x01(\x08\x12\x1f.google\
|
||||
.protobuf.MessageOptionsR\x14goprotoExtensionsMap:T\n\x14goproto_unrecog\
|
||||
nized\x18\x9a\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOption\
|
||||
sR\x13goprotoUnrecognized:A\n\nprotosizer\x18\x9c\xf4\x03\x20\x01(\x08\
|
||||
\x12\x1f.google.protobuf.MessageOptionsR\nprotosizer:;\n\x07compare\x18\
|
||||
\x9d\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x07com\
|
||||
pare:=\n\x08typedecl\x18\x9e\xf4\x03\x20\x01(\x08\x12\x1f.google.protobu\
|
||||
f.MessageOptionsR\x08typedecl:C\n\x0bmessagename\x18\xa1\xf4\x03\x20\x01\
|
||||
(\x08\x12\x1f.google.protobuf.MessageOptionsR\x0bmessagename:N\n\x11gopr\
|
||||
oto_sizecache\x18\xa2\xf4\x03\x20\x01(\x08\x12\x1f.google.protobuf.Messa\
|
||||
geOptionsR\x10goprotoSizecache:J\n\x0fgoproto_unkeyed\x18\xa3\xf4\x03\
|
||||
\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x0egoprotoUnkeyed:\
|
||||
;\n\x08nullable\x18\xe9\xfb\x03\x20\x01(\x08\x12\x1d.google.protobuf.Fie\
|
||||
ldOptionsR\x08nullable:5\n\x05embed\x18\xea\xfb\x03\x20\x01(\x08\x12\x1d\
|
||||
.google.protobuf.FieldOptionsR\x05embed:?\n\ncustomtype\x18\xeb\xfb\x03\
|
||||
\x20\x01(\t\x12\x1d.google.protobuf.FieldOptionsR\ncustomtype:?\n\ncusto\
|
||||
mname\x18\xec\xfb\x03\x20\x01(\t\x12\x1d.google.protobuf.FieldOptionsR\n\
|
||||
customname:9\n\x07jsontag\x18\xed\xfb\x03\x20\x01(\t\x12\x1d.google.prot\
|
||||
obuf.FieldOptionsR\x07jsontag:;\n\x08moretags\x18\xee\xfb\x03\x20\x01(\t\
|
||||
\x12\x1d.google.protobuf.FieldOptionsR\x08moretags:;\n\x08casttype\x18\
|
||||
\xef\xfb\x03\x20\x01(\t\x12\x1d.google.protobuf.FieldOptionsR\x08casttyp\
|
||||
e:9\n\x07castkey\x18\xf0\xfb\x03\x20\x01(\t\x12\x1d.google.protobuf.Fiel\
|
||||
dOptionsR\x07castkey:=\n\tcastvalue\x18\xf1\xfb\x03\x20\x01(\t\x12\x1d.g\
|
||||
oogle.protobuf.FieldOptionsR\tcastvalue:9\n\x07stdtime\x18\xf2\xfb\x03\
|
||||
\x20\x01(\x08\x12\x1d.google.protobuf.FieldOptionsR\x07stdtime:A\n\x0bst\
|
||||
dduration\x18\xf3\xfb\x03\x20\x01(\x08\x12\x1d.google.protobuf.FieldOpti\
|
||||
onsR\x0bstdduration:?\n\nwktpointer\x18\xf4\xfb\x03\x20\x01(\x08\x12\x1d\
|
||||
.google.protobuf.FieldOptionsR\nwktpointerBE\n\x13com.google.protobufB\n\
|
||||
GoGoProtosZ\"github.com/gogo/protobuf/gogoprotob\x06proto2\
|
||||
";
|
||||
|
||||
/// `FileDescriptorProto` object which was a source for this generated file
|
||||
fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
|
||||
static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
|
||||
file_descriptor_proto_lazy.get(|| {
|
||||
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
|
||||
})
|
||||
}
|
||||
|
||||
/// `FileDescriptor` object which allows dynamic access to files
|
||||
pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
|
||||
static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
|
||||
static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
|
||||
file_descriptor.get(|| {
|
||||
let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
|
||||
let mut deps = ::std::vec::Vec::with_capacity(1);
|
||||
deps.push(::protobuf::descriptor::file_descriptor().clone());
|
||||
let mut messages = ::std::vec::Vec::with_capacity(0);
|
||||
let mut enums = ::std::vec::Vec::with_capacity(0);
|
||||
::protobuf::reflect::GeneratedFileDescriptor::new_generated(
|
||||
file_descriptor_proto(),
|
||||
deps,
|
||||
messages,
|
||||
enums,
|
||||
)
|
||||
});
|
||||
::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
|
||||
})
|
||||
}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
// @generated
|
||||
|
||||
pub mod empty;
|
||||
pub mod gogo;
|
||||
pub mod mount;
|
||||
pub mod task;
|
||||
pub mod empty;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
// This file is generated by rust-protobuf 2.27.1. Do not edit
|
||||
// This file is generated by rust-protobuf 3.1.0. Do not edit
|
||||
// .proto file is parsed by pure
|
||||
// @generated
|
||||
|
||||
// https://github.com/rust-lang/rust-clippy/issues/702
|
||||
|
|
@ -15,24 +16,30 @@
|
|||
#![allow(non_snake_case)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![allow(trivial_casts)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(unused_results)]
|
||||
#![allow(unused_mut)]
|
||||
|
||||
//! Generated file from `github.com/containerd/containerd/api/types/mount.proto`
|
||||
|
||||
/// Generated files are compatible only with the same version
|
||||
/// of protobuf runtime.
|
||||
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_27_1;
|
||||
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_1_0;
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
#[derive(PartialEq,Clone,Default,Debug)]
|
||||
// @@protoc_insertion_point(message:containerd.types.Mount)
|
||||
pub struct Mount {
|
||||
// message fields
|
||||
pub field_type: ::std::string::String,
|
||||
// @@protoc_insertion_point(field:containerd.types.Mount.type)
|
||||
pub type_: ::std::string::String,
|
||||
// @@protoc_insertion_point(field:containerd.types.Mount.source)
|
||||
pub source: ::std::string::String,
|
||||
// @@protoc_insertion_point(field:containerd.types.Mount.target)
|
||||
pub target: ::std::string::String,
|
||||
pub options: ::protobuf::RepeatedField<::std::string::String>,
|
||||
// @@protoc_insertion_point(field:containerd.types.Mount.options)
|
||||
pub options: ::std::vec::Vec<::std::string::String>,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
// @@protoc_insertion_point(special_field:containerd.types.Mount.special_fields)
|
||||
pub special_fields: ::protobuf::SpecialFields,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a Mount {
|
||||
|
|
@ -48,36 +55,36 @@ impl Mount {
|
|||
|
||||
// string type = 1;
|
||||
|
||||
|
||||
pub fn get_field_type(&self) -> &str {
|
||||
&self.field_type
|
||||
pub fn type_(&self) -> &str {
|
||||
&self.type_
|
||||
}
|
||||
pub fn clear_field_type(&mut self) {
|
||||
self.field_type.clear();
|
||||
|
||||
pub fn clear_type_(&mut self) {
|
||||
self.type_.clear();
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_field_type(&mut self, v: ::std::string::String) {
|
||||
self.field_type = v;
|
||||
pub fn set_type(&mut self, v: ::std::string::String) {
|
||||
self.type_ = v;
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
// If field is not initialized, it is initialized with default value first.
|
||||
pub fn mut_field_type(&mut self) -> &mut ::std::string::String {
|
||||
&mut self.field_type
|
||||
pub fn mut_type(&mut self) -> &mut ::std::string::String {
|
||||
&mut self.type_
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_field_type(&mut self) -> ::std::string::String {
|
||||
::std::mem::replace(&mut self.field_type, ::std::string::String::new())
|
||||
pub fn take_type_(&mut self) -> ::std::string::String {
|
||||
::std::mem::replace(&mut self.type_, ::std::string::String::new())
|
||||
}
|
||||
|
||||
// string source = 2;
|
||||
|
||||
|
||||
pub fn get_source(&self) -> &str {
|
||||
pub fn source(&self) -> &str {
|
||||
&self.source
|
||||
}
|
||||
|
||||
pub fn clear_source(&mut self) {
|
||||
self.source.clear();
|
||||
}
|
||||
|
|
@ -100,10 +107,10 @@ impl Mount {
|
|||
|
||||
// string target = 3;
|
||||
|
||||
|
||||
pub fn get_target(&self) -> &str {
|
||||
pub fn target(&self) -> &str {
|
||||
&self.target
|
||||
}
|
||||
|
||||
pub fn clear_target(&mut self) {
|
||||
self.target.clear();
|
||||
}
|
||||
|
|
@ -126,53 +133,84 @@ impl Mount {
|
|||
|
||||
// repeated string options = 4;
|
||||
|
||||
|
||||
pub fn get_options(&self) -> &[::std::string::String] {
|
||||
pub fn options(&self) -> &[::std::string::String] {
|
||||
&self.options
|
||||
}
|
||||
|
||||
pub fn clear_options(&mut self) {
|
||||
self.options.clear();
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_options(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) {
|
||||
pub fn set_options(&mut self, v: ::std::vec::Vec<::std::string::String>) {
|
||||
self.options = v;
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
pub fn mut_options(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> {
|
||||
pub fn mut_options(&mut self) -> &mut ::std::vec::Vec<::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())
|
||||
pub fn take_options(&mut self) -> ::std::vec::Vec<::std::string::String> {
|
||||
::std::mem::replace(&mut self.options, ::std::vec::Vec::new())
|
||||
}
|
||||
|
||||
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
|
||||
let mut fields = ::std::vec::Vec::with_capacity(4);
|
||||
let mut oneofs = ::std::vec::Vec::with_capacity(0);
|
||||
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
|
||||
"type",
|
||||
|m: &Mount| { &m.type_ },
|
||||
|m: &mut Mount| { &mut m.type_ },
|
||||
));
|
||||
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
|
||||
"source",
|
||||
|m: &Mount| { &m.source },
|
||||
|m: &mut Mount| { &mut m.source },
|
||||
));
|
||||
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
|
||||
"target",
|
||||
|m: &Mount| { &m.target },
|
||||
|m: &mut Mount| { &mut m.target },
|
||||
));
|
||||
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
|
||||
"options",
|
||||
|m: &Mount| { &m.options },
|
||||
|m: &mut Mount| { &mut m.options },
|
||||
));
|
||||
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Mount>(
|
||||
"Mount",
|
||||
fields,
|
||||
oneofs,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for Mount {
|
||||
const NAME: &'static str = "Mount";
|
||||
|
||||
fn is_initialized(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::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)?;
|
||||
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
|
||||
while let Some(tag) = is.read_raw_tag_or_eof()? {
|
||||
match tag {
|
||||
10 => {
|
||||
self.type_ = is.read_string()?;
|
||||
},
|
||||
2 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.source)?;
|
||||
18 => {
|
||||
self.source = is.read_string()?;
|
||||
},
|
||||
3 => {
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.target)?;
|
||||
26 => {
|
||||
self.target = is.read_string()?;
|
||||
},
|
||||
4 => {
|
||||
::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.options)?;
|
||||
34 => {
|
||||
self.options.push(is.read_string()?);
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
tag => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
@ -181,10 +219,10 @@ impl ::protobuf::Message for Mount {
|
|||
|
||||
// Compute sizes of nested messages
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
fn compute_size(&self) -> u64 {
|
||||
let mut my_size = 0;
|
||||
if !self.field_type.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(1, &self.field_type);
|
||||
if !self.type_.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(1, &self.type_);
|
||||
}
|
||||
if !self.source.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(2, &self.source);
|
||||
|
|
@ -195,14 +233,14 @@ impl ::protobuf::Message for Mount {
|
|||
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 += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
|
||||
self.special_fields.cached_size().set(my_size as u32);
|
||||
my_size
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
if !self.field_type.is_empty() {
|
||||
os.write_string(1, &self.field_type)?;
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
|
||||
if !self.type_.is_empty() {
|
||||
os.write_string(1, &self.type_)?;
|
||||
}
|
||||
if !self.source.is_empty() {
|
||||
os.write_string(2, &self.source)?;
|
||||
|
|
@ -213,116 +251,94 @@ impl ::protobuf::Message for Mount {
|
|||
for v in &self.options {
|
||||
os.write_string(4, &v)?;
|
||||
};
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
os.write_unknown_fields(self.special_fields.unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
}
|
||||
|
||||
fn get_cached_size(&self) -> u32 {
|
||||
self.cached_size.get()
|
||||
fn special_fields(&self) -> &::protobuf::SpecialFields {
|
||||
&self.special_fields
|
||||
}
|
||||
|
||||
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 mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
|
||||
&mut self.special_fields
|
||||
}
|
||||
|
||||
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.type_.clear();
|
||||
self.source.clear();
|
||||
self.target.clear();
|
||||
self.options.clear();
|
||||
self.unknown_fields.clear();
|
||||
self.special_fields.clear();
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static Mount {
|
||||
static instance: Mount = Mount {
|
||||
type_: ::std::string::String::new(),
|
||||
source: ::std::string::String::new(),
|
||||
target: ::std::string::String::new(),
|
||||
options: ::std::vec::Vec::new(),
|
||||
special_fields: ::protobuf::SpecialFields::new(),
|
||||
};
|
||||
&instance
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for Mount {
|
||||
impl ::protobuf::MessageFull for Mount {
|
||||
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
|
||||
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
|
||||
descriptor.get(|| file_descriptor().message_by_package_relative_name("Mount").unwrap()).clone()
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Display for Mount {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
||||
::protobuf::text_format::fmt(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for Mount {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<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\
|
||||
erd.types\x1a\x14gogoproto/gogo.protoX\0\"e\n\x05Mount\x12\x12\n\x04type\
|
||||
\x18\x01\x20\x01(\tR\x04type\x12\x16\n\x06source\x18\x02\x20\x01(\tR\x06\
|
||||
source\x12\x16\n\x06target\x18\x03\x20\x01(\tR\x06target\x12\x18\n\x07op\
|
||||
tions\x18\x04\x20\x03(\tR\x07optionsB2Z0github.com/containerd/containerd\
|
||||
/api/types;typesb\x06proto3\
|
||||
";
|
||||
|
||||
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 {
|
||||
/// `FileDescriptorProto` object which was a source for this generated file
|
||||
fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
|
||||
static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
|
||||
file_descriptor_proto_lazy.get(|| {
|
||||
parse_descriptor_proto()
|
||||
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
|
||||
})
|
||||
}
|
||||
|
||||
/// `FileDescriptor` object which allows dynamic access to files
|
||||
pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
|
||||
static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
|
||||
static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
|
||||
file_descriptor.get(|| {
|
||||
let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
|
||||
let mut deps = ::std::vec::Vec::with_capacity(1);
|
||||
deps.push(super::gogo::file_descriptor().clone());
|
||||
let mut messages = ::std::vec::Vec::with_capacity(1);
|
||||
messages.push(Mount::generated_message_descriptor_data());
|
||||
let mut enums = ::std::vec::Vec::with_capacity(0);
|
||||
::protobuf::reflect::GeneratedFileDescriptor::new_generated(
|
||||
file_descriptor_proto(),
|
||||
deps,
|
||||
messages,
|
||||
enums,
|
||||
)
|
||||
});
|
||||
::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
|
||||
})
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -76,9 +76,11 @@ fn test_create_task() {
|
|||
let mut req = CreateTaskRequest::default();
|
||||
req.set_id("test1".to_owned());
|
||||
let mut buf = Vec::with_capacity(req.compute_size() as usize);
|
||||
{
|
||||
let mut s = CodedOutputStream::vec(&mut buf);
|
||||
req.write_to(&mut s).unwrap();
|
||||
s.flush().unwrap();
|
||||
}
|
||||
assert_eq!(buf.len(), 7);
|
||||
|
||||
let (ctx, rx) = create_ttrpc_context();
|
||||
|
|
@ -103,7 +105,7 @@ fn test_create_task() {
|
|||
let mut s = CodedInputStream::from_bytes(&msg);
|
||||
let mut response = Response::new();
|
||||
response.merge_from(&mut s).unwrap();
|
||||
assert_eq!(response.status.as_ref().unwrap().code, Code::OK);
|
||||
assert_eq!(response.status().code(), Code::OK);
|
||||
|
||||
let mut s = CodedInputStream::from_bytes(&response.payload);
|
||||
let mut resp = CreateTaskResponse::new();
|
||||
|
|
@ -116,9 +118,11 @@ fn test_delete_task() {
|
|||
let mut req = DeleteRequest::default();
|
||||
req.set_id("test1".to_owned());
|
||||
let mut buf = Vec::with_capacity(req.compute_size() as usize);
|
||||
{
|
||||
let mut s = CodedOutputStream::vec(&mut buf);
|
||||
req.write_to(&mut s).unwrap();
|
||||
s.flush().unwrap();
|
||||
}
|
||||
assert_eq!(buf.len(), 7);
|
||||
|
||||
let (ctx, rx) = create_ttrpc_context();
|
||||
|
|
@ -143,5 +147,5 @@ fn test_delete_task() {
|
|||
let mut s = CodedInputStream::from_bytes(&msg);
|
||||
let mut response = Response::new();
|
||||
response.merge_from(&mut s).unwrap();
|
||||
assert_ne!(response.status.as_ref().unwrap().code, Code::OK);
|
||||
assert_ne!(response.status().code(), Code::OK);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ go-flag = "0.1.0"
|
|||
thiserror = "1.0"
|
||||
log = { version = "0.4", features = ["std"] }
|
||||
libc = "0.2.95"
|
||||
nix = "0.24.1"
|
||||
nix = "0.25"
|
||||
command-fds = "0.2.1"
|
||||
lazy_static = "1.4.0"
|
||||
time = { version = "0.3.7", features = ["serde", "std"] }
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ use tokio::sync::oneshot::{channel, Receiver, Sender};
|
|||
|
||||
use containerd_shim_protos::api::{ProcessInfo, StateResponse, Status};
|
||||
use containerd_shim_protos::cgroups::metrics::Metrics;
|
||||
use containerd_shim_protos::protobuf::well_known_types::Timestamp;
|
||||
use containerd_shim_protos::protobuf::well_known_types::timestamp::Timestamp;
|
||||
|
||||
use crate::io::Stdio;
|
||||
use crate::util::asyncify;
|
||||
|
|
@ -110,7 +110,7 @@ where
|
|||
async fn state(&self) -> crate::Result<StateResponse> {
|
||||
let mut resp = StateResponse::new();
|
||||
resp.id = self.id.to_string();
|
||||
resp.status = self.state;
|
||||
resp.set_status(self.state);
|
||||
resp.pid = self.pid as u32;
|
||||
resp.terminal = self.stdio.terminal;
|
||||
resp.stdin = self.stdio.stdin.to_string();
|
||||
|
|
@ -119,9 +119,9 @@ where
|
|||
resp.exit_status = self.exit_code as u32;
|
||||
if let Some(exit_at) = self.exited_at {
|
||||
let mut time_stamp = Timestamp::new();
|
||||
time_stamp.set_seconds(exit_at.unix_timestamp());
|
||||
time_stamp.set_nanos(exit_at.nanosecond() as i32);
|
||||
resp.set_exited_at(time_stamp);
|
||||
time_stamp.seconds = exit_at.unix_timestamp();
|
||||
time_stamp.nanos = exit_at.nanosecond() as i32;
|
||||
resp.exited_at = Some(time_stamp).into();
|
||||
}
|
||||
Ok(resp)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ use std::os::unix::io::RawFd;
|
|||
use async_trait::async_trait;
|
||||
|
||||
use containerd_shim_protos::api::Empty;
|
||||
use containerd_shim_protos::protobuf::Message;
|
||||
use containerd_shim_protos::protobuf::MessageDyn;
|
||||
use containerd_shim_protos::shim::events;
|
||||
use containerd_shim_protos::shim_async::{Client, Events, EventsClient};
|
||||
use containerd_shim_protos::ttrpc;
|
||||
|
|
@ -67,7 +67,7 @@ impl RemotePublisher {
|
|||
ctx: Context,
|
||||
topic: &str,
|
||||
namespace: &str,
|
||||
event: Box<dyn Message>,
|
||||
event: Box<dyn MessageDyn>,
|
||||
) -> Result<()> {
|
||||
let mut envelope = events::Envelope::new();
|
||||
envelope.set_topic(topic.to_owned());
|
||||
|
|
@ -118,8 +118,8 @@ mod tests {
|
|||
#[async_trait]
|
||||
impl Events for FakeServer {
|
||||
async fn forward(&self, _ctx: &TtrpcContext, req: ForwardRequest) -> ttrpc::Result<Empty> {
|
||||
let env = req.get_envelope();
|
||||
if env.get_topic() == "/tasks/oom" {
|
||||
let env = req.envelope();
|
||||
if env.topic() == "/tasks/oom" {
|
||||
self.tx.send(0).await.unwrap();
|
||||
} else {
|
||||
self.tx.send(-1).await.unwrap();
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ use containerd_shim_protos::api::{
|
|||
use containerd_shim_protos::events::task::{
|
||||
TaskCreate, TaskDelete, TaskExecAdded, TaskExecStarted, TaskIO, TaskStart,
|
||||
};
|
||||
use containerd_shim_protos::protobuf::{Message, SingularPtrField};
|
||||
use containerd_shim_protos::protobuf::MessageDyn;
|
||||
use containerd_shim_protos::shim_async::Task;
|
||||
use containerd_shim_protos::ttrpc;
|
||||
use containerd_shim_protos::ttrpc::r#async::TtrpcContext;
|
||||
|
|
@ -46,7 +46,7 @@ use crate::event::Event;
|
|||
use crate::util::{convert_to_any, convert_to_timestamp, AsOption};
|
||||
use crate::TtrpcResult;
|
||||
|
||||
type EventSender = Sender<(String, Box<dyn Message>)>;
|
||||
type EventSender = Sender<(String, Box<dyn MessageDyn>)>;
|
||||
|
||||
/// TaskService is a Task template struct, it is considered a helper struct,
|
||||
/// which has already implemented `Task` trait, so that users can make it the type `T`
|
||||
|
|
@ -103,8 +103,8 @@ where
|
|||
C: Container + Sync + Send + 'static,
|
||||
{
|
||||
async fn state(&self, _ctx: &TtrpcContext, req: StateRequest) -> TtrpcResult<StateResponse> {
|
||||
let container = self.get_container(req.get_id()).await?;
|
||||
let exec_id = req.get_exec_id().as_option();
|
||||
let container = self.get_container(req.id()).await?;
|
||||
let exec_id = req.exec_id().as_option();
|
||||
let resp = container.state(exec_id).await?;
|
||||
Ok(resp)
|
||||
}
|
||||
|
|
@ -133,14 +133,14 @@ where
|
|||
container_id: req.id.to_string(),
|
||||
bundle: req.bundle.to_string(),
|
||||
rootfs: req.rootfs,
|
||||
io: SingularPtrField::some(TaskIO {
|
||||
io: Some(TaskIO {
|
||||
stdin: req.stdin.to_string(),
|
||||
stdout: req.stdout.to_string(),
|
||||
stderr: req.stderr.to_string(),
|
||||
terminal: req.terminal,
|
||||
unknown_fields: Default::default(),
|
||||
cached_size: Default::default(),
|
||||
}),
|
||||
..Default::default()
|
||||
})
|
||||
.into(),
|
||||
checkpoint: req.checkpoint.to_string(),
|
||||
pid,
|
||||
..Default::default()
|
||||
|
|
@ -152,7 +152,7 @@ where
|
|||
|
||||
async fn start(&self, _ctx: &TtrpcContext, req: StartRequest) -> TtrpcResult<StartResponse> {
|
||||
info!("Start request for {:?}", &req);
|
||||
let mut container = self.get_container(req.get_id()).await?;
|
||||
let mut container = self.get_container(req.id()).await?;
|
||||
let pid = container.start(req.exec_id.as_str().as_option()).await?;
|
||||
|
||||
let mut resp = StartResponse::new();
|
||||
|
|
@ -175,25 +175,25 @@ where
|
|||
.await;
|
||||
};
|
||||
|
||||
info!("Start request for {:?} returns pid {}", req, resp.get_pid());
|
||||
info!("Start request for {:?} returns pid {}", req, resp.pid());
|
||||
Ok(resp)
|
||||
}
|
||||
|
||||
async fn delete(&self, _ctx: &TtrpcContext, req: DeleteRequest) -> TtrpcResult<DeleteResponse> {
|
||||
info!("Delete request for {:?}", &req);
|
||||
let mut containers = self.containers.lock().await;
|
||||
let container = containers.get_mut(req.get_id()).ok_or_else(|| {
|
||||
let container = containers.get_mut(req.id()).ok_or_else(|| {
|
||||
ttrpc::Error::RpcStatus(ttrpc::get_status(
|
||||
ttrpc::Code::NOT_FOUND,
|
||||
format!("can not find container by id {}", req.get_id()),
|
||||
format!("can not find container by id {}", req.id()),
|
||||
))
|
||||
})?;
|
||||
let id = container.id().await;
|
||||
let exec_id_opt = req.get_exec_id().as_option();
|
||||
let exec_id_opt = req.exec_id().as_option();
|
||||
let (pid, exit_status, exited_at) = container.delete(exec_id_opt).await?;
|
||||
self.factory.cleanup(&*self.namespace, container).await?;
|
||||
if req.get_exec_id().is_empty() {
|
||||
containers.remove(req.get_id());
|
||||
if req.exec_id().is_empty() {
|
||||
containers.remove(req.id());
|
||||
}
|
||||
|
||||
let ts = convert_to_timestamp(exited_at);
|
||||
|
|
@ -201,7 +201,7 @@ where
|
|||
container_id: id,
|
||||
pid: pid as u32,
|
||||
exit_status: exit_status as u32,
|
||||
exited_at: SingularPtrField::some(ts.clone()),
|
||||
exited_at: Some(ts.clone()).into(),
|
||||
..Default::default()
|
||||
})
|
||||
.await;
|
||||
|
|
@ -212,8 +212,8 @@ where
|
|||
resp.set_exit_status(exit_status as u32);
|
||||
info!(
|
||||
"Delete request for {} {} returns {:?}",
|
||||
req.get_id(),
|
||||
req.get_exec_id(),
|
||||
req.id(),
|
||||
req.exec_id(),
|
||||
resp
|
||||
);
|
||||
Ok(resp)
|
||||
|
|
@ -221,20 +221,20 @@ where
|
|||
|
||||
async fn pids(&self, _ctx: &TtrpcContext, req: PidsRequest) -> TtrpcResult<PidsResponse> {
|
||||
debug!("Pids request for {:?}", req);
|
||||
let container = self.get_container(req.get_id()).await?;
|
||||
let procs = container.all_processes().await?;
|
||||
let container = self.get_container(req.id()).await?;
|
||||
let processes = container.all_processes().await?;
|
||||
debug!("Pids request for {:?} returns successfully", req);
|
||||
Ok(PidsResponse {
|
||||
processes: procs.into(),
|
||||
processes,
|
||||
..Default::default()
|
||||
})
|
||||
}
|
||||
|
||||
async fn kill(&self, _ctx: &TtrpcContext, req: KillRequest) -> TtrpcResult<Empty> {
|
||||
info!("Kill request for {:?}", req);
|
||||
let mut container = self.get_container(req.get_id()).await?;
|
||||
let mut container = self.get_container(req.id()).await?;
|
||||
container
|
||||
.kill(req.get_exec_id().as_option(), req.signal, req.all)
|
||||
.kill(req.exec_id().as_option(), req.signal, req.all)
|
||||
.await?;
|
||||
info!("Kill request for {:?} returns successfully", req);
|
||||
Ok(Empty::new())
|
||||
|
|
@ -242,8 +242,8 @@ where
|
|||
|
||||
async fn exec(&self, _ctx: &TtrpcContext, req: ExecProcessRequest) -> TtrpcResult<Empty> {
|
||||
info!("Exec request for {:?}", req);
|
||||
let exec_id = req.get_exec_id().to_string();
|
||||
let mut container = self.get_container(req.get_id()).await?;
|
||||
let exec_id = req.exec_id().to_string();
|
||||
let mut container = self.get_container(req.id()).await?;
|
||||
container.exec(req).await?;
|
||||
|
||||
self.send_event(TaskExecAdded {
|
||||
|
|
@ -261,9 +261,9 @@ where
|
|||
"Resize pty request for container {}, exec_id: {}",
|
||||
&req.id, &req.exec_id
|
||||
);
|
||||
let mut container = self.get_container(req.get_id()).await?;
|
||||
let mut container = self.get_container(req.id()).await?;
|
||||
container
|
||||
.resize_pty(req.get_exec_id().as_option(), req.height, req.width)
|
||||
.resize_pty(req.exec_id().as_option(), req.height, req.width)
|
||||
.await?;
|
||||
Ok(Empty::new())
|
||||
}
|
||||
|
|
@ -273,16 +273,25 @@ where
|
|||
Ok(Empty::new())
|
||||
}
|
||||
|
||||
async fn update(&self, _ctx: &TtrpcContext, req: UpdateTaskRequest) -> TtrpcResult<Empty> {
|
||||
async fn update(&self, _ctx: &TtrpcContext, mut req: UpdateTaskRequest) -> TtrpcResult<Empty> {
|
||||
debug!("Update request for {:?}", req);
|
||||
let resources: LinuxResources = serde_json::from_slice(req.get_resources().get_value())
|
||||
.map_err(|e| {
|
||||
|
||||
let id = req.take_id();
|
||||
|
||||
let data = req
|
||||
.resources
|
||||
.into_option()
|
||||
.map(|r| r.value)
|
||||
.unwrap_or_default();
|
||||
|
||||
let resources: LinuxResources = serde_json::from_slice(&data).map_err(|e| {
|
||||
ttrpc::Error::RpcStatus(ttrpc::get_status(
|
||||
ttrpc::Code::INVALID_ARGUMENT,
|
||||
format!("failed to parse resource spec: {}", e),
|
||||
))
|
||||
})?;
|
||||
let mut container = self.get_container(req.get_id()).await?;
|
||||
|
||||
let mut container = self.get_container(&id).await?;
|
||||
container.update(&resources).await?;
|
||||
Ok(Empty::new())
|
||||
}
|
||||
|
|
@ -291,35 +300,33 @@ where
|
|||
info!("Wait request for {:?}", req);
|
||||
let exec_id = req.exec_id.as_str().as_option();
|
||||
let wait_rx = {
|
||||
let mut container = self.get_container(req.get_id()).await?;
|
||||
let mut container = self.get_container(req.id()).await?;
|
||||
let state = container.state(exec_id).await?;
|
||||
if state.status != Status::RUNNING && state.status != Status::CREATED {
|
||||
if state.status() != Status::RUNNING && state.status() != Status::CREATED {
|
||||
let mut resp = WaitResponse::new();
|
||||
resp.exit_status = state.exit_status;
|
||||
resp.exited_at = state.exited_at;
|
||||
info!("Wait request for {:?} returns {:?}", req, &resp);
|
||||
return Ok(resp);
|
||||
}
|
||||
container
|
||||
.wait_channel(req.get_exec_id().as_option())
|
||||
.await?
|
||||
container.wait_channel(req.exec_id().as_option()).await?
|
||||
};
|
||||
|
||||
wait_rx.await.unwrap_or_default();
|
||||
// get lock again.
|
||||
let container = self.get_container(req.get_id()).await?;
|
||||
let container = self.get_container(req.id()).await?;
|
||||
let (_, code, exited_at) = container.get_exit_info(exec_id).await?;
|
||||
let mut resp = WaitResponse::new();
|
||||
resp.exit_status = code as u32;
|
||||
resp.set_exit_status(code as u32);
|
||||
let ts = convert_to_timestamp(exited_at);
|
||||
resp.exited_at = SingularPtrField::some(ts);
|
||||
resp.set_exited_at(ts);
|
||||
info!("Wait request for {:?} returns {:?}", req, &resp);
|
||||
Ok(resp)
|
||||
}
|
||||
|
||||
async fn stats(&self, _ctx: &TtrpcContext, req: StatsRequest) -> TtrpcResult<StatsResponse> {
|
||||
debug!("Stats request for {:?}", req);
|
||||
let container = self.get_container(req.get_id()).await?;
|
||||
let container = self.get_container(req.id()).await?;
|
||||
let stats = container.stats().await?;
|
||||
|
||||
let mut resp = StatsResponse::new();
|
||||
|
|
@ -333,7 +340,7 @@ where
|
|||
req: ConnectRequest,
|
||||
) -> TtrpcResult<ConnectResponse> {
|
||||
info!("Connect request for {:?}", req);
|
||||
let container = self.get_container(req.get_id()).await?;
|
||||
let container = self.get_container(req.id()).await?;
|
||||
|
||||
Ok(ConnectResponse {
|
||||
shim_pid: std::process::id() as u32,
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ pub async fn write_runtime(bundle: impl AsRef<Path>, binary_name: &str) -> Resul
|
|||
}
|
||||
|
||||
pub async fn mount_rootfs(m: &Mount, target: impl AsRef<Path>) -> Result<()> {
|
||||
let mount_type = m.field_type.to_string();
|
||||
let mount_type = m.type_.to_string();
|
||||
let source = m.source.to_string();
|
||||
let options = m.options.to_vec();
|
||||
let rootfs = target.as_ref().to_owned();
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ use oci_spec::runtime::LinuxResources;
|
|||
use containerd_shim_protos::cgroups::metrics::{
|
||||
CPUStat, CPUUsage, MemoryEntry, MemoryStat, Metrics,
|
||||
};
|
||||
use containerd_shim_protos::protobuf::well_known_types::Any;
|
||||
use containerd_shim_protos::protobuf::well_known_types::any::Any;
|
||||
use containerd_shim_protos::protobuf::Message;
|
||||
use containerd_shim_protos::shim::oci::Options;
|
||||
|
||||
|
|
@ -48,8 +48,8 @@ pub fn set_cgroup_and_oom_score(pid: u32) -> Result<()> {
|
|||
.map_err(io_error!(e, "read stdin"))?;
|
||||
|
||||
if !data.is_empty() {
|
||||
let opts = Any::parse_from_bytes(&data)
|
||||
.and_then(|any| Options::parse_from_bytes(any.get_value()))?;
|
||||
let opts =
|
||||
Any::parse_from_bytes(&data).and_then(|any| Options::parse_from_bytes(&any.value))?;
|
||||
|
||||
if !opts.shim_cgroup.is_empty() {
|
||||
add_task_to_cgroup(opts.shim_cgroup.as_str(), pid)?;
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ pub enum Error {
|
|||
Ttrpc(#[from] ttrpc::Error),
|
||||
|
||||
#[error("Protobuf error: {0}")]
|
||||
Protobuf(#[from] protobuf::error::ProtobufError),
|
||||
Protobuf(#[from] protobuf::Error),
|
||||
|
||||
#[error("{context} error: {err}")]
|
||||
IoError {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use containerd_shim_protos::events::task::*;
|
||||
use containerd_shim_protos::protobuf::Message;
|
||||
use containerd_shim_protos::protobuf::MessageDyn;
|
||||
|
||||
pub trait Event: Message {
|
||||
pub trait Event: MessageDyn {
|
||||
fn topic(&self) -> String;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,11 +16,9 @@
|
|||
|
||||
//! Implements a client to publish events from the shim back to containerd.
|
||||
|
||||
use protobuf::Message;
|
||||
|
||||
use containerd_shim_protos as client;
|
||||
|
||||
use client::protobuf;
|
||||
use client::protobuf::MessageDyn;
|
||||
use client::shim::events;
|
||||
use client::ttrpc::{self, context::Context};
|
||||
use client::types::empty;
|
||||
|
|
@ -60,7 +58,7 @@ impl RemotePublisher {
|
|||
ctx: Context,
|
||||
topic: &str,
|
||||
namespace: &str,
|
||||
event: Box<dyn Message>,
|
||||
event: Box<dyn MessageDyn>,
|
||||
) -> Result<()> {
|
||||
let mut envelope = events::Envelope::new();
|
||||
envelope.set_topic(topic.to_owned());
|
||||
|
|
@ -104,8 +102,8 @@ mod tests {
|
|||
|
||||
impl Events for FakeServer {
|
||||
fn forward(&self, _ctx: &ttrpc::TtrpcContext, req: ForwardRequest) -> ttrpc::Result<Empty> {
|
||||
let env = req.get_envelope();
|
||||
assert_eq!(env.get_topic(), "/tasks/oom");
|
||||
let env = req.envelope();
|
||||
assert_eq!(env.topic(), "/tasks/oom");
|
||||
Ok(Empty::default())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,8 +25,8 @@ use crate::api::Options;
|
|||
#[cfg(feature = "async")]
|
||||
pub use crate::asynchronous::util::*;
|
||||
use crate::error::Result;
|
||||
use crate::protos::protobuf::well_known_types::{Any, Timestamp};
|
||||
use crate::protos::protobuf::Message;
|
||||
use crate::protos::protobuf::well_known_types::{any::Any, timestamp::Timestamp};
|
||||
use crate::protos::protobuf::MessageDyn;
|
||||
#[cfg(not(feature = "async"))]
|
||||
pub use crate::synchronous::util::*;
|
||||
|
||||
|
|
@ -90,8 +90,7 @@ impl From<JsonOptions> for Options {
|
|||
systemd_cgroup: j.systemd_cgroup,
|
||||
criu_image_path: j.criu_image_path,
|
||||
criu_work_path: j.criu_work_path,
|
||||
unknown_fields: Default::default(),
|
||||
cached_size: Default::default(),
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -133,9 +132,11 @@ pub fn connect(address: impl AsRef<str>) -> Result<RawFd> {
|
|||
pub fn timestamp() -> Result<Timestamp> {
|
||||
let now = SystemTime::now().duration_since(UNIX_EPOCH)?;
|
||||
|
||||
let mut ts = Timestamp::default();
|
||||
ts.set_seconds(now.as_secs() as _);
|
||||
ts.set_nanos(now.subsec_nanos() as _);
|
||||
let ts = Timestamp {
|
||||
seconds: now.as_secs() as _,
|
||||
nanos: now.subsec_nanos() as _,
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
Ok(ts)
|
||||
}
|
||||
|
|
@ -149,13 +150,13 @@ pub fn convert_to_timestamp(exited_at: Option<OffsetDateTime>) -> Timestamp {
|
|||
ts
|
||||
}
|
||||
|
||||
pub fn convert_to_any(obj: Box<dyn Message>) -> Result<Any> {
|
||||
pub fn convert_to_any(obj: Box<dyn MessageDyn>) -> Result<Any> {
|
||||
let mut data = Vec::new();
|
||||
obj.write_to_vec(&mut data)?;
|
||||
obj.write_to_vec_dyn(&mut data)?;
|
||||
|
||||
let mut any = Any::new();
|
||||
any.set_value(data);
|
||||
any.set_type_url(obj.descriptor().full_name().to_string());
|
||||
any.value = data;
|
||||
any.type_url = obj.descriptor_dyn().full_name().to_string();
|
||||
|
||||
Ok(any)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue