Documentation ¶
Index ¶
- Constants
- type ZookeeperDiscoveryClient
- func (client *ZookeeperDiscoveryClient) CreateNode(path string, data []byte, flags int32) error
- func (client *ZookeeperDiscoveryClient) GetInstances(serviceId string) (instances []*SpringCloudDiscovery.ServiceInstance, err error)
- func (client *ZookeeperDiscoveryClient) GetServices() ([]string, error)
- func (client *ZookeeperDiscoveryClient) InitBean(context SpringCore.SpringContext) error
- func (client *ZookeeperDiscoveryClient) PrintNode(path string) error
- func (client *ZookeeperDiscoveryClient) WalkNode(path string) error
- type ZookeeperDiscoveryConfig
Constants ¶
View Source
const (
ZOOKEEPER_DISCOVERY_ROOT = "/discovery_service"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ZookeeperDiscoveryClient ¶
type ZookeeperDiscoveryClient struct { Config *ZookeeperDiscoveryConfig `autowire:""` Conn *zk.Conn AppId string // 当前应用程序的ID }
func (*ZookeeperDiscoveryClient) CreateNode ¶
func (client *ZookeeperDiscoveryClient) CreateNode(path string, data []byte, flags int32) error
func (*ZookeeperDiscoveryClient) GetInstances ¶
func (client *ZookeeperDiscoveryClient) GetInstances(serviceId string) (instances []*SpringCloudDiscovery.ServiceInstance, err error)
func (*ZookeeperDiscoveryClient) GetServices ¶
func (client *ZookeeperDiscoveryClient) GetServices() ([]string, error)
func (*ZookeeperDiscoveryClient) InitBean ¶
func (client *ZookeeperDiscoveryClient) InitBean(context SpringCore.SpringContext) error
func (*ZookeeperDiscoveryClient) PrintNode ¶
func (client *ZookeeperDiscoveryClient) PrintNode(path string) error
func (*ZookeeperDiscoveryClient) WalkNode ¶
func (client *ZookeeperDiscoveryClient) WalkNode(path string) error
type ZookeeperDiscoveryConfig ¶
type ZookeeperDiscoveryConfig struct { // 服务发现地址 Address string `value:"${zookeeper.address:=127.0.0.1:2181}"` AppName string `value:"${spring.application.name}"` }
zookeeper 服务发现配置
Click to show internal directories.
Click to hide internal directories.