client

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2023 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ApiUrl = "https://api.globalping.io/v1/measurements"

Functions

func DecodeTimings

func DecodeTimings(cmd string, timings json.RawMessage) (model.Timings, error)

func GetAPI

func GetAPI(id string) (model.GetMeasurement, error)

Get measurement from Globalping API

func GetApiJson

func GetApiJson(id string) (string, error)

func LiveView

func LiveView(id string, data model.GetMeasurement, ctx model.Context)

func OutputCI

func OutputCI(id string, data model.GetMeasurement, ctx model.Context)

func OutputJson

func OutputJson(id string)

If json flag is used, only output json

func OutputLatency

func OutputLatency(id string, data model.GetMeasurement, ctx model.Context)

If latency flag is used, only output latency values

func OutputResults

func OutputResults(id string, ctx model.Context)

func PostAPI

func PostAPI(measurement model.PostMeasurement) (model.PostResponse, bool, error)

Post measurement to Globalping API - boolean indicates whether to print CLI help on error

Types

This section is empty.

Jump to

Keyboard shortcuts

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