consul

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Deregister

func Deregister()

Deregister 反注册

func Init

func Init(address string)

Init 初始化服务注册

func Register

func Register(config *RegisterConfig)

Register 注册到consul

Types

type RegisterConfig

type RegisterConfig struct {
	Name     string   // 服务显示名称
	Address  string   // IP地址
	Port     int      // 端口
	Tags     []string // 标签
	Interval int      // 健康检查时间间隔(单位秒)
}

RegisterConfig consul注册配置

Jump to

Keyboard shortcuts

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