An open API service indexing awesome lists of open source software.

https://github.com/integralist/go-requester

HTTP service that accepts a collection of "components", fans-out requests and returns aggregated content
https://github.com/integralist/go-requester

Last synced: over 1 year ago
JSON representation

HTTP service that accepts a collection of "components", fans-out requests and returns aggregated content

Awesome Lists containing this project

README

          

Go-Requester




HTTP service that accepts a collection of "components"
then fans-out requests and returns aggregated content

## Summary

- Components should be defined in a YAML page configuration file
- Components are requested concurrently via goroutines
- Components can be marked as "mandatory" (if they fail, the request summary is set to "failure")

## Example Page Config

```yaml
components:
- id: google
url: http://google.com
- id: integralist
url: http://integralist.co.uk
mandatory: true
- id: not-found
url: http://httpstat.us/404
- id: timeout
url: http://httpstat.us/408
- id: server-error
url: http://httpstat.us/500
- id: service-unavailable
url: http://httpstat.us/503
```

> Note:
> example config provided as part of this repo
> `./config/page.yaml`

## Example JSON Output

```json
{
"summary": "success",
"components": [
{
"id": "google",
"status": 200,
"body": " ...