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 ¶
- Variables
- type NewPutAutoFollowPattern
- type PutAutoFollowPattern
- func (r PutAutoFollowPattern) Do(ctx context.Context) (*Response, error)
- func (r *PutAutoFollowPattern) FollowIndexPattern(indexpattern string) *PutAutoFollowPattern
- func (r *PutAutoFollowPattern) Header(key, value string) *PutAutoFollowPattern
- func (r *PutAutoFollowPattern) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *PutAutoFollowPattern) LeaderIndexExclusionPatterns(indexpatterns ...string) *PutAutoFollowPattern
- func (r *PutAutoFollowPattern) LeaderIndexPatterns(indexpatterns ...string) *PutAutoFollowPattern
- func (r *PutAutoFollowPattern) MaxOutstandingReadRequests(maxoutstandingreadrequests int) *PutAutoFollowPattern
- func (r *PutAutoFollowPattern) MaxOutstandingWriteRequests(maxoutstandingwriterequests int) *PutAutoFollowPattern
- func (r *PutAutoFollowPattern) MaxReadRequestOperationCount(maxreadrequestoperationcount int) *PutAutoFollowPattern
- func (r *PutAutoFollowPattern) MaxReadRequestSize(bytesize types.ByteSize) *PutAutoFollowPattern
- func (r *PutAutoFollowPattern) MaxRetryDelay(duration types.Duration) *PutAutoFollowPattern
- func (r *PutAutoFollowPattern) MaxWriteBufferCount(maxwritebuffercount int) *PutAutoFollowPattern
- func (r *PutAutoFollowPattern) MaxWriteBufferSize(bytesize types.ByteSize) *PutAutoFollowPattern
- func (r *PutAutoFollowPattern) MaxWriteRequestOperationCount(maxwriterequestoperationcount int) *PutAutoFollowPattern
- func (r *PutAutoFollowPattern) MaxWriteRequestSize(bytesize types.ByteSize) *PutAutoFollowPattern
- func (r PutAutoFollowPattern) Perform(ctx context.Context) (*http.Response, error)
- func (r *PutAutoFollowPattern) Raw(raw io.Reader) *PutAutoFollowPattern
- func (r *PutAutoFollowPattern) ReadPollTimeout(duration types.Duration) *PutAutoFollowPattern
- func (r *PutAutoFollowPattern) RemoteCluster(remotecluster string) *PutAutoFollowPattern
- func (r *PutAutoFollowPattern) Request(req *Request) *PutAutoFollowPattern
- func (r *PutAutoFollowPattern) Settings(settings map[string]json.RawMessage) *PutAutoFollowPattern
- 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 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 ¶
func New(tp elastictransport.Interface) *PutAutoFollowPattern
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 ¶
func (r PutAutoFollowPattern) Do(ctx context.Context) (*Response, error)
Do runs the request through the transport, handle the response and returns a putautofollowpattern.Response
func (*PutAutoFollowPattern) FollowIndexPattern ¶ added in v8.9.0
func (r *PutAutoFollowPattern) FollowIndexPattern(indexpattern string) *PutAutoFollowPattern
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. API name: follow_index_pattern
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 ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*PutAutoFollowPattern) LeaderIndexExclusionPatterns ¶ added in v8.9.0
func (r *PutAutoFollowPattern) LeaderIndexExclusionPatterns(indexpatterns ...string) *PutAutoFollowPattern
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. API name: leader_index_exclusion_patterns
func (*PutAutoFollowPattern) LeaderIndexPatterns ¶ added in v8.9.0
func (r *PutAutoFollowPattern) LeaderIndexPatterns(indexpatterns ...string) *PutAutoFollowPattern
LeaderIndexPatterns An array of simple index patterns to match against indices in the remote cluster specified by the remote_cluster field. API name: leader_index_patterns
func (*PutAutoFollowPattern) MaxOutstandingReadRequests ¶ added in v8.9.0
func (r *PutAutoFollowPattern) MaxOutstandingReadRequests(maxoutstandingreadrequests int) *PutAutoFollowPattern
MaxOutstandingReadRequests The maximum number of outstanding reads requests from the remote cluster. API name: max_outstanding_read_requests
func (*PutAutoFollowPattern) MaxOutstandingWriteRequests ¶ added in v8.9.0
func (r *PutAutoFollowPattern) MaxOutstandingWriteRequests(maxoutstandingwriterequests int) *PutAutoFollowPattern
MaxOutstandingWriteRequests The maximum number of outstanding reads requests from the remote cluster. API name: max_outstanding_write_requests
func (*PutAutoFollowPattern) MaxReadRequestOperationCount ¶ added in v8.9.0
func (r *PutAutoFollowPattern) MaxReadRequestOperationCount(maxreadrequestoperationcount int) *PutAutoFollowPattern
MaxReadRequestOperationCount The maximum number of operations to pull per read from the remote cluster. API name: max_read_request_operation_count
func (*PutAutoFollowPattern) MaxReadRequestSize ¶ added in v8.9.0
func (r *PutAutoFollowPattern) MaxReadRequestSize(bytesize types.ByteSize) *PutAutoFollowPattern
MaxReadRequestSize The maximum size in bytes of per read of a batch of operations pulled from the remote cluster. API name: max_read_request_size
func (*PutAutoFollowPattern) MaxRetryDelay ¶ added in v8.9.0
func (r *PutAutoFollowPattern) MaxRetryDelay(duration types.Duration) *PutAutoFollowPattern
MaxRetryDelay The maximum time to wait before retrying an operation that failed exceptionally. An exponential backoff strategy is employed when retrying. API name: max_retry_delay
func (*PutAutoFollowPattern) MaxWriteBufferCount ¶ added in v8.9.0
func (r *PutAutoFollowPattern) MaxWriteBufferCount(maxwritebuffercount int) *PutAutoFollowPattern
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. API name: max_write_buffer_count
func (*PutAutoFollowPattern) MaxWriteBufferSize ¶ added in v8.9.0
func (r *PutAutoFollowPattern) MaxWriteBufferSize(bytesize types.ByteSize) *PutAutoFollowPattern
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. API name: max_write_buffer_size
func (*PutAutoFollowPattern) MaxWriteRequestOperationCount ¶ added in v8.9.0
func (r *PutAutoFollowPattern) MaxWriteRequestOperationCount(maxwriterequestoperationcount int) *PutAutoFollowPattern
MaxWriteRequestOperationCount The maximum number of operations per bulk write request executed on the follower. API name: max_write_request_operation_count
func (*PutAutoFollowPattern) MaxWriteRequestSize ¶ added in v8.9.0
func (r *PutAutoFollowPattern) MaxWriteRequestSize(bytesize types.ByteSize) *PutAutoFollowPattern
MaxWriteRequestSize The maximum total bytes of operations per bulk write request executed on the follower. API name: max_write_request_size
func (PutAutoFollowPattern) Perform ¶ added in v8.7.0
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*PutAutoFollowPattern) Raw ¶
func (r *PutAutoFollowPattern) Raw(raw io.Reader) *PutAutoFollowPattern
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) ReadPollTimeout ¶ added in v8.9.0
func (r *PutAutoFollowPattern) ReadPollTimeout(duration types.Duration) *PutAutoFollowPattern
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. API name: read_poll_timeout
func (*PutAutoFollowPattern) RemoteCluster ¶ added in v8.9.0
func (r *PutAutoFollowPattern) RemoteCluster(remotecluster string) *PutAutoFollowPattern
RemoteCluster The remote cluster containing the leader indices to match against. API name: remote_cluster
func (*PutAutoFollowPattern) Request ¶
func (r *PutAutoFollowPattern) Request(req *Request) *PutAutoFollowPattern
Request allows to set the request property with the appropriate payload.
func (*PutAutoFollowPattern) Settings ¶ added in v8.9.0
func (r *PutAutoFollowPattern) Settings(settings map[string]json.RawMessage) *PutAutoFollowPattern
Settings Settings to override from the leader index. Note that certain settings can not be overrode (e.g., index.number_of_shards). API name: settings
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]json.RawMessage `json:"settings,omitempty"` }
Request holds the request body struct for the package putautofollowpattern