mirror of
https://github.com/go-micro/go-micro.git
synced 2024-11-30 08:06:40 +02:00
add json tags to registry service
This commit is contained in:
parent
8cfad5db33
commit
ed75f84584
@ -1,29 +1,29 @@
|
|||||||
package registry
|
package registry
|
||||||
|
|
||||||
type Service struct {
|
type Service struct {
|
||||||
Name string
|
Name string `json:"name"`
|
||||||
Version string
|
Version string `json:"version"`
|
||||||
Metadata map[string]string
|
Metadata map[string]string `json:"metadata"`
|
||||||
Endpoints []*Endpoint
|
Endpoints []*Endpoint `json:"endpoints"`
|
||||||
Nodes []*Node
|
Nodes []*Node `json:"nodes"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Node struct {
|
type Node struct {
|
||||||
Id string
|
Id string `json:"id"`
|
||||||
Address string
|
Address string `json:"address"`
|
||||||
Port int
|
Port int `json:"port"`
|
||||||
Metadata map[string]string
|
Metadata map[string]string `json:"metadata"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Endpoint struct {
|
type Endpoint struct {
|
||||||
Name string
|
Name string `json:"name"`
|
||||||
Request *Value
|
Request *Value `json:"request"`
|
||||||
Response *Value
|
Response *Value `json:"response"`
|
||||||
Metadata map[string]string
|
Metadata map[string]string `json:"metadata"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Value struct {
|
type Value struct {
|
||||||
Name string
|
Name string `json:"name"`
|
||||||
Type string
|
Type string `json:"type"`
|
||||||
Values []*Value
|
Values []*Value `json:"values"`
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user