Documentation ¶
Index ¶
- func GetTemplate(tmpl, tpath string) (*template.Template, error)
- type BasicAuth
- type Config
- type Configs
- type Diagnostic
- type Endpoint
- func (e *Endpoint) AlertTemplate() *template.Template
- func (e *Endpoint) Close()
- func (e *Endpoint) NewHTTPRequest(body io.Reader, tmplCtx interface{}) (req *http.Request, err error)
- func (e *Endpoint) RowTemplate() *template.Template
- func (e *Endpoint) URL() *template.Template
- func (e *Endpoint) Update(c Config) error
- type HandlerConfig
- type Service
- func (s *Service) Close() error
- func (s *Service) Endpoint(name string) (*Endpoint, bool)
- func (s *Service) Handler(c HandlerConfig, ctx ...keyvalue.T) (alert.Handler, error)
- func (s *Service) Open() error
- func (s *Service) Test(options interface{}) error
- func (s *Service) TestOptions() interface{}
- func (s *Service) Update(newConfigs []interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Endpoint string `toml:"endpoint" override:"endpoint"` URLTemplate string `toml:"url" override:"url"` Headers map[string]string `toml:"headers" override:"headers"` BasicAuth BasicAuth `toml:"basic-auth" override:"basic-auth,redact"` AlertTemplate string `toml:"alert-template" override:"alert-template"` AlertTemplateFile string `toml:"alert-template-file" override:"alert-template-file"` RowTemplate string `toml:"row-template" override:"row-template"` RowTemplateFile string `toml:"row-template-file" override:"row-template-file"` }
Config is the configuration for a single [httppost] section of the kapacitor configuration file.
type Configs ¶
type Configs []Config
Configs is the configuration for all [[alertpost]] sections of the kapacitor configuration file.
type Diagnostic ¶ added in v1.4.0
type Endpoint ¶
type Endpoint struct {
// contains filtered or unexported fields
}
Only one of name and url should be non-empty
func NewEndpoint ¶
func (*Endpoint) AlertTemplate ¶ added in v1.4.0
func (*Endpoint) NewHTTPRequest ¶
func (*Endpoint) RowTemplate ¶ added in v1.4.0
type HandlerConfig ¶
type HandlerConfig struct { URL string `mapstructure:"url"` Endpoint string `mapstructure:"endpoint"` Headers map[string]string `mapstructure:"headers"` CaptureResponse bool `mapstructure:"capture-response"` Timeout time.Duration `mapstructure:"timeout"` SkipSSLVerification bool `mapstructure:"skip-ssl-verification"` }
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(c Configs, d Diagnostic) (*Service, error)
func (*Service) TestOptions ¶
func (s *Service) TestOptions() interface{}
Click to show internal directories.
Click to hide internal directories.