using Grpc.Extension.Abstract.Model; using System; using System.Collections.Generic; using System.Text; namespace Grpc.Extension.AspNetCore { /// /// GrpcServerOptions /// public class GrpcServerOptions { /// /// Grpc服务地址(192.168.*.*) /// public string ServiceAddress { get; set; } /// /// 是否启用服务注册和服务发现 /// public bool EnableDiscovery { get; set; } = true; /// /// 服务注册地址(http://192.168.8.6:8500) /// public string DiscoveryUrl { get; set; } /// /// 服务注册名 /// public string DiscoveryServiceName { get; set; } /// /// 服务注册Tags(可用于版本标记) /// public string DiscoveryServiceTags { get; set; } /// /// 服务TTL(秒) /// public int DiscoveryTTLInterval { get; set; } = 10; /// /// 默认错误码 /// public int DefaultErrorCode { get { return GrpcErrorCode.DefaultErrorCode; } set { GrpcErrorCode.DefaultErrorCode = value; } } /// /// JaegerOptions /// public JaegerOptions Jaeger { get; set; } /// /// Grpc客户端调用超时时间(单位:秒) /// public double GrpcCallTimeOut { get; set; } = 10; } }