Overview
Explore a powerful package for making consistent, simple, and easily maintainable internal HTTP API calls in Go. Learn about Bitly's system architecture, standard library HTTP calls, and how to encapsulate functionality into a reusable package. Discover the inner workings of the 'bitlyservice' package, including service discovery, application startup, and service validation. Gain insights into unit testing with hooks and the intricacies of HTTP calls. This GopherCon 2020 talk by Michael Richman provides a comprehensive look at streamlining internal service communication in Go applications.
Syllabus
Intro
Bitly System Architecture
Standard lib HTTP calls
Solution - Encapsulate it all into a reusable package
Under the covers - bitlyservice does all the work
bitlyservice. NewRequest() - What does it do?
First piece: Service Discovery
Application Startup
Service Validation - MustAddNamedAPI()
Unit testing with hooks
The HTTP call and all things surrounding it
Climbing back out...
Taught by
Gopher Academy