Skip to content

GoBuzz is an example of an HTTP server providing REST API functionality using in-memory storage.

Notifications You must be signed in to change notification settings

michalgosek/gobuzz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

gobuzz

GoBuzz is an example of an HTTP server providing REST API functionality using in-memory storage. Project has been inspired by @katezien speech about hex-domain architecture. Application is currently in build process. Used: HTTP light-weight router @chi, BDD framework: @Ginkgo together with matcher/assertion library @Gomega.

Assumptions:

  1. Server is listining on localhost with port 8080
  2. Payload has been limited up to 1 MB per POST request
  3. Worker has five seconds tiemout for fetching URL
  4. Worker fetches data in background with provided interval time in seconds.
  5. Request ID must be an int value.

Creating new Post Request:

curl -si 127.0.0.1:8080/api/fetcher -X POST -d '{"url": "https://httpbin.org/range/15","interval":60}'

For testing purposes only https://httpbin.org/range or https://httpbin.org.delay path are accepted. If duration for fetching url content will be longer than 5s inside response storage response record will be stored as nil value.

In progress:

  1. Adding rest of funcionality for handling PUT, DELETE requests.
  2. Listing global history of created requests and specific fetch response storage data.

About

GoBuzz is an example of an HTTP server providing REST API functionality using in-memory storage.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages