Discover Packages
github.com/nikogura/redisproxy
proxy
service
package
Version:
v0.0.0-...-d66b6fa
Opens a new window with list of versions in this module.
Published: Nov 29, 2017
License: Apache-2.0
Opens a new window with license information.
Imports: 10
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Jump to ...
Documentation
Index
Constants
Variables
Functions
Types
type Proxy
NewProxy(port, maxEntries, maxAge, timeout, redisAddr)
TestProxy(port, maxEntries, maxAge, timeout, redisAddr, fetcher)
(p) Handle(w, r)
(p) Run()
Source Files
Documentation
Documentation
¶
Fetcher The function that actually gets info from redis. This is used when the proxy is run for reals. In testing it's replaced by an in memory function reading from a test fixture
Proxy struct to represent the proxy server itself
NewProxy creates, guess what? a new proxy. Uses the default redis fetcher client.
TestProxy is just like NewProxy, but allows you to hand in a custom fetch func for testing.
func (*Proxy) Handle ¶
Handle is the http handler for all incoming requests.
Run actually runs the http server for the proxy. It does not detatch from the console
Source Files
¶
Click to show internal directories.
Click to hide internal directories.