Skip to content

asifdxtreme/logging-route-service

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example Route Service

An example route service for Cloud Foundry.

Route Service Overview

The Route Service feature is currently in development, the proposal can be found in this Google Doc.

This example route service uses the new headers/features that have been added to the GoRouter. For example:

  • X-CF-Forwarded-Url: A header that contains the original URL that the GoRouter received.
  • X-CF-Proxy-Signature: A header that the GoRouter uses to determine if a request has gone through the route service.

Getting Started

  • Download this repository and cf push to your chosen CF deployment.
  • Push your app which will be associated with the route service.
  • Use the rtr CLI to register this example as the route_service_url of your chosen app.
  • Tail the logs of this route service in order to verify that requests to your app go through the route service. The example logging route service will log requests and responses to and from your app.

Environment Variables

ROUTE_SERVICE_SLEEP_MILLI

If you set this environment variable in the running app, the route service will sleep for that many milliseconds before proxying the request. This can be used to simulate route services that are slow to respond.

Example (10 seconds):

cf set-env logging-route-service ROUTE_SERVICE_SLEEP_MILLI 10000
cf restage logging-route-service

About

A sample route service written in Go.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%