Documentation ¶
Index ¶
- func GetService(s string) *server.ServiceInfo
- func GetServiceKey(prefix string, s *server.ServiceInfo) string
- func GetServiceValue(s *server.ServiceInfo) string
- type ConsumerConfig
- type Endpoints
- type Nop
- func (n Nop) Close() error
- func (n Nop) ListServices(ctx context.Context, s string, s2 string) ([]*server.ServiceInfo, error)
- func (n Nop) RegisterService(context.Context, *server.ServiceInfo) error
- func (n Nop) UnregisterService(context.Context, *server.ServiceInfo) error
- func (n Nop) WatchServices(ctx context.Context, s string, s2 string) (chan Endpoints, error)
- type ProviderConfig
- type Registry
- type RouteConfig
- type Upstream
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetServiceKey ¶
func GetServiceKey(prefix string, s *server.ServiceInfo) string
GetServiceKey ..
Types ¶
type ConsumerConfig ¶ added in v2.7.9
type ConsumerConfig struct { ID string `json:"id"` Scheme string `json:"scheme"` Host string `json:"host"` }
ConsumerConfig config of consumer 客户端调用app的配置
type Endpoints ¶
type Endpoints struct { // 服务节点列表 Nodes map[string]server.ServiceInfo // 路由配置 RouteConfigs map[string]RouteConfig // 消费者元数据 ConsumerConfigs map[string]ConsumerConfig // 服务元信息 ProviderConfigs map[string]ProviderConfig }
Endpoints ...
func (*Endpoints) DeepCopyInfo ¶ added in v2.7.9
type Nop ¶
type Nop struct{}
Nop registry, used for local development/debugging
func (Nop) ListServices ¶
ListServices ...
func (Nop) RegisterService ¶
RegisterService ...
func (Nop) UnregisterService ¶
UnregisterService ...
type ProviderConfig ¶ added in v2.7.9
type ProviderConfig struct { ID string `json:"id"` Scheme string `json:"scheme"` Host string `json:"host"` Region string `json:"region"` Zone string `json:"zone"` Deployment string `json:"deployment"` Metadata map[string]string `json:"metadata"` Enable bool `json:"enable"` }
ProviderConfig config of provider 通过这个配置,修改provider的属性
type Registry ¶
type Registry interface { RegisterService(context.Context, *server.ServiceInfo) error UnregisterService(context.Context, *server.ServiceInfo) error ListServices(context.Context, string, string) ([]*server.ServiceInfo, error) WatchServices(context.Context, string, string) (chan Endpoints, error) io.Closer }
Click to show internal directories.
Click to hide internal directories.