mirror of
https://github.com/go-micro/go-micro.git
synced 2024-12-24 10:07:04 +02:00
30 lines
788 B
Go
30 lines
788 B
Go
package registry
|
|
|
|
type Service struct {
|
|
Name string `json:"name"`
|
|
Version string `json:"version"`
|
|
Metadata map[string]string `json:"metadata"`
|
|
Endpoints []*Endpoint `json:"endpoints"`
|
|
Nodes []*Node `json:"nodes"`
|
|
}
|
|
|
|
type Node struct {
|
|
Id string `json:"id"`
|
|
Address string `json:"address"`
|
|
Port int `json:"port"`
|
|
Metadata map[string]string `json:"metadata"`
|
|
}
|
|
|
|
type Endpoint struct {
|
|
Name string `json:"name"`
|
|
Request *Value `json:"request"`
|
|
Response *Value `json:"response"`
|
|
Metadata map[string]string `json:"metadata"`
|
|
}
|
|
|
|
type Value struct {
|
|
Name string `json:"name"`
|
|
Type string `json:"type"`
|
|
Values []*Value `json:"values"`
|
|
}
|