Example #1
0
        private async Task <List <CatalogNode> > GetCatalogNodeFromConsul(string appName)
        {
            var action  = new RestActionConsumer(_consulNetworkUrl.AbsoluteUri);
            var command = action.GetRestCommand(HttpMethod.GET, NodeQueryParameter);

            command.AddUrlSegment("appName", appName);
            var results = await action.ProcessRestCommand <List <CatalogNode> >(command);

            return(results.Data);
        }
Example #2
0
        private async Task <IRestCommandResult <List <CatalogService> > > GetServiceEndpointsFromConsul(string appName)
        {
            var action  = new RestActionConsumer(_consulNetworkUrl.AbsoluteUri);
            var command = action.GetRestCommand(HttpMethod.GET, ServiceQueryParameter);

            command.AddUrlSegment("appName", appName);
            var results = await action.ProcessRestCommand <List <CatalogService> >(command);

            _logger.Information("StatusCode " + results.StatusCode);
            return(results);
        }