function resolve(opt) {
	if (isObject(opt) && isInheritedClass(opt, Discoverers.Base)) {
		return opt;
	} else if (isString(opt)) {
		let DiscovererClass = getByName(opt);
		if (DiscovererClass) return new DiscovererClass();

		if (opt.startsWith("redis://") || opt.startsWith("rediss://"))
			return new Discoverers.Redis(opt);

		if (opt.startsWith("etcd3://")) return new Discoverers.Etcd3(opt);

		throw new BrokerOptionsError(`Invalid Discoverer type '${opt}'.`, { type: opt });
	} else if (isObject(opt)) {
		let DiscovererClass = getByName(opt.type || "Local");
		if (DiscovererClass) return new DiscovererClass(opt.options);
		else
			throw new BrokerOptionsError(`Invalid Discoverer type '${opt.type}'.`, {
				type: opt.type
			});
	}

	return new Discoverers.Local();
}
Resolve discoverer by name

@param {object|string} opt
@returns {Discoverer}
@memberof ServiceBroker