discovery

package
v0.0.0-...-02b4230 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

*

*
* @author liangjf
* @create on 2020/5/28
* @version 1.0

*

*
* @author liangjf
* @create on 2020/5/28
* @version 1.0

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEtcdBuilder

func NewEtcdBuilder(endpoints []string, service string) resolver.Builder

Types

type IRegister

type IRegister interface {
	//服务注册
	Register(context.Context, ServiceDesc) error
	//服务下线
	UnRegister(context.Context, ServiceDesc) error
}

IRegister 服务注册和下线接口

func NewRegister

func NewRegister(addrs []string, dialTimeout time.Duration) IRegister

type ServiceDesc

type ServiceDesc struct {
	//服务名称
	ServiceName string
	//ip地址
	Host string
	//端口
	Port int
	//心跳间隔 秒
	TTL time.Duration
}

ServiceDesc 服务描述信息

Jump to

Keyboard shortcuts

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