httpserver

package
v0.0.0-...-7378411 Latest Latest
Warning

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

Go to latest
Published: May 21, 2019 License: MIT Imports: 6 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 {
	Method  string
	Path    string
	Handler restful.RouteFunction // actually this should be http.HandlerFunc
}

type HttpServer

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

func NewServer

func NewServer(opt *option.Options) (*HttpServer, error)

func (*HttpServer) GetAddr

func (s *HttpServer) GetAddr() string

func (*HttpServer) GetPort

func (s *HttpServer) GetPort() uint

func (*HttpServer) ListenAndServe

func (s *HttpServer) ListenAndServe() error

func (*HttpServer) RegisterActions

func (s *HttpServer) RegisterActions(as ...Action)

type Server

type Server interface {
	ListenAndServe() error
	RegisterActions(as ...Action)
}

Jump to

Keyboard shortcuts

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