Documentation ¶
Index ¶
- type CheckInterface
- func NewHttpCheck(host string, port int, timeout time.Duration) (CheckInterface, error)
- func NewPostgresCheck(host string, port int, dbName, user, pass, sslMode string) (CheckInterface, error)
- func NewPubsubCheck(projectID string) (CheckInterface, error)
- func NewRabbitmqCheck(host string, port int, user, pass string) (CheckInterface, error)
- type CheckStatus
- type Implementation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckInterface ¶
type CheckInterface interface { // GetImp returns the check's Implementation. GetImp() Implementation // GetStatus returns the check's current status. GetStatus() CheckStatus // GetLastCheck return the time the check last attempt finished. GetLastCheck() time.Time // GetError returns the error the last check attempt encountered, // if the check passed succesfully returns nil. GetError() error // HealthCheck runs the check. // If the check fails, returns the error encountered. // If the check succeeds returns nil. HealthCheck() error // Cleans up any resources and dependencies required by the check. Cleanup() }
func NewHttpCheck ¶
func NewPostgresCheck ¶
func NewPostgresCheck(host string, port int, dbName, user, pass, sslMode string) (CheckInterface, error)
func NewPubsubCheck ¶
func NewPubsubCheck(projectID string) (CheckInterface, error)
func NewRabbitmqCheck ¶
func NewRabbitmqCheck(host string, port int, user, pass string) (CheckInterface, error)
type CheckStatus ¶
type CheckStatus string
const ( // the check is preparing required resources. STARTUP CheckStatus = "startup" // the check is ongoing. CHECKING CheckStatus = "checking" // the check is complete. DONE CheckStatus = "done" )
type Implementation ¶
type Implementation string
const HTTP Implementation = "http"
const POSTGRES Implementation = "postgres"
const (
PUBSUB Implementation = "pubsub"
)
const (
RABBITMQ Implementation = "rabbitmq"
)
Click to show internal directories.
Click to hide internal directories.