Documentation ¶
Index ¶
- Constants
- func EscapeFieldFilter(s string) string
- type BatchIngester
- type Client
- func (c *Client) Do(ctx context.Context, req *http.Request) (*http.Response, func(), error)
- func (c *Client) GetBaseURL() string
- func (c *Client) Query(ctx context.Context, repo string, q Q) (io.ReadCloser, error)
- func (c *Client) QueryDecode(ctx context.Context, repo string, q Q, ret interface{}) error
- func (c *Client) QueryJobsSync(ctx context.Context, repo string, q Q) (io.ReadCloser, error)
- type Event
- type IngestTime
- type Q
- type QueryTime
Constants ¶
const DefaultBaseURL = "https://cloud.humio.com"
Variables ¶
This section is empty.
Functions ¶
func EscapeFieldFilter ¶
Types ¶
type BatchIngester ¶
type Client ¶
A Client is a HTTP REST client for the humio APIs. You must at least initialize the Token field. Unless BaseURL is set, cloud.humio.com will be used.
func (*Client) GetBaseURL ¶
func (*Client) Query ¶
Query performs a query and returns the response body stream Use this for streaming responses, for smaller requests see QueryDecode Caller must .Close() the returned reader
func (*Client) QueryDecode ¶
QueryDecode perform a single query decodes the complete JSON response into "ret". Use this for smaller responses which can be decoded and held in memory. Caller must .Close() the returned reader. For streaming, see the Query method
func (*Client) QueryJobsSync ¶
QueryJobsSync performs a query as a job and returns the response body stream Use this for streaming responses, for smaller requests see QueryDecode Caller must .Close() the returned reader
type Event ¶
type Event struct { Timestamp IngestTime `json:"timestamp"` Attributes map[string]string `json:"attributes"` }
type IngestTime ¶
func (IngestTime) MarshalJSON ¶
func (t IngestTime) MarshalJSON() ([]byte, error)
type QueryTime ¶
type QueryTime struct {
// contains filtered or unexported fields
}
QueryTime serializes relative or absolute times to the proper format for start/end times in for the humio search API. See the functions RelativeTime and AbsoluteTime
func AbsoluteTime ¶
AbsoluteTime returns a QueryTime struct for specifying a absolute start or end time from a go time.Time struct
func RelativeTime ¶
RelativeTime returns a QueryTime struct for specifying a relative start or end time such as "1minute" or "24 hours". See https://docs.humio.com/appendix/relative-time-syntax/