https://github.com/luillyfe/reverse-proxy
https://github.com/luillyfe/reverse-proxy
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/luillyfe/reverse-proxy
- Owner: luillyfe
- Created: 2023-10-04T10:20:05.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-05T23:23:00.000Z (over 2 years ago)
- Last Synced: 2025-01-21T22:16:19.719Z (over 1 year ago)
- Language: Go
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Reverse Proxy
Go is a statically typed, compiled programming language design by Rob Pike, Robert Griesemer and Ken Thompson. It is syntactically similar to C, but also has memory safety, garbage collection, structural typing and CSP-style concurrency.
Go is used to build a variety of software, but we'll use it here for:
- Networking software
Go is also know for its simplicity, efficiency and scalability. A reverse proxy has many applications (uses) we just start by implementing a load balancer.
## Features
- Load balancing
## Installation
To install the **reverse-proxy**, you will need to have Go installed. You can then install the dependencies by running the following command:
`go get .`
## Documentation
For more documentation, please see the following:
- [README file](README.md)
## Examples
The folder **examples** contains three one file servers that could be use to test the capabilities of load balancing of the reverse-proxy. They are leave with the main package to easy its use.
```go
// Collecting a list of backend servers.
endpoints := []string{
// By not specifying an IP address before the colon, the server will listen
// on every IP address associated with your computer
":8081",
":8082",
":8083",
}
// Create a Load Balancer
loadBalancer := &http.ReverseProxy{
BackendService: http.BackendService{Backend: endpoints},
}
// Run the Load Balancer
loadBalancer.Run()
```
## Contributing
If you would like to contribute to the library, please fork the repository and submit a pull request.
## License
The library is licensed under the MIT License.
```
```