discovery

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CONFIG_PREFIX = "config"
)
View Source
const (
	SERVICE_PREFIX = "naming"
)

Variables

This section is empty.

Functions

func DestroyService

func DestroyService(serviceName, HostName string) error

func GetModVal

func GetModVal(modVal uint64) uint64

func GetServerWithName

func GetServerWithName(serviceName string) string

func InitEtcd

func InitEtcd(rootPrefix string, endpoints, key, cert, ca string, events ...WatchEvent)

func KvGet

func KvGet(key string) string

func KvPut

func KvPut(key string, val string) error

func NewEtcdClient

func NewEtcdClient() *etcdClient

func RegisterServerName

func RegisterServerName(serviceName, HostName string, serviceAddr string) error

Types

type WatchEvent

type WatchEvent func(rootPrefix string, event mvccpb.Event_EventType, key, val string)

func ConfigEvent

func ConfigEvent() WatchEvent

func ServiceEvent

func ServiceEvent() WatchEvent

Jump to

Keyboard shortcuts

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