server

package
v1.119.0-rc Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Error is an error class for internal Multinode Dashboard http server error.
	Error = errs.Class("multinode console server")
)

Functions

This section is empty.

Types

type Config

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

Config contains configuration for Multinode Dashboard http server.

type Server

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

Server represents Multinode Dashboard http server.

architecture: Endpoint

func NewServer

func NewServer(log *zap.Logger, listener net.Listener, assets fs.FS, services Services) (*Server, error)

NewServer returns new instance of Multinode Dashboard http 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.

type Services added in v1.33.1

type Services struct {
	Nodes      *nodes.Service
	Payouts    *payouts.Service
	Operators  *operators.Service
	Storage    *storage.Service
	Bandwidth  *bandwidth.Service
	Reputation *reputation.Service
}

Services contains services utilized by multinode dashboard.

Jump to

Keyboard shortcuts

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