Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { HasEtcd() bool GetTarget(string) string MustNewDiscovery() register.IDiscovery }
type ClientConf ¶
type ClientConf struct { configure.EtcdConf `yaml:"Etcd"` NonBlock bool `yaml:"NonBlock"` Model string `yaml:"Model"` }
func (*ClientConf) GetTarget ¶
func (c *ClientConf) GetTarget(serverName string) string
GetTarget 返回一个用来做服务发现的 target
func (*ClientConf) MustNewDiscovery ¶
func (c *ClientConf) MustNewDiscovery() register.IDiscovery
MustNewDiscovery new 一个 Discovery
type ServerConf ¶
type ServerConf struct { configure.EtcdConf `yaml:"Etcd"` ServerName string `yaml:"ServerName"` Endpoint string `yaml:"Endpoint"` Model string `yaml:"Model"` }
func (*ServerConf) GetEndpoint ¶
func (s *ServerConf) GetEndpoint() string
GetEndpoint 返回服务的监听IP与PORT
func (*ServerConf) GetNamespace ¶
func (s *ServerConf) GetNamespace() string
GetNamespace 返回 namespace
func (*ServerConf) GetServiceName ¶
func (s *ServerConf) GetServiceName() string
GetServiceName 返回服务名
func (*ServerConf) MustNewRegister ¶
func (s *ServerConf) MustNewRegister() register.IRegister
MustNewRegister new 一个注册器
Click to show internal directories.
Click to hide internal directories.