mirror of
https://github.com/foomo/keel.git
synced 2025-10-16 12:35:34 +00:00
refactor: use standard errors
This commit is contained in:
parent
a423908c97
commit
e35d4582d2
@ -70,8 +70,8 @@ func ExampleMain() {
|
||||
l.Info("done")
|
||||
|
||||
// Output:
|
||||
// {"level":"info","logger":"root.server","msg":"starting keel service","keel_service_type":"http","keel_service_name":"healthz","net_host_ip":"localhost","net_host_port":"9400"}
|
||||
// {"level":"info","logger":"root.server","msg":"starting keel server"}
|
||||
// {"level":"info","logger":"root.server","msg":"starting keel service","keel_service_type":"http","keel_service_name":"healthz","net_host_ip":"localhost","net_host_port":"9400"}
|
||||
// {"level":"info","logger":"root","msg":"starting keel service","keel_service_type":"http","keel_service_name":"http","net_host_ip":"localhost","net_host_port":"8080"}
|
||||
// {"level":"info","logger":"root","msg":"1. starting checks"}
|
||||
// {"level":"info","logger":"root","msg":"2. sleeping for 5 seconds"}
|
||||
@ -92,13 +92,13 @@ func ExampleMain() {
|
||||
// {"level":"debug","logger":"root.server","msg":"keel graceful shutdown: closer closed","name":"*service.HTTP"}
|
||||
// {"level":"info","logger":"root.closer","msg":"closing stuff"}
|
||||
// {"level":"error","logger":"root.http","msg":"failed to send request","url":"http://localhost:8080","error":"Get \"http://localhost:8080\": dial tcp [::1]:8080: connect: connection refused"}
|
||||
// {"level":"debug","logger":"root.server","msg":"healthz probe failed","error_type":"*errors.fundamental","error_message":"service not running","error_messageVerbose":"service not running\ngithub.com/foomo/keel/service.init\n\t<autogenerated>:1\nruntime.doInit1\n\t/opt/homebrew/opt/go/libexec/src/runtime/proc.go:7176\nruntime.doInit\n\t/opt/homebrew/opt/go/libexec/src/runtime/proc.go:7143\nruntime.main\n\t/opt/homebrew/opt/go/libexec/src/runtime/proc.go:253\nruntime.goexit\n\t/opt/homebrew/opt/go/libexec/src/runtime/asm_arm64.s:1222","http_target":"/healthz/readiness"}
|
||||
// {"level":"debug","logger":"root.server","msg":"healthz probe failed","error_type":"*errors.errorString","error_message":"service not running","http_target":"/healthz/readiness"}
|
||||
// {"level":"info","logger":"root.readiness","msg":"ok","url":"http://localhost:9400/healthz/readiness","status":503}
|
||||
// {"level":"error","logger":"root.http","msg":"failed to send request","url":"http://localhost:8080","error":"Get \"http://localhost:8080\": dial tcp [::1]:8080: connect: connection refused"}
|
||||
// {"level":"debug","logger":"root.server","msg":"healthz probe failed","error_type":"*errors.fundamental","error_message":"service not running","error_messageVerbose":"service not running\ngithub.com/foomo/keel/service.init\n\t<autogenerated>:1\nruntime.doInit1\n\t/opt/homebrew/opt/go/libexec/src/runtime/proc.go:7176\nruntime.doInit\n\t/opt/homebrew/opt/go/libexec/src/runtime/proc.go:7143\nruntime.main\n\t/opt/homebrew/opt/go/libexec/src/runtime/proc.go:253\nruntime.goexit\n\t/opt/homebrew/opt/go/libexec/src/runtime/asm_arm64.s:1222","http_target":"/healthz/readiness"}
|
||||
// {"level":"debug","logger":"root.server","msg":"healthz probe failed","error_type":"*errors.errorString","error_message":"service not running","http_target":"/healthz/readiness"}
|
||||
// {"level":"info","logger":"root.readiness","msg":"ok","url":"http://localhost:9400/healthz/readiness","status":503}
|
||||
// {"level":"error","logger":"root.http","msg":"failed to send request","url":"http://localhost:8080","error":"Get \"http://localhost:8080\": dial tcp [::1]:8080: connect: connection refused"}
|
||||
// {"level":"debug","logger":"root.server","msg":"healthz probe failed","error_type":"*errors.fundamental","error_message":"service not running","error_messageVerbose":"service not running\ngithub.com/foomo/keel/service.init\n\t<autogenerated>:1\nruntime.doInit1\n\t/opt/homebrew/opt/go/libexec/src/runtime/proc.go:7176\nruntime.doInit\n\t/opt/homebrew/opt/go/libexec/src/runtime/proc.go:7143\nruntime.main\n\t/opt/homebrew/opt/go/libexec/src/runtime/proc.go:253\nruntime.goexit\n\t/opt/homebrew/opt/go/libexec/src/runtime/asm_arm64.s:1222","http_target":"/healthz/readiness"}
|
||||
// {"level":"debug","logger":"root.server","msg":"healthz probe failed","error_type":"*errors.errorString","error_message":"service not running","http_target":"/healthz/readiness"}
|
||||
// {"level":"info","logger":"root.readiness","msg":"ok","url":"http://localhost:9400/healthz/readiness","status":503}
|
||||
// {"level":"info","logger":"root.closer","msg":"done closing stuff"}
|
||||
// {"level":"debug","logger":"root.server","msg":"keel graceful shutdown: closer closed","name":"interfaces.CloserFunc"}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"github.com/pkg/errors"
|
||||
"errors"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
Loading…
Reference in New Issue
Block a user