Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dimiro1/health
/ functions
Functions
90 in github.com/dimiro1/health
⨍
Functions
90
◇
Types & classes
22
↓ 17 callers
Method
IsUp
IsUp returns true if Status is Up
health.go:66
↓ 17 callers
Function
NewHealth
NewHealth return a new Health with status Down
health.go:34
↓ 16 callers
Method
IsDown
IsDown returns true if Status is Down
health.go:71
↓ 14 callers
Method
AddInfo
AddInfo adds a info value to the Info map
health.go:45
↓ 13 callers
Method
AddChecker
AddChecker add a Checker to the aggregator
checker.go:48
↓ 10 callers
Method
Down
Down set the status to Down
health.go:81
↓ 10 callers
Method
Up
Up set the status to Up
health.go:99
↓ 9 callers
Method
GetInfo
GetInfo returns a value from the info map
health.go:56
↓ 8 callers
Function
NewChecker
NewChecker returns a new db.Checker with the given URL
db/checker.go:17
↓ 7 callers
Function
NewCompositeChecker
NewCompositeChecker creates a new CompositeChecker
checker.go:32
↓ 5 callers
Method
Check
()
checker.go:9
↓ 5 callers
Method
Check
Check returns the combination of all checkers added if some check is not up, the combined is marked as down
checker.go:54
↓ 5 callers
Method
Check
Check execute two queries in the database The first is a simple one used to verify if the database is up If is Up then another query is executed, quer
db/checker.go:39
↓ 5 callers
Method
GetVersion
()
redis/checker.go:7
↓ 5 callers
Function
NewRedigo
NewRedigo create a new redigoRedis with specified network and addr
redis/redigo.go:33
↓ 4 callers
Method
IsUnknown
IsUnknown returns true if Status is Unknown
health.go:61
↓ 4 callers
Function
NewHandler
NewHandler returns a new Handler
handler.go:14
↓ 3 callers
Function
NewChecker
NewChecker returns a new url.Checker with the given URL
url/checker.go:17
↓ 3 callers
Method
OutOfService
OutOfService set the status to OutOfService
health.go:87
↓ 3 callers
Function
check
(t *testing.T, resp *http.Response, wants string, code int)
url/checker_test.go:93
↓ 2 callers
Method
AddInfo
AddInfo adds a info value to the Info map
checker.go:37
↓ 2 callers
Method
IsOutOfService
IsOutOfService returns true if Status is IsOutOfService
health.go:76
↓ 2 callers
Function
NewCheckerWithRedis
NewCheckerWithRedis returns a new redis.Checker configured with a custom Redis implementation
redis/checker.go:21
↓ 2 callers
Method
ServeHTTP
ServeHTTP returns a json encoded Health set the status to http.StatusServiceUnavailable if the check is down
handler.go:20
↓ 2 callers
Method
Unknown
Unknown set the status to Unknown
health.go:93
↓ 2 callers
Function
parseInfo
parseInfo parse the return of the redis INFO command and returns a maps containing each key associates with its value bot key and value are strings to
redis/util.go:8
↓ 1 callers
Method
MarshalJSON
MarshalJSON is a custom JSON marshaller
health.go:21
↓ 1 callers
Function
NewChecker
NewChecker returns a new redis.Checker
redis/checker.go:16
↓ 1 callers
Function
NewCheckerWithTimeout
NewCheckerWithTimeout returns a new url.Checker with the given URL and given timeout
url/checker.go:22
↓ 1 callers
Function
NewMySQLChecker
NewMySQLChecker returns a new db.Checker configured for use in MySQL
db/checker.go:22
↓ 1 callers
Function
NewPostgreSQLChecker
NewPostgreSQLChecker returns a new db.Checker configured for use in PostgreSQL
db/checker.go:27
↓ 1 callers
Function
NewSqlite3Checker
NewSqlite3Checker returns a new db.Checker configured for use in Sqlite3
db/checker.go:32
↓ 1 callers
Method
getConnection
(network, addr string)
redis/redigo.go:12
Method
Check
()
checker_test.go:7
Method
Check
()
checker_test.go:16
Method
Check
()
checker_test.go:25
Method
Check
()
checker.go:16
Method
Check
Check makes a HEAD request to the given URL If the request returns something different than StatusOK, The status is set to StatusBadRequest and the UR
url/checker.go:29
Method
Check
Check obtain the version string from redis info command
redis/checker.go:26
Method
GetVersion
()
redis/checker_test.go:12
Method
GetVersion
()
redis/checker_test.go:43
Method
GetVersion
GetVersion return the redis version using the reigo package
redis/redigo.go:42
Function
TestCheck_down
(t *testing.T)
db/checker_test.go:135
Function
TestCheck_down_nil_db
(t *testing.T)
db/checker_test.go:192
Function
TestCheck_down_version
(t *testing.T)
db/checker_test.go:162
Function
TestCheck_up
(t *testing.T)
db/checker_test.go:76
Function
TestCheck_up_not_set_version
(t *testing.T)
db/checker_test.go:107
Function
TestCheckerFunc_Check
(t *testing.T)
checker_test.go:127
Function
TestChecker_Check_down
(t *testing.T)
redis/checker_test.go:47
Function
TestChecker_Check_up
(t *testing.T)
redis/checker_test.go:24
Function
TestNewChecker
(t *testing.T)
redis/checker_test.go:16
Function
TestNewHealth
(t *testing.T)
health_test.go:5
Function
TestNewMySQLChecker
(t *testing.T)
db/checker_test.go:10
Function
TestNewPostgreSQLCheckerChecker
(t *testing.T)
db/checker_test.go:32
Function
TestNewSqlite3CheckerChecker
(t *testing.T)
db/checker_test.go:54
Function
Test_Checker_Check_Down
(t *testing.T)
url/checker_test.go:52
Function
Test_Checker_Check_Down_invalid
(t *testing.T)
url/checker_test.go:75
Function
Test_Checker_Check_Up
(t *testing.T)
url/checker_test.go:30
Function
Test_CompositeChecker_AddChecker
(t *testing.T)
checker_test.go:32
Function
Test_CompositeChecker_AddInfo
(t *testing.T)
checker_test.go:103
Function
Test_CompositeChecker_AddInfo_null_map
(t *testing.T)
checker_test.go:115
Function
Test_CompositeChecker_Check_Down
(t *testing.T)
checker_test.go:57
Function
Test_CompositeChecker_Check_Down_combined
(t *testing.T)
checker_test.go:79
Function
Test_CompositeChecker_Check_OutOfService
(t *testing.T)
checker_test.go:68
Function
Test_CompositeChecker_Check_Up
(t *testing.T)
checker_test.go:46
Function
Test_CompositeChecker_Check_Up_combined
(t *testing.T)
checker_test.go:91
Function
Test_Handler_ServeHTTP_Down
(t *testing.T)
handler_test.go:22
Function
Test_Handler_ServeHTTP_Up
(t *testing.T)
handler_test.go:52
Function
Test_Health_AddInfo
(t *testing.T)
health_test.go:96
Function
Test_Health_AddInfo_null_map
(t *testing.T)
health_test.go:108
Function
Test_Health_Down
(t *testing.T)
health_test.go:31
Function
Test_Health_GetInfo
(t *testing.T)
health_test.go:120
Function
Test_Health_GetInfo_null_map
(t *testing.T)
health_test.go:132
Function
Test_Health_IsDown
(t *testing.T)
health_test.go:59
Function
Test_Health_IsOutOfService
(t *testing.T)
health_test.go:68
Function
Test_Health_IsUp
(t *testing.T)
health_test.go:50
Function
Test_Health_MarshalJSON
(t *testing.T)
health_test.go:77
Function
Test_Health_OutOfService
(t *testing.T)
health_test.go:41
Function
Test_Health_Unknown
(t *testing.T)
health_test.go:13
Function
Test_Health_Up
(t *testing.T)
health_test.go:22
Function
Test_NewCheckerWithTimeout
(t *testing.T)
url/checker_test.go:15
Function
Test_NewHandler
(t *testing.T)
handler_test.go:11
Function
Test_RedigoRedis_GetVersion_down
(t *testing.T)
redis/redigo_test.go:52
Function
Test_RedigoRedis_GetVersion_down_version_not_present
(t *testing.T)
redis/redigo_test.go:66
Function
Test_RedigoRedis_GetVersion_nil
(t *testing.T)
redis/redigo_test.go:25
Function
Test_RedigoRedis_GetVersion_up
(t *testing.T)
redis/redigo_test.go:36
Function
Test_parseInfo
(t *testing.T)
redis/util_test.go:5
Method
getConnection
(network, addr string)
redis/redigo_test.go:15
Method
getConnection
(network, addr string)
redis/redigo_test.go:21
Method
getConnection
getConnection returns a new connection for network and addr parameters. It does not make sense write code to test this function, because writing tests
redis/redigo.go:20