Skip to content
This repository

Modular HTTP server framework for Go

branch: master

Merge pull request #55 from ngmoco/lights_out

updating readme
latest commit 0b26499d6a
Paul Karadimas pkar authored
Octocat-spinner-32 compression removed files that are no longer needed for Go1 and the go build tools March 30, 2012
Octocat-spinner-32 etag gofmt March 28, 2012
Octocat-spinner-32 examples fixing hot_restart for 1.0.3 change with ForkExec FDs April 11, 2013
Octocat-spinner-32 static_file fixes #29. make sure all types we test for are in mime's lookup table August 19, 2012
Octocat-spinner-32 test initial public commit January 17, 2012
Octocat-spinner-32 upstream switching to setting deadline on upstreams for all writes using a con… March 19, 2013
Octocat-spinner-32 .gitignore .gitignore: add .swp April 19, 2012
Octocat-spinner-32 LICENSE.md initial public commit January 17, 2012
Octocat-spinner-32 README.md Merge pull request #55 from ngmoco/lights_out November 07, 2013
Octocat-spinner-32 buffer_pool.go go fmt February 26, 2013
Octocat-spinner-32 buffer_pool_test.go removed the need for the drain buffer. renamed bufferPoolEntry.buf to… April 23, 2012
Octocat-spinner-32 continue.go adding support for Expect: 100-continue April 26, 2013
Octocat-spinner-32 doc.go gofmt April 23, 2012
Octocat-spinner-32 filter.go go fmt February 26, 2013
Octocat-spinner-32 handler_filter.go gofmt December 10, 2012
Octocat-spinner-32 handler_filter_test.go Fix handler test with new TestWithRequest signature February 26, 2013
Octocat-spinner-32 logger.go updated to weekly 2012-01-20 March 04, 2012
Octocat-spinner-32 pipeline.go go fmt February 26, 2013
Octocat-spinner-32 pipeline_test.go updated to weekly 2012-01-20 March 04, 2012
Octocat-spinner-32 request.go adding support for Expect: 100-continue April 26, 2013
Octocat-spinner-32 response.go added RedirectResponse as a convenient method for issuing a redirect July 06, 2012
Octocat-spinner-32 router.go updated to weekly 2012-01-20 March 04, 2012
Octocat-spinner-32 router_test.go updated to weekly 2012-01-20 March 04, 2012
Octocat-spinner-32 server.go fixing keep-alive for 1.0 clients, i'm looking at you apache bench April 22, 2013
Octocat-spinner-32 server_notwindows.go calling tcpC.File() causes the socket to become blocking which causes… April 22, 2013
Octocat-spinner-32 server_windows.go go fmt February 26, 2013
Octocat-spinner-32 string_body.go removing debug and choosing fastest impl June 11, 2012
Octocat-spinner-32 string_body_test.go go fmt February 26, 2013
README.md

Falcore has Moved

Fitstar Falcore »

The Fitstar fork has tons of updates that break backwards compatibility so we are leaving this repo live for reference of the older interfaces. It will no longer be maintained here, though so you should upgrade to the Fitstar fork.

Falcore

Falcore is a framework for constructing high performance, modular HTTP servers in Golang.

Read more on our blog »

GoPkgDoc hosts code documentation for this project.

Features

  • Modular and flexible design
  • Hot restart hooks for zero-downtime deploys
  • Builtin statistics framework
  • Builtin logging framework

Design

Falcore is a filter pipeline based HTTP server library. You can build arbitrarily complicated HTTP services by chaining just a few simple components:

  • RequestFilters are the core component. A request filter takes a request and returns a response or nil. Request filters can modify the request as it passes through.
  • ResponseFilters can modify a response on its way out the door. An example response filter, compression_filter, is included. It applies deflate or gzip compression to the response if the request supplies the proper headers.
  • Pipelines form one of the two logic components. A pipeline contains a list of RequestFilters and a list of ResponseFilters. A request is processed through the request filters, in order, until one returns a response. It then passes the response through each of the response filters, in order. A pipeline is a valid RequestFilter.
  • Routers allow you to conditionally follow different pipelines. A router chooses from a set of pipelines. A few basic routers are included, including routing by hostname or requested path. You can implement your own router by implementing falcore.Router. Routers are not RequestFilters, but they can be put into pipelines.

Building

Falcore is currently targeted at Go 1.0. If you're still using Go r.60.x, you can get the last working version of falcore for r.60 using the tag last_r60.

Check out the project into $GOROOT/src/pkg/github.com/ngmoco/falcore. Build using the go build command.

Usage

See the examples directory for usage examples.

HTTPS

To use falcore to serve HTTPS, simply call ListenAndServeTLS instead of ListenAndServe. If you want to host SSL and nonSSL out of the same process, simply create two instances of falcore.Server. You can give them the same pipeline or share pipeline components.

Maintainers

Contributors

Something went wrong with that request. Please try again.