pub struct EvictArgs {
pub hash: String,
pub dry_run: bool,
pub admin_url: Option<String>,
pub config: Option<PathBuf>,
pub json: bool,
pub timeout_ms: u64,
}Expand description
decdn node evict — forcibly remove a blob from the local cache via
admin_v1_evict (issue #279).
The eviction is logical: the iroh-blobs store still holds the bytes
until the next periodic GC sweep reclaims them (#518; cadence controlled
by cache.gc_interval_sec). The takedown is persisted to
<cache_dir>/evicted.log so it survives restarts even if the next sweep
hasn’t run yet.
Operators using this for DMCA takedowns can rely on the takedown
being durable across decdn-node run invocations.
Pass --dry-run (issue #379) to preview what the evict would touch
— blob size, last-access elapsed time, pin status, and already-
evicted flag — without mutating any cache state. Useful as a
pre-flight check before a DMCA takedown so operators can confirm
the right blob and notice cases like “this hash is pinned” or
“this is an idempotent re-run”.
Fields§
§hash: StringBLAKE3 hash of the blob to evict, encoded as 64 hex characters.
Optional 0x / 0X prefix is tolerated; mixed case is accepted.
Operators paste this from access logs / takedown notices.
dry_run: boolReport what would be evicted (blob size, last-access elapsed time, pin status, already-evicted flag) without mutating cache state (issue #379). Use this as a pre-flight check before running the real takedown — operators want to confirm the right blob and spot cases like “this hash is pinned” or “this is an idempotent re-run” before committing to the durable eviction.
admin_url: Option<String>Base URL of the node’s admin HTTP surface. See health --admin-url
for resolution precedence (flag → env → config → default).
config: Option<PathBuf>Path to the TOML config file used to derive the admin URL when
--admin-url / DECDN_ADMIN_URL are unset.
json: boolEmit the admin response body as JSON instead of a human-readable line.
timeout_ms: u64Roundtrip timeout in milliseconds.
Trait Implementations§
Source§impl Args for EvictArgs
impl Args for EvictArgs
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl FromArgMatches for EvictArgs
impl FromArgMatches for EvictArgs
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Auto Trait Implementations§
impl Freeze for EvictArgs
impl RefUnwindSafe for EvictArgs
impl Send for EvictArgs
impl Sync for EvictArgs
impl Unpin for EvictArgs
impl UnsafeUnpin for EvictArgs
impl UnwindSafe for EvictArgs
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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