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