Documentation ¶
Index ¶
- Variables
- func NewRegistry(settings ...option.Setting[RegistryOptions]) discovery.IRegistry
- type Option
- func (Option) Default() option.Setting[RegistryOptions]
- func (Option) EtcdClient(cli *clientv3.Client) option.Setting[RegistryOptions]
- func (Option) EtcdConfig(config *clientv3.Config) option.Setting[RegistryOptions]
- func (Option) FastAddresses(addrs ...string) option.Setting[RegistryOptions]
- func (Option) FastAuth(username, password string) option.Setting[RegistryOptions]
- func (Option) FastSecure(secure bool) option.Setting[RegistryOptions]
- func (Option) FastTLSConfig(conf *tls.Config) option.Setting[RegistryOptions]
- func (Option) KeyPrefix(prefix string) option.Setting[RegistryOptions]
- func (Option) WatchChanSize(size int) option.Setting[RegistryOptions]
- type RegistryOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Install = plugin.Install Uninstall = plugin.Uninstall )
Functions ¶
func NewRegistry ¶
func NewRegistry(settings ...option.Setting[RegistryOptions]) discovery.IRegistry
NewRegistry 创建registry插件,可以配合cache registry将数据缓存本地,提高查询效率
Types ¶
type Option ¶
type Option struct{}
Option 所有选项设置器
func (Option) EtcdClient ¶
EtcdClient etcd客户端,最优先使用
func (Option) EtcdConfig ¶
EtcdConfig etcd配置,次优先使用
func (Option) FastAddresses ¶
func (Option) FastAddresses(addrs ...string) option.Setting[RegistryOptions]
FastAddresses 快速设置etcd服务地址
func (Option) FastAuth ¶
func (Option) FastAuth(username, password string) option.Setting[RegistryOptions]
FastAuth 快速设置etcd鉴权信息
func (Option) FastSecure ¶
func (Option) FastSecure(secure bool) option.Setting[RegistryOptions]
FastSecure 快速设置是否加密etcd连接
func (Option) FastTLSConfig ¶
FastTLSConfig 快速设置加密etcd连接的配置
func (Option) KeyPrefix ¶
func (Option) KeyPrefix(prefix string) option.Setting[RegistryOptions]
KeyPrefix 所有key的前缀
func (Option) WatchChanSize ¶
func (Option) WatchChanSize(size int) option.Setting[RegistryOptions]
WatchChanSize 监控服务变化的channel大小
Click to show internal directories.
Click to hide internal directories.