Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client stream client
func (*Client) ChangeAddress ¶
ChangeAddress 更换服务地址
type Endpoint ¶
type Endpoint struct {
Name string `json:"name"`
URL string `json:"url"`
Weight int `json:"weight"`
Mode int `json:"-"` //0 表示URL变化,1表示Weight变化 ,2表示全变化
}
Endpoint endpoint
type ResponseBody ¶
type ResponseBody struct {
ValidationError url.Values `json:"validation_error,omitempty"`
Msg string `json:"msg,omitempty"`
Bean interface{} `json:"bean,omitempty"`
List []*Endpoint `json:"list,omitempty"`
//数据集总数
ListAllNumber int `json:"number,omitempty"`
//当前页码数
Page int `json:"page,omitempty"`
}
ResponseBody api返回数据格式
func ParseResponseBody ¶
func ParseResponseBody(red io.ReadCloser) (re ResponseBody, err error)
ParseResponseBody 解析成ResponseBody
Click to show internal directories.
Click to hide internal directories.