relay

package
v0.0.0-...-e0ea44e Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2019 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Api is the public endpoint used to send stats from nodes to this server
	Api string = "/api"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeRelay

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

NodeRelay contains the secret used to authenticate the communication between the Ethereum node and this server

func New

func New(service *service.Channel, secret string) *NodeRelay

New creates a new NodeRelay struct with required fields

func (*NodeRelay) Close

func (n *NodeRelay) Close()

Close closes the connection between this server and all Ethereum nodes connected to it

func (*NodeRelay) HandleRequest

func (n *NodeRelay) HandleRequest(w http.ResponseWriter, r *http.Request)

HandleRequest is the function to handle all server requests that came from Ethereum nodes

Jump to

Keyboard shortcuts

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