Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/davidebianchi/echo-service
An echo service written in go
https://github.com/davidebianchi/echo-service
echo-server golang
Last synced: about 2 months ago
JSON representation
An echo service written in go
- Host: GitHub
- URL: https://github.com/davidebianchi/echo-service
- Owner: davidebianchi
- License: mit
- Created: 2021-03-17T17:49:22.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-03-28T16:39:49.000Z (almost 2 years ago)
- Last Synced: 2024-10-12T12:35:08.464Z (3 months ago)
- Topics: echo-server, golang
- Language: Go
- Homepage:
- Size: 4.48 MB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Golang high performance echo service
To install, use the docker image `davidebianchi/echo-service`
## Usage
The service is very easy to set up.
It has only 3 optional env vars:
* `HTTP_PORT` (default set to *8080*): the port listening for http requests
* `LOG_LEVEL` (default set to *info*): the log level of the service
* `RESPONSE_DELAY`: the delay in `time.Duration` format between the request and the response. e.g. `1s`, `10s`An example response of the service, running locally on :8080 and contacting it with `GET` method with query `foo=bar` on path `/my-path`:
```json
{
"request": {
"headers": {
"Accept": "text/html",
"Host": "localhost:8080",
},
"query": {
"foo": "bar"
},
"path": "/my-path",
"method": "GET"
}
}
```With `POST` method and a request body, instead:
An example response of the service, running locally on :8080 and contacting it with query `foo=bar` on path `/my-path`:
```json
{
"request": {
"headers": {
"Accept": "text/html",
"Host": "localhost:8080",
},
"query": {
"foo": "bar"
},
"path": "/my-path",
"method": "POST",
"body": "my request body"
}
}
```