serviceregistry

package module
v0.0.0-...-9680884 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 23, 2014 License: MIT Imports: 5 Imported by: 0

README

go-serviceregistry

Go ZooKeeper service registry.

GoDoc

Install

go get github.com/koofr/go-serviceregistry

Example

go get github.com/koofr/go-zkutils/zkserver
ZKROOT=/opt/zookeeper-3.4.6 zkserver

go get github.com/koofr/go-serviceregistry/zkregistryclient

zkregistryclient register myservice http localhost:8000
zkregistryclient get myservice http

Testing

go get -t
ZKROOT=/opt/zookeeper-3.4.6 go test

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ZK_PERM = zk.WorldACL(zk.PERM_ALL)

Functions

This section is empty.

Types

type Registry

type Registry interface {
	Register(service string, protocol string, server string) error
	Get(service string, protocol string) ([]string, error)
	Close() error
}

type ZkRegistry

type ZkRegistry struct {
	// contains filtered or unexported fields
}

func NewZkRegistry

func NewZkRegistry(zkServers string) (r *ZkRegistry, err error)

func (*ZkRegistry) Close

func (r *ZkRegistry) Close() error

func (*ZkRegistry) Get

func (r *ZkRegistry) Get(service string, protocol string) (servers []string, err error)

func (*ZkRegistry) Register

func (r *ZkRegistry) Register(service string, protocol string, server string) (err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL