Abstract base class for remote endpoints. More...
#include <remote_handle.hpp>
Public Member Functions | |
virtual void | setopt (CurlHandle &curl)=0 |
Set needed connection options on a curl handle. More... | |
virtual std::string | str () const =0 |
Get a description of this remote point instance. More... | |
virtual std::size_t | get_file_size ()=0 |
Get the size of the remote file. More... | |
virtual void | setup_range_request (CurlHandle &curl, std::size_t file_offset, std::size_t size)=0 |
Set up the range request in order to read part of a file given the file offset and read size. | |
RemoteEndpointType | remote_endpoint_type () const noexcept |
Get the type of the remote file. More... | |
Protected Member Functions | |
RemoteEndpoint (RemoteEndpointType remote_endpoint_type) | |
Protected Attributes | |
RemoteEndpointType | _remote_endpoint_type {RemoteEndpointType::AUTO} |
Abstract base class for remote endpoints.
In this context, an endpoint refers to a remote file using a specific communication protocol.
Each communication protocol, such as HTTP or S3, needs to implement this ABC and implement its own ctor that takes communication protocol specific arguments.
Definition at line 65 of file remote_handle.hpp.
|
pure virtual |
Get the size of the remote file.
Implemented in kvikio::S3EndpointWithPresignedUrl, kvikio::S3Endpoint, kvikio::HttpEndpoint, and kvikio::WebHdfsEndpoint.
|
noexcept |
Get the type of the remote file.
|
pure virtual |
Set needed connection options on a curl handle.
Subsequently, a call to curl.perform()
should connect to the endpoint.
curl | The curl handle. |
Implemented in kvikio::S3EndpointWithPresignedUrl, kvikio::S3Endpoint, kvikio::HttpEndpoint, and kvikio::WebHdfsEndpoint.
|
pure virtual |
Get a description of this remote point instance.
Implemented in kvikio::S3EndpointWithPresignedUrl, kvikio::S3Endpoint, kvikio::HttpEndpoint, and kvikio::WebHdfsEndpoint.