You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -367,4 +367,4 @@ class RBACInterceptor(grpc.ServerInterceptor):
367
367
returnFalse
368
368
```
369
369
370
-
gRPC's flexible authentication system allows you to implement secure, scalable authentication patterns that work across different environments and use cases.
370
+
gRPC's flexible authentication system allows you to implement secure, scalable authentication patterns that work across different environments and use cases.
This ensures that any changes to your gRPC services are automatically reflected in your SDKs and documentation, maintaining consistency across your entire API ecosystem.
472
+
This ensures that any changes to your gRPC services are automatically reflected in your SDKs and documentation, maintaining consistency across your entire API ecosystem.
Copy file name to clipboardExpand all lines: fern/products/api-def/grpc-pages/servers.mdx
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ subtitle: Set up and configure gRPC servers for production deployments
6
6
7
7
gRPC servers can be configured with various options for security, performance, and scalability. Proper server configuration is crucial for production deployments.
8
8
9
-
## Basic Server Setup
9
+
## Basic server setup
10
10
11
11
Set up a basic gRPC server with multiple services:
12
12
@@ -41,7 +41,7 @@ if __name__ == '__main__':
41
41
server.wait_for_termination()
42
42
```
43
43
44
-
## TLS Configuration
44
+
## TLS configuration
45
45
46
46
Configure TLS for secure production deployments:
47
47
@@ -78,7 +78,7 @@ def create_secure_server():
78
78
return server
79
79
```
80
80
81
-
## Server Options
81
+
## Server options
82
82
83
83
Configure various server options for performance and behavior:
Copy file name to clipboardExpand all lines: fern/products/api-def/grpc-pages/services/grpc-services.mdx
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ subtitle: Define gRPC services with RPCs, messages, and Protocol Buffer schemas
5
5
6
6
gRPC services are the core building blocks of your API. Each service defines a collection of remote procedure calls (RPCs) that clients can invoke, along with the message types used for requests and responses.
7
7
8
-
## Service Definition
8
+
## Service definition
9
9
10
10
Define a gRPC service in a `.proto` file:
11
11
@@ -79,7 +79,7 @@ enum ThemeMode {
79
79
}
80
80
```
81
81
82
-
## Request and Response Messages
82
+
## Request and response messages
83
83
84
84
Define clear request and response message types:
85
85
@@ -147,7 +147,7 @@ message SearchMetadata {
147
147
}
148
148
```
149
149
150
-
## Service Implementation
150
+
## Service implementation
151
151
152
152
Implement the service in your preferred language:
153
153
@@ -335,9 +335,9 @@ class UserServiceServicer(user_service_pb2_grpc.UserServiceServicer):
335
335
return user_service_pb2.SearchUsersResponse()
336
336
```
337
337
338
-
## Protocol Buffer Best Practices
338
+
## Protocol buffer best practices
339
339
340
-
### Field Numbers
340
+
### Field numbers
341
341
- Use field numbers 1-15 for frequently used fields (more efficient encoding)
342
342
- Reserve field numbers for removed fields to maintain compatibility
343
343
- Never reuse field numbers
@@ -359,7 +359,7 @@ message User {
359
359
}
360
360
```
361
361
362
-
### Naming Conventions
362
+
### Naming conventions
363
363
- Use `snake_case` for field names
364
364
- Use `PascalCase` for message and service names
365
365
- Use `UPPER_SNAKE_CASE` for enum values
@@ -392,7 +392,7 @@ package userservice.v1; // Version in package name
392
392
option go_package = "example.com/userservice/v1";
393
393
```
394
394
395
-
## Multiple Services
395
+
## Multiple services
396
396
397
397
Organize related functionality into separate services:
0 commit comments