Struct abstract_ns::RouterBuilder [] [src]

pub struct RouterBuilder(_);

A builder/fluent interface to create a Router

Methods

impl RouterBuilder
[src]

Start creating DNS router object

Add a name that is resolved to a single IP (just like in MemResolver)

Add a suffix which will be resolved using specified resolver object

This is useful for example to resolve all *.consul addresses against consul.

Suffixes are always matched after dot in the name. Suffixes passed to to this function must not contain initial dot.

If overlapping suffixes are specified, longest matching suffix wins.

Add a default resolver

Default resolver works as fallback when neither specific names nor suffixes matches.

Note: when suffix matches but returns non existent domain name the default resolver is not called.

Build real router object which can be used to resolve names