
Practical Go
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
Google announced the Go programming language to the public in 2009, with the version 1.0 release announced in 2012. Since its announcement to the community, and the compatibility promise of the 1.0 release, the Go language has been used to write scalable and high-impact software programs ranging from command-line applications and critical infrastructure tools to large-scale distributed systems. It's speed, simplicity, and reliability make it a perfect choice for developers working in various domains.
In Practical Go - Building Scalable Network + Non-Network Applications, you will learn to use the Go programming language to build robust, production-ready software applications. You will learn just enough to building command line tools and applications communicating over HTTP and gRPC.
This practical guide will cover:
* Writing command line applications
* Writing a HTTP services and clients
* Writing RPC services and clients using gRPC
* Writing middleware for network clients and servers
* Storing data in cloud object stores and SQL databases
* Testing your applications using idiomatic techniques
* Adding observability to your applications
* Managing configuration data from your applications
You will learn to implement best practices using hands-on examples written with modern practices in mind. With its focus on using the standard library packages as far as possible, Practical Go will give you a solid foundation for developing large applications using Go leveraging the best of the language's ecosystem.
More details
Other editions
Additional editions

Person
Content
- Cover
- Title Page
- Copyright Page
- About the Author
- About the Technical Editor
- Acknowledgments
- Contents at a Glance
- Contents
- Introduction
- What Does This Book Cover?
- Reader Support for This Book
- Getting Started
- Installing Go
- Choosing an Editor
- Installing Protocol Buffer Toolchain
- Linux and macOS
- Windows
- Installing Docker Desktop
- Guide to the Book
- Go Modules
- Command Line and Terminals
- Terms
- Reference Documentation
- Go Refresher
- Struct Type
- Interface Type
- Goroutines and Channels
- Testing
- Summary
- Chapter 1 Writing Command-Line Applications
- Your First Application
- Writing Unit Tests
- Using the Flag Package
- Testing the Parsing Logic
- Improving the User Interface
- Removing Duplicate Error Messages
- Customizing Usage Message
- Accept Name via a Positional Argument
- Updating the Unit Tests
- Summary
- Chapter 2 Advanced Command-Line Applications
- Implementing Sub-commands
- An Architecture for Sub-command-Driven Applications
- Testing the Main Package
- Testing the Cmd Package
- Making Your Applications Robust
- User Input with Deadlines
- Handling User Signals
- Summary
- Chapter 3 Writing HTTP Clients
- Downloading Data
- Testing the Data Downloader
- Deserializing Received Data
- Sending Data
- Working with Binary Data
- Summary
- Chapter 4 Advanced HTTP Clients
- Using a Custom HTTP Client
- Downloading from an Overloaded Server
- Testing the Time-Out Behavior
- Configuring the Redirect Behavior
- Customizing Your Requests
- Implementing Client Middleware
- Understanding the RoundTripper Interface
- A Logging Middleware
- Add a Header to All Requests
- Connection Pooling
- Configuring the Connection Pool
- Summary
- Chapter 5 Building HTTP Servers
- Your First HTTP Server
- Setting Up Request Handlers
- Handler Functions
- Testing Your Server
- The Request Struct
- Method
- URL
- Proto, ProtoMajor, and ProtoMinor
- Header
- Host
- Body
- Form, PostForm
- MultipartForm
- Attaching Metadata to a Request
- Processing Streaming Requests
- Streaming Data as Responses
- Summary
- Chapter 6 Advanced HTTP Server Applications
- The Handler Type
- Sharing Data across Handler Functions
- Writing Server Middleware
- Custom HTTP Handler Technique
- The HandlerFunc Technique
- Chaining Middleware
- Writing Tests for Complex Server Applications
- Code Organization
- Testing the Handler Functions
- Testing the Middleware
- Testing the Server Startup
- Summary
- Chapter 7 Production-Ready HTTP Servers
- Aborting Request Handling
- Strategies to Abort Request Processing
- Handling Client Disconnects
- Server-Wide Time-Outs
- Implement a Time-Out for All Handler Functions
- Implementing Server Time-Out
- Implementing Graceful Shutdown
- Securing Communication with TLS
- Configuring TLS and HTTP/2
- Testing TLS Servers
- Summary
- Chapter 8 Building RPC Applications with gRPC
- gRPC and Protocol Buffers
- Writing Your First Service
- Writing the Server
- Writing a Client
- Testing the Server
- Testing the Client
- A Detour into Protobuf Messages
- Marshalling and Unmarshalling
- Forward and Backward Compatibility
- Multiple Services
- Error Handling
- Summary
- Chapter 9 Advanced gRPC Applications
- Streaming Communication
- Server-Side Streaming
- Client-Side Streaming
- Bidirectional Streaming
- Receiving and Sending Arbitrary Bytes
- Implementing Middleware Using Interceptors
- Client-Side Interceptors
- Server-Side Interceptors
- Wrapping Streams
- Chaining Interceptors
- Summary
- Chapter 10 Production-Ready gRPC Applications
- Securing Communication with TLS
- Robustness in Servers
- Implementing Health Checks
- Handling Runtime Errors
- Aborting Request Processing
- Robustness in Clients
- Improving Connection Setup
- Handling Transient Failures
- Setting Time-Outs for Method Calls
- Connection Management
- Summary
- Chapter 11 Working with Data Stores
- Working with Object Stores
- Integration with Package Server
- Testing Package Uploads
- Accessing Underlying Driver Types
- Working with Relational Databases
- Integration with Package Server
- Testing Data Storage
- Data Type Conversions
- Using Database Transactions
- Summary
- Appendix A Making Your Applications Observable
- Logs, Metrics, and Traces
- Emitting Telemetry Data
- Command-Line Applications
- HTTP Applications
- gRPC Applications
- Summary
- Appendix B Deploying Applications
- Managing Configuration
- Distributing Your Application
- Deploying Server Applications
- Summary
- Index
- EULA
System requirements
File format: PDF
Copy-Protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (only limited: Kindle).
The file format PDF always displays a book page identically on any hardware. This makes PDF suitable for complex layouts such as those used in textbooks and reference books (images, tables, columns, footnotes). Unfortunately, on the small screens of e-readers or smartphones, PDFs are rather annoying, requiring too much scrolling.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our eBook Help page.