httpserver

package
v1.19.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Verb    string               // Verb identifying the action ("GET", "POST", "WATCH", PROXY", etc).
	Path    string               // The path of the action
	Params  []*restful.Parameter // List of parameters associated with the action.
	Handler restful.RouteFunction
}

Action restful action struct

func NewAction

func NewAction(verb, path string, params []*restful.Parameter, handler restful.RouteFunction) *Action

type HttpServer

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

HttpServer is data struct of http server

func NewHttpServer

func NewHttpServer(port uint, addr, sock string) *HttpServer

func (*HttpServer) GetRouter

func (s *HttpServer) GetRouter() *mux.Router

func (*HttpServer) GetWebContainer

func (s *HttpServer) GetWebContainer() *restful.Container

func (*HttpServer) ListenAndServe

func (s *HttpServer) ListenAndServe() error

func (*HttpServer) ListenAndServeMux

func (s *HttpServer) ListenAndServeMux(verifyClientTLS bool) error

func (*HttpServer) NewWebService

func (s *HttpServer) NewWebService(rootPath string, filter restful.FilterFunction) *restful.WebService

func (*HttpServer) RegisterActions

func (s *HttpServer) RegisterActions(ws *restful.WebService, actions []*Action)

func (*HttpServer) RegisterWebServer

func (s *HttpServer) RegisterWebServer(rootPath string, filter restful.FilterFunction, actions []*Action) error

func (*HttpServer) Serve

func (s *HttpServer) Serve(l net.Listener) error

func (*HttpServer) SetInsecureServer

func (s *HttpServer) SetInsecureServer(insecureAddr string, insecurePort uint)

func (*HttpServer) SetSsl

func (s *HttpServer) SetSsl(cafile, certfile, keyfile, certPasswd string)

Jump to

Keyboard shortcuts

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