Class ServiceQuery
Namespace: Consul
Assembly: Consul.dll
ServiceQuery is used to query for a set of healthy nodes offering a specific service.
public class ServiceQuery
Inheritance
Inherited Members
object.Equals(object) , object.Equals(object, object) , object.GetHashCode() , object.GetType() , object.MemberwiseClone() , object.ReferenceEquals(object, object) , object.ToString()
Properties
Failover
Failover controls what we do if there are no healthy nodes in the local datacenter.
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public QueryDatacenterOptions Failover { get; set; }
Property Value
Near
Near allows baking in the name of a node to automatically distance- sort from. The magic "_agent" value is supported, which sorts near the agent which initiated the request by default.
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string Near { get; set; }
Property Value
OnlyPassing
If OnlyPassing is true then we will only include nodes with passing health checks (critical AND warning checks will cause a node to be discarded)
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public bool OnlyPassing { get; set; }
Property Value
Service
Service is the service to query.
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string Service { get; set; }
Property Value
Tags
Tags are a set of required and/or disallowed tags. If a tag is in this list it must be present. If the tag is preceded with "!" then it is disallowed.
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public List<string> Tags { get; set; }