use of io.airlift.node.NodeConfig in project airlift by airlift.
the class TestingNodeModule method configure.
@Override
public void configure(Binder binder) {
binder.bind(NodeInfo.class).in(Scopes.SINGLETON);
NodeConfig nodeConfig = new NodeConfig().setEnvironment(environment).setNodeInternalAddress(InetAddresses.toAddrString(getV4Localhost())).setNodeBindIp(getV4Localhost());
if (pool.isPresent()) {
nodeConfig.setPool(pool.get());
}
binder.bind(NodeConfig.class).toInstance(nodeConfig);
newExporter(binder).export(NodeInfo.class).withGeneratedName();
}
Aggregations