github.com/XiaoMi/Gaea@v1.2.5/models/proxy_monitor_metric.go (about)

     1  // Copyright 2019 The Gaea Authors. All Rights Reserved.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  package models
    16  
    17  // ProxyMonitorMetric proxy register information
    18  type ProxyMonitorMetric struct {
    19  	Token     string `json:"token"` //目前同AdminAddr
    20  	StartTime string `json:"start_time"`
    21  
    22  	IP        string `json:"ip"`
    23  	AdminPort string `json:"admin_port"`
    24  	ProxyPort string `json:"proxy_port"`
    25  
    26  	Pid int    `json:"pid"`
    27  	Pwd string `json:"pwd"`
    28  	Sys string `json:"sys"`
    29  }
    30  
    31  // Encode encode jsosn
    32  func (p *ProxyMonitorMetric) Encode() []byte {
    33  	return JSONEncode(p)
    34  }