Imports github.com/elastic/beats/metricbeat/helper/dialer github.com/elastic/beats/metricbeat/mb github.com/pkg/errors github.com/elastic/beats/libbeat/outputs/transport github.com/elastic/beats/libbeat/common/transport/tlscommon Standard library imports bufio bytes encoding/json fmt io io/ioutil net/http time