Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiscoveryOptions ¶
type DiscoveryOptions struct { // Address , registry center host and port ,like 127.0.0.1:8500 Address string `mapstructure:"address" json:"address,omitempty"` // Scheme , like http or https Scheme string `mapstructure:"scheme" json:"scheme,omitempty"` // ServerName , server name ServerName string `mapstructure:"server-name" json:"server-name,omitempty"` // Type , discovery type Type RegistryDiscoveryType `mapstructure:"type" json:"type,omitempty"` }
DiscoveryOptions 用于服务发现的注册中心的配置对象
func NewDiscoveryOptions ¶
func NewDiscoveryOptions() *DiscoveryOptions
func (*DiscoveryOptions) AddFlags ¶
func (o *DiscoveryOptions) AddFlags(fs *pflag.FlagSet)
func (*DiscoveryOptions) Validate ¶
func (o *DiscoveryOptions) Validate() error
type RegistryDiscoveryType ¶
type RegistryDiscoveryType string
const ( RegistryDiscoveryTypeNativeType RegistryDiscoveryType = "native_type" RegistryDiscoveryTypeConsul RegistryDiscoveryType = "consul" RegistryDiscoveryTypeEtcd RegistryDiscoveryType = "etcd" RegistryDiscoveryTypeEureka RegistryDiscoveryType = "eureka" RegistryDiscoveryTypeKubernetes RegistryDiscoveryType = "kubernetes" RegistryDiscoveryTypeNacos RegistryDiscoveryType = "nacos" RegistryDiscoveryTypeZookeeper RegistryDiscoveryType = "zookeeper" )
type RegistryOptions ¶
type RegistryOptions struct { // Address , registry center host and port ,like 127.0.0.1:8500 Address string `mapstructure:"address" json:"address,omitempty"` // Scheme , like http or https Scheme string `mapstructure:"scheme" json:"scheme,omitempty"` // Tags Tags []string `mapstructure:"tags" json:"tags,omitempty"` // Type , registry type Type RegistryDiscoveryType `mapstructure:"type" json:"type,omitempty"` }
RegistryOptions 注册中心的配置对象
func NewRegistryOptions ¶
func NewRegistryOptions() *RegistryOptions
func (*RegistryOptions) AddFlags ¶
func (o *RegistryOptions) AddFlags(fs *pflag.FlagSet)
func (*RegistryOptions) Validate ¶
func (o *RegistryOptions) Validate() error
Click to show internal directories.
Click to hide internal directories.