Struct discovery_rust::Discovery[][src]

pub struct Discovery { /* fields omitted */ }

Discovery for target app address, with load balancing and fail over.

  1. The discovery will refresh the service list every 10 seconds by default. The selection strategy is roundrobin, for keeping the connections balanced.
  2. Once a connection to a specified host failed, discard the host and try the next. And loop the process until find a connectable host or the retry time reaches the max time. If all the hosts are discarded, refresh the host list.
  3. The discovery also accepts an extra address pair, for fallback when the discovery agent is down. If no backup address found, zone will try to pick one from the discarded addresses.

Methods

impl Discovery
[src]

Discard the given address for a period. The TTL is the one passed in the initializer.

Trait Implementations

impl Default for Discovery
[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations

impl Send for Discovery

impl Sync for Discovery