Documentation ¶
Overview ¶
Package traefik_datadog_event can trigger Datadog events when some pattern matches
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPattern ¶ added in v0.0.4
CheckPattern checks if some pattern matches using regexp
func GenerateEventPayload ¶ added in v0.0.4
func GenerateEventPayload(a *DatadogEvent) *bytes.Buffer
GenerateEventPayload generates the JSON payload required by the Datadog API
func SendEvent ¶ added in v0.0.4
func SendEvent(a *DatadogEvent)
SendEvent sends the HTTP event to Datadog
Types ¶
type Config ¶
type Config struct { APIKey string `yaml:"APIKey"` CodePattern int `yaml:"CodePattern"` BodyPattern string `yaml:"BodyPattern"` Title string `yaml:"Title"` Message string `yaml:"Message"` Priority string `yaml:"Priority"` }
Config the plugin configuration.
func CreateConfig ¶
func CreateConfig() *Config
CreateConfig creates the default plugin configuration.
type DatadogEvent ¶
type DatadogEvent struct { APIKey string CodePattern int BodyPattern string Title string Message string Priority string // contains filtered or unexported fields }
DatadogEvent plugin
func (*DatadogEvent) ServeHTTP ¶
func (a *DatadogEvent) ServeHTTP(rw http.ResponseWriter, req *http.Request)
Click to show internal directories.
Click to hide internal directories.