Documentation ¶
Overview ¶
Adds a node to be shut down. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
Index ¶
- Variables
- type NewPutNode
- type PutNode
- func (r *PutNode) AllocationDelay(allocationdelay string) *PutNode
- func (r PutNode) Do(ctx context.Context) (*Response, error)
- func (r *PutNode) Header(key, value string) *PutNode
- func (r *PutNode) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *PutNode) MasterTimeout(mastertimeout timeunit.TimeUnit) *PutNode
- func (r *PutNode) NodeId(nodeid string) *PutNode
- func (r PutNode) Perform(ctx context.Context) (*http.Response, error)
- func (r *PutNode) Raw(raw io.Reader) *PutNode
- func (r *PutNode) Reason(reason string) *PutNode
- func (r *PutNode) Request(req *Request) *PutNode
- func (r *PutNode) TargetNodeName(targetnodename string) *PutNode
- func (r *PutNode) Timeout(timeout timeunit.TimeUnit) *PutNode
- func (r *PutNode) Type(type_ type_.Type) *PutNode
- 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 NewPutNode ¶
NewPutNode type alias for index.
func NewPutNodeFunc ¶
func NewPutNodeFunc(tp elastictransport.Interface) NewPutNode
NewPutNodeFunc returns a new instance of PutNode with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.
type PutNode ¶
type PutNode struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *PutNode
Adds a node to be shut down. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
https://www.elastic.co/guide/en/elasticsearch/reference/current
func (*PutNode) AllocationDelay ¶ added in v8.9.0
AllocationDelay Only valid if type is restart. Controls how long Elasticsearch will wait for the node to restart and join the cluster before reassigning its shards to other nodes. This works the same as delaying allocation with the index.unassigned.node_left.delayed_timeout setting. If you specify both a restart allocation delay and an index-level allocation delay, the longer of the two is used. API name: allocation_delay
func (PutNode) Do ¶
Do runs the request through the transport, handle the response and returns a putnode.Response
func (*PutNode) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*PutNode) MasterTimeout ¶
MasterTimeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. API name: master_timeout
func (PutNode) Perform ¶ added in v8.7.0
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*PutNode) Raw ¶
Raw takes a json payload as input which is then passed to the http.Request If specified Raw takes precedence on Request method.
func (*PutNode) Reason ¶ added in v8.9.0
Reason A human-readable reason that the node is being shut down. This field provides information for other cluster operators; it does not affect the shut down process. API name: reason
func (*PutNode) TargetNodeName ¶ added in v8.9.0
TargetNodeName Only valid if type is replace. Specifies the name of the node that is replacing the node being shut down. Shards from the shut down node are only allowed to be allocated to the target node, and no other data will be allocated to the target node. During relocation of data certain allocation rules are ignored, such as disk watermarks or user attribute filtering rules. API name: target_node_name
func (*PutNode) Timeout ¶
Timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. API name: timeout
func (*PutNode) Type ¶ added in v8.9.0
Type Valid values are restart, remove, or replace. Use restart when you need to temporarily shut down a node to perform an upgrade, make configuration changes, or perform other maintenance. Because the node is expected to rejoin the cluster, data is not migrated off of the node. Use remove when you need to permanently remove a node from the cluster. The node is not marked ready for shutdown until data is migrated off of the node Use replace to do a 1:1 replacement of a node with another node. Certain allocation decisions will be ignored (such as disk watermarks) in the interest of true replacement of the source node with the target node. During a replace-type shutdown, rollover and index creation may result in unassigned shards, and shrink may fail until the replacement is complete. API name: type
type Request ¶
type Request struct { // AllocationDelay Only valid if type is restart. // Controls how long Elasticsearch will wait for the node to restart and join // the cluster before reassigning its shards to other nodes. // This works the same as delaying allocation with the // index.unassigned.node_left.delayed_timeout setting. // If you specify both a restart allocation delay and an index-level allocation // delay, the longer of the two is used. AllocationDelay *string `json:"allocation_delay,omitempty"` // Reason A human-readable reason that the node is being shut down. // This field provides information for other cluster operators; it does not // affect the shut down process. Reason string `json:"reason"` // TargetNodeName Only valid if type is replace. // Specifies the name of the node that is replacing the node being shut down. // Shards from the shut down node are only allowed to be allocated to the target // node, and no other data will be allocated to the target node. // During relocation of data certain allocation rules are ignored, such as disk // watermarks or user attribute filtering rules. TargetNodeName *string `json:"target_node_name,omitempty"` // Type Valid values are restart, remove, or replace. // Use restart when you need to temporarily shut down a node to perform an // upgrade, make configuration changes, or perform other maintenance. // Because the node is expected to rejoin the cluster, data is not migrated off // of the node. // Use remove when you need to permanently remove a node from the cluster. // The node is not marked ready for shutdown until data is migrated off of the // node Use replace to do a 1:1 replacement of a node with another node. // Certain allocation decisions will be ignored (such as disk watermarks) in the // interest of true replacement of the source node with the target node. // During a replace-type shutdown, rollover and index creation may result in // unassigned shards, and shrink may fail until the replacement is complete. Type type_.Type `json:"type"` }
Request holds the request body struct for the package putnode