From 6f9c74a854496cfe1a9aa97180b7a61a0f1c8aad Mon Sep 17 00:00:00 2001 From: kenriortega Date: Tue, 6 Jul 2021 16:08:41 -0400 Subject: [PATCH] update files for release ci --- .github/workflows/release.yml | 2 +- cmd/LICENCE | 21 ++++++++++++++++++ cmd/README.md | 42 +++++++++++++++++++++++++++++++++++ 3 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 cmd/LICENCE create mode 100644 cmd/README.md diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index de45ecd..15f5a9a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,4 +25,4 @@ jobs: project_path: "./cmd/" binary_name: "goproxy" ldflags: "-s -w" - extra_files: LICENSE Readme.md \ No newline at end of file + extra_files: LICENSE README.md \ No newline at end of file diff --git a/cmd/LICENCE b/cmd/LICENCE new file mode 100644 index 0000000..9948726 --- /dev/null +++ b/cmd/LICENCE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Egosystem + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/cmd/README.md b/cmd/README.md new file mode 100644 index 0000000..5e51de7 --- /dev/null +++ b/cmd/README.md @@ -0,0 +1,42 @@ +# GOproxy +PoC for learning how work proxy and load balancer like nginx server + + +## GOproxy command + +> Build + +```bash +make build +``` + +> Start Proxy server first time + +`genkey` command in true generate random secretkey storaged on badgerdb on `badger.data` + +```bash +./goproxy -portProxy 5000 -genkey true +``` + +> Start Proxy server + +```bash +./goproxy -portProxy 5001 +``` + +> Start load balancer + +```bash +./goproxy -type lb --backends "http://localhost:5000,http://localhost:5001,http://localhost:5002" +``` + +> Start API PoC service + +```bash +go run services/micro-a/api.go --port +``` + +Install badger db on window if you don`t use CGO +```bash +CGO_ENABLED=0 go get github.com/dgraph-io/badger/v3 +```