internal RaftClusterMember(IHostingContext context, Uri remoteMember, Uri resourcePath) : base(context.CreateHttpHandler(), true) { this.resourcePath = resourcePath; this.context = context; status = new AtomicEnum <ClusterMemberStatus>(ClusterMemberStatus.Unknown); BaseAddress = remoteMember; endPoint = remoteMember.ToEndPoint() ?? throw new UriFormatException(ExceptionMessages.UnresolvedHostName(remoteMember.Host)); Id = ClusterMemberId.FromEndPoint(endPoint); DefaultRequestHeaders.UserAgent.Add(new ProductInfoHeaderValue(UserAgent, (GetType().Assembly.GetName().Version ?? new Version()).ToString())); }
internal CustomMessage(ClusterMemberId sender, IMessage message, MessageReader <T> reader) : base(sender, message, DeliveryMode.RequestReply) => this.reader = reader;
private static bool IsMatchedById(RaftClusterMember actual, ClusterMemberId expected) => actual.Id == expected;