pub struct SidecarConfig {
pub addr: Option<String>,
pub tls_dir: Option<PathBuf>,
pub idle_secs: u64,
pub storage_graph_root: Option<PathBuf>,
pub storage_run_root: Option<PathBuf>,
pub storage_driver: Option<String>,
pub context_mount: Option<(PathBuf, PathBuf)>,
}Expand description
Transport configuration for connecting to a zlayer-buildd sidecar.
Default operation: the daemon spawns its own local sidecar bound to
127.0.0.1:<auto-port> with mTLS material under
${ZLAYER_DATA_DIR}/buildd/. A remote builder (LAN build host) is selected
by setting addr to a host:port reachable by the caller.
Fields§
§addr: Option<String>host:port to dial. None means “spawn a local sidecar and use the
auto-allocated 127.0.0.1 port.”
tls_dir: Option<PathBuf>Directory containing the mTLS material (ca.pem, cert.pem, key.pem).
None means use the default under ${ZLAYER_DATA_DIR}/buildd/.
idle_secs: u64Idle-shutdown timeout in seconds for an auto-spawned local sidecar.
Ignored when addr points at a remote sidecar (lifecycle is the
remote operator’s responsibility).
storage_graph_root: Option<PathBuf>Storage GraphRoot to pass to the sidecar. None → derive
${ZLAYER_DATA_DIR}/buildd/storage/graph.
storage_run_root: Option<PathBuf>Storage RunRoot. None → ${ZLAYER_DATA_DIR}/buildd/storage/run.
storage_driver: Option<String>Storage driver name. None → vfs for rootless safety. Operators
running as root may switch to overlay for performance.
context_mount: Option<(PathBuf, PathBuf)>Build-context mount translation for a remote (cross-host) sidecar.
When the sidecar runs in a different mount namespace than the client
(e.g. a zlayer-buildd inside a VZ-Linux container on a macOS host),
the build context must be shared in via a bind / virtiofs mount and
the context_dir sent on the wire must be the path the sidecar
sees, not the host path the client computed.
Some((host_prefix, guest_prefix)) rewrites any context_dir that
starts with host_prefix so the prefix becomes guest_prefix. The
dockerfile paths are translated the same way. None (the default,
same-host sidecar) passes paths through unchanged.
Implementations§
Source§impl SidecarConfig
impl SidecarConfig
pub const DEFAULT_IDLE_SECS: u64 = 30
pub fn default_idle_secs() -> u64
Trait Implementations§
Source§impl Clone for SidecarConfig
impl Clone for SidecarConfig
Source§fn clone(&self) -> SidecarConfig
fn clone(&self) -> SidecarConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SidecarConfig
impl Debug for SidecarConfig
Source§impl Default for SidecarConfig
impl Default for SidecarConfig
Source§impl<'de> Deserialize<'de> for SidecarConfig
impl<'de> Deserialize<'de> for SidecarConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for SidecarConfig
Source§impl PartialEq for SidecarConfig
impl PartialEq for SidecarConfig
Source§fn eq(&self, other: &SidecarConfig) -> bool
fn eq(&self, other: &SidecarConfig) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for SidecarConfig
impl Serialize for SidecarConfig
impl StructuralPartialEq for SidecarConfig
Auto Trait Implementations§
impl Freeze for SidecarConfig
impl RefUnwindSafe for SidecarConfig
impl Send for SidecarConfig
impl Sync for SidecarConfig
impl Unpin for SidecarConfig
impl UnsafeUnpin for SidecarConfig
impl UnwindSafe for SidecarConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.