From 1ee8ea8d8478154b7d813e82e7760a256bc51428 Mon Sep 17 00:00:00 2001 From: Erdem Agaoglu Date: Wed, 14 Nov 2018 20:13:40 +0300 Subject: [PATCH 1/2] Add nodemeta --- Consul/Catalog.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Consul/Catalog.cs b/Consul/Catalog.cs index 3337d6f..30c82c1 100644 --- a/Consul/Catalog.cs +++ b/Consul/Catalog.cs @@ -31,13 +31,18 @@ public class Node [JsonProperty(PropertyName = "Node")] public string Name { get; set; } public string Address { get; set; } + public string Datacenter { get; set; } public Dictionary TaggedAddresses { get; set; } + public Dictionary Meta { get; set; } } public class CatalogService { public string Node { get; set; } public string Address { get; set; } + public string Datacenter { get; set; } + public IDictionary TaggedAddresses { get; set; } + public IDictionary NodeMeta { get; set; } public string ServiceID { get; set; } public string ServiceName { get; set; } public string ServiceAddress { get; set; } @@ -63,6 +68,8 @@ public class CatalogRegistration public string Node { get; set; } public string Address { get; set; } public string Datacenter { get; set; } + public IDictionary TaggedAddresses { get; set; } + public IDictionary NodeMeta { get; set; } public AgentService Service { get; set; } public AgentCheck Check { get; set; } } From f5c5ab7bcef0f7e31cd2780242b1a90d299920dc Mon Sep 17 00:00:00 2001 From: Erdem Agaoglu Date: Fri, 16 Nov 2018 18:08:36 +0300 Subject: [PATCH 2/2] Make AgentCheck usable at catalog registration --- Consul/Agent.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Consul/Agent.cs b/Consul/Agent.cs index 1350f84..b22bfe1 100644 --- a/Consul/Agent.cs +++ b/Consul/Agent.cs @@ -125,9 +125,16 @@ public class AgentCheck public HealthStatus Status { get; set; } public string Notes { get; set; } + + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public string Output { get; set; } public string ServiceID { get; set; } + + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public string ServiceName { get; set; } + + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public AgentServiceCheck Definition { get; set; } } ///