mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2024-12-25 15:09:05 +01:00
HTTPS for HttpSink
This commit is contained in:
parent
db02c89683
commit
02cd21abe2
@ -26,7 +26,11 @@ func (s *HttpSink) Init(config sinkConfig) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
s.client = &http.Client{}
|
s.client = &http.Client{}
|
||||||
s.url = fmt.Sprintf("http://%s:%s/%s", config.Host, config.Port, config.Database)
|
proto := "http"
|
||||||
|
if config.SSL {
|
||||||
|
proto = "https"
|
||||||
|
}
|
||||||
|
s.url = fmt.Sprintf("%s://%s:%s/%s", proto, config.Host, config.Port, config.Database)
|
||||||
s.port = config.Port
|
s.port = config.Port
|
||||||
s.jwt = config.Password
|
s.jwt = config.Password
|
||||||
s.buffer = &bytes.Buffer{}
|
s.buffer = &bytes.Buffer{}
|
||||||
|
Loading…
Reference in New Issue
Block a user