[−][src]Struct cage::Pod
A pod, specified by pods/$NAME.yml
and zero or more
pods/targets/*/*.yml
targets that we can apply to it.
Implementations
impl Pod
[src]
pub fn name(&self) -> &str
[src]
Get the name of this pod.
pub fn pod_type(&self) -> PodType
[src]
Get the type of this pod.
pub fn service_names(&self) -> &BTreeSet<String>
[src]
Get the names of the services declared in this pod.
pub fn enabled_in(&self, target: &Target) -> bool
[src]
Is this pod enabled in the specified target?
pub fn base_dir(&self) -> &Path
[src]
The base directory for our relative paths.
pub fn rel_path(&self) -> &Path
[src]
The path to the top-level file defining this pod, relative to the
base_dir
specified at creation time.
pub fn file(&self) -> &File
[src]
The top-level file defining this pod. This is normalized to
include the appropriate env_file
entries, but if you want to do
more complicated transformations, you'll need to clone it with
to_owned()
first.
pub fn target_rel_path(&self, target: &Target) -> Result<&Path>
[src]
The path to the specificied target file for this pod.
pub fn target_file(&self, target: &Target) -> Result<&File>
[src]
The dc::File
for this target.
pub fn merged_file(&self, target: &Target) -> Result<File>
[src]
Return the base file and the target file merged into a single
docker-compose.yml
file.
pub fn target_files(&self) -> TargetFiles<'_>ⓘNotable traits for TargetFiles<'a>
impl<'a> Iterator for TargetFiles<'a> type Item = (&'a Target, &'a File);
[src]
Notable traits for TargetFiles<'a>
impl<'a> Iterator for TargetFiles<'a> type Item = (&'a Target, &'a File);
All the targets associated with this pod.
pub fn all_files(&self) -> AllFiles<'_>ⓘ
[src]
Iterate over all dc::File
objects associated with this pod, including
both the main file()
and all the files in target_files()
.
pub fn service(&self, target: &Target, name: &str) -> Result<Option<Service>>
[src]
Look up a service by name.
pub fn service_or_err(&self, target: &Target, name: &str) -> Result<Service>
[src]
Like service
, but returns an error if the service can't be found.
pub fn compose_args(&self, proj: &Project) -> Result<Vec<OsString>>
[src]
Command-line -p
and -f
arguments that we'll pass to
docker-compose
to describe this file.
pub fn run_on_init(&self) -> &[Vec<String>]
[src]
The commands we should run to initialize this pod.
pub fn run_script<CR>(
&self,
runner: &CR,
project: &Project,
service_name: &str,
script_name: &str,
opts: &Run
) -> Result<()> where
CR: CommandRunner,
[src]
&self,
runner: &CR,
project: &Project,
service_name: &str,
script_name: &str,
opts: &Run
) -> Result<()> where
CR: CommandRunner,
Run a named script for specified service name
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Pod
impl Send for Pod
impl Sync for Pod
impl Unpin for Pod
impl UnwindSafe for Pod
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> GetTypeId for T where
T: Any,
T: Any,
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Err = <U as TryFrom<T>>::Err
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Err>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,