项目作者: cube-group

项目描述 :
Service Discovery Server
高级语言: Go
项目地址: git://github.com/cube-group/SDS.git
创建时间: 2018-01-20T08:53:33Z
项目社区:https://github.com/cube-group/SDS

开源协议:MIT License

下载


SDS

  • Service Discovery Server

  • SDS Framework

  • SDS Simple Register Data Stat

  • SDS config
    1. {
    2. "proxy": {
    3. "address": ":3333",
    4. "maxBytes": 10240
    5. },
    6. "register": {
    7. "address": ":12345",
    8. "secret": "asdfafdaafaf12132",
    9. "expire": 30,
    10. },
    11. "dis": {
    12. "type": "memory",
    13. "address": ""
    14. }
    15. }
  • proxy.address - 代理接口地址
  • proxy.maxBytes - 代理最大支持的字节数
  • register.address - 微服务注册接口
  • register.secret - 微服务注册秘钥(暂未启用)
  • register.expire - 微服务注册过期时间(单位:秒)
  • dis.type - memory(etcd和zookeeper暂未实现)目前仅支持单点注册和代理
  • dis.address - If dis.type is the address of zookeeper, etcd (temporarily not supported)

解决goole类库

  1. git clone https://github.com/golang/net.git $GOPATH/src/golang.org/net
  2. git clone https://github.com/golang/sys.git $GOPATH/src/golang.org/sys
  3. git clone https://github.com/golang/tools.git $GOPATH/src/golang.org/tools
  4. git clone https://github.com/golang/text.git $GOPATH/src/golang.org/x

运行

  1. $cd src/server && ./server

微服务注册

  1. $curl http://127.0.0.1:12345/register?name=ms&address=10.10.2.2:80

观察当前proxy代理情况

请求:http://127.0.0.1:12345/manager

微服务请求模式

  1. $curl http://127.0.0.1:3333/ms/controller/action?querystring