report

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHostName

func GetHostName(hostName string) string

GetHostName ...

func GetIP

func GetIP() string

GetIP ...

func Hostname

func Hostname() (string, error)

func IP

func IP() (string, error)

func ReturnHostName

func ReturnHostName() string

ReturnHostName ..

Types

type AgentReportRequest

type AgentReportRequest struct {
	Hostname     string `json:"hostname"`
	IP           string `json:"ip"`
	ProxyVersion string `json:"proxy_version"`
	RegionCode   string `json:"region_code"`
	RegionName   string `json:"region_name"`
	ZoneCode     string `json:"zone_code"`
	ZoneName     string `json:"zone_name"`
	Env          string `json:"env"`
	ProxyType    int    `json:"proxy_type"`
}

AgentReportRequest agent status

type ErrCode

type ErrCode int

ErrCode code

const (
	// ReportErr err code
	ReportErr ErrCode = 1
)

type HTTPReport

type HTTPReport struct {
	Config cfg.HeartBeat
	// contains filtered or unexported fields
}

HTTPReport httpReport struct

func NewHTTPReport

func NewHTTPReport(config cfg.HeartBeat) *HTTPReport

NewHTTPReport new httpReport

func (*HTTPReport) Report

func (r *HTTPReport) Report(info interface{}) ReporterResp

Report ...

type Report

type Report struct {
	Reporter
	// contains filtered or unexported fields
}

Report ...

func Build

func Build() *Report

Build new a instance

func (*Report) ReportAgentStatus

func (r *Report) ReportAgentStatus() error

ReportAgentStatus report agent status

type Reporter

type Reporter interface {
	Report(interface{}) ReporterResp
}

Reporter interface

type ReporterResp

type ReporterResp struct {
	Err  int
	Msg  string
	Data interface{}
}

ReporterResp ...

Jump to

Keyboard shortcuts

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