mod_tile 0.9.1
Renders map tiles with Mapnik and serves them using Apache HTTP Server
Loading...
Searching...
No Matches
store_ro_http_proxy.h File Reference
#include "config.h"
#include <curl/curl.h>
#include "protocol.h"
#include "store.h"

Go to the source code of this file.

Classes

struct  ro_http_proxy_tile_cache
 Single-tile cache holding the most recently fetched remote tile and its metadata. More...
struct  ro_http_proxy_ctx
 Per-backend state for the read-only HTTP proxy storage engine. More...
struct  MemoryStruct
 Dynamically resized memory buffer used by libcurl's write callback to accumulate HTTP response bodies. More...

Functions

struct storage_backend * init_storage_ro_http_proxy (const char *connection_string)
 Allocate and initialize a read-only HTTP proxy storage_backend.

Function Documentation

◆ init_storage_ro_http_proxy()

struct storage_backend * init_storage_ro_http_proxy ( const char * connection_string)

Allocate and initialize a read-only HTTP proxy storage_backend.

Strips the "ro_http_proxy://" prefix from connection_string to obtain the upstream base host/path, performs thread-safe one-time curl_global_init() under ro_http_proxy_mutex, configures a CURL easy handle with CURLOPT_NOSIGNAL, CURLOPT_FOLLOWLOCATION, CURLOPT_USERAGENT, and CURLOPT_FILETIME, and wires all backend operation function pointers. Returns NULL if compiled without HAVE_LIBCURL or if initialization fails.

Parameters
connection_stringBackend URI of the form "ro_http_proxy://<host[:port][/prefix]>".
Returns
Newly allocated struct storage_backend pointer, or NULL on failure or if unsupported.