consoleserver

package
v0.16.2 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2019 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Error = errs.Class("storagenode console web error")
)

Error is storagenode console web error type

Functions

This section is empty.

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 DashboardData added in v0.16.0

type DashboardData struct {
	Bandwidth          console.BandwidthInfo       `json:"bandwidth"`
	DiskSpace          console.DiskSpaceInfo       `json:"diskSpace"`
	WalletAddress      string                      `json:"walletAddress"`
	VersionInfo        version.Info                `json:"versionInfo"`
	IsLastVersion      bool                        `json:"isLastVersion"`
	Uptime             time.Duration               `json:"uptime"`
	NodeID             string                      `json:"nodeId"`
	Satellites         storj.NodeIDList            `json:"satellites"`
	UptimeCheck        nodestats.ReputationStats   `json:"uptimeCheck"`
	AuditCheck         nodestats.ReputationStats   `json:"auditCheck"`
	BandwidthChartData []console.BandwidthUsed     `json:"bandwidthChartData"`
	DiskSpaceChartData []nodestats.SpaceUsageStamp `json:"diskSpaceChartData"`
}

DashboardData stores all needed information about storagenode

type DashboardResponse added in v0.16.0

type DashboardResponse struct {
	Data  DashboardData `json:"data"`
	Error string        `json:"error,omitempty"`
}

DashboardResponse stores data and error message

type Server

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

Server represents storagenode console web server

func NewServer

func NewServer(logger *zap.Logger, config Config, service *console.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