Quantcast
Channel:
Browsing all 285 articles
Browse latest View live

Interceptor Best Practices

This guide covers best practices and guidelines for implementing interceptors in your Goa services. Design Time Best Practices 1. Keep Interceptors Focused Interceptors should follow the single...

View Article


HTTP Transport Mapping

This section explains how service method payloads are mapped to HTTP endpoints using the HTTP transport DSL. The payload types define the shape of the data passed as arguments to service methods, while...

View Article


Error Handling

This guide explains how to handle errors in gRPC services using Goa. Error Types Status Codes gRPC uses status codes to indicate errors. Goa provides built-in mappings to these codes: Method("divide",...

View Article

Customizing Request/Response Encoding

After implementing your Concerts service, you might want to level up your API by customizing how data is encoded and decoded. Whether you need better performance with binary formats, special data...

View Article

Elegant Monolith

Goa makes it convenient to adopt the elegant monolith architecture, where all services are combined into a single codebase and run in a single process. This guide will walk you through the process of...

View Article


Cross-Origin Resource Sharing (CORS)

Cross-Origin Resource Sharing (CORS) Cross-Origin Resource Sharing (CORS) is a security feature implemented by web browsers that controls how web pages in one domain can request and interact with...

View Article

Implementing Client-Side Streaming

Once you’ve designed your client streaming endpoints using Goa’s StreamingPayload DSL, the next step is to implement both the client-side logic that handles the streaming of data and the server-side...

View Article

Generated Client

Goa Endpoint The endpoint abstraction represents a single RPC method in your service. An endpoint may be created server side to represent a method that the service implements, or client side to...

View Article


WebSocket Integration

WebSocket integration in Goa enables your services to handle real-time, bidirectional communications. This guide explains how to implement WebSocket connections in your services, progressing from basic...

View Article


Streaming

Goa provides comprehensive support for gRPC streaming, enabling you to build services that can handle continuous data transmission in real-time. This guide covers the different streaming patterns...

View Article

Single Page Application Integration

For simple applications, you can embed your React application directly into the Go binary using go:embed. This approach combines the benefits of modern frontend development with Go’s streamlined...

View Article

Services & Methods

Services A service in Goa represents a collection of related methods that work together to provide specific functionality. Services help organize your API into logical groupings. Service DSL The...

View Article

Service Metrics

Modern applications need quantitative data to understand their behavior and performance. How many requests are we handling? How long do they take? Are we running out of resources? Metrics help answer...

View Article


Generated Service Interfaces and Endpoints

Service Interfaces The first component that Goa generates is the service interface layer. This foundational layer defines both the API contract and the service implementation interface. It includes all...

View Article

Implementing Server-Side Streaming

Once you’ve designed your server streaming endpoints using Goa’s StreamingResult DSL, the next step is to implement both the server-side logic that handles the streaming of results and the client-side...

View Article


Running the Service

After designing and implementing your gRPC-based Goa service, you’ll want to run it locally and confirm it works as expected. In this tutorial, we’ll: Launch the gRPC server. Test the service using...

View Article

Running the Concerts Service

You’ve designed your API and implemented the service methods. Now it’s time to run the Concerts service and test its endpoints. 1. Start the Server From your project root, build and run your app: go...

View Article


Overriding Error Serialization

This guide explains how to customize the way errors are serialized in Goa services. Error serialization is the process of converting error objects into a format that can be transmitted over HTTP or...

View Article

JWT Authentication

JSON Web Tokens (JWT) provide a secure way to transmit claims between parties. They’re particularly useful in microservices architectures where you need to pass authentication and authorization...

View Article

Interceptor Implementation

This guide explains how to implement interceptors in Goa, focusing on the flexibility provided by the interceptor pattern and the next function. Implementation Structure Goa generates type-safe...

View Article
Browsing all 285 articles
Browse latest View live