|
iceberg-cpp
|
Session-aware REST catalog root. More...
#include <rest_catalog.h>
Public Types | |
| using | ClientFactory = std::function< Result< std::shared_ptr< HttpClient > >(const RestCatalogProperties &)> |
Public Member Functions | |
| RestCatalog (const RestCatalog &)=delete | |
| RestCatalog & | operator= (const RestCatalog &)=delete |
| RestCatalog (RestCatalog &&)=delete | |
| RestCatalog & | operator= (RestCatalog &&)=delete |
| std::string_view | name () const override |
| Catalog name. | |
| Result< std::shared_ptr< Catalog > > | AsCatalog () override |
Return a Catalog view bound to the catalog's default session. | |
| Result< std::shared_ptr< Catalog > > | WithContext (SessionContext context) override |
Return a Catalog view bound to the supplied session context. | |
Static Public Member Functions | |
| static Result< std::shared_ptr< RestCatalog > > | Make (const RestCatalogProperties &config, ClientFactory client_factory={}, Executor *auth_executor=nullptr, Executor *metrics_executor=nullptr) |
| Create a RestCatalog instance. | |
Session-aware REST catalog root.
Return a Catalog view bound to the catalog's default session.
Implementations may cache and return the same default catalog view on repeated calls.
Implements iceberg::SessionCatalog.
|
static |
Create a RestCatalog instance.
| client_factory | Optional HTTP client factory, called with the initial config and then the merged server config. It should configure the HTTP client's base URI from the supplied properties. When empty, uses the default HTTP client. |
| auth_executor | Borrowed OAuth2 refresh executor. With OAuth2 credentials, token-refresh-enabled=true (default) requires it; null returns InvalidArgument. Must enqueue asynchronously and outlive the catalog, its auth sessions and their tasks. |
| metrics_executor | Optional non-owning executor for asynchronous REST metrics. It must outlive the catalog and all tables created by it. When null, REST metrics are reported synchronously. |
|
overridevirtual |
Catalog name.
Implements iceberg::SessionCatalog.
|
overridevirtual |
Return a Catalog view bound to the supplied session context.
Implementations should reject invalid contexts, such as an empty SessionContext::session_id. Returned catalog views use the normal Catalog interface for all table and namespace operations.
Implements iceberg::SessionCatalog.