Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Sensor ¶
type Sensor struct { sensors.UnimplementedSensor // Client is used to make HTTP connections Client *http.Client // HttpMethod defines request type being send to remote http(s) endpoint via HTTP protocol HttpMethod string `yaml:"http_method" validate:"oneof=GET HEAD POST PUT PATCH DELETE CONNECT OPTIONS TRACE"` // Endpoint defines URL where sensor sends request to recieve data Endpoint string `yaml:"endpoint" validate:"http_url"` // Headers are HTTP request headers being send with any HTTP request Headers map[string]string `yaml:"headers"` // Body is send with any HTTP request as payload Body string `yaml:"body"` // JsonPath is used to extract elements from json response of remote endpoint or shell command output using https://jsonpath.com/ syntax JsonPath string `yaml:"json_path"` // ExpectedStatusCode ExpectedStatusCode int `yaml:"expected_status_code"` }
Click to show internal directories.
Click to hide internal directories.