iceberg-cpp
Loading...
Searching...
No Matches
Public Types | Static Public Member Functions | Static Public Attributes | List of all members
iceberg::FileIORegistry Class Reference

Registry for FileIO implementations. More...

#include <file_io_registry.h>

Public Types

using Factory = std::function< Result< std::unique_ptr< FileIO > >(const std::unordered_map< std::string, std::string > &properties)>
 Factory function type for creating FileIO instances.
 

Static Public Member Functions

static void Register (const std::string &name, Factory factory)
 Register a FileIO factory under the given name.
 
static Result< std::unique_ptr< FileIO > > Load (const std::string &name, const std::unordered_map< std::string, std::string > &properties)
 Load a FileIO implementation by name.
 

Static Public Attributes

static constexpr std::string_view kArrowLocalFileIO = "arrow-fs-local"
 
static constexpr std::string_view kArrowS3FileIO = "arrow-fs-s3"
 

Detailed Description

Registry for FileIO implementations.

Provides a mechanism to register and load FileIO implementations by name. This allows the REST catalog (and others) to resolve FileIO implementations at runtime based on configuration properties like "io-impl".

Member Function Documentation

◆ Load()

Result< std::unique_ptr< FileIO > > iceberg::FileIORegistry::Load ( const std::string &  name,
const std::unordered_map< std::string, std::string > &  properties 
)
static

Load a FileIO implementation by name.

Parameters
nameThe implementation name to look up.
propertiesConfiguration properties to pass to the factory.
Returns
A unique_ptr to the FileIO instance, or an error if not found.

◆ Register()

void iceberg::FileIORegistry::Register ( const std::string &  name,
Factory  factory 
)
static

Register a FileIO factory under the given name.

Parameters
nameThe implementation name (e.g., "local", "s3")
factoryThe factory function that creates the FileIO instance.

The documentation for this class was generated from the following files: