コード例 #1
0
        private void OnGetServices(SvcDiscovery.GetServices msg)
        {
            Log.Info("{@Event}", msg);

            var response = new SvcDiscovery.SetServices();

            Services.ForEach(x => response.Services.Add(x));

            Sender.Tell(response, Self);
        }
コード例 #2
0
        private void OnServices(SvcDiscovery.SetServices msg)
        {
            Log.Info("{@Event}", msg);

            initialized = true;

            msg.Services.ForEach(x =>
            {
                if (!Services.Any(svc => svc.ClusterAddress.Equals(x.ClusterAddress)))
                {
                    Services.Add(x);
                }
            });

            DecrementAck();
        }