consul

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateAndRegisterConsulResolver

func GenerateAndRegisterConsulResolver(address string, serviceName string) (schema string, err error)

GenerateAndRegisterConsulResolver 生成

func NewConsulBuilder

func NewConsulBuilder(address string) resolver.Builder

NewConsulBuilder 创建consulbuilder

func NewConsulClientConn

func NewConsulClientConn() resolver.ClientConn

NewConsulClientConn 新连接

func NewConsulResolver

func NewConsulResolver(cc *resolver.ClientConn, cb *consulBuilder, opts resolver.BuildOptions) *consulResolver

NewConsulResolver 生成resolver

func Register

func Register(name string, host string, port int, target string, interval time.Duration, ttl int) error

Register is the helper function to self-register service into Etcd/Consul server name - service name host - service host port - service port target - consul dial address, for example: "127.0.0.1:8500" interval - interval of self-register to consul ttl - ttl of the register information

Types

This section is empty.

Jump to

Keyboard shortcuts

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