Documentation ¶
Overview ¶
Creates a new follower index configured to follow the referenced leader index.
Index ¶
- Variables
- type Follow
- func (r Follow) Do(ctx context.Context) (*http.Response, error)
- func (r *Follow) Header(key, value string) *Follow
- func (r *Follow) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *Follow) Index(v string) *Follow
- func (r *Follow) Raw(raw json.RawMessage) *Follow
- func (r *Follow) Request(req *Request) *Follow
- func (r *Follow) WaitForActiveShards(value string) *Follow
- type NewFollow
- type Request
- type RequestBuilder
- func (rb *RequestBuilder) Build() *Request
- func (rb *RequestBuilder) FromJSON(data string) (*Request, error)
- func (rb *RequestBuilder) LeaderIndex(leaderindex types.IndexName) *RequestBuilder
- func (rb *RequestBuilder) MaxOutstandingReadRequests(maxoutstandingreadrequests int64) *RequestBuilder
- func (rb *RequestBuilder) MaxOutstandingWriteRequests(maxoutstandingwriterequests int64) *RequestBuilder
- func (rb *RequestBuilder) MaxReadRequestOperationCount(maxreadrequestoperationcount int64) *RequestBuilder
- func (rb *RequestBuilder) MaxReadRequestSize(maxreadrequestsize string) *RequestBuilder
- func (rb *RequestBuilder) MaxRetryDelay(maxretrydelay *types.DurationBuilder) *RequestBuilder
- func (rb *RequestBuilder) MaxWriteBufferCount(maxwritebuffercount int64) *RequestBuilder
- func (rb *RequestBuilder) MaxWriteBufferSize(maxwritebuffersize string) *RequestBuilder
- func (rb *RequestBuilder) MaxWriteRequestOperationCount(maxwriterequestoperationcount int64) *RequestBuilder
- func (rb *RequestBuilder) MaxWriteRequestSize(maxwriterequestsize string) *RequestBuilder
- func (rb *RequestBuilder) ReadPollTimeout(readpolltimeout *types.DurationBuilder) *RequestBuilder
- func (rb *RequestBuilder) RemoteCluster(remotecluster string) *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 Follow ¶
type Follow struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *Follow
Creates a new follower index configured to follow the referenced leader index.
https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/ccr-put-follow.html
func (*Follow) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*Follow) Raw ¶
func (r *Follow) Raw(raw json.RawMessage) *Follow
Raw takes a json payload as input which is then passed to the http.Request If specified Raw takes precedence on Request method.
func (*Follow) WaitForActiveShards ¶
WaitForActiveShards Sets the number of shard copies that must be active before returning. Defaults to 0. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) API name: wait_for_active_shards
type NewFollow ¶
NewFollow type alias for index.
func NewFollowFunc ¶
func NewFollowFunc(tp elastictransport.Interface) NewFollow
NewFollowFunc returns a new instance of Follow with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.
type Request ¶
type Request struct { LeaderIndex *types.IndexName `json:"leader_index,omitempty"` MaxOutstandingReadRequests *int64 `json:"max_outstanding_read_requests,omitempty"` MaxOutstandingWriteRequests *int64 `json:"max_outstanding_write_requests,omitempty"` MaxReadRequestOperationCount *int64 `json:"max_read_request_operation_count,omitempty"` MaxReadRequestSize *string `json:"max_read_request_size,omitempty"` MaxRetryDelay *types.Duration `json:"max_retry_delay,omitempty"` MaxWriteBufferCount *int64 `json:"max_write_buffer_count,omitempty"` MaxWriteBufferSize *string `json:"max_write_buffer_size,omitempty"` MaxWriteRequestOperationCount *int64 `json:"max_write_request_operation_count,omitempty"` MaxWriteRequestSize *string `json:"max_write_request_size,omitempty"` ReadPollTimeout *types.Duration `json:"read_poll_timeout,omitempty"` RemoteCluster *string `json:"remote_cluster,omitempty"` }
Request holds the request body struct for the package follow
type RequestBuilder ¶
type RequestBuilder struct {
// contains filtered or unexported fields
}
RequestBuilder is the builder API for the follow.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) FromJSON ¶
func (rb *RequestBuilder) FromJSON(data string) (*Request, error)
FromJSON allows to load an arbitrary json into the request structure
func (*RequestBuilder) LeaderIndex ¶
func (rb *RequestBuilder) LeaderIndex(leaderindex types.IndexName) *RequestBuilder
func (*RequestBuilder) MaxOutstandingReadRequests ¶
func (rb *RequestBuilder) MaxOutstandingReadRequests(maxoutstandingreadrequests int64) *RequestBuilder
func (*RequestBuilder) MaxOutstandingWriteRequests ¶
func (rb *RequestBuilder) MaxOutstandingWriteRequests(maxoutstandingwriterequests int64) *RequestBuilder
func (*RequestBuilder) MaxReadRequestOperationCount ¶
func (rb *RequestBuilder) MaxReadRequestOperationCount(maxreadrequestoperationcount int64) *RequestBuilder
func (*RequestBuilder) MaxReadRequestSize ¶
func (rb *RequestBuilder) MaxReadRequestSize(maxreadrequestsize string) *RequestBuilder
func (*RequestBuilder) MaxRetryDelay ¶
func (rb *RequestBuilder) MaxRetryDelay(maxretrydelay *types.DurationBuilder) *RequestBuilder
func (*RequestBuilder) MaxWriteBufferCount ¶
func (rb *RequestBuilder) MaxWriteBufferCount(maxwritebuffercount int64) *RequestBuilder
func (*RequestBuilder) MaxWriteBufferSize ¶
func (rb *RequestBuilder) MaxWriteBufferSize(maxwritebuffersize string) *RequestBuilder
func (*RequestBuilder) MaxWriteRequestOperationCount ¶
func (rb *RequestBuilder) MaxWriteRequestOperationCount(maxwriterequestoperationcount int64) *RequestBuilder
func (*RequestBuilder) MaxWriteRequestSize ¶
func (rb *RequestBuilder) MaxWriteRequestSize(maxwriterequestsize string) *RequestBuilder
func (*RequestBuilder) ReadPollTimeout ¶
func (rb *RequestBuilder) ReadPollTimeout(readpolltimeout *types.DurationBuilder) *RequestBuilder
func (*RequestBuilder) RemoteCluster ¶
func (rb *RequestBuilder) RemoteCluster(remotecluster string) *RequestBuilder