bkietz commented on code in PR #39067:
URL: https://github.com/apache/arrow/pull/39067#discussion_r1511693163
##########
cpp/src/arrow/filesystem/filesystem.h:
##########
@@ -519,6 +568,84 @@ Result<std::shared_ptr<FileSystem>>
FileSystemFromUriOrPath(
/// @}
+/// \defgroup filesystem-factory-registration Helpers for FileSystem
registration
+///
+/// @{
+
+/// \brief Register a Filesystem factory
+///
+/// Support for custom Uri schemes can be added by registering a factory
+/// for the corresponding FileSystem.
+///
+/// \param[in] scheme a Uri scheme which the factory will handle.
+/// If a factory has already been registered for a scheme,
+/// the new factory will be ignored.
+/// \param[in] factory a function which can produce a FileSystem for Uris
which match
+/// scheme.
+/// \param[in] finalizer a function which must be called to finalize the
factory before
+/// the process exits, or nullptr if no finalization is necessary.
+/// \return raises KeyError if a name collision occurs.
+ARROW_EXPORT Status RegisterFileSystemFactory(std::string scheme,
+ FileSystemFactory factory,
+ void finalizer() = NULLPTR);
+
+/// \brief Register Filesystem factories from a shared library
+///
+/// The library should register factories as part of its initialization.
Review Comment:
Although it's worth noting that the required symbol is defined in libarrow
itself and is inherited by any library which links to it. Since any filesystem
implementation library will need to link to libarrow it shouldn't be necessary
for library authors to do more
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]