Exemplo n.º 1
0
        private async Task <ClusterInfo> SendGossipAsync(ClusterInfo clusterInfo,
                                                         EndPoint server, DateTime deadline)
        {
            var request = new GossipRequest {
                Info   = ClusterInfo.ToGrpcClusterInfo(clusterInfo),
                Server = new GossipEndPoint(server.GetHost(), (uint)server.GetPort())
            };
            var clusterInfoDto = await _gossipClient.UpdateAsync(request, deadline : deadline.ToUniversalTime());

            return(ClusterInfo.FromGrpcClusterInfo(clusterInfoDto));
        }
Exemplo n.º 2
0
        private async Task <ClusterInfo> GetGossipAsync(DateTime deadline)
        {
            var clusterInfoDto = await _gossipClient.ReadAsync(new Empty(), deadline : deadline.ToUniversalTime());

            return(ClusterInfo.FromGrpcClusterInfo(clusterInfoDto));
        }