ipfs-chromium
Public Member Functions | List of all members
ipfs::gw::GatewayState Class Reference

#include <library/src/ipfs_client/gw/gateway_state.h>

Public Member Functions

 GatewayState (std::string_view prefix, std::shared_ptr< Client > api)
 
long score (GatewayRequest const &, unsigned) const
 
bool bored () const
 
bool over_rate ()
 
void just_sent_one ()
 
void hit (GatewayRequestType, GatewayRequest const &)
 
bool miss (GatewayRequestType, GatewayRequest const &)
 
void timed_out ()
 
long extra_ms ()
 

Detailed Description

Information about an IPFS HTTP gateway and how often it should be used for what

Constructor & Destructor Documentation

◆ GatewayState()

ipfs::gw::GatewayState::GatewayState ( std::string_view  prefix,
std::shared_ptr< Client api 
)
Parameters
prefixThe URL prefix that goes in front of HTTP requests to the gateway e.g. https://ipfs.io/
apiAccess to the functionality of this client's context

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