Skip to content

xiy/charon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Charon

About

Charon is designed to act as an API Gateway for a service-oriented architecture. It's my first personal attempt at a useful piece of software written in Go. Because of that, the code might not be great and there will be little to no testing.

Architecture

Charon acts as both a router and a proxy. Given a set of defined services that each have a defined routing rule, it will proxy any HTTP requests that match a rule to the respective service.

Config

Config is handled entirely through a TOML-based config file. It's very simple and has only a few options:

port = "9000"
service_timeout = "30s"

[services]
  [services.member]
  url = "http://users.charon.io"
  prefix = "/users/*"
  

The value for prefix is important, as it defines how the internal router will route requests to each specific service. With the above config, any request to http://gateway.charon.io with a path that matches /users, e.g. http://gateway.charon.io/users/1 will be proxied to the service at http://users.charon.io/users/1.

About

An HTTP reverse proxy and router, or API Gateway, written in Go

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages