Documentation ¶
Overview ¶
Explicitly clears the search context for a scroll.
Index ¶
- Variables
- type ClearScroll
- func (r ClearScroll) Do(providedCtx context.Context) (*Response, error)
- func (r *ClearScroll) Header(key, value string) *ClearScroll
- func (r *ClearScroll) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r ClearScroll) Perform(providedCtx context.Context) (*http.Response, error)
- func (r *ClearScroll) Raw(raw io.Reader) *ClearScroll
- func (r *ClearScroll) Request(req *Request) *ClearScroll
- func (r *ClearScroll) ScrollId(scrollids ...string) *ClearScroll
- type NewClearScroll
- type Request
- type Response
Constants ¶
This section is empty.
Variables ¶
var ErrBuildPath = errors.New("cannot build path, check for missing path parameters")
ErrBuildPath is returned in case of missing parameters within the build of the request.
Functions ¶
This section is empty.
Types ¶
type ClearScroll ¶
type ClearScroll struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *ClearScroll
Explicitly clears the search context for a scroll.
https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-scroll-api.html
func (ClearScroll) Do ¶
func (r ClearScroll) Do(providedCtx context.Context) (*Response, error)
Do runs the request through the transport, handle the response and returns a clearscroll.Response
func (*ClearScroll) Header ¶
func (r *ClearScroll) Header(key, value string) *ClearScroll
Header set a key, value pair in the ClearScroll headers map.
func (*ClearScroll) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (ClearScroll) Perform ¶ added in v8.7.0
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*ClearScroll) Raw ¶
func (r *ClearScroll) Raw(raw io.Reader) *ClearScroll
Raw takes a json payload as input which is then passed to the http.Request If specified Raw takes precedence on Request method.
func (*ClearScroll) Request ¶
func (r *ClearScroll) Request(req *Request) *ClearScroll
Request allows to set the request property with the appropriate payload.
func (*ClearScroll) ScrollId ¶
func (r *ClearScroll) ScrollId(scrollids ...string) *ClearScroll
ScrollId Scroll IDs to clear. To clear all scroll IDs, use `_all`. API name: scroll_id
type NewClearScroll ¶
type NewClearScroll func() *ClearScroll
NewClearScroll type alias for index.
func NewClearScrollFunc ¶
func NewClearScrollFunc(tp elastictransport.Interface) NewClearScroll
NewClearScrollFunc returns a new instance of ClearScroll with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.
type Request ¶
type Request struct { // ScrollId Scroll IDs to clear. // To clear all scroll IDs, use `_all`. ScrollId []string `json:"scroll_id,omitempty"` }
Request holds the request body struct for the package clearscroll