raw output: add custom fields
This will include all configured custom fields in the raw output under the "custom_fields" key.
This commit is contained in:
parent
70cdb53b49
commit
9a70560cfb
|
@ -14,6 +14,7 @@ type RawNode struct {
|
|||
Statistics *data.Statistics `json:"statistics"`
|
||||
Nodeinfo *data.Nodeinfo `json:"nodeinfo"`
|
||||
Neighbours *data.Neighbours `json:"neighbours"`
|
||||
CustomFields map[string]interface{} `json:"custom_fields"`
|
||||
}
|
||||
|
||||
type NodeList struct {
|
||||
|
@ -37,6 +38,7 @@ func transform(nodes *runtime.Nodes) *NodeList {
|
|||
Statistics: nodeOrigin.Statistics,
|
||||
Nodeinfo: nodeOrigin.Nodeinfo,
|
||||
Neighbours: nodeOrigin.Neighbours,
|
||||
CustomFields: nodeOrigin.CustomFields,
|
||||
}
|
||||
nodelist.List = append(nodelist.List, node)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue