mirror of
https://github.com/nabbar/golib.git
synced 2025-12-24 11:51:02 +08:00
Rework Monitoring, Prometheus, Status system
Package Monitoring : - use packag dedicated to monitor component - each monitor work as standalone server to monitor health - collect metrics to export them to prometheus exporter Package Prometheus : - review to simplify use for API and not API metrics - optimize code Package Status : - Rework to use Monitor package - Rework to use native json / text Marshaller interface Context : - rework context config (context var) to use sync map and sync RWMutex (WORM) - move gin context to dedicated sub package (dependancies of logger make circular dependencies) - optimize code Config : - rework to optimize sync / collect of component - rework status to monitor - remove monitor managment from config to each component - add a func to set default logger to implement inherit default logger options - optimize code IOUtils : - isolate logger / closer interface as a usable & public interface & instance - this interface / instance allow to collect io.closer over a context to close all if context is done Logger : - rework to use context.config map - rework to use ioutils closer - rework to allow options to inherit a default options, or the last version of options - optimize code Size : - Add package Size to calculate and manipulate size Byte or bit - Add encoding : Text/JSON/Yaml/Toml... - Add option to défine default unit : Byte or bit Other : - adjust following code - optimize code - limit use of atomic value - rework to use RWMutex instead of sync.Mutex to maximize capabilities of read instead of write - remove 32bit build for CI/CD - add darwin/arm64 build for CI/CD Bump Dependencies
This commit is contained in:
32
.github/workflows/go.yml
vendored
32
.github/workflows/go.yml
vendored
@@ -93,43 +93,21 @@ jobs:
|
||||
continue-on-error: false
|
||||
run: sudo apt-get install gcc-multilib gcc-mingw-w64
|
||||
|
||||
- name: Test Build Linux/amd64 with suffix
|
||||
- name: Test Build Linux/amd64 with suffix/CGO
|
||||
continue-on-error: false
|
||||
run: |
|
||||
CGO_ENABLED=0
|
||||
GOOS=linux
|
||||
GOARCH=amd64
|
||||
GOAMD64=v4
|
||||
IGNORE_BUILD=$(sed '/^[[:space:]]*$/d' "build.$(go env | grep GOARCH | cut -d'=' -f2 | tr -d '"')" | tr '\n' '|')
|
||||
go build -a -v -installsuffix cgo -ldflags "-w -s -extldflags '-static' " $(go list ./... | grep -vPi ${IGNORE_BUILD::-1})
|
||||
|
||||
- name: Test Build Linux/386 with suffix
|
||||
continue-on-error: false
|
||||
run: |
|
||||
CGO_ENABLED=0
|
||||
GOOS=linux
|
||||
GOARCH=386
|
||||
IGNORE_BUILD=$(sed '/^[[:space:]]*$/d' "build.$(go env | grep GOARCH | cut -d'=' -f2 | tr -d '"')" | tr '\n' '|')
|
||||
go build -a -v -installsuffix cgo -ldflags "-w -s -extldflags '-static' " $(go list ./... | grep -vPi ${IGNORE_BUILD::-1})
|
||||
CGO_ENABLED=1 GOOS=linux GOARCH=amd64 GOAMD64=v4 go build -a -v -race -installsuffix cgo -ldflags "-w -s -extldflags '-static' " $(go list ./... | grep -vPi ${IGNORE_BUILD::-1})
|
||||
|
||||
- name: Test Build Windows/amd64 with CGO
|
||||
continue-on-error: false
|
||||
run: |
|
||||
CC=/usr/bin/x86_64-w64-mingw32-gcc
|
||||
CGO_ENABLED=1
|
||||
GOOS=windows
|
||||
GOARCH=amd64
|
||||
GOAMD64=v4
|
||||
IGNORE_BUILD=$(sed '/^[[:space:]]*$/d' "build.$(go env | grep GOARCH | cut -d'=' -f2 | tr -d '"')" | tr '\n' '|')
|
||||
go build -a -v -ldflags "-w -s -extldflags '-static' " $(go list ./... | grep -vPi ${IGNORE_BUILD::-1})
|
||||
CC=/usr/bin/x86_64-w64-mingw32-gcc CGO_ENABLED=1 GOOS=windows GOARCH=amd64 GOAMD64=v4 go build -a -v -ldflags "-w -s -extldflags '-static' " $(go list ./... | grep -vPi ${IGNORE_BUILD::-1})
|
||||
|
||||
- name: Test Build Windows/386 with CGO
|
||||
- name: Test Build Darwin/arm64 with suffix/CGO
|
||||
continue-on-error: false
|
||||
run: |
|
||||
CC=/usr/bin/i686-w64-mingw32-gcc
|
||||
CGO_ENABLED=1
|
||||
GOOS=windows
|
||||
GOARCH=386
|
||||
IGNORE_BUILD=$(sed '/^[[:space:]]*$/d' "build.$(go env | grep GOARCH | cut -d'=' -f2 | tr -d '"')" | tr '\n' '|')
|
||||
go build -a -v -ldflags "-w -s -extldflags '-static' " $(go list ./... | grep -vPi ${IGNORE_BUILD::-1})
|
||||
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 GOAMD64=v1 go build -a -v -ldflags "-w -s -extldflags '-static' " $(go list ./... | grep -vPi ${IGNORE_BUILD::-1})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user