Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TRAF. 1451 add ack broker and remove dingo #16

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:
test:
strategy:
matrix:
go-version: [1.13.x]
go-version: [1.17.x]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
env:
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@
*.out

# Ignore generated files
pkg/generatedServices
bin
sockets
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.13-buster AS build
FROM golang:1.17-buster AS build

RUN apt-get update \
&& apt-get install -y protobuf-compiler
Expand Down
6 changes: 2 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,17 @@ TAG ?= dev

generate-proto:
protoc -I proto/ proto/middleware.proto --go_out=plugins=grpc:proto
protoc -I proto/ proto/broker.proto --go_out=plugins=grpc:proto
dep:
go get -u github.com/rakyll/gotest
go get -u github.com/sarulabs/dingo/dingo
go get -u github.com/vektra/mockery/.../
go get -u github.com/golang/protobuf/proto
go get -u github.com/golang/protobuf/protoc-gen-go
go get -u github.com/golang/protobuf/protoc-gen-go@v1.3.2
go get -u google.golang.org/grpc
go mod download
build: dep generate-proto
dingo -src="./pkg/services" -dest="./pkg/generatedServices"
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -ldflags="-w -s" -o bin/homing-pigeon pkg/main.go
stress-build: dep generate-proto
dingo -src="./pkg/services" -dest="./pkg/generatedServices"
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -ldflags="-w -s" -o bin/stress-pigeon pkg/stress/main.go
docker-build:
docker build -t softonic/homing-pigeon:${TAG} .
Expand Down
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,14 @@ In order to start up correctly, it needs well defined environment variables:

##### Core

| Name | Value |
| ------------------------------------ | -------------------------------------------------------------------------- |
| MESSAGE_BUFFER_LENGTH | Buffer length for internal golang channel used for messaging |
| ACK_BUFFER_LENGTH | Buffer length for internal golang channel used for acks |
| MIDDLEWARES_SOCKET | Socket to connect to middlewares. Ex: passthrough:///unix://tmp/test.sock" |
| Name | Value |
|-----------------------|----------------------------------------------------------------------------|
| MESSAGE_BUFFER_LENGTH | Buffer length for internal golang channel used for messaging |
| ACK_BUFFER_LENGTH | Buffer length for internal golang channel used for acks |
paupm marked this conversation as resolved.
Show resolved Hide resolved
| MIDDLEWARES_SOCKET | Socket to connect to middlewares. Ex: passthrough:///unix://tmp/test.sock" |
| READ_ADAPTER | Read interface implementation. Default: AMQP |
| WRITE_ADAPTER | Write interface implementation. Default: ELASTIC |
| RESPONSE_BROKER_PORT | TCP port where broker will emit each response Ex: ":12345" |

##### Read Adapters

Expand Down
3 changes: 3 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ services:
GRPC_GO_LOG_VERBOSITY_LEVEL: 99
GRPC_GO_LOG_SEVERITY_LEVEL: info
MIDDLEWARES_SOCKET: "passthrough:///unix:///tmp/hp"
READ_ADAPTER: "AMQP"
WRITE_ADAPTER: "ELASTIC"
RESPONSE_BROKER_PORT: ":8090"
hp-middleware-pass:
volumes:
- ./sockets:/tmp
Expand Down
46 changes: 28 additions & 18 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,37 @@ module github.com/softonic/homing-pigeon

require (
github.com/elastic/go-elasticsearch/v7 v7.10.0
github.com/gobuffalo/envy v1.9.0 // indirect
github.com/gobuffalo/packd v1.0.0 // indirect
github.com/gobuffalo/packr v1.30.1 // indirect
github.com/golang/protobuf v1.4.3
github.com/golangci/golangci-lint v1.33.0 // indirect
github.com/rakyll/gotest v0.0.5 // indirect
github.com/rogpeppe/go-internal v1.6.2 // indirect
github.com/golang/protobuf v1.5.2
github.com/google/uuid v1.3.0
github.com/sarulabs/dingo v2.0.0+incompatible
github.com/streadway/amqp v1.0.0
github.com/stretchr/testify v1.7.0
google.golang.org/grpc v1.44.0
google.golang.org/protobuf v1.27.1
k8s.io/klog v1.0.0
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/google/go-cmp v0.5.5 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rakyll/gotest v0.0.6 // indirect
github.com/stretchr/objx v0.3.0 // indirect
github.com/stretchr/testify v1.6.1
github.com/vektra/mockery v1.1.2 // indirect
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b // indirect
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 // indirect
golang.org/x/text v0.3.4 // indirect
golang.org/x/tools v0.0.0-20201121010211-780cb80bd7fb // indirect
google.golang.org/genproto v0.0.0-20201119123407-9b1e624d6bc4 // indirect
google.golang.org/grpc v1.33.2
google.golang.org/protobuf v1.25.0
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect
k8s.io/klog v1.0.0
golang.org/x/mod v0.5.1 // indirect
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect
golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/tools v0.1.9 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350 // indirect
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
)

go 1.13
go 1.17
Loading