This repository contains the slides and code for my 2018 talk at OpenWest titled "Creating a Dynamic Reverse Proxy with Go".
Here are the steps shown during the live demo:
- Launch Godoc:
godoc --http=:6060
- Open local Godocs in browser.
- Show off how Godoc works, navigate to the
httputil
package - Show documentation for reverse proxy
- Copy docs into a Go file.
- Run them.
- Show source for
NewSingleHostReverseProxy
- Make our own rp struct that goes to "https://now.httpbin.org/"
- Modify the struct so it randomly shows either the time or the original backend
- Launch a goroutine in the director