Expand description
§trop
A library for managing ephemeral port reservations.
This library provides core types and functionality for reserving, tracking, and managing port allocations across development projects.
§Core Types
PortandPortRange: Network port types with validationReservationandReservationKey: Port reservation trackingErrorandResult: Error handling typesLoggerandLogLevel: Logging infrastructure
§Examples
use trop::{Port, PortRange};
// Create a valid port
let port = Port::try_from(8080).unwrap();
assert_eq!(port.value(), 8080);
// Create a port range
let min = Port::try_from(5000).unwrap();
let max = Port::try_from(5010).unwrap();
let range = PortRange::new(min, max).unwrap();
assert_eq!(range.len(), 11);Re-exports§
pub use config::Config;pub use config::ConfigBuilder;pub use database::Database;pub use database::DatabaseConfig;pub use error::Error;pub use error::Result;pub use logging::init_logger;pub use logging::LogLevel;pub use logging::Logger;pub use operations::execute_migrate;pub use operations::init_database;pub use operations::AutocleanResult;pub use operations::AutoreserveOptions;pub use operations::AutoreservePlan;pub use operations::CleanupOperations;pub use operations::ExecutionResult;pub use operations::ExpireResult;pub use operations::InitOptions;pub use operations::InitResult;pub use operations::MigrateOptions;pub use operations::MigratePlan;pub use operations::MigrateResult;pub use operations::MigrationItem;pub use operations::OperationPlan;pub use operations::PlanAction;pub use operations::PlanExecutor;pub use operations::PruneResult;pub use operations::ReleaseOptions;pub use operations::ReleasePlan;pub use operations::ReserveGroupOptions;pub use operations::ReserveGroupPlan;pub use operations::ReserveOptions;pub use operations::ReservePlan;pub use path::PathProvenance;pub use path::PathRelationship;pub use path::PathResolver;pub use port::Port;pub use port::PortRange;pub use reservation::Reservation;pub use reservation::ReservationKey;
Modules§
- config
- Configuration system for trop.
- database
- Database layer for persistent storage of port reservations.
- error
- Error types for the trop library.
- logging
- Logging infrastructure for the trop library.
- operations
- Reservation operations using the plan-execute pattern.
- output
- Output formatting module for port allocations.
- path
- Path handling with provenance-aware canonicalization.
- port
- Port and port range types for network port management.
- reservation
- Reservation types for tracking port allocations.