Skip to main content

Addresses

Struct Addresses 

Source
pub struct Addresses { /* private fields */ }
Expand description

Behaviour 12: addresses move.

The appliance got 10.13.8.101 one re-lay and 10.13.8.99 the next, with the twin holding the other; the public address changed every single time. Code that held a literal went stale exactly that way, so the mock shuffles both pools on every lay and hands them out in the shuffled order. A consumer that pins an address fails here on the second lay instead of in production on the second re-lay.

The public pool is RFC 5737 TEST-NET, and nothing else — ever. It was a list of REAL UpCloud addresses (our estate’s of 2026-09-15, and others), and one of them had port 22 open on a machine that is not ours: every mock step that connects to a handed-out address — verify, the ssh to the front, the re-image’s banner check — went out onto the internet, to a stranger. A TEST-NET address is not routed, so a mock that connects to one fails locally instead of reaching someone. TEST_NET is the check, and the tests hold every address the estate can hand out to it.

The utility pool is RFC 1918 (10.13.8.96–120, 10.13.12.96–120, across both /22s for option 121, behaviour 29), disjoint from the networks of the box the rig runs on.

Implementations§

Source§

impl Addresses

Source

pub fn new(seed: u64) -> Addresses

Source

pub fn relay(&mut self, seed: u64)

A new lay of the estate: reshuffle, hand out from the top again.

Source

pub fn lays(&self) -> u64

Source

pub fn take_utility(&mut self) -> String

Source

pub fn take_public(&mut self) -> String

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.