Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientConf ¶
type ClientConf struct { configure.EtcdConf `yaml:"Etcd"` NonBlock bool `yaml:"NonBlock"` Model string `yaml:"Model"` Timeout int `yaml:"Timeout"` }
func (*ClientConf) BuildTarget ¶ added in v0.1.10
func (c *ClientConf) BuildTarget(serverName string) string
BuildTarget 返回一个用来做服务发现的 target
func (*ClientConf) MustNewDiscovery ¶
func (c *ClientConf) MustNewDiscovery() register.IDiscovery
MustNewDiscovery new 一个 Discovery
func (*ClientConf) NoBlock ¶ added in v0.1.4
func (c *ClientConf) NoBlock() bool
func (*ClientConf) TimeOut ¶ added in v0.1.4
func (c *ClientConf) TimeOut() int
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.