-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implement reth and op-node checks
..also: refactor a bit
- Loading branch information
1 parent
484ff13
commit c67b732
Showing
37 changed files
with
1,460 additions
and
575 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
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,12 +1,15 @@ | ||
# Built binaries | ||
# builds | ||
|
||
bin/* | ||
!bin/.gitkeep | ||
/bin/* | ||
!/bin/.gitkeep | ||
dist | ||
|
||
# Goreleaser artifacts | ||
# ide | ||
|
||
dist/* | ||
.idea | ||
.vscode | ||
*.code-workspace | ||
|
||
# VS Code | ||
# temporary files | ||
|
||
.vscode | ||
.temp |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# stage: build --------------------------------------------------------- | ||
|
||
FROM golang:1.22-alpine as build | ||
|
||
RUN apk add --no-cache gcc musl-dev linux-headers | ||
|
||
WORKDIR /go/src/github.com/flashbots/node-healthchecker | ||
|
||
COPY go.* ./ | ||
RUN go mod download | ||
|
||
COPY . . | ||
|
||
RUN go build -o bin/node-healthchecker -ldflags "-s -w" github.com/flashbots/node-healthchecker/cmd | ||
|
||
# stage: run ----------------------------------------------------------- | ||
|
||
FROM alpine | ||
|
||
RUN apk add --no-cache ca-certificates | ||
|
||
WORKDIR /app | ||
|
||
COPY --from=build /go/src/github.com/flashbots/node-healthchecker/bin/node-healthchecker ./node-healthchecker | ||
|
||
ENTRYPOINT ["/app/node-healthchecker"] |
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,9 @@ | ||
# stage: run | ||
|
||
FROM gcr.io/distroless/static-debian12 as runner | ||
|
||
WORKDIR /app | ||
|
||
COPY node-healthchecker ./ | ||
|
||
ENTRYPOINT [ "./node-healthchecker" ] |
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,16 +1,24 @@ | ||
VERSION := $(shell git describe --tags --always --dirty="-dev") | ||
|
||
default: build | ||
VERSION := $(shell git describe --tags --always --dirty="-dev" --match "v*.*.*" || echo "development" ) | ||
VERSION := $(VERSION:v%=%) | ||
|
||
.PHONY: build | ||
build: | ||
CGO_ENABLED=0 go build -ldflags "-X main.version=${VERSION}" -o ./bin/node-healthchecker github.com/flashbots/node-healthchecker/cmd | ||
@CGO_ENABLED=0 go build \ | ||
-ldflags "-X main.version=${VERSION}" \ | ||
-o ./bin/node-healthchecker \ | ||
github.com/flashbots/node-healthchecker/cmd | ||
|
||
.PHONY: snapshot | ||
snapshot: | ||
goreleaser release --snapshot --rm-dist | ||
@goreleaser release --snapshot --clean | ||
|
||
.PHONY: help | ||
help: | ||
@printf "\n=====\n\n" | ||
@go run github.com/flashbots/node-healthchecker/cmd help | ||
@printf "\n=====\n\n" | ||
@go run github.com/flashbots/node-healthchecker/cmd serve --help | ||
|
||
.PHONY: release | ||
release: | ||
@rm -rf ./dist | ||
GITHUB_TOKEN=$$( gh auth token ) goreleaser release | ||
.PHONY: serve | ||
serve: | ||
@go run github.com/flashbots/node-healthchecker/cmd serve |
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,18 @@ | ||
package main | ||
|
||
import ( | ||
"github.com/urfave/cli/v2" | ||
|
||
"github.com/flashbots/node-healthchecker/config" | ||
) | ||
|
||
func CommandHelp(_ *config.Config) *cli.Command { | ||
return &cli.Command{ | ||
Usage: "show the list of commands or help for one command", | ||
Name: "help", | ||
|
||
Action: func(clictx *cli.Context) error { | ||
return cli.ShowAppHelp(clictx) | ||
}, | ||
} | ||
} |
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.