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
Copy file name to clipboardExpand all lines: docs/architecture.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ Frame is a fast, extensible Go framework built around a minimal core `Service` a
9
9
10
10
## Mental Model
11
11
12
-
Frame bootstraps a `Service` that owns shared runtime state and managers. Options configure the service and register startup hooks. The service then starts HTTP/gRPC servers, background workers, and pluggable components.
12
+
Frame bootstraps a `Service` that owns shared runtime state and managers. Options configure the service and register startup hooks. The service then starts the HTTP server, background workers, and pluggable components.
Copy file name to clipboardExpand all lines: docs/server.md
+10-27Lines changed: 10 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
-
# HTTP and gRPC Server
1
+
# HTTP Server
2
2
3
-
Frame provides an HTTP server with optional gRPC sidecar support. The server layer is configured via `Service` options and environment-based config interfaces.
3
+
Frame provides an HTTP server with configurable lifecycle and transport limits. The server layer is configured via `Service` options and environment-based config interfaces.
4
4
5
5
## HTTP Server Basics
6
6
@@ -40,24 +40,6 @@ _ = svc.Run(ctx, ":8080")
40
40
- Default path: `/healthz`
41
41
- Register custom checks using `AddHealthCheck`.
42
42
43
-
## gRPC Server
44
-
45
-
```go
46
-
grpcServer:= grpc.NewServer()
47
-
48
-
ctx, svc:= frame.NewService(
49
-
frame.WithHTTPHandler(http.DefaultServeMux),
50
-
frame.WithGRPCServer(grpcServer),
51
-
frame.WithGRPCPort(":50051"),
52
-
)
53
-
54
-
_ = svc.Run(ctx, ":8080")
55
-
```
56
-
57
-
Optional:
58
-
-`WithEnableGRPCServerReflection()`
59
-
-`WithGRPCServerListener(listener net.Listener)`
60
-
61
43
## HTTP/2 Support
62
44
63
45
Frame configures HTTP/2 support automatically:
@@ -82,12 +64,13 @@ type ServerDriver interface {
82
64
83
65
You can inject a custom driver with `WithDriver` for testing or custom transport.
84
66
85
-
## Default HTTP Timeouts
86
-
87
-
These defaults are hard-coded in `service.go`:
67
+
## Default HTTP Limits
88
68
89
-
- Read timeout: 5s
90
-
- Write timeout: 10s
91
-
- Idle timeout: 90s
69
+
These defaults are configurable via `config.ConfigurationHTTPServer` and environment variables:
0 commit comments