Improve documentation

This commit is contained in:
TwinProduction 2020-10-06 19:07:47 -04:00
parent 230c8821ec
commit 3d7dbf4bba

View File

@ -10,10 +10,29 @@ import (
) )
const ( const (
// StatusPlaceholder is a placeholder for a HTTP status.
//
// Values that could replace the placeholder: 200, 404, 500, ...
StatusPlaceholder = "[STATUS]" StatusPlaceholder = "[STATUS]"
// IPPlaceHolder is a placeholder for an IP.
//
// Values that could replace the placeholder: 127.0.0.1, 10.0.0.1, ...
IPPlaceHolder = "[IP]" IPPlaceHolder = "[IP]"
// ResponseTimePlaceHolder is a placeholder for the request response time, in milliseconds.
//
// Values that could replace the placeholder: 1, 500, 1000, ...
ResponseTimePlaceHolder = "[RESPONSE_TIME]" ResponseTimePlaceHolder = "[RESPONSE_TIME]"
// BodyPlaceHolder is a placeholder for the body of the response
//
// Values that could replace the placeholder: {}, {"data":{"name":"john"}}, ...
BodyPlaceHolder = "[BODY]" BodyPlaceHolder = "[BODY]"
// ConnectedPlaceHolder is a placeholder for whether a connection was successfully established.
//
// Values that could replace the placeholder: true, false
ConnectedPlaceHolder = "[CONNECTED]" ConnectedPlaceHolder = "[CONNECTED]"
LengthFunctionPrefix = "len(" LengthFunctionPrefix = "len("
@ -23,6 +42,7 @@ const (
InvalidConditionElementSuffix = "(INVALID)" InvalidConditionElementSuffix = "(INVALID)"
) )
// Condition is a condition that needs to be met in order for a Service to be considered healthy.
type Condition string type Condition string
// evaluate the Condition with the Result of the health check // evaluate the Condition with the Result of the health check