Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UpdateAddress ¶
func UpdateAddress(i []Instance, conn resolver.ClientConn)
Types ¶
type NoopResolver ¶
type NoopResolver struct{}
func (*NoopResolver) Close ¶
func (r *NoopResolver) Close()
func (*NoopResolver) ResolveNow ¶
func (r *NoopResolver) ResolveNow(resolver.ResolveNowOptions)
type Option ¶
type Option func(*Options)
func RegisterInterval ¶
func RegisterTTL ¶
func ServiceName ¶
func ServiceNamespaces ¶
type Options ¶
type Options struct {
ServiceName string `json:"servicename"`
Namespaces string `json:"namespaces"`
Address string `json:"address"`
Metadata metadata.MD `json:"metadata"`
// 服务有效时长
RegisterTTL time.Duration `json:"-"` // time to live, 服务失活一段时间后自动从注册中心删除
RegisterInterval time.Duration `json:"-"` // 注册间隔时长,也可不要 默认为RegisterTTL/3
}
Registry Options
Click to show internal directories.
Click to hide internal directories.