consul

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfig

func GetConfig() *api.Config

func IsRegister added in v0.1.6

func IsRegister(name string, protocol string, address string, port int) bool

func RegisterServer added in v0.1.0

func RegisterServer(name string, protocol string, address string, port int, check *api.AgentServiceCheck) (b bool, err error)

func SyncService added in v0.1.0

func SyncService(serviceName string)

同步服务信息

Types

type Service

type Service struct {
}

func (Service) Start

func (Service) Start(wg *sync.WaitGroup)

type ServiceNode

type ServiceNode struct {
	ServiceName string
	Address     string
	Port        string
	Status      string
	Protocol    string
}

func GetNode

func GetNode(serviceName string, protocol string) (node ServiceNode, err error)

type ServiceNodes

type ServiceNodes struct {
	// contains filtered or unexported fields
}

type Services

type Services struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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