consul: Adding indexed versions of return structs

This commit is contained in:
Armon Dadgar 2014-02-05 10:44:28 -08:00
parent ffa7173953
commit 630aa33cf4
1 changed files with 25 additions and 0 deletions

View File

@ -142,6 +142,31 @@ type CheckServiceNode struct {
}
type CheckServiceNodes []CheckServiceNode
type IndexedNodes struct {
Index uint64
Nodes Nodes
}
type IndexedServices struct {
Index uint64
Services map[string][]string
}
type IndexedServiceNodes struct {
Index uint64
ServiceNodes ServiceNodes
}
type IndexedNodeServices struct {
Index uint64
NodeServices *NodeServices
}
type IndexedHealthChecks struct {
Index uint64
HealthChecks HealthChecks
}
// Decode is used to decode a MsgPack encoded object
func Decode(buf []byte, out interface{}) error {
var handle codec.MsgpackHandle