consul: Move the Index into QueryMeta
This commit is contained in:
parent
5b91b6f06e
commit
959ffb5758
|
@ -79,6 +79,9 @@ func (w WriteRequest) AllowStaleRead() bool {
|
||||||
// QueryMeta allows a query response to include potentially
|
// QueryMeta allows a query response to include potentially
|
||||||
// useful metadata about a query
|
// useful metadata about a query
|
||||||
type QueryMeta struct {
|
type QueryMeta struct {
|
||||||
|
// This is the index associated with the read
|
||||||
|
Index uint64
|
||||||
|
|
||||||
// If AllowStale is used, this is time elapsed since
|
// If AllowStale is used, this is time elapsed since
|
||||||
// last contact between the follower and leader. This
|
// last contact between the follower and leader. This
|
||||||
// can be used to gauge staleness.
|
// can be used to gauge staleness.
|
||||||
|
@ -224,37 +227,31 @@ type CheckServiceNode struct {
|
||||||
type CheckServiceNodes []CheckServiceNode
|
type CheckServiceNodes []CheckServiceNode
|
||||||
|
|
||||||
type IndexedNodes struct {
|
type IndexedNodes struct {
|
||||||
Index uint64
|
|
||||||
Nodes Nodes
|
Nodes Nodes
|
||||||
QueryMeta
|
QueryMeta
|
||||||
}
|
}
|
||||||
|
|
||||||
type IndexedServices struct {
|
type IndexedServices struct {
|
||||||
Index uint64
|
|
||||||
Services Services
|
Services Services
|
||||||
QueryMeta
|
QueryMeta
|
||||||
}
|
}
|
||||||
|
|
||||||
type IndexedServiceNodes struct {
|
type IndexedServiceNodes struct {
|
||||||
Index uint64
|
|
||||||
ServiceNodes ServiceNodes
|
ServiceNodes ServiceNodes
|
||||||
QueryMeta
|
QueryMeta
|
||||||
}
|
}
|
||||||
|
|
||||||
type IndexedNodeServices struct {
|
type IndexedNodeServices struct {
|
||||||
Index uint64
|
|
||||||
NodeServices *NodeServices
|
NodeServices *NodeServices
|
||||||
QueryMeta
|
QueryMeta
|
||||||
}
|
}
|
||||||
|
|
||||||
type IndexedHealthChecks struct {
|
type IndexedHealthChecks struct {
|
||||||
Index uint64
|
|
||||||
HealthChecks HealthChecks
|
HealthChecks HealthChecks
|
||||||
QueryMeta
|
QueryMeta
|
||||||
}
|
}
|
||||||
|
|
||||||
type IndexedCheckServiceNodes struct {
|
type IndexedCheckServiceNodes struct {
|
||||||
Index uint64
|
|
||||||
Nodes CheckServiceNodes
|
Nodes CheckServiceNodes
|
||||||
QueryMeta
|
QueryMeta
|
||||||
}
|
}
|
||||||
|
@ -304,7 +301,6 @@ func (r *KeyRequest) RequestDatacenter() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
type IndexedDirEntries struct {
|
type IndexedDirEntries struct {
|
||||||
Index uint64
|
|
||||||
Entries DirEntries
|
Entries DirEntries
|
||||||
QueryMeta
|
QueryMeta
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue