mod client

module client

Optional informer, not the walk.

The chain is a kubelet: it owns its leftover search. The bank is the control plane. If the plane is down, slow, or on the login node under IRA load, the walk continues. A refused connect is not a panic; a hung snapshot is a dropped client, not a blocked hop.

Structs and Unions

struct BankClient

One connection to the shared bank.

Implementations

impl BankClient

Functions

fn bias_of(&mut self, soap: ArrayView1<f64>) -> Result<f64, String>

Current height of the well containing soap.

fn connect(addr: impl AsRef<str>) -> std::io::Result<Self>

Connect to host:port with a short timeout.

fn deposit(&mut self, soap: ArrayView1<f64>, increment: f64) -> Result<f64, String>

Add increment to the well containing soap.

fn nearest(&mut self, soap: ArrayView1<f64>) -> Result<f64, String>

Distance in packing SOAP to the nearest known well.

fn offer(&mut self, energy: f64, coords: ArrayView1<f64>, soap: ArrayView1<f64>) -> Result<(u16, f64), String>

Offer a quenched member. Returns the admission kind and current Dcut.

fn sample(&mut self, seed: u64) -> Result<Option<(f64, Array1<f64>)>, String>

A bank member to start from. None if the bank is empty.

fn set_dcut(&mut self, dcut: f64) -> Result<(), String>

Publish a Dcut. Ignored while the first bank is still seeding.

fn snapshot(&mut self) -> Result<Snapshot, String>

Bank size, Dcut, member energies, and SOAP wells.

fn wells(&mut self) -> Result<Vec<(Array1<f64>, f64)>, String>

Packing wells held on the server.

struct Snapshot

Live bank contents from snapshot.

size: u32

Members currently held.

dcut: f64

Current Lee Dcut.

energies: Vec<f64>

Member energies, bank order.

wells: Vec<(Array1<f64>, f64)>

SOAP packing wells (spectrum, height).