Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIHandler ¶
type APIHandler struct { ActionOdds [100]int MethodOdds [100]int UUID uuid.UUID Expire time.Time // contains filtered or unexported fields }
APIHandler docstring
func NewAPIHandler ¶
func NewAPIHandler(uuid uuid.UUID, metricsRegistry metrics.Registry, expire time.Time, percentDuplicate, percentTooMany, percentNonIndex, percentTooLarge uint) *APIHandler
NewAPIHandler return handler with Action and Method Odds array filled in
func (*APIHandler) Bulk ¶
func (h *APIHandler) Bulk(w http.ResponseWriter, r *http.Request)
Bulk handles bulk posts
func (*APIHandler) License ¶
func (h *APIHandler) License(w http.ResponseWriter, r *http.Request)
License handles /_license get requests
func (*APIHandler) Root ¶
func (h *APIHandler) Root(w http.ResponseWriter, r *http.Request)
Root handles / get requests
func (*APIHandler) ServeHTTP ¶
func (h *APIHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type BulkResponse ¶
type BulkResponse struct { Errors bool `json:"errors"` Items []map[string]any `json:"items,omitempty"` }
BulkResponse is an Elastic Search Bulk Response, assuming filter_path is "errors,items.*.error,items.*.status"
Click to show internal directories.
Click to hide internal directories.