ipfs-chromium
Public Member Functions | List of all members
ipfs::ctx::TransitoryGatewayConfig Class Reference

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

Inheritance diagram for ipfs::ctx::TransitoryGatewayConfig:
Inheritance graph
[legend]
Collaboration diagram for ipfs::ctx::TransitoryGatewayConfig:
Collaboration graph
[legend]

Public Member Functions

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

Detailed Description

Takes the place of a configuration, but it's not persisted

Constructor & Destructor Documentation

◆ TransitoryGatewayConfig()

ipfs::ctx::TransitoryGatewayConfig::TransitoryGatewayConfig ( )

Loads gateways from IPFS_GATEWAY environment or a static list

Member Function Documentation

◆ GetGateway()

std::optional<GatewaySpec> ipfs::ctx::TransitoryGatewayConfig::GetGateway ( std::size_t  index) const
overridevirtual

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

Implements ipfs::ctx::GatewayConfig.


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