Documentation
¶
Index ¶
- func RunTUI(client *Client) error
- type Client
- func (c *Client) GetIPv4() (string, error)
- func (c *Client) GetIPv6() (string, error)
- func (c *Client) GetISP() (*ISPInfo, error)
- func (c *Client) GetProbes() (*ProbesResponse, error)
- func (c *Client) GetRegion() (string, error)
- func (c *Client) GetServerTime() (string, error)
- func (c *Client) RunSpeedTest(ctx context.Context, progress ProgressFunc) (*SpeedResult, error)
- type Config
- type FullInfo
- type IPResponse
- type ISPInfo
- type Probe
- type ProbesResponse
- type ProgressFunc
- type ProgressReport
- type RegionInfo
- type SpeedResult
- type UploadProbeGroup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetProbes ¶
func (c *Client) GetProbes() (*ProbesResponse, error)
func (*Client) GetServerTime ¶
func (*Client) RunSpeedTest ¶
func (c *Client) RunSpeedTest(ctx context.Context, progress ProgressFunc) (*SpeedResult, error)
type IPResponse ¶
type IPResponse struct {
IP string `json:"ip"`
}
type ProbesResponse ¶
type ProbesResponse struct {
MID string `json:"mid"`
LID []string `json:"lid"`
Latency struct {
Probes []Probe `json:"probes"`
} `json:"latency"`
Download struct {
Probes []Probe `json:"probes"`
} `json:"download"`
Upload struct {
Warmup struct {
Duration int `json:"duration"`
Probes []struct {
URLs []string `json:"urls"`
Size int `json:"size"`
Count int `json:"count"`
} `json:"probes"`
} `json:"warmup"`
Probes []struct {
Size int `json:"size"`
URL string `json:"url"`
} `json:"probes"`
} `json:"upload"`
}
type ProgressFunc ¶
type ProgressFunc func(ProgressReport)
type ProgressReport ¶
type RegionInfo ¶
type RegionInfo struct {
Name string `json:"name"`
}
type SpeedResult ¶
Click to show internal directories.
Click to hide internal directories.