Skip to content
This repository was archived by the owner on Jul 4, 2024. It is now read-only.

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

API Gateway

An api gateway for Go Micro services

Overview

The API gateway dynamically serves requests via HTTP json to go-micro services using path based resolution.

Example

The request http://localhost:8080/helloworld/call will route to the service go.micro.helloworld and endpoint Helloworld.Call.

For differing handlers

The request http://localhost:8080/helloworld/Greeter/Call will route to the service go.micro.helloworld and endpoint Greeter.Call

Usage

Install

go install github.com/go-micro/api/cmd/api

Run (listens on :8080)

api

To test it in Postman, create Post request with url http://localhost:8080/helloworld/Greeter/Call, use x-www-form-urlencoded format, that's all. Notice: latest code in go-micro master branch supports this way, if not it will report a ill-formed: POST error.

TODO

  • Enable changing registry, client/server, etc
  • Enable setting endpoints manually via RPC

About

Go Micro API Gateway

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages