March 2020
Intermediate to advanced
406 pages
8h 39m
English
In order to see the improvements we can make with built and cached assets, let's build a project with a third-party dependency. Prometheus [https://prometheus.io/] is a popular time-series database (also written in Go) that is commonly used for metrics gathering and collection. We may want to start up a Prometheus metrics server in any of our applications in order to learn more about our current running binary, from a systems perspective. To do this, we can import the Prometheus library as follows:
package mainimport ( "net/http" "github.com/prometheus/client_golang/prometheus/promhttp")func main() { http.Handle("/promMetrics", promhttp.Handler()) http.ListenAndServe(":1234", nil)}
After we instantiate our ...
Read now
Unlock full access