lcd

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2019 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CLIVersionRequestHandler

func CLIVersionRequestHandler(w http.ResponseWriter, r *http.Request)

cli version REST handler endpoint

func NodeVersionRequestHandler

func NodeVersionRequestHandler(cliCtx context.CLIContext) http.HandlerFunc

connected node version REST handler endpoint

func ServeCommand

func ServeCommand(cdc *codec.Codec, registerRoutesFn func(*RestServer)) *cobra.Command

ServeCommand will start a Hashgard Lite REST service as a blocking process. It takes a codec to create a RestServer object and a function to register all necessary routes.

Types

type RestServer

type RestServer struct {
	Mux     *mux.Router
	CliCtx  context.CLIContext
	KeyBase keybase.Keybase
	Cdc     *codec.Codec
	// contains filtered or unexported fields
}

RestServer represents the Light Client Rest server

func NewRestServer

func NewRestServer(cdc *codec.Codec) *RestServer

NewRestServer creates a new rest server instance

func (*RestServer) Start

func (rs *RestServer) Start(listenAddr string, sslHosts string,
	certFile string, keyFile string, maxOpen int, insecure bool) (err error)

Start starts the rest server

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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