mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -07:00
21 lines
479 B
C++
21 lines
479 B
C++
#include "globals.h"
|
|
#include "flags.h"
|
|
#include "dataspec.h"
|
|
#include "fluxsink/fluxsink.h"
|
|
#include "lib/config.pb.h"
|
|
|
|
std::unique_ptr<FluxSink> FluxSink::create(const OutputDiskProto& config)
|
|
{
|
|
switch (config.dest_case())
|
|
{
|
|
case OutputDiskProto::kFluxfile:
|
|
return createSqliteFluxSink(config.fluxfile());
|
|
|
|
case OutputDiskProto::kDrive:
|
|
return createHardwareFluxSink(config.drive());
|
|
}
|
|
|
|
Error() << "bad output disk config";
|
|
return std::unique_ptr<FluxSink>();
|
|
}
|