http

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2020 License: Apache-2.0, MIT Imports: 14 Imported by: 20

Documentation

Index

Constants

View Source
const HTTPHeartbeatInterval = 10 * time.Second

HTTPHeartbeatInterval is the duration between liveness heartbeats sent to an HTTP API.

Variables

This section is empty.

Functions

func ForURLs

func ForURLs(urls []string, chainHash []byte) []client.Client

ForURLs provides a shortcut for creating a set of HTTP clients for a set of URLs.

func New

func New(url string, chainHash []byte, transport nhttp.RoundTripper) (client.Client, error)

New creates a new client pointing to an HTTP endpoint

func NewWithInfo

func NewWithInfo(url string, info *chain.Info, transport nhttp.RoundTripper) (client.Client, error)

NewWithInfo constructs an http client when the group parameters are already known.

Types

type HealthMetrics

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

HealthMetrics is a measurement task around HTTP clients

func MeasureHeartbeats

func MeasureHeartbeats(ctx context.Context, c []client.Client) *HealthMetrics

MeasureHeartbeats periodically tracks latency observed on a set of HTTP clients

Jump to

Keyboard shortcuts

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