benchmark

package
v0.0.0-...-5667f9a Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

A Manager performs benchmarks and manages contracts

func New

func New(log *zap.Logger) *Manager

New creates a new benchmark manager.

func (*Manager) PingHost

func (m *Manager) PingHost(ctx context.Context, hostAddr string, hostKey types.PublicKey) PingResult

PingHost scans the host at the given address and returns simplified true/false values.

func (*Manager) ScanHost

func (m *Manager) ScanHost(ctx context.Context, hostAddr string, hostKey types.PublicKey) (Settings, error)

ScanHost scans the host at the given address and returns the settings.

type PingResult

type PingResult struct {
	RHPv2   bool    `json:"rhpv2"`
	RHPv3   bool    `json:"rhpv3"`
	PingRTT float64 `json:"ping"`
}

PingResult contains simplified true/false values.

type Settings

type Settings struct {
	Settings   rhp2.HostSettings   `json:"settings"`
	PriceTable rhp3.HostPriceTable `json:"priceTable"`
	PingRTT    float64             `json:"ping"`
}

Settings contains the settings scanned from a host.

Jump to

Keyboard shortcuts

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