Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
kvikio::RemoteEndpoint Class Referenceabstract

Abstract base class for remote endpoints. More...

#include <remote_handle.hpp>

Inheritance diagram for kvikio::RemoteEndpoint:
kvikio::HttpEndpoint kvikio::S3Endpoint kvikio::S3EndpointWithPresignedUrl kvikio::WebHdfsEndpoint

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}
 

Detailed Description

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.

Member Function Documentation

◆ get_file_size()

virtual std::size_t kvikio::RemoteEndpoint::get_file_size ( )
pure virtual

Get the size of the remote file.

Returns
The file size

Implemented in kvikio::S3EndpointWithPresignedUrl, kvikio::S3Endpoint, kvikio::HttpEndpoint, and kvikio::WebHdfsEndpoint.

◆ remote_endpoint_type()

RemoteEndpointType kvikio::RemoteEndpoint::remote_endpoint_type ( ) const
noexcept

Get the type of the remote file.

Returns
The type of the remote file.

◆ setopt()

virtual void kvikio::RemoteEndpoint::setopt ( CurlHandle curl)
pure virtual

Set needed connection options on a curl handle.

Subsequently, a call to curl.perform() should connect to the endpoint.

Parameters
curlThe curl handle.

Implemented in kvikio::S3EndpointWithPresignedUrl, kvikio::S3Endpoint, kvikio::HttpEndpoint, and kvikio::WebHdfsEndpoint.

◆ str()

virtual std::string kvikio::RemoteEndpoint::str ( ) const
pure virtual

Get a description of this remote point instance.

Returns
A string description.

Implemented in kvikio::S3EndpointWithPresignedUrl, kvikio::S3Endpoint, kvikio::HttpEndpoint, and kvikio::WebHdfsEndpoint.


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