-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* make pulsar binding * fix formatting issue * Update src/Saunter/AsyncApiSchema/v2/Bindings/Pulsar/PulsarServerBinding.cs
- Loading branch information
1 parent
6a3441d
commit 1bd5ed1
Showing
10 changed files
with
142 additions
and
1 deletion.
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
83 changes: 83 additions & 0 deletions
83
src/Saunter/AsyncApiSchema/v2/Bindings/Pulsar/PulsarChannelBinding.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,83 @@ | ||
using System.Collections.Generic; | ||
using System.Runtime.Serialization; | ||
using Newtonsoft.Json; | ||
|
||
namespace Saunter.AsyncApiSchema.v2.Bindings.Pulsar | ||
{ | ||
/// <remarks> | ||
/// See: https://github.com/asyncapi/bindings/tree/master/pulsar#channel-binding-object | ||
/// </remarks> | ||
public class PulsarChannelBinding | ||
{ | ||
/// <summary> | ||
/// The version of this binding. If omitted, "latest" MUST be assumed. | ||
/// </summary> | ||
[JsonProperty("bindingVersion", NullValueHandling = NullValueHandling.Ignore)] | ||
public string BindingVersion { get; set; } | ||
|
||
/// <summary> | ||
/// The namespace associated with the topic. | ||
/// </summary> | ||
[JsonProperty("namespace", NullValueHandling = NullValueHandling.Ignore)] | ||
public string Namespace { get; set; } | ||
|
||
/// <summary> | ||
/// persistence of the topic in Pulsar persistent or non-persistent. | ||
/// </summary> | ||
[JsonProperty("persistence", NullValueHandling = NullValueHandling.Ignore)] | ||
public Persistence? Persistence { get; set; } | ||
|
||
/// <summary> | ||
/// Topic compaction threshold given in bytes. | ||
/// </summary> | ||
[JsonProperty("compaction", NullValueHandling = NullValueHandling.Ignore)] | ||
public int? Compaction { get; set; } | ||
|
||
/// <summary> | ||
/// A list of clusters the topic is replicated to. | ||
/// </summary> | ||
[JsonProperty("geoReplication", NullValueHandling = NullValueHandling.Ignore)] | ||
public IList<string> GeoReplication { get; set; } | ||
|
||
/// <summary> | ||
/// Topic retention policy. | ||
/// </summary> | ||
[JsonProperty("retention", NullValueHandling = NullValueHandling.Ignore)] | ||
public RetentionDefinition Retention { get; set; } | ||
|
||
/// <summary> | ||
/// Message Time-to-live in seconds. | ||
/// </summary> | ||
[JsonProperty("ttl", NullValueHandling = NullValueHandling.Ignore)] | ||
public int? TTL { get; set; } | ||
|
||
/// <summary> | ||
/// When Message deduplication is enabled, it ensures that each message produced on Pulsar topics is persisted to disk only once. | ||
/// </summary> | ||
[JsonProperty("deduplication", NullValueHandling = NullValueHandling.Ignore)] | ||
public bool? Deduplication { get; set; } | ||
} | ||
|
||
public enum Persistence | ||
{ | ||
[EnumMember(Value = "persistent")] | ||
Persistent, | ||
[EnumMember(Value = "non-persistent")] | ||
NonPersistent, | ||
} | ||
|
||
public class RetentionDefinition | ||
{ | ||
/// <summary> | ||
/// Time given in Minutes. 0 = Disable message retention (by default). | ||
/// </summary> | ||
[JsonProperty("time", NullValueHandling = NullValueHandling.Ignore)] | ||
public int Time { get; set; } | ||
|
||
/// <summary> | ||
/// Size given in MegaBytes. 0 = Disable message retention (by default). | ||
/// </summary> | ||
[JsonProperty("size", NullValueHandling = NullValueHandling.Ignore)] | ||
public int Size { get; set; } | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
src/Saunter/AsyncApiSchema/v2/Bindings/Pulsar/PulsarMessageBinding.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,12 @@ | ||
namespace Saunter.AsyncApiSchema.v2.Bindings.Pulsar | ||
{ | ||
/// <summary> | ||
/// This object MUST NOT contain any properties. Its name is reserved for future use. | ||
/// </summary> | ||
/// <remarks> | ||
/// See: https://github.com/asyncapi/bindings/blob/master/pulsar/README.md#message-binding-object | ||
/// </remarks> | ||
public class PulsarMessageBinding | ||
{ | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
src/Saunter/AsyncApiSchema/v2/Bindings/Pulsar/PulsarOperationBinding.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,12 @@ | ||
namespace Saunter.AsyncApiSchema.v2.Bindings.Pulsar | ||
{ | ||
/// <summary> | ||
/// This object MUST NOT contain any properties. Its name is reserved for future use. | ||
/// </summary> | ||
/// <remarks> | ||
/// See: https://github.com/asyncapi/bindings/blob/master/pulsar/README.md#operation-binding-object | ||
/// </remarks> | ||
public class PulsarOperationBinding | ||
{ | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
src/Saunter/AsyncApiSchema/v2/Bindings/Pulsar/PulsarServerBinding.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,16 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace Saunter.AsyncApiSchema.v2.Bindings.Pulsar | ||
{ | ||
/// <remarks> | ||
/// See: https://github.com/asyncapi/bindings/tree/master/pulsar#server-binding-object | ||
/// </remarks> | ||
public class PulsarServerBinding | ||
{ | ||
/// <summary> | ||
/// The pulsar tenant. If omitted, "public" must be assumed. | ||
/// </summary> | ||
[JsonProperty("tenant", NullValueHandling = NullValueHandling.Ignore)] | ||
public string Tenant { get; set; } | ||
} | ||
} |
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 @@ | ||
https://github.com/asyncapi/bindings/blob/master/pulsar/README.md |
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