api

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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer(bench Benchmark, log *zap.Logger) http.Handler

NewServer initializes the API

Types

type Benchmark

type Benchmark interface {
	ScanHost(ctx context.Context, hostAddr string, hostKey types.PublicKey) (benchmark.Settings, error)
	PingHost(ctx context.Context, hostAddr string, hostKey types.PublicKey) benchmark.PingResult
}

A Benchmark benchmarks hosts and manages contracts

type ScanRequest

type ScanRequest struct {
	Address string          `json:"address"`
	HostKey types.PublicKey `json:"hostKey"`
}

A ScanRequest scans a host's settings and price table

Jump to

Keyboard shortcuts

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