Module proxy

Source
Expand description

rama proxy support

Modules§

haproxy
rama HaProxy support

Structs§

LiveUpdateProxyDB
A wrapper around a T ProxyDB which can be updated through the only linked writer LiveUpdateProxyDBSetter.
LiveUpdateProxyDBSetter
Writer to set a new ProxyDB in the linked LiveUpdateProxyDB.
MemoryProxyDB
A fast in-memory ProxyDatabase that is the default choice for Rama.
MemoryProxyDBInsertError
The error type that can be returned by MemoryProxyDB when some of the proxies could not be inserted due to a proxy that had a duplicate key or was invalid for some other reason.
MemoryProxyDBQueryError
The error type that can be returned by MemoryProxyDB when no proxy could be returned.
Proxy
The selected proxy to use to connect to the proxy.
ProxyContext
The context as relevant to the proxy layer.
ProxyCsvRowReader
A CSV Reader that can be used to create a Proxy database from a CSV file or raw data.
ProxyCsvRowReaderError
An error that can occur when reading a Proxy CSV row.
ProxyDBLayer
A Layer which wraps an inner Service to select a Proxy based on the given Context, and insert, if a Proxy is selected, it in the Context for further processing.
ProxyDBService
A Service which selects a Proxy based on the given Context.
ProxyFilter
Filter to select a specific kind of proxy.
ProxyFilterUsernameParser
A parser which parses ProxyFilters from username labels and adds it to the Context’s Extensions.
ProxyID
ID of the selected proxy. To be inserted into the Context, only if that proxy is selected.
StringFilter
A string filter that normalizes the string prior to consumption.

Enums§

MemoryProxyDBInsertErrorKind
The kind of error that MemoryProxyDBInsertError represents.
MemoryProxyDBQueryErrorKind
The kind of error that MemoryProxyDBQueryError represents.
ProxyCsvRowReaderErrorKind
The kind of error that can occur when reading a Proxy CSV row.
ProxyFilterMode
The modus operandi to decide how to deal with a missing ProxyFilter in the Context when selecting a Proxy from the ProxyDB.

Traits§

ProxyDB
The trait to implement to provide a proxy database to other facilities, such as connection pools, to provide a proxy based on the given [TransportContext] and ProxyFilter.
ProxyQueryPredicate
Trait that is used by the ProxyDB for providing an optional filter predicate to rule out returned results.
UsernameFormatter
Trait that is used to allow the formatting of a username, e.g. to allow proxy routers to have proxy config labels in the username.

Functions§

proxy_db_updater
Create a new ProxyDB updater which allows you to have a (typically in-memory) ProxyDB which you can update live.