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) (*http.Response, error)
- func (r *PutAutoFollowPattern) Header(key, value string) *PutAutoFollowPattern
- func (r *PutAutoFollowPattern) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *PutAutoFollowPattern) Name(v string) *PutAutoFollowPattern
- func (r *PutAutoFollowPattern) Raw(raw json.RawMessage) *PutAutoFollowPattern
- func (r *PutAutoFollowPattern) Request(req *Request) *PutAutoFollowPattern
- type Request
- type RequestBuilder
- func (rb *RequestBuilder) Build() *Request
- func (rb *RequestBuilder) FollowIndexPattern(followindexpattern types.IndexPattern) *RequestBuilder
- func (rb *RequestBuilder) FromJSON(data string) (*Request, error)
- func (rb *RequestBuilder) LeaderIndexExclusionPatterns(leaderindexexclusionpatterns *types.IndexPatternsBuilder) *RequestBuilder
- func (rb *RequestBuilder) LeaderIndexPatterns(leaderindexpatterns *types.IndexPatternsBuilder) *RequestBuilder
- func (rb *RequestBuilder) MaxOutstandingReadRequests(maxoutstandingreadrequests int) *RequestBuilder
- func (rb *RequestBuilder) MaxOutstandingWriteRequests(maxoutstandingwriterequests int) *RequestBuilder
- func (rb *RequestBuilder) MaxReadRequestOperationCount(maxreadrequestoperationcount int) *RequestBuilder
- func (rb *RequestBuilder) MaxReadRequestSize(maxreadrequestsize *types.ByteSizeBuilder) *RequestBuilder
- func (rb *RequestBuilder) MaxRetryDelay(maxretrydelay *types.DurationBuilder) *RequestBuilder
- func (rb *RequestBuilder) MaxWriteBufferCount(maxwritebuffercount int) *RequestBuilder
- func (rb *RequestBuilder) MaxWriteBufferSize(maxwritebuffersize *types.ByteSizeBuilder) *RequestBuilder
- func (rb *RequestBuilder) MaxWriteRequestOperationCount(maxwriterequestoperationcount int) *RequestBuilder
- func (rb *RequestBuilder) MaxWriteRequestSize(maxwriterequestsize *types.ByteSizeBuilder) *RequestBuilder
- func (rb *RequestBuilder) ReadPollTimeout(readpolltimeout *types.DurationBuilder) *RequestBuilder
- func (rb *RequestBuilder) RemoteCluster(remotecluster string) *RequestBuilder
- func (rb *RequestBuilder) Settings(value map[string]interface{}) *RequestBuilder
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) 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) Name ¶
func (r *PutAutoFollowPattern) Name(v string) *PutAutoFollowPattern
Name The name of the collection of auto-follow patterns. API Name: name
func (*PutAutoFollowPattern) Raw ¶
func (r *PutAutoFollowPattern) Raw(raw json.RawMessage) *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) Request ¶
func (r *PutAutoFollowPattern) Request(req *Request) *PutAutoFollowPattern
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 *types.IndexPattern `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 *types.IndexPatterns `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 *types.IndexPatterns `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
type RequestBuilder ¶
type RequestBuilder struct {
// contains filtered or unexported fields
}
RequestBuilder is the builder API for the putautofollowpattern.Request
func NewRequestBuilder ¶
func NewRequestBuilder() *RequestBuilder
NewRequest returns a RequestBuilder which can be chained and built to retrieve a RequestBuilder
func (*RequestBuilder) Build ¶
func (rb *RequestBuilder) Build() *Request
Build finalize the chain and returns the Request struct.
func (*RequestBuilder) FollowIndexPattern ¶
func (rb *RequestBuilder) FollowIndexPattern(followindexpattern types.IndexPattern) *RequestBuilder
func (*RequestBuilder) FromJSON ¶
func (rb *RequestBuilder) FromJSON(data string) (*Request, error)
FromJSON allows to load an arbitrary json into the request structure
func (*RequestBuilder) LeaderIndexExclusionPatterns ¶
func (rb *RequestBuilder) LeaderIndexExclusionPatterns(leaderindexexclusionpatterns *types.IndexPatternsBuilder) *RequestBuilder
func (*RequestBuilder) LeaderIndexPatterns ¶
func (rb *RequestBuilder) LeaderIndexPatterns(leaderindexpatterns *types.IndexPatternsBuilder) *RequestBuilder
func (*RequestBuilder) MaxOutstandingReadRequests ¶
func (rb *RequestBuilder) MaxOutstandingReadRequests(maxoutstandingreadrequests int) *RequestBuilder
func (*RequestBuilder) MaxOutstandingWriteRequests ¶
func (rb *RequestBuilder) MaxOutstandingWriteRequests(maxoutstandingwriterequests int) *RequestBuilder
func (*RequestBuilder) MaxReadRequestOperationCount ¶
func (rb *RequestBuilder) MaxReadRequestOperationCount(maxreadrequestoperationcount int) *RequestBuilder
func (*RequestBuilder) MaxReadRequestSize ¶
func (rb *RequestBuilder) MaxReadRequestSize(maxreadrequestsize *types.ByteSizeBuilder) *RequestBuilder
func (*RequestBuilder) MaxRetryDelay ¶
func (rb *RequestBuilder) MaxRetryDelay(maxretrydelay *types.DurationBuilder) *RequestBuilder
func (*RequestBuilder) MaxWriteBufferCount ¶
func (rb *RequestBuilder) MaxWriteBufferCount(maxwritebuffercount int) *RequestBuilder
func (*RequestBuilder) MaxWriteBufferSize ¶
func (rb *RequestBuilder) MaxWriteBufferSize(maxwritebuffersize *types.ByteSizeBuilder) *RequestBuilder
func (*RequestBuilder) MaxWriteRequestOperationCount ¶
func (rb *RequestBuilder) MaxWriteRequestOperationCount(maxwriterequestoperationcount int) *RequestBuilder
func (*RequestBuilder) MaxWriteRequestSize ¶
func (rb *RequestBuilder) MaxWriteRequestSize(maxwriterequestsize *types.ByteSizeBuilder) *RequestBuilder
func (*RequestBuilder) ReadPollTimeout ¶
func (rb *RequestBuilder) ReadPollTimeout(readpolltimeout *types.DurationBuilder) *RequestBuilder
func (*RequestBuilder) RemoteCluster ¶
func (rb *RequestBuilder) RemoteCluster(remotecluster string) *RequestBuilder
func (*RequestBuilder) Settings ¶
func (rb *RequestBuilder) Settings(value map[string]interface{}) *RequestBuilder