scheduled

package
v0.0.0-...-796898b Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package scheduled 定时服务包

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckService

func CheckService(serviceID, serviceName, component string)

CheckService 检查可用负载服务列表

func ConsulEnroll

func ConsulEnroll(consulURL, serviceID, serviceName, hostname string, port int)

ConsulEnroll 定时调用此方法检查注册 consul 是否失效

consulUrl:consul 注册地址,包括端口号(优先通过环境变量 CONSUL_URL 获取)

serviceID:注册到 consul 的服务 ID

serviceName:注册到 consul 的服务名称(优先通过环境变量 SERVICE_NAME 获取)

hostname:注册到 consul 的服务地址(如果为空,则尝试通过 /etc/hostname 获取)

port:注册到 consul 的服务端口(优先通过环境变量 PORT 获取)

Types

This section is empty.

Jump to

Keyboard shortcuts

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