register

package
v0.0.0-...-5870b03 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

// register service cr := register.NewConsulRegister(fmt.Sprintf("%s:%d", host, consul_port), 15)

cr.Register(common.RegisterInfo{
	Host:           host,
	Port:           port,
	ServerName:     "HelloService",
	UpdateInterval: time.Second})

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConsulRegister

func NewConsulRegister(target []string, ttl int) common.Register

Types

type ConsulRegister

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

func (*ConsulRegister) Register

func (cr *ConsulRegister) Register(info common.RegisterInfo) (err error)

func (*ConsulRegister) UnRegister

func (cr *ConsulRegister) UnRegister() (err error)

Jump to

Keyboard shortcuts

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