-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement CCR Follow Info API (#3927)
Implement CCR Follow Info API
- Loading branch information
Showing
12 changed files
with
224 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
src/Nest/XPack/CrossClusterReplication/Follow/FollowInfo/FollowConfig.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
using System; | ||
using System.Runtime.Serialization; | ||
|
||
namespace Nest | ||
{ | ||
public class FollowConfig | ||
{ | ||
[DataMember(Name = "max_read_request_operation_count")] | ||
public int MaximumReadRequestOperationCount { get; internal set; } | ||
|
||
[DataMember(Name = "max_read_request_size")] | ||
public string MaximumReadRequestSize { get; internal set; } | ||
|
||
[DataMember(Name = "max_outstanding_read_requests")] | ||
public int MaximumOutstandingReadRequests { get; internal set; } | ||
|
||
[DataMember(Name = "max_write_request_operation_count")] | ||
public int MaximumWriteRequestOperationCount { get; internal set; } | ||
|
||
[DataMember(Name = "max_write_request_size")] | ||
public string MaximumWriteRequestSize { get; internal set; } | ||
|
||
[DataMember(Name = "max_outstanding_write_requests")] | ||
public int MaximumOutstandingWriteRequests { get; internal set; } | ||
|
||
[DataMember(Name = "max_write_buffer_count")] | ||
public int MaximumWriteBufferCount { get; internal set; } | ||
|
||
[DataMember(Name = "max_write_buffer_size")] | ||
public string MaximumWriteBufferSize { get; internal set; } | ||
|
||
[DataMember(Name = "max_retry_delay")] | ||
public Time MaximumRetryDelay { get; internal set; } | ||
|
||
[DataMember(Name = "read_poll_timeout")] | ||
public Time ReadPollTimeout { get; internal set; } | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/Nest/XPack/CrossClusterReplication/Follow/FollowInfo/FollowInfoRequest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
namespace Nest | ||
{ | ||
/// <summary> | ||
/// Retrieves information about all follower indices. | ||
/// </summary> | ||
[MapsApi("ccr.follow_info.json")] | ||
public partial interface IFollowInfoRequest { } | ||
|
||
/// <inheritdoc cref="IFollowInfoRequest" /> | ||
public partial class FollowInfoRequest { } | ||
|
||
/// <inheritdoc cref="IFollowInfoRequest" /> | ||
public partial class FollowInfoDescriptor { } | ||
} |
30 changes: 30 additions & 0 deletions
30
src/Nest/XPack/CrossClusterReplication/Follow/FollowInfo/FollowInfoResponse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System.Collections.Generic; | ||
using System.Runtime.Serialization; | ||
using Elasticsearch.Net; | ||
|
||
namespace Nest | ||
{ | ||
public class FollowInfoResponse : ResponseBase | ||
{ | ||
[DataMember(Name = "follower_indices")] | ||
public IReadOnlyCollection<FollowerInfo> FollowerIndices { get; internal set; } = EmptyReadOnly<FollowerInfo>.Collection; | ||
} | ||
|
||
public class FollowerInfo | ||
{ | ||
[DataMember(Name = "follower_index")] | ||
public string FollowerIndex { get; internal set; } | ||
|
||
[DataMember(Name = "remote_cluster")] | ||
public string RemoteCluster { get; internal set; } | ||
|
||
[DataMember(Name = "leader_index")] | ||
public string LeaderIndex { get; internal set; } | ||
|
||
[DataMember(Name = "status")] | ||
public FollowerIndexStatus Status { get; internal set; } | ||
|
||
[DataMember(Name = "parameters")] | ||
public FollowConfig Parameters { get; internal set; } | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
src/Nest/XPack/CrossClusterReplication/Follow/FollowInfo/FollowerIndexStatus.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System.Runtime.Serialization; | ||
using Elasticsearch.Net; | ||
|
||
namespace Nest | ||
{ | ||
[StringEnum] | ||
public enum FollowerIndexStatus | ||
{ | ||
[EnumMember(Value = "active")] | ||
Active, | ||
|
||
[EnumMember(Value = "paused")] | ||
Paused | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters