register

package
v0.0.0-...-6f596e7 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2024 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Consul

type Consul struct {
	ID   string
	Name string
	Tags []string
	*api.Client
}

func (*Consul) All

func (c *Consul) All()

服务发现(所有)

func (*Consul) Deregister

func (c *Consul) Deregister()

服务注销

func (*Consul) Filter

func (c *Consul) Filter(name string) (host string, port int)

服务发现

func (*Consul) Register

func (c *Consul) Register(address string, port int, serviceType string) error

服务注册

type RegisterInterface

type RegisterInterface interface {
	Register(address string, port int, serviceType string) error
	All()
	Filter(name string) (host string, port int)
	Deregister()
}

func NewClient

func NewClient(name string, tags []string) RegisterInterface

Jump to

Keyboard shortcuts

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