Documentation
¶
Overview ¶
Close a point in time. A point in time must be opened explicitly before being used in search requests. The `keep_alive` parameter tells Elasticsearch how long it should persist. A point in time is automatically closed when the `keep_alive` period has elapsed. However, keeping points in time has a cost; close them as soon as they are no longer required for search requests.
Index ¶
- Variables
- type ClosePointInTime
- func (r ClosePointInTime) Do(providedCtx context.Context) (*Response, error)
- func (r *ClosePointInTime) ErrorTrace(errortrace bool) *ClosePointInTime
- func (r *ClosePointInTime) FilterPath(filterpaths ...string) *ClosePointInTime
- func (r *ClosePointInTime) Header(key, value string) *ClosePointInTime
- func (r *ClosePointInTime) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *ClosePointInTime) Human(human bool) *ClosePointInTime
- func (r *ClosePointInTime) Id(id string) *ClosePointInTime
- func (r ClosePointInTime) Perform(providedCtx context.Context) (*http.Response, error)
- func (r *ClosePointInTime) Pretty(pretty bool) *ClosePointInTime
- func (r *ClosePointInTime) Raw(raw io.Reader) *ClosePointInTime
- func (r *ClosePointInTime) Request(req *Request) *ClosePointInTime
- type NewClosePointInTime
- 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 ClosePointInTime ¶
type ClosePointInTime struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *ClosePointInTime
Close a point in time. A point in time must be opened explicitly before being used in search requests. The `keep_alive` parameter tells Elasticsearch how long it should persist. A point in time is automatically closed when the `keep_alive` period has elapsed. However, keeping points in time has a cost; close them as soon as they are no longer required for search requests.
https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-open-point-in-time
func (ClosePointInTime) Do ¶
func (r ClosePointInTime) Do(providedCtx context.Context) (*Response, error)
Do runs the request through the transport, handle the response and returns a closepointintime.Response
func (*ClosePointInTime) ErrorTrace ¶
func (r *ClosePointInTime) ErrorTrace(errortrace bool) *ClosePointInTime
ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors when they occur. API name: error_trace
func (*ClosePointInTime) FilterPath ¶
func (r *ClosePointInTime) FilterPath(filterpaths ...string) *ClosePointInTime
FilterPath Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch. API name: filter_path
func (*ClosePointInTime) Header ¶
func (r *ClosePointInTime) Header(key, value string) *ClosePointInTime
Header set a key, value pair in the ClosePointInTime headers map.
func (*ClosePointInTime) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*ClosePointInTime) Human ¶
func (r *ClosePointInTime) Human(human bool) *ClosePointInTime
Human When set to `true` will return statistics in a format suitable for humans. For example `"exists_time": "1h"` for humans and `"exists_time_in_millis": 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines. API name: human
func (*ClosePointInTime) Id ¶
func (r *ClosePointInTime) Id(id string) *ClosePointInTime
The ID of the point-in-time. API name: id
func (ClosePointInTime) Perform ¶
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*ClosePointInTime) Pretty ¶
func (r *ClosePointInTime) Pretty(pretty bool) *ClosePointInTime
Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use this option for debugging only. API name: pretty
func (*ClosePointInTime) Raw ¶
func (r *ClosePointInTime) Raw(raw io.Reader) *ClosePointInTime
Raw takes a json payload as input which is then passed to the http.Request If specified Raw takes precedence on Request method.
func (*ClosePointInTime) Request ¶
func (r *ClosePointInTime) Request(req *Request) *ClosePointInTime
Request allows to set the request property with the appropriate payload.
type NewClosePointInTime ¶
type NewClosePointInTime func() *ClosePointInTime
NewClosePointInTime type alias for index.
func NewClosePointInTimeFunc ¶
func NewClosePointInTimeFunc(tp elastictransport.Interface) NewClosePointInTime
NewClosePointInTimeFunc returns a new instance of ClosePointInTime 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 {
// Id The ID of the point-in-time.
Id string `json:"id"`
}
Request holds the request body struct for the package closepointintime
func (*Request) UnmarshalJSON ¶
type Response ¶
type Response struct {
// NumFreed The number of search contexts that were successfully closed.
NumFreed int `json:"num_freed"`
// Succeeded If `true`, all search contexts associated with the point-in-time ID were
// successfully closed.
Succeeded bool `json:"succeeded"`
}
Response holds the response body struct for the package closepointintime