consul

package
v0.0.0-...-04961f1 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(conf Conf, listenOn string) error

Register 服务注册到consul (consul的作用:为了普罗米修斯能自动发现我们的服务)

Types

type Conf

type Conf struct {
	Host string
	Key  string            //注册的服务名
	Tags []string          `json:",optional"`
	Meta map[string]string `json:",optional"`
	TTL  int               `json:"ttl,optional"` //持续 check 的时间
}

Jump to

Keyboard shortcuts

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