consoleserver

package
v1.14.7 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2020 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// Error is storagenode console web error type.
	Error = errs.Class("storagenode console web error")
)

Functions

func CommonContentType added in v0.33.2

func CommonContentType(ext string) (string, bool)

CommonContentType returns content-type for common extensions.

Types

type Config

type Config struct {
	Address   string `help:"server address of the api gateway and frontend app" default:"127.0.0.1:14002"`
	StaticDir string `help:"path to static resources" default:""`
}

Config contains configuration for storagenode console web server.

type Server

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

Server represents storagenode console web server.

architecture: Endpoint

func NewServer

func NewServer(logger *zap.Logger, assets http.FileSystem, notifications *notifications.Service, service *console.Service, payout *payout.Service, listener net.Listener) *Server

NewServer creates new instance of storagenode console web server.

func (*Server) Close

func (server *Server) Close() error

Close closes server and underlying listener.

func (*Server) Run

func (server *Server) Run(ctx context.Context) (err error)

Run starts the server that host webapp and api endpoints.

Jump to

Keyboard shortcuts

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