consul

package
v0.9.11 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

* 集成consul组件,包含实例化consul客户端,服务发现,服务注册,服务注销,负载均衡等方法

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultConfig

func DefaultConfig() *consulapi.Config

DefaultConfig 默认配置

func Deregister

func Deregister(node service.Node) error

Deregister 注销服务

func Discover

func Discover(name string) (*service.Group, error)

Discover 服务发现

func InitClient

func InitClient(config *consulapi.Config) error

InitClient 初始化consul客户端

func Register

func Register(node service.Node) error

Register 注册服务

Types

This section is empty.

Jump to

Keyboard shortcuts

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