Versions in this module Expand all Collapse all v2 v2.0.2 Aug 19, 2021 v2.0.1 Oct 13, 2020 Changes in this version + type Client struct + HTTPClient *http.Client + Hostname string + Index string + Source string + SourceType string + Token string + URL string + func NewClient(httpClient *http.Client, URL string, Token string, Source string, ...) *Client + func (c *Client) Log(event interface{}) error + func (c *Client) LogEvent(e *Event) error + func (c *Client) LogEvents(events []*Event) error + func (c *Client) LogWithTime(t time.Time, event interface{}) error + func (c *Client) NewEvent(event interface{}, source string, sourcetype string, index string) *Event + func (c *Client) NewEventWithTime(t time.Time, event interface{}, source string, sourcetype string, index string) *Event + func (c *Client) Writer() io.Writer + type Event struct + Event interface{} + Host string + Index string + Source string + SourceType string + Time EventTime + type EventCollectorResponse struct + AckID *int + Code StatusCode + InvalidEventNumber *int + Text string + func (r *EventCollectorResponse) Error() string + type EventTime struct + func (t EventTime) MarshalJSON() ([]byte, error) + type StatusCode int8 + const ACKDisabled + const DataChannelMissing + const ErrorHandlingIndexedFields + const EventFieldBlank + const EventFieldRequired + const IncorrectIndex + const InternalServerError + const InvalidAuthz + const InvalidDataChannel + const InvalidDataFormat + const InvalidToken + const NoData + const QueryStringAuthzNotEnabled + const ServerBusy + const Success + const TokenDisabled + const TokenRequired + func (c StatusCode) HTTPCode() (code int, err error) + type Writer struct + Client *Client + FlushInterval time.Duration + FlushThreshold int + MaxRetries int + func (w *Writer) Errors() <-chan error + func (w *Writer) Write(b []byte) (int, error)