Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from boschrexroth/feature/ver21
Feature/ver21
- Loading branch information
Showing
394 changed files
with
16,074 additions
and
10,036 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# EditorConfig is awesome: https://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = false | ||
insert_final_newline = false | ||
|
||
[*] | ||
insert_final_newline = true | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[{go.mod,go.sum,*.go,.gitmodules}] | ||
indent_style = tab | ||
indent_size = 4 | ||
|
||
[*.md] | ||
indent_size = 4 | ||
trim_trailing_whitespace = false | ||
eclint_indent_style = unset | ||
|
||
[{Makefile,**.mk}] | ||
# Use tabs for indentation (Makefiles require tabs) | ||
indent_style = tab | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,60 @@ | ||
PROJECT_NAME := "ctrlx-datalayer-golang" | ||
PKG := "github.com/boschrexroth/$(PROJECT_NAME)" | ||
PKG_LIST := ./pkg/datalayer ./pkg/sseclient ./pkg/token | ||
COV_PKG_LIST := ./pkg/datalayer,./pkg/sseclient,./pkg/token | ||
TST_LIST := ./test/datalayer ./test/sseclient ./test/token | ||
GO_FILES := $(shell find . -name '*.go' | grep -v /vendor/ | grep -v _test.go) | ||
GOOS := $(shell go env GOOS) | ||
GOARCH := $(shell go env GOARCH) | ||
BUILD := build/public/$(GOOS)_$(GOARCH) | ||
|
||
DATALAYER_DEB_VERSION := 2.2.0 | ||
DATALAYER_DEB_FILE_VERSION := 2.2.7 | ||
|
||
.PHONY: all go-dep apt-dep lint vet test test-coverage build clean | ||
|
||
all: build | ||
|
||
go-dep: ## Get go dependencies | ||
@go mod download | ||
@go mod vendor | ||
|
||
apt-dep: ## Get native dependencies | ||
@sudo apt-get update | ||
@sudo apt-get install -y libsystemd-dev libzmq3-dev | ||
@wget --quiet https://github.com/boschrexroth/ctrlx-automation-sdk/releases/download/$(DATALAYER_DEB_VERSION)/ctrlx-datalayer-${DATALAYER_DEB_FILE_VERSION}.deb | ||
@sudo apt-get install -y -f ./ctrlx-datalayer-${DATALAYER_DEB_FILE_VERSION}.deb | ||
@rm ctrlx-datalayer-${DATALAYER_DEB_FILE_VERSION}.deb | ||
|
||
lint: ## Lint Golang files | ||
@golangci-lint run | ||
|
||
vet: ## Run go vet | ||
@go vet $(PKG_LIST) | ||
|
||
test: ## Run unittests | ||
@go test -race -short -count=1 -mod=vendor $(TST_LIST) | ||
|
||
memprofile: ## Run memory profiler | ||
@go test -race -short -count=1 -mod=vendor $(TST_LIST) -memprofile mem.pprof -memprofilerate 1 | ||
@go tool pprof -http=:8080 mem.pprof | ||
|
||
cpuprofile: ## Run cpu profiler | ||
@go test -race -short -count=1 -mod=vendor $(TST_LIST) -cpuprofile cpu.pprof | ||
@go tool pprof -http=:8080 cpu.pprof | ||
|
||
testcover: ## Run unittests with coverage 'go tool cover -html=coverage.out -o coverage.html' | ||
@go test -race -short -count=1 -mod=vendor -coverpkg=$(COV_PKG_LIST) -coverprofile=coverage.out -covermode=atomic $(TST_LIST) | ||
|
||
build: go-dep ## Build the samples | ||
@CGO_ENABLED=1 go build -mod=vendor -o $(BUILD)/datalayer ./cmd/datalayer | ||
@CGO_ENABLED=1 go build -mod=vendor -o $(BUILD)/benchmark ./cmd/benchmark | ||
|
||
clean: ## Remove previously build samples | ||
@rm -rf $(BUILD)/* | ||
|
||
help: ## Display this help screen | ||
@grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | ||
PROJECT_NAME := "ctrlx-datalayer-golang" | ||
PKG := "github.com/boschrexroth/$(PROJECT_NAME)" | ||
PKG_LIST := ./pkg/datalayer ./pkg/sseclient ./pkg/token | ||
COV_PKG_LIST := ./pkg/datalayer,./pkg/sseclient,./pkg/token | ||
TST_LIST := ./test/datalayer ./test/sseclient ./test/token | ||
GO_FILES := $(shell find . -name '*.go' | grep -v /vendor/ | grep -v _test.go) | ||
GOOS := $(shell go env GOOS) | ||
GOARCH := $(shell go env GOARCH) | ||
BUILD := build/public/$(GOOS)_$(GOARCH) | ||
|
||
DATALAYER_DEB_VERSION := 2.4.0 | ||
DATALAYER_DEB_FILE_VERSION := 2.4.5 | ||
|
||
.PHONY: all go-dep apt-dep lint vet test test-coverage build clean | ||
|
||
all: build | ||
|
||
go-dep: ## Get go dependencies | ||
@go mod download | ||
@go mod vendor | ||
|
||
apt-dep: ## Get native dependencies | ||
@sudo apt-get update | ||
@sudo apt-get install -y libsystemd-dev libzmq3-dev | ||
@wget --quiet https://github.com/boschrexroth/ctrlx-automation-sdk/releases/download/$(DATALAYER_DEB_VERSION)/ctrlx-datalayer-${DATALAYER_DEB_FILE_VERSION}.deb | ||
@sudo apt-get install -y -f ./ctrlx-datalayer-${DATALAYER_DEB_FILE_VERSION}.deb | ||
@rm ctrlx-datalayer-${DATALAYER_DEB_FILE_VERSION}.deb | ||
|
||
lint: ## Lint Golang files | ||
@golangci-lint run | ||
|
||
vet: ## Run go vet | ||
@go vet $(PKG_LIST) | ||
|
||
test: ## Run unittests | ||
@go test -race -short -count=1 -mod=vendor $(TST_LIST) | ||
|
||
memprofile: ## Run memory profiler | ||
@go test -race -short -count=1 -mod=vendor $(TST_LIST) -memprofile mem.pprof -memprofilerate 1 | ||
@go tool pprof -http=:8080 mem.pprof | ||
|
||
cpuprofile: ## Run cpu profiler | ||
@go test -race -short -count=1 -mod=vendor $(TST_LIST) -cpuprofile cpu.pprof | ||
@go tool pprof -http=:8080 cpu.pprof | ||
|
||
testcover: ## Run unittests with coverage 'go tool cover -html=coverage.out -o coverage.html' | ||
@go test -race -short -count=1 -mod=vendor -coverpkg=$(COV_PKG_LIST) -coverprofile=coverage.out -covermode=atomic $(TST_LIST) | ||
|
||
testreport: ## Run unittests with coverage 'go tool cover -html=coverage.out -o coverage.html' and junit report | ||
@go test -v 2>&1 -race -short -count=1 -mod=vendor -coverpkg=$(COV_PKG_LIST) -coverprofile=coverage.out -covermode=atomic $(TST_LIST) | go-junit-report -set-exit-code > test-results.junit.xml | ||
|
||
build: go-dep ## Build the samples | ||
@CGO_ENABLED=1 go build -mod=vendor -o $(BUILD)/datalayer ./cmd/datalayer | ||
@CGO_ENABLED=1 go build -mod=vendor -o $(BUILD)/benchmark ./cmd/benchmark | ||
|
||
clean: ## Remove previously build samples | ||
@rm -rf $(BUILD)/* | ||
|
||
help: ## Display this help screen | ||
@grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
module github.com/boschrexroth/ctrlx-datalayer-golang | ||
module github.com/boschrexroth/ctrlx-datalayer-golang/v2 | ||
|
||
go 1.19 | ||
go 1.21 | ||
|
||
require ( | ||
github.com/google/flatbuffers v23.5.26+incompatible | ||
github.com/loov/hrtime v1.0.3 | ||
github.com/loov/hrtime/hrplot v1.0.2 | ||
github.com/oliveagle/jsonpath v0.0.0-20180606110733-2e52cf6e6852 | ||
github.com/stretchr/testify v1.7.0 | ||
github.com/stretchr/testify v1.8.4 | ||
gopkg.in/yaml.v2 v2.4.0 | ||
) | ||
|
||
require ( | ||
github.com/davecgh/go-spew v1.1.0 // indirect | ||
github.com/loov/plot v0.0.0-20200413101321-e09a6f01d2f5 // indirect | ||
github.com/davecgh/go-spew v1.1.1 // indirect | ||
github.com/loov/plot v0.0.0-20230104081220-6b3108899f6e // indirect | ||
github.com/pmezard/go-difflib v1.0.0 // indirect | ||
gopkg.in/yaml.v3 v3.0.0 // indirect | ||
gopkg.in/yaml.v3 v3.0.1 // indirect | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,24 @@ | ||
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= | ||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= | ||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= | ||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= | ||
github.com/google/flatbuffers v23.5.26+incompatible h1:M9dgRyhJemaM4Sw8+66GHBu8ioaQmyPLg1b8VwK5WJg= | ||
github.com/google/flatbuffers v23.5.26+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= | ||
github.com/loov/hrtime v1.0.1/go.mod h1:yDY3Pwv2izeY4sq7YcPX/dtLwzg5NU1AxWuWxKwd0p0= | ||
github.com/loov/hrtime v1.0.3 h1:LiWKU3B9skJwRPUf0Urs9+0+OE3TxdMuiRPOTwR0gcU= | ||
github.com/loov/hrtime v1.0.3/go.mod h1:yDY3Pwv2izeY4sq7YcPX/dtLwzg5NU1AxWuWxKwd0p0= | ||
github.com/loov/hrtime/hrplot v1.0.2 h1:y9c7g1ao5AQOLzJxo4PLhAdFG0ehPIIy5eP6g9ymczc= | ||
github.com/loov/hrtime/hrplot v1.0.2/go.mod h1:9t65xYn4d42ntjv40Wt5lbU72/VC5S0zGDgjC8kD5BU= | ||
github.com/loov/plot v0.0.0-20200413101321-e09a6f01d2f5 h1:pzQgy0g937iWmXKKEM8uaDRL9oxB2+1hVAfV5hJ+yIA= | ||
github.com/loov/plot v0.0.0-20200413101321-e09a6f01d2f5/go.mod h1:gSrhfSMoiPGG0CZ9E66kXjaHxFw0fzJhooyicOnz5z4= | ||
github.com/loov/plot v0.0.0-20230104081220-6b3108899f6e h1:kJM0h0L+WIFj/jFnJ0EG/yZqen50QC1huXeFmIxPvFE= | ||
github.com/loov/plot v0.0.0-20230104081220-6b3108899f6e/go.mod h1:y6pmRyrXJv2rEkDfcgqSuzLOOCT3voWvegA3G9H0dGI= | ||
github.com/oliveagle/jsonpath v0.0.0-20180606110733-2e52cf6e6852 h1:Yl0tPBa8QPjGmesFh1D0rDy+q1Twx6FyU7VWHi8wZbI= | ||
github.com/oliveagle/jsonpath v0.0.0-20180606110733-2e52cf6e6852/go.mod h1:eqOVx5Vwu4gd2mmMZvVZsgIqNSaW3xxRThUJ0k/TPk4= | ||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= | ||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= | ||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= | ||
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= | ||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= | ||
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= | ||
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= | ||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= | ||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= | ||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= | ||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= | ||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= | ||
gopkg.in/yaml.v3 v3.0.0 h1:hjy8E9ON/egN1tAYqKb61G10WtihqetD4sz2H+8nIeA= | ||
gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= | ||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= | ||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.