|
Haio 0.2.X
Homebrew Asset IO/CDN
|
#include "haio.hpp"#include "haio_cache.hpp"#include <boost/asio/awaitable.hpp>#include <chrono>#include <filesystem>#include <map>#include <set>#include <string_view>

Go to the source code of this file.
Classes | |
| struct | Haio::Cdn::BucketConfig |
| struct | Haio::Cdn::SecurityConfig |
| struct | Haio::Cdn::Config |
Namespaces | |
| namespace | Haio |
| namespace | Haio::Cdn |
| namespace | Haio::Cdn::Bucket |
Functions | |
| Config | Haio::Cdn::parseConfig (std::string_view text) |
| Config | Haio::Cdn::loadConfig (const std::filesystem::path &path) |
| boost::asio::awaitable< Result< Blob > > | Haio::Cdn::fetchBucket (const Config &config, Bucket::ZipArchives &archives, std::string bucket, std::string path) |
| boost::asio::awaitable< void > | Haio::Cdn::runServer (Config config) |
| struct Haio::Cdn::BucketConfig |
a bucket is described entirely by the scheme of its url:
file://relative/dir file:///absolute/dir http://host/prefix https://host/prefix s3://host/bucket https://* open, the request names the host //* open, the request names the scheme and the host
Definition at line 201 of file haio_cdn.hpp.
| struct Haio::Cdn::SecurityConfig |
every limit the server has, in one table, so that reviewing what protects this deployment is reading one page of the config rather than hunting for it.
each one is safe when left out, and the server says at startup which ones it chose for itself; see Security.
Definition at line 229 of file haio_cdn.hpp.
| struct Haio::Cdn::Config |
Definition at line 261 of file haio_cdn.hpp.

| Class Members | ||
|---|---|---|
| map< string, BucketConfig > | buckets | |
| CacheConfig | cache | |
| set< string > | declared |
the keys the file actually spelled out, as "max_size" or "cache.max_ip". the safety limits all have a default, so leaving one out is safe rather than open; this is what lets the server say which ones it chose for itself instead of letting an operator believe they had configured something. |
| string | host = "0.0.0.0" | |
| unsigned short | port = 8080 | |
| SecurityConfig | security | |