mirror of
https://github.com/qdm12/ddns-updater.git
synced 2026-04-21 16:42:34 -04:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fe294f52a9 | ||
|
|
62e700c82c | ||
|
|
5d0e8548a1 |
@@ -19,7 +19,7 @@ RUN go test ./...
|
||||
RUN go build -trimpath -ldflags="-s -w" -o app
|
||||
RUN golangci-lint run --timeout=10m
|
||||
|
||||
FROM scratch
|
||||
FROM alpine:${ALPINE_VERSION}
|
||||
ARG BUILD_DATE
|
||||
ARG VCS_REF
|
||||
ARG VERSION
|
||||
|
||||
@@ -150,7 +150,7 @@ func _main(ctx context.Context, timeNow func() time.Time) int {
|
||||
go func() {
|
||||
serverErrors <- server.RunServers(ctx,
|
||||
server.Settings{Name: "production", Addr: "0.0.0.0:" + p.listeningPort, Handler: productionHandlerFunc},
|
||||
server.Settings{Name: "healthcheck", Addr: "127.0.0.1:9999", Handler: healthcheckHandlerFunc},
|
||||
server.Settings{Name: "healthcheck", Addr: "0.0.0.0:9999", Handler: healthcheckHandlerFunc},
|
||||
)
|
||||
}()
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ type lookupIPFunc func(host string) ([]net.IP, error)
|
||||
|
||||
// IsHealthy checks all the records were updated successfully and returns an error if not
|
||||
func IsHealthy(db data.Database, lookupIP lookupIPFunc, logger logging.Logger) (err error) {
|
||||
logger.Info("Healthcheck triggered!")
|
||||
defer func() {
|
||||
if err != nil {
|
||||
logger.Warn("unhealthy: %s", err)
|
||||
|
||||
Reference in New Issue
Block a user