gateway

package
v1.0.0-alpha.8 Latest Latest
Warning

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

Go to latest
Published: May 14, 2020 License: GPL-3.0 Imports: 15 Imported by: 20

Documentation

Overview

Package gateway defines a gRPC gateway to serve HTTP-JSON traffic as a proxy and forward it to a beacon node's gRPC service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SwaggerServer

func SwaggerServer() http.HandlerFunc

SwaggerServer returns swagger specification files located under "/swagger/"

Types

type Gateway

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

Gateway is the gRPC gateway to serve HTTP JSON traffic as a proxy and forward it to the beacon-chain gRPC server.

func New

func New(
	ctx context.Context,
	remoteAddress,
	gatewayAddress string,
	mux *http.ServeMux,
	allowedOrigins []string,
	enableDebugRPCEndpoints bool,
	maxCallRecvMsgSize uint64,
) *Gateway

New returns a new gateway server which translates HTTP into gRPC. Accepts a context and optional http.ServeMux.

func (*Gateway) Start

func (g *Gateway) Start()

Start the gateway service. This serves the HTTP JSON traffic on the specified port.

func (*Gateway) Status

func (g *Gateway) Status() error

Status of grpc gateway. Returns an error if this service is unhealthy.

func (*Gateway) Stop

func (g *Gateway) Stop() error

Stop the gateway with a graceful shutdown.

Directories

Path Synopsis
Package main allows for creation of an HTTP-JSON to gRPC gateway as a binary go process.
Package main allows for creation of an HTTP-JSON to gRPC gateway as a binary go process.

Jump to

Keyboard shortcuts

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