From 63539dc9fdf8f5af9d75de257c13261c4e1e4d04 Mon Sep 17 00:00:00 2001 From: Samuel Ortiz Date: Tue, 24 Aug 2021 20:28:27 +0200 Subject: [PATCH] agent: config: Add allowed endpoints They will define the list of endpoints that an agent supports. They're empty and non actionable for now. Signed-off-by: Samuel Ortiz --- src/agent/src/config.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/agent/src/config.rs b/src/agent/src/config.rs index 986d98da41..960dda552c 100644 --- a/src/agent/src/config.rs +++ b/src/agent/src/config.rs @@ -47,6 +47,11 @@ const ERR_INVALID_CONTAINER_PIPE_SIZE_PARAM: &str = "unable to parse container p const ERR_INVALID_CONTAINER_PIPE_SIZE_KEY: &str = "invalid container pipe size key name"; const ERR_INVALID_CONTAINER_PIPE_NEGATIVE: &str = "container pipe size should not be negative"; +#[derive(Debug, Default)] +pub struct EndpointsConfig { + pub allowed: Vec, +} + #[derive(Debug)] pub struct AgentConfig { pub debug_console: bool, @@ -59,6 +64,7 @@ pub struct AgentConfig { pub server_addr: String, pub unified_cgroup_hierarchy: bool, pub tracing: tracer::TraceType, + pub endpoints: EndpointsConfig, } // parse_cmdline_param parse commandline parameters. @@ -104,6 +110,7 @@ impl Default for AgentConfig { server_addr: format!("{}:{}", VSOCK_ADDR, VSOCK_PORT), unified_cgroup_hierarchy: false, tracing: tracer::TraceType::Disabled, + endpoints: Default::default(), } } }