usage
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Overview¶
Get usage information.Get information about the features that are currently enabled and availableunder the current license.The API also provides some usage statistics.
Index¶
- Variables
- type NewUsage
- type Response
- type Usage
- func (r Usage) Do(providedCtx context.Context) (*Response, error)
- func (r *Usage) ErrorTrace(errortrace bool) *Usage
- func (r *Usage) FilterPath(filterpaths ...string) *Usage
- func (r *Usage) Header(key, value string) *Usage
- func (r *Usage) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *Usage) Human(human bool) *Usage
- func (r Usage) IsSuccess(providedCtx context.Context) (bool, error)
- func (r *Usage) MasterTimeout(duration string) *Usage
- func (r Usage) Perform(providedCtx context.Context) (*http.Response, error)
- func (r *Usage) Pretty(pretty bool) *Usage
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¶
typeNewUsage¶
type NewUsage func() *Usage
NewUsage type alias for index.
funcNewUsageFunc¶
func NewUsageFunc(tpelastictransport.Interface)NewUsage
NewUsageFunc returns a new instance of Usage with the provided transport.Used in the index of the library this allows to retrieve every apis in once place.
typeResponse¶added inv8.7.0
type Response struct {AggregateMetrictypes.Base `json:"aggregate_metric"`Analyticstypes.Analytics `json:"analytics"`Archivetypes.Archive `json:"archive"`Ccrtypes.Ccr `json:"ccr"`DataFrame *types.Base `json:"data_frame,omitempty"`DataScience *types.Base `json:"data_science,omitempty"`DataStreams *types.DataStreams `json:"data_streams,omitempty"`DataTierstypes.DataTiers `json:"data_tiers"`Enrich *types.Base `json:"enrich,omitempty"`Eqltypes.Eql `json:"eql"`Flattened *types.Flattened `json:"flattened,omitempty"`FrozenIndicestypes.FrozenIndices `json:"frozen_indices"`Graphtypes.Base `json:"graph"`HealthApi *types.HealthStatistics `json:"health_api,omitempty"`Ilmtypes.Ilm `json:"ilm"`Logstashtypes.Base `json:"logstash"`Mltypes.MachineLearning `json:"ml"`Monitoringtypes.Monitoring `json:"monitoring"`Rolluptypes.Base `json:"rollup"`RuntimeFields *types.XpackRuntimeFieldTypes `json:"runtime_fields,omitempty"`SearchableSnapshotstypes.SearchableSnapshots `json:"searchable_snapshots"`Securitytypes.Security `json:"security"`Slmtypes.Slm `json:"slm"`Spatialtypes.Base `json:"spatial"`Sqltypes.Sql `json:"sql"`Transformtypes.Base `json:"transform"`Vectors *types.Vector `json:"vectors,omitempty"`VotingOnlytypes.Base `json:"voting_only"`Watchertypes.Watcher `json:"watcher"`}Response holds the response body struct for the package usage
typeUsage¶
type Usage struct {// contains filtered or unexported fields}funcNew¶
func New(tpelastictransport.Interface) *Usage
Get usage information.Get information about the features that are currently enabled and availableunder the current license.The API also provides some usage statistics.
https://www.elastic.co/docs/api/doc/elasticsearch/v8/group/endpoint-xpack
func (Usage)Do¶
Do runs the request through the transport, handle the response and returns a usage.Response
func (*Usage)ErrorTrace¶added inv8.14.0
ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errorswhen they occur.API name: error_trace
func (*Usage)FilterPath¶added inv8.14.0
FilterPath Comma-separated list of filters in dot notation which reduce the responsereturned by Elasticsearch.API name: filter_path
func (*Usage)HttpRequest¶
HttpRequest returns the http.Request object built from thegiven parameters.
func (*Usage)Human¶added inv8.14.0
Human When set to `true` will return statistics in a format suitable for humans.For example `"exists_time": "1h"` for humans and`"eixsts_time_in_millis": 3600000` for computers. When disabled the humanreadable values will be omitted. This makes sense for responses beingconsumedonly by machines.API name: human
func (Usage)IsSuccess¶
IsSuccess allows to run a query with a context and retrieve the result as a boolean.This only exists for endpoints without a request payload and allows for quick control flow.
func (*Usage)MasterTimeout¶
MasterTimeout The period to wait for a connection to the master node.If no response is received before the timeout expires, the request fails andreturns an error.To indicate that the request should never timeout, set it to `-1`.API name: master_timeout