diff --git a/registry/registry.go b/registry/registry.go index 6ec72292..291a1988 100644 --- a/registry/registry.go +++ b/registry/registry.go @@ -28,6 +28,33 @@ type Registry interface { String() string } +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"` + 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"` +} + type Option func(*Options) type RegisterOption func(*RegisterOptions) diff --git a/registry/service.go b/registry/service.go deleted file mode 100644 index 5259a6b6..00000000 --- a/registry/service.go +++ /dev/null @@ -1,28 +0,0 @@ -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"` - 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"` -}