http

package
v3.0.19 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2021 License: BSD-2-Clause Imports: 14 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

NewStreamContext is unused presently as it's not so useful for HTTP

func (*Server) RegisterService

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

RegisterService currently accepts a path and a http.Handler object but in future should also be able to handle http.Transport handlers as well

func (*Server) SSL added in v3.0.9

func (this *Server) SSL() bool

func (*Server) ServeHTTP added in v3.0.14

func (this *Server) ServeHTTP(w http.ResponseWriter, req *http.Request)

func (*Server) Service added in v3.0.10

func (this *Server) Service() string

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 Transport added in v3.0.14

type Transport interface {
	http.Handler
	SetHandler(fn http.Handler)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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