Finished implementing all the exporters

This commit is contained in:
Trial97
2021-08-17 17:15:50 +03:00
committed by Dan Christian Bogos
parent a74aacd7fe
commit cd0964dfea
69 changed files with 1365 additions and 2859 deletions

View File

@@ -80,7 +80,7 @@ func (httpEE *HTTPjsonMapEE) Connect() (_ error) { return }
func (httpEE *HTTPjsonMapEE) ExportEvent(content interface{}, _ string) (err error) {
httpEE.reqs.get()
defer httpEE.reqs.done()
pReq := content.(httpPosterRequest)
pReq := content.(*HTTPPosterRequest)
var req *http.Request
if req, err = prepareRequest(httpEE.Cfg().ExportPath, utils.ContentJSON, pReq.Body, pReq.Header); err != nil {
return
@@ -95,7 +95,7 @@ func (httpEE *HTTPjsonMapEE) GetMetrics() *utils.SafeMapStorage { return httpEE.
func (httpEE *HTTPjsonMapEE) PrepareMap(mp map[string]interface{}) (interface{}, error) {
body, err := json.Marshal(mp)
return &httpPosterRequest{
return &HTTPPosterRequest{
Header: httpEE.hdr,
Body: body,
}, err
@@ -110,7 +110,7 @@ func (httpEE *HTTPjsonMapEE) PrepareOrderMap(mp *utils.OrderedNavigableMap) (int
valMp[strings.Join(path, utils.NestingSep)] = nmIt.String()
}
body, err := json.Marshal(valMp)
return &httpPosterRequest{
return &HTTPPosterRequest{
Header: httpEE.hdr,
Body: body,
}, err