consul_discovery

package
v0.0.37 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GRPC = "GRPC"
	HTTP = "HTTP"
)
View Source
const (
	ConsulResolver = "consul"
)

Variables

This section is empty.

Functions

func InitConsulGRPCResolver

func InitConsulGRPCResolver()

Types

type ConsulRegister

type ConsulRegister struct {
	Address                        string
	ServerName                     string
	Tag                            []string
	Port                           int
	DeregisterCriticalServiceAfter time.Duration
	Interval                       time.Duration

	K8sHostName string
	ProductName string
	RunVersion  string
	// contains filtered or unexported fields
}

ConsulRegister consul service register

func NewConsulRegister

func NewConsulRegister(serverType, serverName, runVersion string) *ConsulRegister

NewConsulRegister create a new consul register

func (*ConsulRegister) Register

func (r *ConsulRegister) Register() error

Register register service

Jump to

Keyboard shortcuts

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