Expand description
Shared helpers: filename splitting, worker identity, seeds, and secure mode.
Re-exports§
pub use crate::workers::clear_worker;pub use crate::workers::set_thread_id_hook;pub use crate::workers::set_worker;pub use crate::workers::with_worker;
Structs§
- Worker
Info - Which process and worker this code is running in.
Functions§
- base_
plus_ ext - Split a path into its basename and its full extension.
- check_
security - Fail when secure mode forbids
what. - enforce_
security - Whether secure mode is on.
- envsubst
std - Substitute
${NAME}with the environment variableWDS_NAME. - expand_
urls - Expand a URL specification into a concrete list of shard URLs.
- format_
shard_ pattern - Format
valueinto aprintf-style integer pattern such as%06d. - is_
shard_ metadata - Whether a tar member name is shard-level metadata that should be skipped.
- make_
seed - Combine several values into a 31-bit seed, mirroring
utils.make_seed. - next_
unique - A process-unique counter, used to keep temporary file names from colliding.
- seed_
from_ str - Hash a string into a seed component.
- set_
enforce_ security - Turn secure mode on or off explicitly.
- worker_
info - Report the current worker identity.