Back to

Package lcd

Latest Go to latest

The latest major version is .

Published: Jun 11, 2020 | License: Apache-2.0 | Module:


func ServeCommand

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

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

type RestServer

type RestServer struct {
	Mux     *mux.Router
	CliCtx  context.CLIContext
	KeyBase keybase.Keybase
	// 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, maxOpen int, readTimeout, writeTimeout uint) (err error)

Start starts the rest server

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier