Building web services in Go
summary
Shows concrete patterns: a marshalled wrapper using reflection that decodes request types and encodes JSON responses with Go-style error values; a tree router with wildcard segments and method dispatch that returns 404/405; middleware composed by wrapping handlers and overriding the ResponseWriter to implement logging, metrics and short-circuiting; and a graceful shutdown built on ConnState and SetKeepAlivesEnabled so active requests finish within a bounded grace period.
AI-written summary · about
chapters (8)
- 0:00Web services and Go intro
- 2:39HTTP handler interface
- 9:03JSON and errors handling
- 12:38Tree-based routing
- 15:49Logging and metrics handlers
- 18:17Graceful shutdown in Go 1.3
- 21:45Recap and building blocks
- 23:28Q&A
related talks
37mPatterns for Scalable Web Services in Go
25mHow I Write HTTP Web Services After 8 Years
52mBuilding APIs
31mImplementing RESTful APIs
47mimport Golang; struct microservices
46mKeynote: You Want To Build a Web Service?
31mBuilding a microservices architecture with Go
01h 01mGo Kit A Toolkit for Microservices
