use of io.apisense.embed.influx.configuration.InfluxConfigurationWriter in project invesdwin-context-persistence by subes.
the class InfluxDBPerformanceTest method startInfluxDB.
private InfluxServer startInfluxDB(final int freeHttpPort, final int freeUdpPort) throws IOException {
final InfluxServer.Builder builder = new InfluxServer.Builder();
// configuration to start InfluxDB server with HTTP on port `freeHttpPort`
// and default backup restore port
final InfluxConfigurationWriter influxConfig = // by default auth is disabled
new InfluxConfigurationWriter.Builder().setHttp(freeHttpPort).setUdp(// If you happen to need udp enabled, by default to 'udp' database
freeUdpPort).build();
// let's start both of protocols, HTTP and UDP
builder.setInfluxConfiguration(influxConfig);
final InfluxServer server = builder.build();
return server;
}
Aggregations