git clone https://github.com/reggiepy/LogBeetle.git
cd LogBeetle
go mod tidy
generate swagger UI
swag init -g cmd/LogBeetle/main.go
runs
go run cmd/LogBeetle/main.go
build
SET CGO_ENABLED=0
SET GOOS=windows
SET GOARCH=amd64
# go env -w CGO_ENABLED=0 GOOS=windows GOARCH=amd64
go build github.com/reggiepy/LogBeetle/cmd/LogBeetle
go build -ldflags="-s -w" github.com/reggiepy/LogBeetle/cmd/LogBeetle
build linux
SET CGO_ENABLED=0
SET GOOS=linux
SET GOARCH=amd64
# go env -w CGO_ENABLED=0 GOOS=linux GOARCH=amd64
go build cmd/LogBeetle
go build -ldflags="-s -w" github.com/reggiepy/LogBeetle/cmd/LogBeetle
sequenceDiagram
participant Client
participant HTTP
participant NSQ
participant LogBeetle
Client-->>HTTP: Client send request to send log as a message
loop HealthCheck
LogBeetle->>LogBeetle: Consumers lookup nsq topic message
end
HTTP-->>NSQ: Send log to nsq topic
Note right of LogBeetle: Consumer to handle log by nsq topic
NSQ-->>LogBeetle: LogBeetle Consumer write log to file