ipfs-chromium
Public Member Functions | List of all members
ipfs::ctx::GatewayConfig Class Referenceabstract

#include <library/include/ipfs_client/ctx/gateway_config.h>

Inheritance diagram for ipfs::ctx::GatewayConfig:
Inheritance graph
[legend]

Public Member Functions

virtual std::optional< GatewaySpecGetGateway (std::size_t index) const =0
 
virtual unsigned GetGatewayRate (std::string_view url_prefix)=0
 
virtual int GetTypeAffinity (std::string_view url_prefix, gw::GatewayRequestType) const =0
 
virtual void SetTypeAffinity (std::string_view url_prefix, gw::GatewayRequestType, int)=0
 
virtual void SetGatewayRate (std::string_view url_prefix, unsigned rpm)=0
 
virtual void AddGateway (std::string_view url_prefix, unsigned rpm)=0
 
virtual unsigned RoutingApiDiscoveryDefaultRate () const =0
 
virtual bool RoutingApiDiscoveryOfUnencryptedGateways () const =0
 

Detailed Description

Configuration for IPFS gateways - which to use, how, etc.

Member Function Documentation

◆ GetGateway()

virtual std::optional<GatewaySpec> ipfs::ctx::GatewayConfig::GetGateway ( std::size_t  index) const
pure virtual

Position-based access (indexing)

Parameters
indexThe 0-based index of the gateway in question
Returns
The spec for the gateway iff index < count of gateways, nullopt otherwise

Implemented in ipfs::ctx::TransitoryGatewayConfig, and ipfs::ChromiumIpfsGatewayConfig.


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