Summary
In this chapter, we first looked into what middleware is, exactly, including how middleware processes a request and response. We then explored middleware code with a few practical examples. After that, we saw how to chain our middleware by passing one middleware to another. Then, we used a package called Alice for intuitive chaining. We also took a look at the Gorilla handlers middleware for logging. Next, we learned what an RPC is and how an RPC server and client can be built. After that, we explained what a JSON RPC is, and we saw how one can create a JSON RPC using Gorilla toolkit. We introduced many third-party packages for middleware and RPC, with examples.
In the next chapter, we are going to explore few famous web frameworks ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access