https://github.com/warchant/go-grpc-health
Tiny binary, which checks if grpc server is started or not
https://github.com/warchant/go-grpc-health
go grpc health healthcheck
Last synced: 4 months ago
JSON representation
Tiny binary, which checks if grpc server is started or not
- Host: GitHub
- URL: https://github.com/warchant/go-grpc-health
- Owner: Warchant
- License: apache-2.0
- Created: 2018-10-14T16:36:32.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-06-30T03:16:07.000Z (almost 4 years ago)
- Last Synced: 2025-01-15T08:04:22.468Z (5 months ago)
- Topics: go, grpc, health, healthcheck
- Language: Go
- Homepage:
- Size: 2.8 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-grpc-health
Simple binary, which checks if grpc server is started or not# Build
As any GO package.
If you're not familiar with go or don't have golang installed in a system, then run:
```bash
$ ./build.sh
```This script should produce static binary `go-grpc-health` for your host OS.
### Crosscompilation
You also can produce binary from any os for any other OS, thanks to GO:
```bash
$ uname
Darwin$ GOOS=linux ./build.sh
$ file go-grpc-health
go-grpc-health: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, not stripped$ GOOS=windows ./build.sh
$ file go-grpc-health.exe
go-grpc-health.exe: PE32+ executable (console) x86-64 (stripped to external PDB), for MS Windows$ GOOS=darwin ./build.sh
$ file go-grpc-health
go-grpc-health: Mach-O 64-bit executable x86_64
```# Usage
```bash
$ ./go-grpc-health -h
Usage of ./go-grpc-health:
-host string
Specify grpc host (default "localhost")
-port int
Specify grpc port (default 50051)
-timeout int
Timeout, ms (default 1000)
-verbosity string
Verbosity level [panic,fatal,error,warn,info,debug] (default "warn")$ ./go-grpc-health -host 127.0.0.1 -port 32864 && echo UP || echo DOWN
WARN[0000] 127.0.0.1:32864 is up
UP$ ./go-grpc-health -host 127.0.0.1 -port 11111 && echo UP || echo DOWN
WARN[0000] 127.0.0.1:11111 is down
DOWN
```