service

package
v0.0.0-...-0388399 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2020 License: GPL-3.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	ID         string            `json:"id"`          // 服务唯一ID
	Name       string            `json:"name"`        // 服务名称
	Version    string            `json:"version"`     // 版本
	Host       string            `json:"host"`        // 服务地址
	PProf      string            `json:"pprof"`       // pprof地址
	Metrics    string            `json:"metrics"`     // prometheus指标曝露地址
	Metadata   map[string]string `json:"metadata"`    // 扩展信息
	CreateTime string            `json:"create_time"` // 服务注册时间
}

Service 服务注册信息

func NewService

func NewService() *Service

NewService 创建Service对象

func (*Service) GetRealIP

func (c *Service) GetRealIP() error

GetRealIP 获取Host、Metrics、PProf的真实IP

Jump to

Keyboard shortcuts

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