Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
67 lines (44 sloc) 1.63 KB


 Maven Central  Javadocs  


ikasoa zk

概述

ikasoa利用zookeeper注册和更新服务.

开发运行环境要求

  • 要求java运行环境为java8

环境搭建

引用依赖包

Maven

pom.xml

    ......
    <dependency>
        <groupId>com.ikasoa</groupId>
        <artifactId>ikasoa-zk</artifactId>
        <version>0.1.1-BETA</version>
    </dependency>
    ......

Gradle

    compile group: 'com.ikasoa', name: 'ikasoa-zk', version: '0.1.1-BETA'

使用示例

服务端(服务注册)
    ......
    ThriftServerConfiguration thriftServerConfiguration = new ThriftServerConfiguration();
    thriftServerConfiguration.setServerAspect(new ZkServerAspect("xxx.xxx.xxx.xxx:2181", null));
    ......
客户端(服务发现)
    ......
    ThriftClientConfiguration thriftClientConfiguration = new ThriftClientConfiguration();
    thriftClientConfiguration.setServerCheck(new ZkServerCheck("xxx.xxx.xxx.xxx:2181", null));
    ......

License

ikasoa is free to use under MIT license.


larry7696@gmail.com  

You can’t perform that action at this time.