snops_common/state/
mod.rs1use lazy_static::lazy_static;
2use regex::Regex;
3
4mod agent_mode;
5mod agent_state;
6mod agent_status;
7mod height_request;
8mod id;
9mod network;
10mod node_key;
11mod node_state;
12mod node_type;
13mod port_config;
14pub mod snarkos_status;
15pub mod strings;
16
17pub use agent_mode::*;
18pub use agent_state::*;
19pub use agent_status::*;
20pub use height_request::*;
21pub use id::*;
22pub use network::*;
23pub use node_key::*;
24pub use node_state::*;
25pub use node_type::*;
26pub use port_config::*;
27
28lazy_static! {
29 static ref NODE_KEY_REGEX: Regex = Regex::new(
30 r"^(?P<ty>client|validator|prover)\/(?P<id>[A-Za-z0-9\-]*)(?:@(?P<ns>[A-Za-z0-9\-]+))?$"
31 )
32 .unwrap();
33 static ref INTERNED_ID_REGEX: Regex =
34 Regex::new(r"^[A-Za-z0-9][A-Za-z0-9\-_.]{0,63}$").unwrap();
35}
36
37pub type AgentId = InternedId;
38pub type EnvId = InternedId;
39pub type CannonId = InternedId;
40pub type StorageId = InternedId;
41pub type TimelineId = InternedId;
42pub type TxPipeId = InternedId;