pub struct Manager { /* private fields */ }Expand description
Implements the skaffold reloader.
Implementations§
Source§impl Manager
impl Manager
Sourcepub fn new(kubectl_backend: Box<dyn KubectlBackend + Send + Sync>) -> Self
pub fn new(kubectl_backend: Box<dyn KubectlBackend + Send + Sync>) -> Self
Creates a new skaffold reloader manager.
Sourcepub fn reloader_type(&self) -> &'static str
pub fn reloader_type(&self) -> &'static str
Returns the reloader type identifier ("skaffold").
Sourcepub fn check_preconditions(
&self,
executor: &dyn CommandRunner,
_reloader_config: &ReloaderConfig,
_caproni_config: &CaproniConfig,
get_tool_version: &dyn Fn(&str) -> Option<String>,
) -> Result<(), SkaffoldError>
pub fn check_preconditions( &self, executor: &dyn CommandRunner, _reloader_config: &ReloaderConfig, _caproni_config: &CaproniConfig, get_tool_version: &dyn Fn(&str) -> Option<String>, ) -> Result<(), SkaffoldError>
Verifies skaffold version meets minimum requirements.
executor is threaded explicitly rather than read off an
ambient context; see the equivalent note on
reloader::mirror::manager::Manager::check_preconditions.
§Errors
Returns SkaffoldError::SkaffoldVersionTooOld if the
installed skaffold version is below the configured minimum.
Sourcepub fn run(
&self,
executor: &dyn CommandRunner,
reloader_config: &ReloaderConfig,
caproni_config: &CaproniConfig,
kubeconfig_path: &str,
) -> Result<(), SkaffoldError>
pub fn run( &self, executor: &dyn CommandRunner, reloader_config: &ReloaderConfig, caproni_config: &CaproniConfig, kubeconfig_path: &str, ) -> Result<(), SkaffoldError>
Runs the reloader, blocking until the process exits. Runs
skaffold dev in the repository directory.
§Errors
Returns SkaffoldError if the config is invalid, no
repository is configured, or skaffold dev fails for a reason
other than cancellation.
Sourcepub fn status(
&self,
reloader_config: &ReloaderConfig,
caproni_config: &CaproniConfig,
) -> Result<Status, SkaffoldError>
pub fn status( &self, reloader_config: &ReloaderConfig, caproni_config: &CaproniConfig, ) -> Result<Status, SkaffoldError>
Returns the current status of the reloader.
§Errors
Returns SkaffoldError if the config is invalid, or
SkaffoldError::RepositoryNotFound if the referenced
repository doesn’t exist (a Status with
State::NotReady is still returned alongside the error, as
in the Go original).
Sourcepub fn validate(
&self,
reloader_config: &ReloaderConfig,
caproni_config: &CaproniConfig,
) -> Result<(), SkaffoldError>
pub fn validate( &self, reloader_config: &ReloaderConfig, caproni_config: &CaproniConfig, ) -> Result<(), SkaffoldError>
Validates the skaffold reloader configuration and referenced files.
§Errors
Returns SkaffoldError if the config is invalid, no
repository is configured, or the configured config file does
not exist within a cloned repository.
Auto Trait Implementations§
impl !RefUnwindSafe for Manager
impl !UnwindSafe for Manager
impl Freeze for Manager
impl Send for Manager
impl Sync for Manager
impl Unpin for Manager
impl UnsafeUnpin for Manager
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more