iceberg-cpp
Loading...
Searching...
No Matches
Classes | 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>

Classes

struct  Factory
 Factory for explicit loading and optional scheme-based routing. More...
 

Public Types

using Properties = std::unordered_map< std::string, std::string >
 

Static Public Member Functions

static void Register (std::string name, Factory factory)
 Register a FileIO factory under the given name.
 
static Result< std::unique_ptr< FileIO > > Load (std::string_view name, const Properties &properties)
 Load a FileIO implementation by name.
 
static Result< std::string > Resolve (std::string_view scheme)
 Returns the last registered factory accepting scheme.
 

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". Registrations must be completed before registry consumers are created.

Member Function Documentation

◆ Load()

static Result< std::unique_ptr< FileIO > > iceberg::FileIORegistry::Load ( std::string_view  name,
const Properties &  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()

static void iceberg::FileIORegistry::Register ( 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.

◆ Resolve()

static Result< std::string > iceberg::FileIORegistry::Resolve ( std::string_view  scheme)
static

Returns the last registered factory accepting scheme.

Matching is case-insensitive; registration order determines precedence.


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