http

package
v3.0.6 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2020 License: BSD-2-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	gopi.Unit
	gopi.Logger
	sync.RWMutex
	sync.WaitGroup
	// contains filtered or unexported fields
}

func (*Server) Addr

func (this *Server) Addr() string

func (*Server) Define

func (this *Server) Define(cfg gopi.Config) error

func (*Server) Dispose

func (this *Server) Dispose() error

func (*Server) New

func (this *Server) New(cfg gopi.Config) error

func (*Server) NewStreamContext

func (this *Server) NewStreamContext() context.Context

func (*Server) RegisterService

func (this *Server) RegisterService(path interface{}, service gopi.Service) error

func (*Server) StartInBackground

func (this *Server) StartInBackground(network, addr string) error

Start serves HTTP in foreground. Network should always be "tcp" and address is either empty (using standard ports) or ":0" which means a free port is used and can be determined using the Addr method once the server has started.

func (*Server) Stop

func (this *Server) Stop(force bool) error

func (*Server) String

func (this *Server) String() string

type Static

type Static struct {
	gopi.Unit
	gopi.Server
}

func (*Static) ServeFolder

func (this *Static) ServeFolder(path, folder string) error

Register a service to serve static files to path from a folder

Jump to

Keyboard shortcuts

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