ipfs-chromium
transitory_gateway_config.h
1 #ifndef IPFS_CHROMIUM_TRANSITORY_GATEWAY_CONFIG_H
2 #define IPFS_CHROMIUM_TRANSITORY_GATEWAY_CONFIG_H
3 
4 #include "gateway_config.h"
5 
6 #include <vector>
7 
8 namespace ipfs::ctx {
10  std::vector<GatewaySpec> gateways_;
11 
12  std::vector<GatewaySpec>::iterator FindGateway(std::string_view);
13 
14  public:
15  std::optional<GatewaySpec> GetGateway(std::size_t index) const override;
16  unsigned GetGatewayRate(std::string_view) override;
17  void SetGatewayRate(std::string_view, unsigned) override;
18  void AddGateway(std::string_view, unsigned) override;
19  unsigned RoutingApiDiscoveryDefaultRate() const override;
20  bool RoutingApiDiscoveryOfUnencryptedGateways() const override;
21  int GetTypeAffinity(std::string_view url_prefix,
22  gw::GatewayRequestType) const override;
23  void SetTypeAffinity(std::string_view url_prefix,
24  gw::GatewayRequestType,
25  int) override;
26 
28 };
29 } // namespace ipfs::ctx
30 
31 #endif // IPFS_CHROMIUM_TRANSITORY_GATEWAY_CONFIG_H
Definition: gateway_config.h:11
Definition: transitory_gateway_config.h:9