Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// URL is the URL to monitor
URL string `json:"url"`
// Method is the HTTP method to use
Method string `json:"method"`
// Headers is the headers to send with the request
Headers map[string]string `json:"headers"`
// Body is the body to send with the request
Body string `json:"body"`
// ExpectedStatusCode is the expected status code
ExpectedStatusCode int `json:"expectedStatusCode"`
// ExpectedBody is the expected body
ExpectedBody string `json:"expectedBody"`
}
Config is the config for the HTTP monitor
type ConfigHeader ¶
ConfigHeader is the header for the HTTP config
type JSONConfig ¶
type JSONConfig struct {
monitors.JSONBaseConfig
URL string `json:"url"`
Method string `json:"method"`
Headers ConfigHeader `json:"headers"`
ExpectedStatusCode int `json:"expectedStatusCode"`
ExpectedResponseBody string `json:"expectedResponseBody"`
}
JSONConfig is the config for the HTTP monitor
type Monitor ¶
type Monitor struct {
monitors.BaseMonitor
Config *Config
// contains filtered or unexported fields
}
Monitor is a monitor that monitors http endpoints it implements the Monitor interface
func (*Monitor) GetConfig ¶
func (m *Monitor) GetConfig() interface{}
GetConfig returns the config for the monitor
func (*Monitor) GetNotificationBody ¶
func (m *Monitor) GetNotificationBody(state *monitors.State) *monitors.NotificationBody
GetNotificationBody returns the notification body
Click to show internal directories.
Click to hide internal directories.