putautofollowpattern

package
v8.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2022 License: Apache-2.0 Imports: 10 Imported by: 4

Documentation

Overview

Creates a new named collection of auto-follow patterns against a specified remote cluster. Newly created indices on the remote cluster matching any of the specified patterns will be automatically configured as follower indices.

Index

Constants

This section is empty.

Variables

View Source
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 NewPutAutoFollowPattern

type NewPutAutoFollowPattern func(name string) *PutAutoFollowPattern

NewPutAutoFollowPattern type alias for index.

func NewPutAutoFollowPatternFunc

func NewPutAutoFollowPatternFunc(tp elastictransport.Interface) NewPutAutoFollowPattern

NewPutAutoFollowPatternFunc returns a new instance of PutAutoFollowPattern with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.

type PutAutoFollowPattern

type PutAutoFollowPattern struct {
	// contains filtered or unexported fields
}

func New

Creates a new named collection of auto-follow patterns against a specified remote cluster. Newly created indices on the remote cluster matching any of the specified patterns will be automatically configured as follower indices.

https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/ccr-put-auto-follow-pattern.html

func (PutAutoFollowPattern) Do

Do runs the http.Request through the provided transport.

func (*PutAutoFollowPattern) Header

func (r *PutAutoFollowPattern) Header(key, value string) *PutAutoFollowPattern

Header set a key, value pair in the PutAutoFollowPattern headers map.

func (*PutAutoFollowPattern) HttpRequest

func (r *PutAutoFollowPattern) HttpRequest(ctx context.Context) (*http.Request, error)

HttpRequest returns the http.Request object built from the given parameters.

func (*PutAutoFollowPattern) Name

Name The name of the collection of auto-follow patterns. API Name: name

func (*PutAutoFollowPattern) 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 (*PutAutoFollowPattern) Request

Request allows to set the request property with the appropriate payload.

type Request

type Request struct {

	// FollowIndexPattern The name of follower index. The template {{leader_index}} can be used to
	// derive the name of the follower index from the name of the leader index. When
	// following a data stream, use {{leader_index}}; CCR does not support changes
	// to the names of a follower data stream’s backing indices.
	FollowIndexPattern *string `json:"follow_index_pattern,omitempty"`
	// LeaderIndexExclusionPatterns An array of simple index patterns that can be used to exclude indices from
	// being auto-followed. Indices in the remote cluster whose names are matching
	// one or more leader_index_patterns and one or more
	// leader_index_exclusion_patterns won’t be followed.
	LeaderIndexExclusionPatterns []string `json:"leader_index_exclusion_patterns,omitempty"`
	// LeaderIndexPatterns An array of simple index patterns to match against indices in the remote
	// cluster specified by the remote_cluster field.
	LeaderIndexPatterns []string `json:"leader_index_patterns,omitempty"`
	// MaxOutstandingReadRequests The maximum number of outstanding reads requests from the remote cluster.
	MaxOutstandingReadRequests *int `json:"max_outstanding_read_requests,omitempty"`
	// MaxOutstandingWriteRequests The maximum number of outstanding reads requests from the remote cluster.
	MaxOutstandingWriteRequests *int `json:"max_outstanding_write_requests,omitempty"`
	// MaxReadRequestOperationCount The maximum number of operations to pull per read from the remote cluster.
	MaxReadRequestOperationCount *int `json:"max_read_request_operation_count,omitempty"`
	// MaxReadRequestSize The maximum size in bytes of per read of a batch of operations pulled from
	// the remote cluster.
	MaxReadRequestSize *types.ByteSize `json:"max_read_request_size,omitempty"`
	// MaxRetryDelay The maximum time to wait before retrying an operation that failed
	// exceptionally. An exponential backoff strategy is employed when retrying.
	MaxRetryDelay *types.Duration `json:"max_retry_delay,omitempty"`
	// MaxWriteBufferCount The maximum number of operations that can be queued for writing. When this
	// limit is reached, reads from the remote cluster will be deferred until the
	// number of queued operations goes below the limit.
	MaxWriteBufferCount *int `json:"max_write_buffer_count,omitempty"`
	// MaxWriteBufferSize The maximum total bytes of operations that can be queued for writing. When
	// this limit is reached, reads from the remote cluster will be deferred until
	// the total bytes of queued operations goes below the limit.
	MaxWriteBufferSize *types.ByteSize `json:"max_write_buffer_size,omitempty"`
	// MaxWriteRequestOperationCount The maximum number of operations per bulk write request executed on the
	// follower.
	MaxWriteRequestOperationCount *int `json:"max_write_request_operation_count,omitempty"`
	// MaxWriteRequestSize The maximum total bytes of operations per bulk write request executed on the
	// follower.
	MaxWriteRequestSize *types.ByteSize `json:"max_write_request_size,omitempty"`
	// ReadPollTimeout The maximum time to wait for new operations on the remote cluster when the
	// follower index is synchronized with the leader index. When the timeout has
	// elapsed, the poll for operations will return to the follower so that it can
	// update some statistics. Then the follower will immediately attempt to read
	// from the leader again.
	ReadPollTimeout *types.Duration `json:"read_poll_timeout,omitempty"`
	// RemoteCluster The remote cluster containing the leader indices to match against.
	RemoteCluster string `json:"remote_cluster"`
	// Settings Settings to override from the leader index. Note that certain settings can
	// not be overrode (e.g., index.number_of_shards).
	Settings map[string]interface{} `json:"settings,omitempty"`
}

Request holds the request body struct for the package putautofollowpattern

https://github.com/elastic/elasticsearch-specification/blob/555082f38110f65b60d470107d211fc354a5c55a/specification/ccr/put_auto_follow_pattern/PutAutoFollowPatternRequest.ts#L27-L113

func NewRequest added in v8.5.0

func NewRequest() *Request

NewRequest returns a Request

func (*Request) FromJSON added in v8.5.0

func (rb *Request) FromJSON(data string) (*Request, error)

FromJSON allows to load an arbitrary json into the request structure

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL