#[non_exhaustive]pub struct HogdDevConfig {Show 13 fields
pub binary_path: Option<PathBuf>,
pub contract_artifact_directories: Vec<PathBuf>,
pub data_dir: Option<PathBuf>,
pub log_level: Option<LogLevel>,
pub listen_host: String,
pub shutdown_grace: Duration,
pub startup_timeout: Duration,
pub bootstrap_accounts: Vec<BootstrapManifestAllocation>,
pub ramdb_bytes: Option<u64>,
pub network_config_overrides: BTreeMap<ConfigParamName, u64>,
pub extra_args: Vec<OsString>,
pub init_network_hash: Option<NetworkHashText>,
pub pid_file: Option<PathBuf>,
}Expand description
Configuration for the supervised hogd-dev process.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.binary_path: Option<PathBuf>Explicit binary path, if supplied by CLI flag or higher-level config.
When unset, the supervisor falls back to the documented hogd-dev binary lookup order.
contract_artifact_directories: Vec<PathBuf>Contract artifact directories searched by hog-devnode before its defaults.
data_dir: Option<PathBuf>Directory where hog-devnode persists recoverable node state.
When unset, hog-devnode runs with ephemeral state.
log_level: Option<LogLevel>Log level to request from hogd-dev
listen_host: StringHost address hogd-dev should bind its internal services to.
shutdown_grace: DurationGrace period after SIGTERM before the supervisor escalates to SIGKILL.
This allows log drain and orderly task cancellation before forced process termination.
startup_timeout: DurationMaximum time to wait for the readiness line after spawning hogd-dev.
bootstrap_accounts: Vec<BootstrapManifestAllocation>Explicit public allocations for a fresh local chain.
On restart the persisted public intent remains authoritative.
ramdb_bytes: Option<u64>RAM database capacity in bytes hog-devnode reserves at startup.
When unset, hog-devnode uses its built-in default capacity.
network_config_overrides: BTreeMap<ConfigParamName, u64>Genesis execution parameter values forwarded to hog-devnode in place of the ones stock genesis states. The child still rejects a value outside the ceilings its build was compiled with.
extra_args: Vec<OsString>Raw arguments appended after every flag the supervisor sets, so a repeated flag here overrides the supervisor’s value. Not persisted.
init_network_hash: Option<NetworkHashText>Signing domain for a new chain. Omission initializes the zero development domain.
An initialized directory rejects this option, even if the value matches. Leave it unset on restart to load the persisted identity.
pid_file: Option<PathBuf>PID file used to detect and clean up orphaned hogd-dev children.
Implementations§
Source§impl HogdDevConfig
impl HogdDevConfig
Sourcepub fn with_init_network_hash(self, network_hash: NetworkHashText) -> Self
pub fn with_init_network_hash(self, network_hash: NetworkHashText) -> Self
Select a new chain’s signing domain. Initialized directories reject this option.
Sourcepub fn with_network_config_overrides(
self,
overrides: BTreeMap<ConfigParamName, u64>,
) -> Self
pub fn with_network_config_overrides( self, overrides: BTreeMap<ConfigParamName, u64>, ) -> Self
Return a copy with genesis network parameter overrides.
Sourcepub fn with_binary_path(self, binary_path: impl Into<PathBuf>) -> Self
pub fn with_binary_path(self, binary_path: impl Into<PathBuf>) -> Self
Return a copy with an explicit hogd-dev binary path.
Sourcepub fn with_contract_artifact_directories<I, P>(self, directories: I) -> Self
pub fn with_contract_artifact_directories<I, P>(self, directories: I) -> Self
Return a copy with explicit contract artifact search directories.
Sourcepub fn with_data_dir(self, data_dir: impl Into<PathBuf>) -> Self
pub fn with_data_dir(self, data_dir: impl Into<PathBuf>) -> Self
Return a copy with a directory for persistent hog-devnode state.
Sourcepub fn with_log_level(self, log_level: LogLevel) -> Self
pub fn with_log_level(self, log_level: LogLevel) -> Self
Return a copy with an explicit hogd-dev log level.
Sourcepub fn with_listen_host(self, listen_host: impl Into<String>) -> Self
pub fn with_listen_host(self, listen_host: impl Into<String>) -> Self
Return a copy with a different internal listen host.
Sourcepub fn with_shutdown_grace(self, shutdown_grace: Duration) -> Self
pub fn with_shutdown_grace(self, shutdown_grace: Duration) -> Self
Return a copy with a different graceful shutdown timeout.
Sourcepub fn with_startup_timeout(self, startup_timeout: Duration) -> Self
pub fn with_startup_timeout(self, startup_timeout: Duration) -> Self
Return a copy with a different startup readiness timeout.
Sourcepub fn with_bootstrap_accounts(
self,
accounts: Vec<BootstrapManifestAllocation>,
) -> Self
pub fn with_bootstrap_accounts( self, accounts: Vec<BootstrapManifestAllocation>, ) -> Self
Return a copy with caller-owned public bootstrap allocations.
Sourcepub fn with_ramdb_bytes(self, ramdb_bytes: u64) -> Self
pub fn with_ramdb_bytes(self, ramdb_bytes: u64) -> Self
Return a copy with an explicit hog-devnode RAM database capacity in bytes.
Sourcepub fn with_extra_args<I, A>(self, args: I) -> Self
pub fn with_extra_args<I, A>(self, args: I) -> Self
Return a copy with raw arguments appended to the hog-devnode command line.
Sourcepub fn with_pid_file(self, pid_file: impl Into<PathBuf>) -> Self
pub fn with_pid_file(self, pid_file: impl Into<PathBuf>) -> Self
Return a copy with a PID file for orphan detection.
Sourcepub fn to_bootstrap_manifest(
&self,
network_hash: NetworkHashText,
faucet_public_key: Ed25519PublicKey,
) -> BootstrapManifest
pub fn to_bootstrap_manifest( &self, network_hash: NetworkHashText, faucet_public_key: Ed25519PublicKey, ) -> BootstrapManifest
Build public intent using the supervisor-owned faucet’s public key.
Trait Implementations§
Source§impl Clone for HogdDevConfig
impl Clone for HogdDevConfig
Source§impl Debug for HogdDevConfig
impl Debug for HogdDevConfig
Source§impl Default for HogdDevConfig
impl Default for HogdDevConfig
impl Eq for HogdDevConfig
Source§impl PartialEq for HogdDevConfig
impl PartialEq for HogdDevConfig
impl StructuralPartialEq for HogdDevConfig
Auto Trait Implementations§
impl Freeze for HogdDevConfig
impl RefUnwindSafe for HogdDevConfig
impl Send for HogdDevConfig
impl Sync for HogdDevConfig
impl Unpin for HogdDevConfig
impl UnsafeUnpin for HogdDevConfig
impl UnwindSafe for HogdDevConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.