webserver

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2022 License: BlueOak-1.0.0 Imports: 34 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonArguments

type CommonArguments struct {
	UserInfo *userInfo
	Title    string
}

CommonArguments are common page arguments that must be supplied to every page to populate the <title> and <header> elements.

type Config added in v0.4.0

type Config struct {
	Core          clientCore
	Addr          string
	CustomSiteDir string
	Language      string
	Logger        dex.Logger
	ReloadHTML    bool
	HttpProf      bool
}

type WebServer

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

WebServer is a single-client http and websocket server enabling a browser interface to the DEX client.

func New

func New(cfg *Config) (*WebServer, error)

New is the constructor for a new WebServer. customSiteDir can be left blank, in which case a handful of default locations will be checked. This will work in most cases.

func (*WebServer) Connect

func (s *WebServer) Connect(ctx context.Context) (*sync.WaitGroup, error)

Connect starts the web server. Satisfies the dex.Connector interface.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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