public async Task <ServiceInformation[]> FindServiceInstancesAsync(string name)
        {
            var x   = new ConsulRestClient();
            var res = await x.FindServiceAsync(name).ConfigureAwait(false);

            return(res);
        }
        public async Task RegisterServiceAsync(string serviceName, string serviceId, string version, Uri uri)
        {
            _serviceName = serviceName;
            _serviceId   = serviceId;
            _version     = version;
            _uri         = uri;
            var x = new ConsulRestClient();
            await x.RegisterServiceAsync(serviceName, serviceId, uri).ConfigureAwait(false);

            StartReaper();
        }
Exemple #3
0
        public async Task <ServiceInformation[]> FindServiceInstancesAsync(string name)
        {
            if (_useEbayFabio)
            {
                return(new[] { new ServiceInformation("http://localhost", 9999) });
            }

            var x   = new ConsulRestClient();
            var res = await x.FindServiceAsync(name).ConfigureAwait(false);

            return(res);
        }
        public async Task <T> KvGetAsync <T>(string key)
        {
            var x = new ConsulRestClient();

            return(await x.KVGetAsync <T>(key).ConfigureAwait(false));;
        }
 public async Task KvPutAsync(string key, object value)
 {
     var x = new ConsulRestClient();
     await x.KVPutAsync(key, value).ConfigureAwait(false);
 }