httpreqresp

package
v0.0.0-...-1f8a15b Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

package httpreqresp encapsulates eth2 beacon chain resp-resp into http

Index

Constants

View Source
const (
	ResponseCodeHeader = "Reqresp-Response-Code"
	PeerIdHeader       = "Reqresp-Peer-Id"
	TopicHeader        = "Reqresp-Topic"
)

Variables

This section is empty.

Functions

func Do

func Do(handler http.Handler, r *http.Request) (*http.Response, error)

Do performs an http request against the http handler. NOTE: this is actually very similar to the http.RoundTripper interface... maybe we should investigate using that.

the following headers have meaning when passed in to the request:

REQRESP-PEER-ID - the peer id to target for the request
REQRESP-TOPIC - the topic to request with
REQRESP-EXPECTED-CHUNKS - this is an integer, which will be multiplied by 10 to calculate the amount of seconds the peer has to respond with all the data

func NewRequestHandler

func NewRequestHandler(host host.Host) http.HandlerFunc

Handles a request

Types

This section is empty.

Jump to

Keyboard shortcuts

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