http_proxy

package
v0.0.0-...-79bde31 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Networks map[string]string // e.g. "ethereum.mainnet" -> "https://ethereum-rpc.publicnode.com"
}

func Load

func Load(b []byte) (*Config, error)

Load parses and validates the provided buffer b as a config file body and returns the Config.

func LoadFile

func LoadFile(f string) (*Config, error)

LoadFile loads, parses and validates the provided file and returns the Config.

func (*Config) Validate

func (c *Config) Validate() error

type Request

type Request struct {
	// Payload contains the proxied http request
	Payload []byte
}

Request is the type which is serialized into the cborplugin request payload.

type Response

type Response struct {
	// Payload contains the entire proxied http response or response chunk.
	Payload []byte

	// Error if not empty indicates an error condition.
	Error string
}

Response is the type which is serialized and sent as a response from the cborplugin.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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