37 lines
1.2 KiB
C#
37 lines
1.2 KiB
C#
using NATS.Server.Auth;
|
|
|
|
namespace NATS.Server.Imports;
|
|
|
|
public sealed class ServiceExport
|
|
{
|
|
/// <summary>
|
|
/// Gets authorization rules controlling which accounts may import this service.
|
|
/// </summary>
|
|
public ExportAuth Auth { get; init; } = new();
|
|
|
|
/// <summary>
|
|
/// Gets the exporting account that owns this service definition.
|
|
/// </summary>
|
|
public Account? Account { get; init; }
|
|
|
|
/// <summary>
|
|
/// Gets the response mode expected from service responders (singleton or streamed).
|
|
/// </summary>
|
|
public ServiceResponseType ResponseType { get; init; } = ServiceResponseType.Singleton;
|
|
|
|
/// <summary>
|
|
/// Gets the threshold used for service latency advisories and slow-response tracking.
|
|
/// </summary>
|
|
public TimeSpan ResponseThreshold { get; init; } = TimeSpan.FromMinutes(2);
|
|
|
|
/// <summary>
|
|
/// Gets optional service latency sampling configuration for exported service calls.
|
|
/// </summary>
|
|
public ServiceLatency? Latency { get; init; }
|
|
|
|
/// <summary>
|
|
/// Gets a value indicating whether distributed tracing headers are allowed for this service.
|
|
/// </summary>
|
|
public bool AllowTrace { get; init; }
|
|
}
|