@@ -33,17 +33,14 @@ type AlertmanagerNotification struct {
3333
3434// AlertmanagerOptions cluster configuration
3535type AlertmanagerOptions struct {
36- Targets []string `json:"targets"`
37- Scheme string `json:"scheme"`
38- APIPath string `json:"apiPath"`
39- BasicAuth * BasicAuth `json:"basicAuth"`
40- BearerToken string `json:"bearerToken"`
41- Timeout int `json:"timeout"`
42- InsecureSkipVerify bool `json:"insecureSkipVerify"`
43- MaxIdleConns int `json:"maxIdleConns"`
44- MaxIdleConnsPerHost int `json:"maxIdleConnsPerHost"`
45- MaxConnsPerHost int `json:"maxConnsPerHost"`
46- IdleConnTimeout string `json:"idleConnTimeout"`
36+ Targets []string `json:"targets"`
37+ Scheme string `json:"scheme"`
38+ APIPath string `json:"apiPath"`
39+ BasicAuth * BasicAuth `json:"basicAuth"`
40+ BearerToken string `json:"bearerToken"`
41+ Timeout int `json:"timeout"`
42+ InsecureSkipVerify bool `json:"insecureSkipVerify"`
43+ httputil.TransportOptions
4744}
4845
4946// NewAlertmanagerService new service
@@ -211,7 +208,13 @@ func (s alertmanagerService) Send(notification Notification, dest Destination) e
211208func (s alertmanagerService ) sendOneTarget (ctx context.Context , target string , rawBody []byte ) (err error ) {
212209 rawURL := fmt .Sprintf ("%v://%v%v" , s .opts .Scheme , target , s .opts .APIPath )
213210
214- client , err := httputil .NewServiceHTTPClient (s .opts .MaxIdleConns , s .opts .MaxIdleConnsPerHost , s .opts .MaxConnsPerHost , s .opts .IdleConnTimeout , s .opts .InsecureSkipVerify , rawURL , "alertmanager" )
211+ tp := httputil.TransportOptions {
212+ MaxIdleConns : s .opts .MaxIdleConns ,
213+ MaxIdleConnsPerHost : s .opts .MaxIdleConnsPerHost ,
214+ MaxConnsPerHost : s .opts .MaxConnsPerHost ,
215+ IdleConnTimeout : s .opts .IdleConnTimeout ,
216+ }
217+ client , err := httputil .NewServiceHTTPClient (tp , s .opts .InsecureSkipVerify , rawURL , "alertmanager" )
215218 if err != nil {
216219 return err
217220 }
0 commit comments