cmd

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2024 License: MPL-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// <version>|<index>|<time>|<id>|<command>
	HistoryItemVersion1 string = "1"
)
View Source
const PostMeasurementTypeHttp = "http"

Variables

View Source
var (
	ErrNoPreviousMeasurements = errors.New("no previous measurements found")
	ErrInvalidIndex           = errors.New("invalid index")
	ErrIndexOutOfRange        = errors.New("index out of range")
)
View Source
var (
	ErrReadHistory = errors.New("failed to read history")
)
View Source
var SESSION_PATH string

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Types

type MeasurementsBuffer added in v1.3.0

type MeasurementsBuffer struct {
	// contains filtered or unexported fields
}

func NewMeasurementsBuffer added in v1.3.0

func NewMeasurementsBuffer(capacity int) *MeasurementsBuffer

func (*MeasurementsBuffer) Append added in v1.3.0

func (b *MeasurementsBuffer) Append(hm *view.HistoryItem)

func (*MeasurementsBuffer) CanAppend added in v1.3.0

func (b *MeasurementsBuffer) CanAppend() bool

func (*MeasurementsBuffer) Len added in v1.3.0

func (b *MeasurementsBuffer) Len() int

func (*MeasurementsBuffer) Next added in v1.3.0

func (b *MeasurementsBuffer) Next() *view.HistoryItem

func (*MeasurementsBuffer) Remove added in v1.3.0

func (b *MeasurementsBuffer) Remove(el *view.HistoryItem)

func (*MeasurementsBuffer) Restart added in v1.3.0

func (b *MeasurementsBuffer) Restart()

type Root added in v1.2.1

type Root struct {
	Cmd *cobra.Command
	// contains filtered or unexported fields
}

func NewRoot added in v1.2.1

func NewRoot(
	printer *view.Printer,
	ctx *view.Context,
	viewer view.Viewer,
	time utils.Time,
	globalpingClient globalping.Client,
	globalpingProbe probe.Probe,
) *Root

func (*Root) GetHistory added in v1.3.0

func (r *Root) GetHistory(limit int) ([]string, error)

func (*Root) RunDNS added in v1.2.1

func (r *Root) RunDNS(cmd *cobra.Command, args []string) error

func (*Root) RunHTTP added in v1.2.1

func (r *Root) RunHTTP(cmd *cobra.Command, args []string) error

func (*Root) RunHistory added in v1.3.0

func (r *Root) RunHistory(cmd *cobra.Command, args []string)

func (*Root) RunInstallProbe added in v1.2.1

func (r *Root) RunInstallProbe(cmd *cobra.Command, args []string)

func (*Root) RunMTR added in v1.2.1

func (r *Root) RunMTR(cmd *cobra.Command, args []string) error

func (*Root) RunPing added in v1.2.1

func (r *Root) RunPing(cmd *cobra.Command, args []string) error

func (*Root) RunTraceroute added in v1.2.1

func (r *Root) RunTraceroute(cmd *cobra.Command, args []string) error

func (*Root) RunVersion added in v1.2.1

func (r *Root) RunVersion(cmd *cobra.Command, args []string)

func (*Root) UpdateHistory added in v1.3.0

func (r *Root) UpdateHistory() error

type TargetQuery added in v1.2.1

type TargetQuery struct {
	Target   string
	From     string
	Resolver string
}

type UrlData added in v0.4.0

type UrlData struct {
	Protocol string
	Path     string
	Query    string
	Host     string
	Port     int
}

Jump to

Keyboard shortcuts

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