-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7ed987e
commit 1b904bb
Showing
26 changed files
with
324 additions
and
314 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,30 +1,26 @@ | ||
using System.Reflection; | ||
|
||
namespace Core.ServiceMesh.Abstractions; | ||
namespace Core.ServiceMesh.Abstractions; | ||
|
||
public interface IServiceMesh | ||
{ | ||
/// <summary> | ||
/// Create remote proxy for service interface. | ||
/// Create remote proxy for service interface. | ||
/// </summary> | ||
/// <typeparam name="T">service interface</typeparam> | ||
/// <returns>proxy service implementation</returns> | ||
T CreateProxy<T>() where T : class; | ||
|
||
/// <summary> | ||
/// Publish message and await confirmation. | ||
/// Requires at least one consumer or timeout. | ||
/// Publish message and await confirmation. | ||
/// Requires at least one consumer or timeout. | ||
/// </summary> | ||
ValueTask PublishAsync(object message, int retry = 3, TimeSpan? retryWait = null, string? id = null); | ||
|
||
/// <summary> | ||
/// Send message and ignore confirmation | ||
/// Send message and ignore confirmation | ||
/// </summary> | ||
ValueTask SendAsync(object message); | ||
|
||
ValueTask<T> RequestAsync<T>(string subject, object[] args, Type[] generics); | ||
ValueTask RequestAsync(string subject, object[] args, Type[] generics); | ||
IAsyncEnumerable<T> StreamAsync<T>(string subject, object[] args, Type[] generics); | ||
|
||
|
||
} |
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,4 +1,5 @@ | ||
using System.Diagnostics; | ||
|
||
namespace Core.ServiceMesh.Abstractions; | ||
|
||
public static class ServiceMeshActivity | ||
|
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
17 changes: 11 additions & 6 deletions
17
Core.ServiceMesh.SourceGen/Core/ImmutableEquatableArray.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,14 +1,19 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
namespace Core.ServiceMesh.SourceGen.Core | ||
namespace Core.ServiceMesh.SourceGen.Core; | ||
|
||
internal static class ImmutableEquatableArray | ||
{ | ||
internal static class ImmutableEquatableArray | ||
public static ImmutableEquatableArray<T> Empty<T>() | ||
where T : IEquatable<T> | ||
{ | ||
public static ImmutableEquatableArray<T> Empty<T>() | ||
where T : IEquatable<T> => ImmutableEquatableArray<T>.Empty; | ||
return ImmutableEquatableArray<T>.Empty; | ||
} | ||
|
||
public static ImmutableEquatableArray<T> ToImmutableEquatableArray<T>(this IEnumerable<T> values) | ||
where T : IEquatable<T> => values == null ? Empty<T>() : new(values); | ||
public static ImmutableEquatableArray<T> ToImmutableEquatableArray<T>(this IEnumerable<T> values) | ||
where T : IEquatable<T> | ||
{ | ||
return values == null ? Empty<T>() : new ImmutableEquatableArray<T>(values); | ||
} | ||
} |
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
Oops, something went wrong.