util

package
v0.0.0-...-fac4fbb Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConsulClient *api.Client
View Source
var ORM *gorm.DB

Functions

This section is empty.

Types

type ConsulHandle

type ConsulHandle struct {
}

func (*ConsulHandle) Discovery

func (this *ConsulHandle) Discovery(service string) (insts []*balance.Instance)

发现服务

func (*ConsulHandle) Register

func (this *ConsulHandle) Register()

注册服务

type Response

type Response struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data"`
}

func (*Response) Failed

func (this *Response) Failed(code int, message string) interface{}

func (*Response) Json

func (this *Response) Json(response interface{}) string

func (*Response) Success

func (this *Response) Success(data interface{}) interface{}

Jump to

Keyboard shortcuts

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