Documentation ¶
Overview ¶
Provides a detailed view of shard allocation on nodes.
Index ¶
- Variables
- type NewShards
- type Response
- type Shards
- func (r *Shards) Bytes(bytes bytes.Bytes) *Shards
- func (r Shards) Do(providedCtx context.Context) (Response, error)
- func (r *Shards) Header(key, value string) *Shards
- func (r *Shards) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *Shards) Index(index string) *Shards
- func (r Shards) IsSuccess(providedCtx context.Context) (bool, error)
- func (r Shards) Perform(providedCtx context.Context) (*http.Response, error)
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 NewShards ¶
type NewShards func() *Shards
NewShards type alias for index.
func NewShardsFunc ¶
func NewShardsFunc(tp elastictransport.Interface) NewShards
NewShardsFunc returns a new instance of Shards with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.
type Response ¶ added in v8.7.0
type Response []types.ShardsRecord
type Shards ¶
type Shards struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *Shards
Provides a detailed view of shard allocation on nodes.
https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-shards.html
func (Shards) Do ¶
Do runs the request through the transport, handle the response and returns a shards.Response
func (*Shards) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*Shards) Index ¶
Index A comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indices, omit this parameter or use `*` or `_all`. API Name: index