-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: changes to file scoped namespaces
- Loading branch information
1 parent
539a007
commit aff26ac
Showing
326 changed files
with
13,704 additions
and
14,028 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
using System; | ||
|
||
namespace KafkaFlow.Sample.FlowControl | ||
namespace KafkaFlow.Sample.FlowControl; | ||
|
||
internal class SampleMessage | ||
{ | ||
internal class SampleMessage | ||
{ | ||
public Guid Id { get; set; } | ||
public Guid Id { get; set; } | ||
|
||
public string Name { get; set; } | ||
} | ||
public string Name { 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
21 changes: 10 additions & 11 deletions
21
samples/KafkaFlow.Sample.SchemaRegistry/MessageTypes/Json/JsonLogMessage.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 |
---|---|---|
@@ -1,16 +1,15 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace SchemaRegistry | ||
namespace SchemaRegistry; | ||
|
||
/// <summary> | ||
/// A simple log message. | ||
/// </summary> | ||
public class JsonLogMessage | ||
{ | ||
/// <summary> | ||
/// A simple log message. | ||
/// </summary> | ||
public class JsonLogMessage | ||
{ | ||
[JsonProperty] | ||
public string Message { get; set; } | ||
[JsonProperty] | ||
public string Message { get; set; } | ||
|
||
[JsonProperty] | ||
public string Type { get; set; } | ||
} | ||
[JsonProperty] | ||
public string Type { 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 |
---|---|---|
@@ -1,15 +1,14 @@ | ||
namespace KafkaFlow | ||
namespace KafkaFlow; | ||
|
||
/// <summary>Acknowledge type</summary> | ||
public enum Acks | ||
{ | ||
/// <summary>Acknowledge type</summary> | ||
public enum Acks | ||
{ | ||
/// <summary>Only waits leader's acknowledge</summary> | ||
Leader, | ||
/// <summary>Only waits leader's acknowledge</summary> | ||
Leader, | ||
|
||
/// <summary>Waits acknowledge from all brokers</summary> | ||
All, | ||
/// <summary>Waits acknowledge from all brokers</summary> | ||
All, | ||
|
||
/// <summary>Don't wait acknowledge</summary> | ||
None, | ||
} | ||
/// <summary>Don't wait acknowledge</summary> | ||
None, | ||
} |
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 |
---|---|---|
@@ -1,12 +1,11 @@ | ||
namespace KafkaFlow | ||
namespace KafkaFlow; | ||
|
||
/// <summary>AutoOffsetReset enum values</summary> | ||
public enum AutoOffsetReset | ||
{ | ||
/// <summary>AutoOffsetReset enum values</summary> | ||
public enum AutoOffsetReset | ||
{ | ||
/// <summary>Only reads new messages in the topic</summary> | ||
Latest, | ||
/// <summary>Only reads new messages in the topic</summary> | ||
Latest, | ||
|
||
/// <summary>Reads the topic from the beginning</summary> | ||
Earliest, | ||
} | ||
/// <summary>Reads the topic from the beginning</summary> | ||
Earliest, | ||
} |
139 changes: 69 additions & 70 deletions
139
src/KafkaFlow.Abstractions/Configuration/IClusterConfigurationBuilder.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 |
---|---|---|
@@ -1,86 +1,85 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
namespace KafkaFlow.Configuration | ||
namespace KafkaFlow.Configuration; | ||
|
||
/// <summary> | ||
/// A interface to build the cluster configuration | ||
/// </summary> | ||
public interface IClusterConfigurationBuilder | ||
{ | ||
/// <summary> | ||
/// A interface to build the cluster configuration | ||
/// Gets the dependency injection configurator | ||
/// </summary> | ||
public interface IClusterConfigurationBuilder | ||
{ | ||
/// <summary> | ||
/// Gets the dependency injection configurator | ||
/// </summary> | ||
IDependencyConfigurator DependencyConfigurator { get; } | ||
IDependencyConfigurator DependencyConfigurator { get; } | ||
|
||
/// <summary> | ||
/// Set the Kafka Brokers to be used | ||
/// </summary> | ||
/// <param name="brokers">The brokers address to be used</param> | ||
/// <returns></returns> | ||
IClusterConfigurationBuilder WithBrokers(IEnumerable<string> brokers); | ||
/// <summary> | ||
/// Set the Kafka Brokers to be used | ||
/// </summary> | ||
/// <param name="brokers">The brokers address to be used</param> | ||
/// <returns></returns> | ||
IClusterConfigurationBuilder WithBrokers(IEnumerable<string> brokers); | ||
|
||
/// <summary> | ||
/// Sets a unique name for the cluster | ||
/// </summary> | ||
/// <param name="name">A unique name</param> | ||
/// <returns></returns> | ||
IClusterConfigurationBuilder WithName(string name); | ||
/// <summary> | ||
/// Sets a unique name for the cluster | ||
/// </summary> | ||
/// <param name="name">A unique name</param> | ||
/// <returns></returns> | ||
IClusterConfigurationBuilder WithName(string name); | ||
|
||
/// <summary> | ||
/// Configures cluster security | ||
/// </summary> | ||
/// <param name="handler">A handler to sets the values</param> | ||
/// <returns></returns> | ||
IClusterConfigurationBuilder WithSecurityInformation(Action<SecurityInformation> handler); | ||
/// <summary> | ||
/// Configures cluster security | ||
/// </summary> | ||
/// <param name="handler">A handler to sets the values</param> | ||
/// <returns></returns> | ||
IClusterConfigurationBuilder WithSecurityInformation(Action<SecurityInformation> handler); | ||
|
||
/// <summary> | ||
/// Adds a producer to the cluster | ||
/// </summary> | ||
/// <param name="producer">A handler to configure the producer</param> | ||
/// <typeparam name="TProducer">A type used to get the internal producer instance</typeparam> | ||
/// <returns></returns> | ||
IClusterConfigurationBuilder AddProducer<TProducer>(Action<IProducerConfigurationBuilder> producer); | ||
/// <summary> | ||
/// Adds a producer to the cluster | ||
/// </summary> | ||
/// <param name="producer">A handler to configure the producer</param> | ||
/// <typeparam name="TProducer">A type used to get the internal producer instance</typeparam> | ||
/// <returns></returns> | ||
IClusterConfigurationBuilder AddProducer<TProducer>(Action<IProducerConfigurationBuilder> producer); | ||
|
||
/// <summary> | ||
/// Adds a producer to the cluster | ||
/// </summary> | ||
/// <param name="name">The producer name used to get its instance</param> | ||
/// <param name="producer">A handler to configure the producer</param> | ||
/// <returns></returns> | ||
IClusterConfigurationBuilder AddProducer(string name, Action<IProducerConfigurationBuilder> producer); | ||
/// <summary> | ||
/// Adds a producer to the cluster | ||
/// </summary> | ||
/// <param name="name">The producer name used to get its instance</param> | ||
/// <param name="producer">A handler to configure the producer</param> | ||
/// <returns></returns> | ||
IClusterConfigurationBuilder AddProducer(string name, Action<IProducerConfigurationBuilder> producer); | ||
|
||
/// <summary> | ||
/// Adds a consumer to the cluster | ||
/// </summary> | ||
/// <param name="consumer">A handler to configure the consumer</param> | ||
/// <returns></returns> | ||
IClusterConfigurationBuilder AddConsumer(Action<IConsumerConfigurationBuilder> consumer); | ||
/// <summary> | ||
/// Adds a consumer to the cluster | ||
/// </summary> | ||
/// <param name="consumer">A handler to configure the consumer</param> | ||
/// <returns></returns> | ||
IClusterConfigurationBuilder AddConsumer(Action<IConsumerConfigurationBuilder> consumer); | ||
|
||
/// <summary> | ||
/// Adds a handler to be executed when KafkaFlow cluster is stopping | ||
/// </summary> | ||
/// <param name="handler">A handler to KafkaFlow cluster stopping event</param> | ||
/// <returns></returns> | ||
IClusterConfigurationBuilder OnStopping(Action<IDependencyResolver> handler); | ||
/// <summary> | ||
/// Adds a handler to be executed when KafkaFlow cluster is stopping | ||
/// </summary> | ||
/// <param name="handler">A handler to KafkaFlow cluster stopping event</param> | ||
/// <returns></returns> | ||
IClusterConfigurationBuilder OnStopping(Action<IDependencyResolver> handler); | ||
|
||
/// <summary> | ||
/// Adds a handler to be executed after KafkaFlow cluster started | ||
/// </summary> | ||
/// <param name="handler">A handler to KafkaFlow cluster started event</param> | ||
/// <returns></returns> | ||
IClusterConfigurationBuilder OnStarted(Action<IDependencyResolver> handler); | ||
/// <summary> | ||
/// Adds a handler to be executed after KafkaFlow cluster started | ||
/// </summary> | ||
/// <param name="handler">A handler to KafkaFlow cluster started event</param> | ||
/// <returns></returns> | ||
IClusterConfigurationBuilder OnStarted(Action<IDependencyResolver> handler); | ||
|
||
/// <summary> | ||
/// Adds a Topic to the Cluster | ||
/// </summary> | ||
/// <param name="topicName">The topic name</param> | ||
/// <param name="numberOfPartitions">The number of Topic partitions</param> | ||
/// <param name="replicationFactor">The Topic replication factor</param> | ||
/// <returns></returns> | ||
IClusterConfigurationBuilder CreateTopicIfNotExists( | ||
string topicName, | ||
int numberOfPartitions, | ||
short replicationFactor); | ||
} | ||
/// <summary> | ||
/// Adds a Topic to the Cluster | ||
/// </summary> | ||
/// <param name="topicName">The topic name</param> | ||
/// <param name="numberOfPartitions">The number of Topic partitions</param> | ||
/// <param name="replicationFactor">The Topic replication factor</param> | ||
/// <returns></returns> | ||
IClusterConfigurationBuilder CreateTopicIfNotExists( | ||
string topicName, | ||
int numberOfPartitions, | ||
short replicationFactor); | ||
} |
Oops, something went wrong.