Skip to content

vlorc/hprose-gateway-etcd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hprose

简体中文

License codebeat badge Go Report Card GoDoc Build Status Coverage Status

Hprose gateway etcd service discovery based on golang

Features

  • lazy client
  • discovery
  • register

Installing

go get github.com/vlorc/hprose-gateway-etcd

Quick Start

  • Service discovery
r := resolver.NewResolver(cli, ctx, "rpc" /*prefix*/)
// print event 
go r.Watch("*", watcher.NewPrintWatcher(fmt.Printf))
  • Service register
m := manager.NewManager(cli, context.Background(), "rpc" /*prefix*/, 5 /*ttl*/)
s := manage.Register("user" /*name*/, "1" /*uuid*/)
s.Update(&types.Service{
	Id:       "1",
	Name:     "user",
	Url:      "http://localhost:8080",
})

License

This project is under the apache License. See the LICENSE file for the full license text.

About

Hprose gateway etcd

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages