SitePoint
Blog
Forum
Library
Login
Join Premium
Toggle sidebar
Practical Go: Building Scalable Network and Non-Network Applications
Toggle community discussions
Close
Content
Bookmarks
Preface
Practical Go
Building Scalable Network and Non-Network Applications
Introduction
What Does This Book Cover?
Reader Support for This Book
Getting Started
Installing Go
Choosing an Editor
Installing Protocol Buffer Toolchain
Installing Docker Desktop
Guide to the Book
Go Refresher
Summary
1
Writing Command-Line Applications
Your First Application
Writing Unit Tests
Using the Flag Package
Improving the User Interface
Updating the Unit Tests
Summary
Advanced Command-Line Applications
Implementing Sub-commands
Making Your Applications Robust
Summary
Writing HTTP Clients
Downloading Data
Deserializing Received Data
Sending Data
Working with Binary Data
Summary
Advanced HTTP Clients
Using a Custom HTTP Client
Customizing Your Requests
Implementing Client Middleware
Connection Pooling
Summary
Building HTTP Servers
Your First HTTP Server
Setting Up Request Handlers
Testing Your Server
The Request Struct
Attaching Metadata to a Request
Processing Streaming Requests
Streaming Data as Responses
Summary
Advanced HTTP Server Applications
The Handler Type
Sharing Data across Handler Functions
Writing Server Middleware
Writing Tests for Complex Server Applications
Summary
Production-Ready HTTP Servers
Aborting Request Handling
Server-Wide Time-Outs
Implementing Graceful Shutdown
Securing Communication with TLS
Summary
Building RPC Applications with gRPC
gRPC and Protocol Buffers
Writing Your First Service
A Detour into Protobuf Messages
Multiple Services
Error Handling
Summary
Advanced gRPC Applications
Streaming Communication
Receiving and Sending Arbitrary Bytes
Implementing Middleware Using Interceptors
Summary
Production-Ready gRPC Applications
Securing Communication with TLS
Robustness in Servers
Robustness in Clients
Connection Management
Summary
Working with Data Stores
Working with Object Stores
Working with Relational Databases
Summary
APPENDIX A: Making Your Applications Observable
Logs, Metrics, and Traces
Emitting Telemetry Data
Summary
APPENDIX B: Deploying Applications
Managing Configuration
Distributing Your Application
Deploying Server Applications
Summary
Index
About the Author
About the Technical Editor
Acknowledgments
WILEY END USER LICENSE AGREEMENT
Open text modal
Community Questions
Close