Skip to main content

Class QueryResult

Namespace: Consul
Assembly: Consul.dll

The result of a Consul API query

public class QueryResult : ConsulResult

Inheritance​

object ← ConsulResult ← QueryResult

Derived​

QueryResult<T>

Inherited Members​

ConsulResult.RequestTime , ConsulResult.StatusCode , object.Equals(object) , object.Equals(object, object) , object.GetHashCode() , object.GetType() , object.MemberwiseClone() , object.ReferenceEquals(object, object) , object.ToString()

Constructors​

QueryResult()​

public QueryResult()

QueryResult(QueryResult)​

public QueryResult(QueryResult other)

Parameters​

other QueryResult

Properties​

AddressTranslationEnabled​

Is address translation enabled for HTTP responses on this agent

public bool AddressTranslationEnabled { get; set; }

Property Value​

bool

Age​

For cache hits, the HTTP Age header is always set in the response to indicate how many seconds since that response was fetched from the servers. As long as the local agent has an active connection to the servers, the age will always be 0 since the value is up-to-date.

public TimeSpan Age { get; set; }

Property Value​

TimeSpan

KnownLeader​

Is there a known leader

public bool KnownLeader { get; set; }

Property Value​

bool

LastContact​

Time of last contact from the leader for the server servicing the request

public TimeSpan LastContact { get; set; }

Property Value​

TimeSpan

LastIndex​

The index number when the query was serviced. This can be used as a WaitIndex to perform a blocking query

public ulong LastIndex { get; set; }

Property Value​

ulong

XCache​

In all cases the HTTP X-Cache header is always set in the response to either HIT or MISS indicating whether the response was served from cache or not.

public QueryResult.CacheResult? XCache { get; set; }

Property Value​

QueryResult .CacheResult ?

  • Constructors
    • QueryResult()
    • QueryResult(QueryResult)
  • Properties
    • AddressTranslationEnabled
    • Age
    • KnownLeader
    • LastContact
    • LastIndex
    • XCache