Documentation ¶
Index ¶
- type BasicAuth
- type Config
- type Configs
- type Diagnostic
- type Endpoint
- 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
- 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 ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Endpoint string `toml:"endpoint" override:"endpoint"` URL 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 ¶
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 ¶
func (*Endpoint) NewHTTPRequest ¶
func (*Endpoint) RowTemplate ¶
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.