Documentation ¶
Index ¶
Constants ¶
const LogsMappings = `` /* 14449-byte string literal not displayed */
LogsMappings mappings for .logs indices
Variables ¶
This section is empty.
Functions ¶
func Recorder ¶
func Recorder() middleware.Middleware
Recorder records a log "record" for every request.
Types ¶
type Logs ¶
type Logs struct {
// contains filtered or unexported fields
}
Logs plugin records an elasticsearch request and its response.
func Instance ¶
func Instance() *Logs
Instance returns the singleton instance of Logs plugin. Note: Only this function must be used (both within and outside the package) to obtain the instance Logs in order to avoid stateless instances of the plugin.
func (*Logs) ESMiddleware ¶
func (l *Logs) ESMiddleware() []middleware.Middleware
Default empty middleware array function
func (*Logs) InitFunc ¶
InitFunc is a part of Plugin interface that gets executed only once, and initializes the dao, i.e. elasticsearch before the plugin is operational.
func (*Logs) RSMiddleware ¶
func (a *Logs) RSMiddleware() []middleware.Middleware
Default empty middleware array function
type NormalizedQueryParams ¶
NormalizedQueryParams represents the normalized query parameters
func RangeQueryParams ¶
func RangeQueryParams(values url.Values) NormalizedQueryParams
RangeQueryParams returns the common query params that every analytics endpoint expects, - "start_date": start of the duration in consideration - "end_date" : end of the duration in consideration - "size": no. of response entries
type RSSettings ¶
type RSSettings struct {
Took float64 `json:"took"`
}
RSSettings represents the settings object in RS API response
type RequestChange ¶
type RequestChange struct { Before requestlogs.LogsResults After requestlogs.LogsResults }
type ResponseBodyRS ¶
type ResponseBodyRS struct {
Settings RSSettings `json:"settings"`
}
ResponseBodyRS represents the response body returned by reactivesearch route
type SearchResponseBody ¶
type SearchResponseBody struct {
Took float64 `json:"took"`
}
SearchResponseBody represents the response body returned by search