Skip to content

vlorc/hprose-gateway-consul

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hprose

简体中文

License codebeat badge Go Report Card GoDoc Build Status Coverage Status

Hprose gateway consul service discovery based on golang

Features

  • lazy client
  • discovery
  • register

Installing

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

Quick Start

  • Service discovery
r := resolver.NewResolver(cli, ctx, "")
// print event 
go r.Watch("user" /*service name*/, watcher.NewPrintWatcher(fmt.Printf))
  • Service register
m := manager.NewManager(cli, context.Background(), "", 5 /*ttl*/)
s := manage.Register("user" /*service 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 consul

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages