gitee.com/liuxuezhan/go-micro-v1.18.0@v1.0.0/registry/service.go (about)

     1  package registry
     2  
     3  type Service struct {
     4  	Name      string            `json:"name"`
     5  	Version   string            `json:"version"`
     6  	Metadata  map[string]string `json:"metadata"`
     7  	Endpoints []*Endpoint       `json:"endpoints"`
     8  	Nodes     []*Node           `json:"nodes"`
     9  }
    10  
    11  type Node struct {
    12  	Id       string            `json:"id"`
    13  	Address  string            `json:"address"`
    14  	Metadata map[string]string `json:"metadata"`
    15  }
    16  
    17  type Endpoint struct {
    18  	Name     string            `json:"name"`
    19  	Request  *Value            `json:"request"`
    20  	Response *Value            `json:"response"`
    21  	Metadata map[string]string `json:"metadata"`
    22  }
    23  
    24  type Value struct {
    25  	Name   string   `json:"name"`
    26  	Type   string   `json:"type"`
    27  	Values []*Value `json:"values"`
    28  }