droute

command module
v0.0.0-...-84d4900 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2019 License: Apache-2.0 Imports: 20 Imported by: 0

README

Warning

Under development don't use it!

Droute

Build Status GoDoc Go Report Card

Droute is a proxy server and a http router. The proxy part receive the requests and redirect it based on the domain and path of the request. The client part, where is the logic, register itself with the proxy sending to it the domain, path and host. Is supported multiple hosts for the same domain and path, you can do the load balancing politics of our choice. The proxy supports retries, load balance and circuit brake. You can add more middlewares if we need it.

Install

Execute the bellow command:

go get github.com/fcavani/droute

And change the folder to the droute folder.

Dep

Start sync yours vendor folder.

go get -u github.com/golang/dep/cmd/dep
dep ensure

Server

I have made a sample server in main.go, just compile it.

go build github.com/fcavani/droute

Client

Client is simple, it's like the httprouter. See the client/client_test.go.

TODO

Client can only add new routes. Need to implement remove and list routes. httprouter don't support it, and I don't know how I will do it. May be I will make a new router, I don't know...

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
middlewares
bucket
Package bucket contains a leeking bucket to be used with a web server for slow down the requests.
Package bucket contains a leeking bucket to be used with a web server for slow down the requests.
cache
Package cache is a midware thats stores one signature, composed of fields with information about the document that is accessed, with that signature one document is identified and the validit of it is considered for the sacke of cache.
Package cache is a midware thats stores one signature, composed of fields with information about the document that is accessed, with that signature one document is identified and the validit of it is considered for the sacke of cache.
expire
Package expire contains the expire midleware that adds to the http header the expire field.
Package expire contains the expire midleware that adds to the http header the expire field.
hsts
Package expire contains the expire midleware that adds to the http header the expire field.
Package expire contains the expire midleware that adds to the http header the expire field.
iplists
Package iplists control the access by the referrer address or ip address.
Package iplists control the access by the referrer address or ip address.
minify
Package minify compact certains types of codes in a form readable only by the computer.
Package minify compact certains types of codes in a form readable only by the computer.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL