Skip to content

Commit dbd3b6a

Browse files
committed
docs: remove API doc from example doc
1 parent 11f8ad5 commit dbd3b6a

File tree

1 file changed

+0
-39
lines changed

1 file changed

+0
-39
lines changed

docs/EXAMPLE.md

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
- [Fastify](#fastify)
66
- [Koa](#koa)
77
- [HTTP Server](#http-server)
8-
- [GracefulServer](#gracefulserver)
9-
- [IGracefulServerOptions](#igracefulserveroptions)
10-
- [GracefulServer Instance](#gracefulserver-instance)
118

129

1310
## ExpressJS
@@ -185,39 +182,3 @@ server.listen(8080, async () => {
185182
gracefulServer.setReady()
186183
})
187184
```
188-
189-
## GracefulServer
190-
191-
```typescript
192-
;((server: http.Server, options?: IGracefulServerOptions | undefined) => IGracefulServer) & typeof State
193-
```
194-
195-
where `State` is an enum that contains, `STARTING`, `READY`, `SHUTTING_DOWN` and `SHUTDOWN`.
196-
197-
## IGracefulServerOptions
198-
199-
All of the below options are optional.
200-
201-
| Name | Type | Default | Description |
202-
| ----------------- | :------------------------: | :-----: | ---------------------------------------------------------------: |
203-
| syncClose | boolean | false | Run the closePromises in a series. |
204-
| closePromises | (() => Promise<unknown>)[] | [] | The functions to run when the API is stopping |
205-
| timeout | number | 1000 | The time in milliseconds to wait before shutting down the server |
206-
| healthCheck | boolean | true | Enable/Disable the default endpoints (liveness and readiness) |
207-
| kubernetes | boolean | false | Enable/Disable the kubernetes mode |
208-
| livenessEndpoint | string | /live | The liveness endpoint |
209-
| readinessEndpoint | string | /ready | The readiness endpoint |
210-
211-
If you use Kubernetes, enable the kubernetes mode to let it handles the incoming traffic of your application.
212-
213-
The Kubernetes mode will only work if you haven't disabled the health checks.
214-
215-
## GracefulServer Instance
216-
217-
```typescript
218-
export default interface IGracefulServer {
219-
isReady: () => boolean
220-
setReady: () => void
221-
on: (name: string, callback: (...args: any[]) => void) => EventEmitter
222-
}
223-
```

0 commit comments

Comments
 (0)