http

package
v1.1.0-alpha.4 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

Handler processes API requests.

func NewHandler

func NewHandler(opts Options) (*Handler, error)

NewHandler returns a new Handler.

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP implements http.Handler.

type Options

type Options struct {
	Logger log.Logger
	Node   *p2p.Node
	Router routing.Router

	// For API v2
	Network *config.Describe
	MaxWait time.Duration
}

Options are the options for a Handler.

Jump to

Keyboard shortcuts

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