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