web

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2026 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Overview

Package web implements finance HTTP server.

Index

Constants

This section is empty.

Variables

View Source
var ErrServerRuns = errors.New("web server runs")

ErrServerRuns means the web server already runs (see [Server.Serve]).

Functions

This section is empty.

Types

type Server

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

Server is the finance server to serve the results page, plots, etc.

func (*Server) Addr

func (s *Server) Addr() string

Addr returns the address the server listens on.

func (*Server) Err

func (s *Server) Err() error

Err returns the error from http.Server.ListenAndServe if any.

func (*Server) ListenAndServe

func (s *Server) ListenAndServe(addr string) error

ListenAndServe starts HTTP server listening on the addr in a goroutine. It pickss up a random port of the address does not have have or set to 0.

It returns an error if it fails to bind to the address. Use Server.Err to check for server errors.

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context) error

Shutdown gracefully shuts down the server. It returns the error from http.Server.Shutdown.

Directories

Path Synopsis
Package queryparam provides API to access query parameters from URL.
Package queryparam provides API to access query parameters from URL.

Jump to

Keyboard shortcuts

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