livezk

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

README

livezk

直播 zookeeper 注册工具

usage
import (
    "go-common/conf"
    "go-common/business/warden/livezk"
)

func main() {
    config := &conf.Zookeeper{/*...*/}
    addr := ":5000" // grpc 监听的端口
    appID := "test.test" // app_id
    // 注册失败每隔1分钟会自动重试
    live.DoRegister(config, addr, appID)
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(config *lz.Zookeeper, addr string, discoveryID string) (context.CancelFunc, error)

Register self grpc service to live zookeeper

Types

This section is empty.

Jump to

Keyboard shortcuts

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