http

package
v3.0.33 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2021 License: BSD-2-Clause Imports: 15 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) Flags added in v3.0.24

func (this *Server) Flags() gopi.ServiceFlag

func (*Server) Mux added in v3.0.30

func (this *Server) Mux() *http.ServeMux

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) 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 be empty or "unix" for FGCI or "tcp" otherwise, In the former case, the 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. In the case for fcgi it should be a filename so that a unix socket can be created for communication.

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
Package fcgi implements the FastCGI protocol.
Package fcgi implements the FastCGI protocol.

Jump to

Keyboard shortcuts

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